From 87fa38182edc61e4a2322636dfef39c4f8cc7a93 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez <Berkeley@robotie.com>
Date: Tue, 10 Nov 2015 18:27:58 -0800
Subject: [PATCH] bundle vendor files

---
 bower.json                                         |     6 +-
 client/commonFramework.js                          |     8 +-
 gulpfile.js                                        |    74 +-
 package.json                                       |     7 +
 public/js/lib/bootstrap.min.js                     |     6 -
 public/js/lib/chai/chai-jquery.js                  |   231 -
 public/js/lib/chai/chai.js                         |  4800 ---
 public/js/lib/codemirror-accessible/.gitignore     |     1 -
 public/js/lib/codemirror-accessible/README.md      |     3 -
 public/js/lib/codemirror-accessible/accessible.js  |    80 -
 .../codemirror-accessible/codemirror-accessible.js |  5828 ---
 .../codemirror-accessible2.js                      |  5848 ---
 .../codemirror-accessible/codemirror-original.js   |  5799 ---
 public/js/lib/codemirror-accessible/codemirror.css |   258 -
 public/js/lib/codemirror-accessible/index.html     |  9941 -----
 public/js/lib/codemirror-accessible/javascript.js  |   482 -
 public/js/lib/codemirror-accessible/stress.html    |   749 -
 public/js/lib/codemirror/.gitattributes            |     8 -
 public/js/lib/codemirror/.gitignore                |     8 -
 public/js/lib/codemirror/.travis.yml               |     3 -
 public/js/lib/codemirror/AUTHORS                   |   423 -
 public/js/lib/codemirror/CONTRIBUTING.md           |    76 -
 public/js/lib/codemirror/LICENSE                   |    19 -
 public/js/lib/codemirror/README.md                 |    11 -
 public/js/lib/codemirror/addon/comment/comment.js  |   183 -
 .../codemirror/addon/comment/continuecomment.js    |    85 -
 public/js/lib/codemirror/addon/dialog/dialog.css   |    32 -
 public/js/lib/codemirror/addon/dialog/dialog.js    |   155 -
 .../js/lib/codemirror/addon/display/fullscreen.css |     6 -
 .../js/lib/codemirror/addon/display/fullscreen.js  |    41 -
 public/js/lib/codemirror/addon/display/panel.js    |    94 -
 .../js/lib/codemirror/addon/display/placeholder.js |    58 -
 public/js/lib/codemirror/addon/display/rulers.js   |    64 -
 .../js/lib/codemirror/addon/edit/closebrackets.js  |   159 -
 public/js/lib/codemirror/addon/edit/closetag.js    |   159 -
 .../js/lib/codemirror/addon/edit/continuelist.js   |    51 -
 .../js/lib/codemirror/addon/edit/matchbrackets.js  |   120 -
 public/js/lib/codemirror/addon/edit/matchtags.js   |    66 -
 .../js/lib/codemirror/addon/edit/trailingspace.js  |    27 -
 public/js/lib/codemirror/addon/emmet/emmet.js      | 43080 -------------------
 public/js/lib/codemirror/addon/fold/brace-fold.js  |   105 -
 .../js/lib/codemirror/addon/fold/comment-fold.js   |    57 -
 public/js/lib/codemirror/addon/fold/foldcode.js    |   145 -
 public/js/lib/codemirror/addon/fold/foldgutter.css |    20 -
 public/js/lib/codemirror/addon/fold/foldgutter.js  |   134 -
 public/js/lib/codemirror/addon/fold/indent-fold.js |    44 -
 .../js/lib/codemirror/addon/fold/markdown-fold.js  |    49 -
 public/js/lib/codemirror/addon/fold/xml-fold.js    |   182 -
 .../js/lib/codemirror/addon/hint/anyword-hint.js   |    41 -
 public/js/lib/codemirror/addon/hint/css-hint.js    |    56 -
 public/js/lib/codemirror/addon/hint/html-hint.js   |   348 -
 .../lib/codemirror/addon/hint/javascript-hint.js   |   146 -
 public/js/lib/codemirror/addon/hint/show-hint.css  |    38 -
 public/js/lib/codemirror/addon/hint/show-hint.js   |   389 -
 public/js/lib/codemirror/addon/hint/sql-hint.js    |   197 -
 public/js/lib/codemirror/addon/hint/xml-hint.js    |   110 -
 .../lib/codemirror/addon/lint/coffeescript-lint.js |    41 -
 public/js/lib/codemirror/addon/lint/css-lint.js    |    35 -
 .../lib/codemirror/addon/lint/javascript-lint.js   |   136 -
 public/js/lib/codemirror/addon/lint/json-lint.js   |    31 -
 public/js/lib/codemirror/addon/lint/lint.css       |    73 -
 public/js/lib/codemirror/addon/lint/lint.js        |   204 -
 public/js/lib/codemirror/addon/lint/yaml-lint.js   |    28 -
 public/js/lib/codemirror/addon/merge/merge.css     |   112 -
 public/js/lib/codemirror/addon/merge/merge.js      |   643 -
 public/js/lib/codemirror/addon/mode/loadmode.js    |    64 -
 public/js/lib/codemirror/addon/mode/multiplex.js   |   118 -
 .../js/lib/codemirror/addon/mode/multiplex_test.js |    33 -
 public/js/lib/codemirror/addon/mode/overlay.js     |    85 -
 public/js/lib/codemirror/addon/mode/simple.js      |   213 -
 public/js/lib/codemirror/addon/runmode/colorize.js |    40 -
 .../codemirror/addon/runmode/runmode-standalone.js |   157 -
 public/js/lib/codemirror/addon/runmode/runmode.js  |    72 -
 .../lib/codemirror/addon/runmode/runmode.node.js   |   120 -
 .../codemirror/addon/scroll/annotatescrollbar.js   |    76 -
 .../lib/codemirror/addon/scroll/scrollpastend.js   |    46 -
 .../codemirror/addon/scroll/simplescrollbars.css   |    66 -
 .../codemirror/addon/scroll/simplescrollbars.js    |   139 -
 .../codemirror/addon/search/match-highlighter.js   |   128 -
 .../codemirror/addon/search/matchesonscrollbar.css |     8 -
 .../codemirror/addon/search/matchesonscrollbar.js  |    90 -
 public/js/lib/codemirror/addon/search/search.js    |   164 -
 .../js/lib/codemirror/addon/search/searchcursor.js |   189 -
 .../lib/codemirror/addon/selection/active-line.js  |    71 -
 .../codemirror/addon/selection/mark-selection.js   |   118 -
 public/js/lib/codemirror/addon/tern/tern.css       |    86 -
 public/js/lib/codemirror/addon/tern/tern.js        |   670 -
 public/js/lib/codemirror/addon/tern/worker.js      |    44 -
 public/js/lib/codemirror/addon/wrap/hardwrap.js    |   139 -
 public/js/lib/codemirror/bin/authors.sh            |     6 -
 public/js/lib/codemirror/bin/compress              |    92 -
 public/js/lib/codemirror/bin/lint                  |    16 -
 public/js/lib/codemirror/bin/release               |    46 -
 public/js/lib/codemirror/bin/source-highlight      |    51 -
 public/js/lib/codemirror/bower.json                |    16 -
 public/js/lib/codemirror/index.html                |   200 -
 public/js/lib/codemirror/keymap/emacs.js           |   411 -
 public/js/lib/codemirror/keymap/sublime.js         |   540 -
 public/js/lib/codemirror/keymap/vim.js             |  4901 ---
 public/js/lib/codemirror/lib/codemirror.css        |   311 -
 public/js/lib/codemirror/lib/codemirror.js         |  8029 ----
 public/js/lib/codemirror/mode/css/css.js           |   717 -
 public/js/lib/codemirror/mode/css/index.html       |    75 -
 public/js/lib/codemirror/mode/css/less.html        |   152 -
 public/js/lib/codemirror/mode/css/less_test.js     |    51 -
 public/js/lib/codemirror/mode/css/scss.html        |   157 -
 public/js/lib/codemirror/mode/css/scss_test.js     |   110 -
 public/js/lib/codemirror/mode/css/test.js          |   135 -
 .../codemirror/mode/htmlembedded/htmlembedded.js   |    86 -
 .../js/lib/codemirror/mode/htmlembedded/index.html |    58 -
 .../js/lib/codemirror/mode/htmlmixed/htmlmixed.js  |   121 -
 public/js/lib/codemirror/mode/htmlmixed/index.html |    85 -
 public/js/lib/codemirror/mode/jade/index.html      |    70 -
 public/js/lib/codemirror/mode/jade/jade.js         |   590 -
 .../js/lib/codemirror/mode/javascript/index.html   |   114 -
 .../lib/codemirror/mode/javascript/javascript.js   |   686 -
 .../js/lib/codemirror/mode/javascript/json-ld.html |    72 -
 public/js/lib/codemirror/mode/javascript/test.js   |   200 -
 .../lib/codemirror/mode/javascript/typescript.html |    61 -
 public/js/lib/codemirror/mode/markdown/index.html  |   359 -
 public/js/lib/codemirror/mode/markdown/markdown.js |   765 -
 public/js/lib/codemirror/mode/markdown/test.js     |   754 -
 public/js/lib/codemirror/mode/meta.js              |   165 -
 public/js/lib/codemirror/mode/xml/index.html       |    57 -
 public/js/lib/codemirror/mode/xml/test.js          |    51 -
 public/js/lib/codemirror/mode/xml/xml.js           |   384 -
 public/js/lib/codemirror/mode/yaml/index.html      |    80 -
 public/js/lib/codemirror/mode/yaml/yaml.js         |   117 -
 public/js/lib/codemirror/package.json              |    20 -
 public/js/lib/codemirror/test/comment_test.js      |   100 -
 public/js/lib/codemirror/test/doc_test.js          |   371 -
 public/js/lib/codemirror/test/driver.js            |   138 -
 public/js/lib/codemirror/test/emacs_test.js        |   141 -
 public/js/lib/codemirror/test/index.html           |   236 -
 public/js/lib/codemirror/test/lint/acorn.js        |  1782 -
 public/js/lib/codemirror/test/lint/lint.js         |   166 -
 public/js/lib/codemirror/test/lint/walk.js         |   313 -
 public/js/lib/codemirror/test/mode_test.css        |    23 -
 public/js/lib/codemirror/test/mode_test.js         |   192 -
 public/js/lib/codemirror/test/multi_test.js        |   285 -
 public/js/lib/codemirror/test/phantom_driver.js    |    31 -
 public/js/lib/codemirror/test/run.js               |    38 -
 public/js/lib/codemirror/test/scroll_test.js       |   105 -
 public/js/lib/codemirror/test/search_test.js       |    62 -
 public/js/lib/codemirror/test/sublime_test.js      |   303 -
 public/js/lib/codemirror/test/test.js              |  2101 -
 public/js/lib/codemirror/test/vim_test.js          |  3768 --
 public/js/lib/codemirror/theme/3024-day.css        |    38 -
 public/js/lib/codemirror/theme/3024-night.css      |    37 -
 public/js/lib/codemirror/theme/ambiance-mobile.css |     5 -
 public/js/lib/codemirror/theme/ambiance.css        |    77 -
 public/js/lib/codemirror/theme/base16-dark.css     |    36 -
 public/js/lib/codemirror/theme/base16-light.css    |    36 -
 public/js/lib/codemirror/theme/blackboard.css      |    30 -
 public/js/lib/codemirror/theme/cobalt.css          |    23 -
 public/js/lib/codemirror/theme/eclipse.css         |    23 -
 public/js/lib/codemirror/theme/elegant.css         |    13 -
 public/js/lib/codemirror/theme/erlang-dark.css     |    32 -
 public/js/lib/codemirror/theme/lesser-dark.css     |    45 -
 public/js/lib/codemirror/theme/mbo.css             |    35 -
 public/js/lib/codemirror/theme/mdn-like.css        |    44 -
 public/js/lib/codemirror/theme/midnight.css        |    45 -
 public/js/lib/codemirror/theme/monokai.css         |    31 -
 public/js/lib/codemirror/theme/neat.css            |    12 -
 public/js/lib/codemirror/theme/neo.css             |    43 -
 public/js/lib/codemirror/theme/night.css           |    26 -
 public/js/lib/codemirror/theme/paraiso-dark.css    |    36 -
 public/js/lib/codemirror/theme/paraiso-light.css   |    36 -
 public/js/lib/codemirror/theme/pastel-on-dark.css  |    50 -
 public/js/lib/codemirror/theme/rubyblue.css        |    23 -
 public/js/lib/codemirror/theme/solarized.css       |   165 -
 public/js/lib/codemirror/theme/the-matrix.css      |    28 -
 .../lib/codemirror/theme/tomorrow-night-bright.css |    35 -
 .../codemirror/theme/tomorrow-night-eighties.css   |    36 -
 public/js/lib/codemirror/theme/twilight.css        |    30 -
 public/js/lib/codemirror/theme/vibrant-ink.css     |    32 -
 public/js/lib/codemirror/theme/xq-dark.css         |    51 -
 public/js/lib/codemirror/theme/xq-light.css        |    43 -
 public/js/lib/codemirror/theme/zenburn.css         |    37 -
 public/js/lib/jquery-2.1.1.min.js                  |     4 -
 public/js/lib/ramda/ramda.js                       |     4 -
 public/js/lib/ramda/ramda.min.js                   |     6 -
 server/views/coursewares/showBonfire.jade          |    10 -
 server/views/coursewares/showHTML.jade             |    14 -
 server/views/coursewares/showJS.jade               |     9 -
 server/views/coursewares/showStep.jade             |     2 +-
 .../views/coursewares/showZiplineOrBasejump.jade   |     2 -
 server/views/partials/challenge-footer.jade        |     2 +
 server/views/partials/scripts.jade                 |    29 +-
 189 files changed, 91 insertions(+), 117639 deletions(-)
 delete mode 100644 public/js/lib/bootstrap.min.js
 delete mode 100644 public/js/lib/chai/chai-jquery.js
 delete mode 100644 public/js/lib/chai/chai.js
 delete mode 100755 public/js/lib/codemirror-accessible/.gitignore
 delete mode 100755 public/js/lib/codemirror-accessible/README.md
 delete mode 100755 public/js/lib/codemirror-accessible/accessible.js
 delete mode 100755 public/js/lib/codemirror-accessible/codemirror-accessible.js
 delete mode 100755 public/js/lib/codemirror-accessible/codemirror-accessible2.js
 delete mode 100755 public/js/lib/codemirror-accessible/codemirror-original.js
 delete mode 100755 public/js/lib/codemirror-accessible/codemirror.css
 delete mode 100755 public/js/lib/codemirror-accessible/index.html
 delete mode 100755 public/js/lib/codemirror-accessible/javascript.js
 delete mode 100755 public/js/lib/codemirror-accessible/stress.html
 delete mode 100644 public/js/lib/codemirror/.gitattributes
 delete mode 100644 public/js/lib/codemirror/.gitignore
 delete mode 100644 public/js/lib/codemirror/.travis.yml
 delete mode 100644 public/js/lib/codemirror/AUTHORS
 delete mode 100644 public/js/lib/codemirror/CONTRIBUTING.md
 delete mode 100644 public/js/lib/codemirror/LICENSE
 delete mode 100644 public/js/lib/codemirror/README.md
 delete mode 100644 public/js/lib/codemirror/addon/comment/comment.js
 delete mode 100644 public/js/lib/codemirror/addon/comment/continuecomment.js
 delete mode 100644 public/js/lib/codemirror/addon/dialog/dialog.css
 delete mode 100644 public/js/lib/codemirror/addon/dialog/dialog.js
 delete mode 100644 public/js/lib/codemirror/addon/display/fullscreen.css
 delete mode 100644 public/js/lib/codemirror/addon/display/fullscreen.js
 delete mode 100644 public/js/lib/codemirror/addon/display/panel.js
 delete mode 100644 public/js/lib/codemirror/addon/display/placeholder.js
 delete mode 100644 public/js/lib/codemirror/addon/display/rulers.js
 delete mode 100644 public/js/lib/codemirror/addon/edit/closebrackets.js
 delete mode 100644 public/js/lib/codemirror/addon/edit/closetag.js
 delete mode 100644 public/js/lib/codemirror/addon/edit/continuelist.js
 delete mode 100644 public/js/lib/codemirror/addon/edit/matchbrackets.js
 delete mode 100644 public/js/lib/codemirror/addon/edit/matchtags.js
 delete mode 100644 public/js/lib/codemirror/addon/edit/trailingspace.js
 delete mode 100644 public/js/lib/codemirror/addon/emmet/emmet.js
 delete mode 100644 public/js/lib/codemirror/addon/fold/brace-fold.js
 delete mode 100644 public/js/lib/codemirror/addon/fold/comment-fold.js
 delete mode 100644 public/js/lib/codemirror/addon/fold/foldcode.js
 delete mode 100644 public/js/lib/codemirror/addon/fold/foldgutter.css
 delete mode 100644 public/js/lib/codemirror/addon/fold/foldgutter.js
 delete mode 100644 public/js/lib/codemirror/addon/fold/indent-fold.js
 delete mode 100644 public/js/lib/codemirror/addon/fold/markdown-fold.js
 delete mode 100644 public/js/lib/codemirror/addon/fold/xml-fold.js
 delete mode 100644 public/js/lib/codemirror/addon/hint/anyword-hint.js
 delete mode 100644 public/js/lib/codemirror/addon/hint/css-hint.js
 delete mode 100644 public/js/lib/codemirror/addon/hint/html-hint.js
 delete mode 100644 public/js/lib/codemirror/addon/hint/javascript-hint.js
 delete mode 100644 public/js/lib/codemirror/addon/hint/show-hint.css
 delete mode 100644 public/js/lib/codemirror/addon/hint/show-hint.js
 delete mode 100644 public/js/lib/codemirror/addon/hint/sql-hint.js
 delete mode 100644 public/js/lib/codemirror/addon/hint/xml-hint.js
 delete mode 100644 public/js/lib/codemirror/addon/lint/coffeescript-lint.js
 delete mode 100644 public/js/lib/codemirror/addon/lint/css-lint.js
 delete mode 100644 public/js/lib/codemirror/addon/lint/javascript-lint.js
 delete mode 100644 public/js/lib/codemirror/addon/lint/json-lint.js
 delete mode 100644 public/js/lib/codemirror/addon/lint/lint.css
 delete mode 100644 public/js/lib/codemirror/addon/lint/lint.js
 delete mode 100644 public/js/lib/codemirror/addon/lint/yaml-lint.js
 delete mode 100644 public/js/lib/codemirror/addon/merge/merge.css
 delete mode 100644 public/js/lib/codemirror/addon/merge/merge.js
 delete mode 100644 public/js/lib/codemirror/addon/mode/loadmode.js
 delete mode 100644 public/js/lib/codemirror/addon/mode/multiplex.js
 delete mode 100644 public/js/lib/codemirror/addon/mode/multiplex_test.js
 delete mode 100644 public/js/lib/codemirror/addon/mode/overlay.js
 delete mode 100644 public/js/lib/codemirror/addon/mode/simple.js
 delete mode 100644 public/js/lib/codemirror/addon/runmode/colorize.js
 delete mode 100644 public/js/lib/codemirror/addon/runmode/runmode-standalone.js
 delete mode 100644 public/js/lib/codemirror/addon/runmode/runmode.js
 delete mode 100644 public/js/lib/codemirror/addon/runmode/runmode.node.js
 delete mode 100644 public/js/lib/codemirror/addon/scroll/annotatescrollbar.js
 delete mode 100644 public/js/lib/codemirror/addon/scroll/scrollpastend.js
 delete mode 100644 public/js/lib/codemirror/addon/scroll/simplescrollbars.css
 delete mode 100644 public/js/lib/codemirror/addon/scroll/simplescrollbars.js
 delete mode 100644 public/js/lib/codemirror/addon/search/match-highlighter.js
 delete mode 100644 public/js/lib/codemirror/addon/search/matchesonscrollbar.css
 delete mode 100644 public/js/lib/codemirror/addon/search/matchesonscrollbar.js
 delete mode 100644 public/js/lib/codemirror/addon/search/search.js
 delete mode 100644 public/js/lib/codemirror/addon/search/searchcursor.js
 delete mode 100644 public/js/lib/codemirror/addon/selection/active-line.js
 delete mode 100644 public/js/lib/codemirror/addon/selection/mark-selection.js
 delete mode 100644 public/js/lib/codemirror/addon/tern/tern.css
 delete mode 100644 public/js/lib/codemirror/addon/tern/tern.js
 delete mode 100644 public/js/lib/codemirror/addon/tern/worker.js
 delete mode 100644 public/js/lib/codemirror/addon/wrap/hardwrap.js
 delete mode 100755 public/js/lib/codemirror/bin/authors.sh
 delete mode 100755 public/js/lib/codemirror/bin/compress
 delete mode 100755 public/js/lib/codemirror/bin/lint
 delete mode 100755 public/js/lib/codemirror/bin/release
 delete mode 100755 public/js/lib/codemirror/bin/source-highlight
 delete mode 100644 public/js/lib/codemirror/bower.json
 delete mode 100644 public/js/lib/codemirror/index.html
 delete mode 100644 public/js/lib/codemirror/keymap/emacs.js
 delete mode 100644 public/js/lib/codemirror/keymap/sublime.js
 delete mode 100644 public/js/lib/codemirror/keymap/vim.js
 delete mode 100644 public/js/lib/codemirror/lib/codemirror.css
 delete mode 100644 public/js/lib/codemirror/lib/codemirror.js
 delete mode 100644 public/js/lib/codemirror/mode/css/css.js
 delete mode 100644 public/js/lib/codemirror/mode/css/index.html
 delete mode 100644 public/js/lib/codemirror/mode/css/less.html
 delete mode 100644 public/js/lib/codemirror/mode/css/less_test.js
 delete mode 100644 public/js/lib/codemirror/mode/css/scss.html
 delete mode 100644 public/js/lib/codemirror/mode/css/scss_test.js
 delete mode 100644 public/js/lib/codemirror/mode/css/test.js
 delete mode 100644 public/js/lib/codemirror/mode/htmlembedded/htmlembedded.js
 delete mode 100644 public/js/lib/codemirror/mode/htmlembedded/index.html
 delete mode 100644 public/js/lib/codemirror/mode/htmlmixed/htmlmixed.js
 delete mode 100644 public/js/lib/codemirror/mode/htmlmixed/index.html
 delete mode 100644 public/js/lib/codemirror/mode/jade/index.html
 delete mode 100644 public/js/lib/codemirror/mode/jade/jade.js
 delete mode 100644 public/js/lib/codemirror/mode/javascript/index.html
 delete mode 100644 public/js/lib/codemirror/mode/javascript/javascript.js
 delete mode 100644 public/js/lib/codemirror/mode/javascript/json-ld.html
 delete mode 100644 public/js/lib/codemirror/mode/javascript/test.js
 delete mode 100644 public/js/lib/codemirror/mode/javascript/typescript.html
 delete mode 100644 public/js/lib/codemirror/mode/markdown/index.html
 delete mode 100644 public/js/lib/codemirror/mode/markdown/markdown.js
 delete mode 100644 public/js/lib/codemirror/mode/markdown/test.js
 delete mode 100644 public/js/lib/codemirror/mode/meta.js
 delete mode 100644 public/js/lib/codemirror/mode/xml/index.html
 delete mode 100644 public/js/lib/codemirror/mode/xml/test.js
 delete mode 100644 public/js/lib/codemirror/mode/xml/xml.js
 delete mode 100644 public/js/lib/codemirror/mode/yaml/index.html
 delete mode 100644 public/js/lib/codemirror/mode/yaml/yaml.js
 delete mode 100644 public/js/lib/codemirror/package.json
 delete mode 100644 public/js/lib/codemirror/test/comment_test.js
 delete mode 100644 public/js/lib/codemirror/test/doc_test.js
 delete mode 100644 public/js/lib/codemirror/test/driver.js
 delete mode 100644 public/js/lib/codemirror/test/emacs_test.js
 delete mode 100644 public/js/lib/codemirror/test/index.html
 delete mode 100644 public/js/lib/codemirror/test/lint/acorn.js
 delete mode 100644 public/js/lib/codemirror/test/lint/lint.js
 delete mode 100644 public/js/lib/codemirror/test/lint/walk.js
 delete mode 100644 public/js/lib/codemirror/test/mode_test.css
 delete mode 100644 public/js/lib/codemirror/test/mode_test.js
 delete mode 100644 public/js/lib/codemirror/test/multi_test.js
 delete mode 100644 public/js/lib/codemirror/test/phantom_driver.js
 delete mode 100755 public/js/lib/codemirror/test/run.js
 delete mode 100644 public/js/lib/codemirror/test/scroll_test.js
 delete mode 100644 public/js/lib/codemirror/test/search_test.js
 delete mode 100644 public/js/lib/codemirror/test/sublime_test.js
 delete mode 100644 public/js/lib/codemirror/test/test.js
 delete mode 100644 public/js/lib/codemirror/test/vim_test.js
 delete mode 100644 public/js/lib/codemirror/theme/3024-day.css
 delete mode 100644 public/js/lib/codemirror/theme/3024-night.css
 delete mode 100644 public/js/lib/codemirror/theme/ambiance-mobile.css
 delete mode 100644 public/js/lib/codemirror/theme/ambiance.css
 delete mode 100644 public/js/lib/codemirror/theme/base16-dark.css
 delete mode 100644 public/js/lib/codemirror/theme/base16-light.css
 delete mode 100644 public/js/lib/codemirror/theme/blackboard.css
 delete mode 100644 public/js/lib/codemirror/theme/cobalt.css
 delete mode 100644 public/js/lib/codemirror/theme/eclipse.css
 delete mode 100644 public/js/lib/codemirror/theme/elegant.css
 delete mode 100644 public/js/lib/codemirror/theme/erlang-dark.css
 delete mode 100644 public/js/lib/codemirror/theme/lesser-dark.css
 delete mode 100644 public/js/lib/codemirror/theme/mbo.css
 delete mode 100644 public/js/lib/codemirror/theme/mdn-like.css
 delete mode 100644 public/js/lib/codemirror/theme/midnight.css
 delete mode 100644 public/js/lib/codemirror/theme/monokai.css
 delete mode 100644 public/js/lib/codemirror/theme/neat.css
 delete mode 100644 public/js/lib/codemirror/theme/neo.css
 delete mode 100644 public/js/lib/codemirror/theme/night.css
 delete mode 100644 public/js/lib/codemirror/theme/paraiso-dark.css
 delete mode 100644 public/js/lib/codemirror/theme/paraiso-light.css
 delete mode 100644 public/js/lib/codemirror/theme/pastel-on-dark.css
 delete mode 100644 public/js/lib/codemirror/theme/rubyblue.css
 delete mode 100644 public/js/lib/codemirror/theme/solarized.css
 delete mode 100644 public/js/lib/codemirror/theme/the-matrix.css
 delete mode 100644 public/js/lib/codemirror/theme/tomorrow-night-bright.css
 delete mode 100644 public/js/lib/codemirror/theme/tomorrow-night-eighties.css
 delete mode 100644 public/js/lib/codemirror/theme/twilight.css
 delete mode 100644 public/js/lib/codemirror/theme/vibrant-ink.css
 delete mode 100644 public/js/lib/codemirror/theme/xq-dark.css
 delete mode 100644 public/js/lib/codemirror/theme/xq-light.css
 delete mode 100644 public/js/lib/codemirror/theme/zenburn.css
 delete mode 100644 public/js/lib/jquery-2.1.1.min.js
 delete mode 100644 public/js/lib/ramda/ramda.js
 delete mode 100644 public/js/lib/ramda/ramda.min.js

diff --git a/bower.json b/bower.json
index 1f83316..fe3c9c6 100644
--- a/bower.json
+++ b/bower.json
@@ -25,8 +25,10 @@
     "font-awesome": "~4.3.0",
     "moment": "~2.10.2",
     "angular-bootstrap": "~0.13.0",
-    "ramda": "~0.13.0",
     "jshint": "~2.7.0",
-    "lightbox2": "~2.8.1"
+    "lightbox2": "~2.8.1",
+    "rxjs": "~4.0.6",
+    "CodeMirror": "~5.8.0",
+    "chai": "~3.4.1"
   }
 }
diff --git a/client/commonFramework.js b/client/commonFramework.js
index 1138975..b5a80bc 100644
--- a/client/commonFramework.js
+++ b/client/commonFramework.js
@@ -268,7 +268,7 @@ common.codeOutput = (function(CodeMirror, document, challengeType) {
   return codeOutput;
 }(window.CodeMirror, window.document, common.challengeType || 0));
 
-var sandBox = (function(jailed, codeOutput) {
+common.sandBox = (function(jailed, codeOutput) {
   if (!jailed) {
     return {};
   }
@@ -818,7 +818,7 @@ function safeHTMLRun(test) {
         '  return this;' +
         '};' + s;
 
-      sandBox.submit(scopejQuery(s), function(cls, message) {
+      common.sandBox.submit(scopejQuery(s), function(cls, message) {
         if (cls) {
           console.log(message.error);
           workerError(message.error);
@@ -1398,7 +1398,7 @@ function bonfireExecute(shouldTest) {
 
     if (userJavaScript.match(/function/gi)) {
       if (userJavaScript.match(/function\s*?\(|function\s+\w+\s*?\(/gi)) {
-        sandBox.submit(userJavaScript, function(cls, message) {
+        common.sandBox.submit(userJavaScript, function(cls, message) {
           if (failedCommentTest) {
             editor.setValue(editor.getValue() + '*/');
             console.log('Caught Unfinished Comment');
@@ -1422,7 +1422,7 @@ function bonfireExecute(shouldTest) {
         codeOutput.setValue('Unsafe or unfinished function declaration');
       }
     } else {
-      sandBox.submit(userJavaScript, function(cls, message) {
+      common.sandBox.submit(userJavaScript, function(cls, message) {
 
         if (failedCommentTest) {
           editor.setValue(editor.getValue() + '*/');
diff --git a/gulpfile.js b/gulpfile.js
index f37b963..5218705 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -14,7 +14,9 @@ var Rx = require('rx'),
   sortKeys = require('sort-keys'),
   debug = require('debug')('freecc:gulp'),
   yargs = require('yargs'),
+  concat = require('gulp-concat'),
   uglify = require('gulp-uglify'),
+  merge = require('merge-stream'),
 
   // react app
   webpack = require('gulp-webpack'),
@@ -70,6 +72,33 @@ var paths = {
     dest: 'public/js'
   },
 
+  vendorChallenges: [
+    'public/bower_components/jshint/dist/jshint.js',
+    'public/bower_components/chai/chai.js',
+    'public/bower_components/CodeMirror/lib/codemirror.js',
+    'public/bower_components/CodeMirror/addon/edit/closebrackets.js',
+    'public/bower_components/CodeMirror/addon/edit/matchbrackets.js',
+    'public/bower_components/CodeMirror/addon/lint/lint.js',
+    'public/bower_components/CodeMirror/addon/lint/javascript-lint.js',
+    'public/bower_components/CodeMirror/mode/javascript/javascript.js',
+    'public/bower_components/CodeMirror/mode/xml/xml.js',
+    'public/bower_components/CodeMirror/mode/css/css.js',
+    'public/bower_components/CodeMirror/mode/htmlmixed/htmlmixed.js',
+    'public/bower_components/CodeMirror/addon/emmet/emmet.js'
+  ],
+
+  vendorMain: [
+    'public/bower_components/jquery/dist/jquery.min.js',
+    'public/bower_components/bootstrap/dist/js/bootstrap.min.js',
+    'public/bower_components/angular/angular.min.js',
+    'public/bower_components/angular-bootstrap/ui-bootstrap.min.js',
+    'public/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js',
+    'public/bower_components/d3/d3.min.js',
+    'public/bower_components/moment/min/moment.min.js',
+    'public/bower_components/lightbox2/dist/js/lightbox.min.js',
+    'public/bower_components/rxjs/dist/rx.all.min.js'
+  ],
+
   js: [
     'client/main.js',
     'client/iFrameScripts.js',
@@ -297,7 +326,7 @@ gulp.task('less', function() {
   var dest = paths.css;
   return gulp.src(paths.less)
     .pipe(plumber({ errorHandler: errorHandler }))
-    // copile
+    // compile
     .pipe(less({
       paths: [ path.join(__dirname, 'less', 'includes') ]
     }))
@@ -315,12 +344,52 @@ gulp.task('less', function() {
     .pipe(gulp.dest(paths.manifest));
 });
 
+function getFilesGlob(files) {
+  if (!__DEV__) {
+    return files;
+  }
+  return files.map(function(file) {
+    return file
+      .replace('.min.', '.')
+      // moment breaks the pattern
+      .replace('/min/', '/');
+  });
+}
+
+gulp.task('vendor', ['js'], function() {
+  var manifestName = 'js-manifest.json';
+  var dest = paths.publicJs;
+
+  var vendorFiles = merge(
+    gulp.src(getFilesGlob(paths.vendorMain))
+      .pipe(concat('vendor-main.js')),
+    gulp.src(paths.vendorChallenges)
+      .pipe(__DEV__ ? gutil.noop() : uglify())
+      .pipe(concat('vendor-challenges.js'))
+  );
+
+  return vendorFiles.pipe(gulp.dest(dest))
+    // create registry file
+    .pipe(rev())
+    // copy revisioned assets to dest
+    .pipe(gulp.dest(dest))
+    // create manifest file
+    .pipe(rev.manifest(manifestName))
+    .pipe(delRev(
+      dest,
+      manifestName
+    ))
+    // copy manifest file to dest
+    .pipe(gulp.dest(paths.manifest));
+});
+
 gulp.task('js', function() {
   var manifestName = 'js-manifest.json';
   var dest = paths.publicJs;
 
   return gulp.src(paths.js)
     .pipe(plumber({ errorHandler: errorHandler }))
+    .pipe(__DEV__ ? gutil.noop() : uglify())
     .pipe(gulp.dest(dest))
     // create registry file
     .pipe(rev())
@@ -348,6 +417,7 @@ gulp.task('dependents', ['js'], function() {
 
   return gulp.src(paths.dependents)
     .pipe(plumber({ errorHandler: errorHandler }))
+    .pipe(__DEV__ ? gutil.noop() : uglify())
     .pipe(revReplace({ manifest: manifest }))
     .pipe(gulp.dest(dest))
     .pipe(rev())
@@ -374,7 +444,7 @@ function buildManifest() {
     .pipe(gulp.dest('server/'));
 }
 
-var buildDependents = ['less', 'js', 'dependents'];
+var buildDependents = ['less', 'js', 'dependents', 'vendor'];
 
 gulp.task('build-manifest', buildDependents, function() {
   return buildManifest();
diff --git a/package.json b/package.json
index a9e5b0a..21138d1 100644
--- a/package.json
+++ b/package.json
@@ -57,6 +57,7 @@
     "forever": "~0.15.1",
     "frameguard": "~0.2.2",
     "gulp": "^3.9.0",
+    "gulp-concat": "^2.6.0",
     "gulp-eslint": "^1.1.0",
     "gulp-inject": "^3.0.0",
     "gulp-jsonlint": "^1.1.0",
@@ -64,6 +65,7 @@
     "gulp-minify-css": "^1.2.1",
     "gulp-nodemon": "^2.0.3",
     "gulp-notify": "^2.2.0",
+    "gulp-order": "^1.1.1",
     "gulp-plumber": "^1.0.1",
     "gulp-reduce-file": "0.0.1",
     "gulp-rev": "^6.0.1",
@@ -82,6 +84,7 @@
     "loopback-boot": "^2.13.0",
     "loopback-component-passport": "^1.6.0",
     "loopback-connector-mongodb": "^1.10.0",
+    "merge-stream": "^1.0.0",
     "method-override": "^2.3.0",
     "moment": "^2.10.2",
     "mongodb": "^2.0.33",
@@ -120,7 +123,11 @@
     "validator": "^4.2.1",
     "webpack": "^1.9.12",
     "xss-filters": "^1.2.6",
+<<<<<<< HEAD
     "yargs": "^3.30.0"
+=======
+    "yargs": "^3.29.0"
+>>>>>>> bundle vendor files
   },
   "devDependencies": {
     "blessed": "~0.1.81",
diff --git a/public/js/lib/bootstrap.min.js b/public/js/lib/bootstrap.min.js
deleted file mode 100644
index 1d4a4ed..0000000
--- a/public/js/lib/bootstrap.min.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
- * Bootstrap v3.1.0 (http://getbootstrap.com)
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-if("undefined"==typeof jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown",h),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=" li:not(.divider):visible a",i=f.find("[role=menu]"+h+", [role=listbox]"+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j<i.length-1&&j++,~j||(j=0),i.eq(j).focus()}}}};var g=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new f(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=f,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=g,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",e,f.prototype.toggle).on("keydown.bs.dropdown.data-api",e+", [role=menu], [role=listbox]",f.prototype.keydown)}(jQuery),+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};b.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isShown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body),c.$element.show().scrollTop(0),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulateTransitionEnd(300):c.$element.focus().trigger(e)}))},b.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},b.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.focus()},this))},b.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());c.is("a")&&b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this,d=this.tip();this.setContent(),this.options.animation&&d.addClass("fade");var e="function"==typeof this.options.placement?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,f=/\s?auto?\s?/i,g=f.test(e);g&&(e=e.replace(f,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(e),this.options.container?d.appendTo(this.options.container):d.insertAfter(this.$element);var h=this.getPosition(),i=d[0].offsetWidth,j=d[0].offsetHeight;if(g){var k=this.$element.parent(),l=e,m=document.documentElement.scrollTop||document.body.scrollTop,n="body"==this.options.container?window.innerWidth:k.outerWidth(),o="body"==this.options.container?window.innerHeight:k.outerHeight(),p="body"==this.options.container?0:k.offset().left;e="bottom"==e&&h.top+h.height+j-m>o?"top":"top"==e&&h.top-m-j<0?"bottom":"right"==e&&h.right+i>n?"left":"left"==e&&h.left-i<p?"right":e,d.removeClass(l).addClass(e)}var q=this.getCalculatedOffset(e,h,i,j);this.applyPlacement(q,e),this.hoverState=null;var r=function(){c.$element.trigger("shown.bs."+c.type)};a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,r).emulateTransitionEnd(150):r()}},b.prototype.applyPlacement=function(b,c){var d,e=this.tip(),f=e[0].offsetWidth,g=e[0].offsetHeight,h=parseInt(e.css("margin-top"),10),i=parseInt(e.css("margin-left"),10);isNaN(h)&&(h=0),isNaN(i)&&(i=0),b.top=b.top+h,b.left=b.left+i,a.offset.setOffset(e[0],a.extend({using:function(a){e.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),e.addClass("in");var j=e[0].offsetWidth,k=e[0].offsetHeight;if("top"==c&&k!=g&&(d=!0,b.top=b.top+g-k),/bottom|top/.test(c)){var l=0;b.left<0&&(l=-2*b.left,b.left=0,e.offset(b),j=e[0].offsetWidth,k=e[0].offsetHeight),this.replaceArrow(l-f+j,j,"left")}else this.replaceArrow(k-g,k,"top");d&&e.offset(b)},b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},b.prototype.hide=function(){function b(){"in"!=c.hoverState&&d.detach(),c.$element.trigger("hidden.bs."+c.type)}var c=this,d=this.tip(),e=a.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(d.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,b).emulateTransitionEnd(150):b(),this.hoverState=null,this)},b.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},b.prototype.hasContent=function(){return this.getTitle()},b.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},b.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},b.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},b.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},b.prototype.enable=function(){this.enabled=!0},b.prototype.disable=function(){this.enabled=!1},b.prototype.toggleEnabled=function(){this.enabled=!this.enabled},b.prototype.toggle=function(b){var c=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;c.tip().hasClass("in")?c.leave(c):c.enter(c)},b.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.tooltip",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.tooltip.Constructor=b,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(jQuery),+function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");b.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery);
\ No newline at end of file
diff --git a/public/js/lib/chai/chai-jquery.js b/public/js/lib/chai/chai-jquery.js
deleted file mode 100644
index 52d8a72..0000000
--- a/public/js/lib/chai/chai-jquery.js
+++ /dev/null
@@ -1,231 +0,0 @@
-(function (chaiJquery) {
-    // Module systems magic dance.
-    if (typeof require === "function" && typeof exports === "object" && typeof module === "object") {
-        // NodeJS
-        module.exports = chaiJquery;
-    } else if (typeof define === "function" && define.amd) {
-        // AMD
-        define(['jquery'], function ($) {
-            return function (chai, utils) {
-                return chaiJquery(chai, utils, $);
-            };
-        });
-    } else {
-        // Other environment (usually <script> tag): plug in to global chai instance directly.
-        chai.use(function (chai, utils) {
-            return chaiJquery(chai, utils, jQuery);
-        });
-    }
-}(function (chai, utils, $) {
-    var inspect = utils.inspect,
-        flag = utils.flag;
-    $ = $ || jQuery;
-
-    var setPrototypeOf = '__proto__' in Object ?
-        function (object, prototype) {
-            object.__proto__ = prototype;
-        } :
-        function (object, prototype) {
-            var excludeNames = /^(?:length|name|arguments|caller)$/;
-
-            function copyProperties(dst, src) {
-                Object.getOwnPropertyNames(src).forEach(function (name) {
-                    if (!excludeNames.test(name)) {
-                        Object.defineProperty(dst, name,
-                            Object.getOwnPropertyDescriptor(src, name));
-                    }
-                });
-            }
-
-            copyProperties(object, prototype);
-            copyProperties(object, Object.getPrototypeOf(prototype));
-        };
-
-    $.fn.inspect = function (depth) {
-        var el = $('<div />').append(this.clone());
-        if (depth !== undefined) {
-            var children = el.children();
-            while (depth-- > 0)
-                children = children.children();
-            children.html('...');
-        }
-        return el.html();
-    };
-
-    var props = {attr: 'attribute', css: 'CSS property', prop: 'property'};
-    for (var prop in props) {
-        (function (prop, description) {
-            chai.Assertion.addMethod(prop, function (name, val) {
-                var actual = flag(this, 'object')[prop](name);
-
-                if (!flag(this, 'negate') || undefined === val) {
-                    this.assert(
-                        undefined !== actual
-                        , 'expected #{this} to have a #{exp} ' + description
-                        , 'expected #{this} not to have a #{exp} ' + description
-                        , name
-                    );
-                }
-
-                if (undefined !== val) {
-                    this.assert(
-                        val === actual
-                        , 'expected #{this} to have a ' + inspect(name) + ' ' + description + ' with the value #{exp}, but the value was #{act}'
-                        , 'expected #{this} not to have a ' + inspect(name) + ' ' + description + ' with the value #{act}'
-                        , val
-                        , actual
-                    );
-                }
-
-                flag(this, 'object', actual);
-            });
-        })(prop, props[prop]);
-    }
-
-    chai.Assertion.addMethod('data', function (name, val) {
-        // Work around a chai bug (https://github.com/logicalparadox/chai/issues/16)
-        if (flag(this, 'negate') && undefined !== val && undefined === flag(this, 'object').data(name)) {
-            return;
-        }
-
-        var assertion = new chai.Assertion(flag(this, 'object').data());
-        if (flag(this, 'negate'))
-            assertion = assertion.not;
-        return assertion.property(name, val);
-    });
-
-    chai.Assertion.addMethod('class', function (className) {
-        this.assert(
-            flag(this, 'object').hasClass(className)
-            , 'expected #{this} to have class #{exp}'
-            , 'expected #{this} not to have class #{exp}'
-            , className
-        );
-    });
-
-    chai.Assertion.addMethod('id', function (id) {
-        this.assert(
-            flag(this, 'object').attr('id') === id
-            , 'expected #{this} to have id #{exp}'
-            , 'expected #{this} not to have id #{exp}'
-            , id
-        );
-    });
-
-    chai.Assertion.addMethod('html', function (html) {
-        var actual = flag(this, 'object').html();
-        this.assert(
-            actual === html
-            , 'expected #{this} to have HTML #{exp}, but the HTML was #{act}'
-            , 'expected #{this} not to have HTML #{exp}'
-            , html
-            , actual
-        );
-    });
-
-    chai.Assertion.addMethod('text', function (text) {
-        var actual = flag(this, 'object').text();
-        this.assert(
-            actual === text
-            , 'expected #{this} to have text #{exp}, but the text was #{act}'
-            , 'expected #{this} not to have text #{exp}'
-            , text
-            , actual
-        );
-    });
-
-    chai.Assertion.addMethod('value', function (value) {
-        var actual = flag(this, 'object').val();
-        this.assert(
-            flag(this, 'object').val() === value
-            , 'expected #{this} to have value #{exp}, but the value was #{act}'
-            , 'expected #{this} not to have value #{exp}'
-            , value
-            , actual
-        );
-    });
-
-    chai.Assertion.addMethod('descendants', function (selector) {
-        this.assert(
-            flag(this, 'object').has(selector).length > 0
-            , 'expected #{this} to have #{exp}'
-            , 'expected #{this} not to have #{exp}'
-            , selector
-        );
-    });
-
-    $.each(['visible', 'hidden', 'selected', 'checked', 'enabled', 'disabled'], function (i, attr) {
-        chai.Assertion.addProperty(attr, function () {
-            this.assert(
-                flag(this, 'object').is(':' + attr)
-                , 'expected #{this} to be ' + attr
-                , 'expected #{this} not to be ' + attr);
-        });
-    });
-
-    chai.Assertion.overwriteProperty('exist', function (_super) {
-        return function () {
-            var obj = flag(this, 'object');
-            if (obj instanceof $) {
-                this.assert(
-                    obj.length > 0
-                    , 'expected ' + inspect(obj.selector) + ' to exist'
-                    , 'expected ' + inspect(obj.selector) + ' not to exist');
-            } else {
-                _super.apply(this, arguments);
-            }
-        };
-    });
-
-    chai.Assertion.overwriteProperty('empty', function (_super) {
-        return function () {
-            var obj = flag(this, 'object');
-            if (obj instanceof $) {
-                this.assert(
-                    obj.is(':empty')
-                    , 'expected #{this} to be empty'
-                    , 'expected #{this} not to be empty');
-            } else {
-                _super.apply(this, arguments);
-            }
-        };
-    });
-
-    chai.Assertion.overwriteMethod('match', function (_super) {
-        return function (selector) {
-            var obj = flag(this, 'object');
-            if (obj instanceof $) {
-                this.assert(
-                    obj.is(selector)
-                    , 'expected #{this} to match #{exp}'
-                    , 'expected #{this} not to match #{exp}'
-                    , selector
-                );
-            } else {
-                _super.apply(this, arguments);
-            }
-        }
-    });
-
-    chai.Assertion.overwriteChainableMethod('contain',
-        function (_super) {
-            return function (text) {
-                var obj = flag(this, 'object');
-                if (obj instanceof $) {
-                    this.assert(
-                        obj.is(':contains(\'' + text + '\')')
-                        , 'expected #{this} to contain #{exp}'
-                        , 'expected #{this} not to contain #{exp}'
-                        , text);
-                } else {
-                    _super.apply(this, arguments);
-                }
-            }
-        },
-        function(_super) {
-            return function() {
-                _super.call(this);
-            };
-        }
-    );
-}));
\ No newline at end of file
diff --git a/public/js/lib/chai/chai.js b/public/js/lib/chai/chai.js
deleted file mode 100644
index 4191939..0000000
--- a/public/js/lib/chai/chai.js
+++ /dev/null
@@ -1,4800 +0,0 @@
-
-(function(){
-
-    /**
-     * Require the module at `name`.
-     *
-     * @param {String} name
-     * @return {Object} exports
-     * @api public
-     */
-
-    function require(name) {
-        var module = require.modules[name];
-        if (!module) throw new Error('failed to require "' + name + '"');
-
-        if (!('exports' in module) && typeof module.definition === 'function') {
-            module.client = module.component = true;
-            module.definition.call(this, module.exports = {}, module);
-            delete module.definition;
-        }
-
-        return module.exports;
-    }
-
-    /**
-     * Meta info, accessible in the global scope unless you use AMD option.
-     */
-
-    require.loader = 'component';
-
-    /**
-     * Internal helper object, contains a sorting function for semantiv versioning
-     */
-    require.helper = {};
-    require.helper.semVerSort = function(a, b) {
-        var aArray = a.version.split('.');
-        var bArray = b.version.split('.');
-        for (var i=0; i<aArray.length; ++i) {
-            var aInt = parseInt(aArray[i], 10);
-            var bInt = parseInt(bArray[i], 10);
-            if (aInt === bInt) {
-                var aLex = aArray[i].substr((""+aInt).length);
-                var bLex = bArray[i].substr((""+bInt).length);
-                if (aLex === '' && bLex !== '') return 1;
-                if (aLex !== '' && bLex === '') return -1;
-                if (aLex !== '' && bLex !== '') return aLex > bLex ? 1 : -1;
-                continue;
-            } else if (aInt > bInt) {
-                return 1;
-            } else {
-                return -1;
-            }
-        }
-        return 0;
-    }
-
-    /**
-     * Find and require a module which name starts with the provided name.
-     * If multiple modules exists, the highest semver is used.
-     * This function can only be used for remote dependencies.
-
-     * @param {String} name - module name: `user~repo`
-     * @param {Boolean} returnPath - returns the canonical require path if true,
-     *                               otherwise it returns the epxorted module
-     */
-    require.latest = function (name, returnPath) {
-        function showError(name) {
-            throw new Error('failed to find latest module of "' + name + '"');
-        }
-        // only remotes with semvers, ignore local files conataining a '/'
-        var versionRegexp = /(.*)~(.*)@v?(\d+\.\d+\.\d+[^\/]*)$/;
-        var remoteRegexp = /(.*)~(.*)/;
-        if (!remoteRegexp.test(name)) showError(name);
-        var moduleNames = Object.keys(require.modules);
-        var semVerCandidates = [];
-        var otherCandidates = []; // for instance: name of the git branch
-        for (var i=0; i<moduleNames.length; i++) {
-            var moduleName = moduleNames[i];
-            if (new RegExp(name + '@').test(moduleName)) {
-                var version = moduleName.substr(name.length+1);
-                var semVerMatch = versionRegexp.exec(moduleName);
-                if (semVerMatch != null) {
-                    semVerCandidates.push({version: version, name: moduleName});
-                } else {
-                    otherCandidates.push({version: version, name: moduleName});
-                }
-            }
-        }
-        if (semVerCandidates.concat(otherCandidates).length === 0) {
-            showError(name);
-        }
-        if (semVerCandidates.length > 0) {
-            var module = semVerCandidates.sort(require.helper.semVerSort).pop().name;
-            if (returnPath === true) {
-                return module;
-            }
-            return require(module);
-        }
-        // if the build contains more than one branch of the same module
-        // you should not use this funciton
-        var module = otherCandidates.pop().name;
-        if (returnPath === true) {
-            return module;
-        }
-        return require(module);
-    }
-
-    /**
-     * Registered modules.
-     */
-
-    require.modules = {};
-
-    /**
-     * Register module at `name` with callback `definition`.
-     *
-     * @param {String} name
-     * @param {Function} definition
-     * @api private
-     */
-
-    require.register = function (name, definition) {
-        require.modules[name] = {
-            definition: definition
-        };
-    };
-
-    /**
-     * Define a module's exports immediately with `exports`.
-     *
-     * @param {String} name
-     * @param {Generic} exports
-     * @api private
-     */
-
-    require.define = function (name, exports) {
-        require.modules[name] = {
-            exports: exports
-        };
-    };
-    require.register("chaijs~assertion-error@1.0.0", function (exports, module) {
-        /*!
-         * assertion-error
-         * Copyright(c) 2013 Jake Luer <jake@qualiancy.com>
-         * MIT Licensed
-         */
-
-        /*!
-         * Return a function that will copy properties from
-         * one object to another excluding any originally
-         * listed. Returned function will create a new `{}`.
-         *
-         * @param {String} excluded properties ...
-         * @return {Function}
-         */
-
-        function exclude () {
-            var excludes = [].slice.call(arguments);
-
-            function excludeProps (res, obj) {
-                Object.keys(obj).forEach(function (key) {
-                    if (!~excludes.indexOf(key)) res[key] = obj[key];
-                });
-            }
-
-            return function extendExclude () {
-                var args = [].slice.call(arguments)
-                    , i = 0
-                    , res = {};
-
-                for (; i < args.length; i++) {
-                    excludeProps(res, args[i]);
-                }
-
-                return res;
-            };
-        };
-
-        /*!
-         * Primary Exports
-         */
-
-        module.exports = AssertionError;
-
-        /**
-         * ### AssertionError
-         *
-         * An extension of the JavaScript `Error` constructor for
-         * assertion and validation scenarios.
-         *
-         * @param {String} message
-         * @param {Object} properties to include (optional)
-         * @param {callee} start stack function (optional)
-         */
-
-        function AssertionError (message, _props, ssf) {
-            var extend = exclude('name', 'message', 'stack', 'constructor', 'toJSON')
-                , props = extend(_props || {});
-
-            // default values
-            this.message = message || 'Unspecified AssertionError';
-            this.showDiff = false;
-
-            // copy from properties
-            for (var key in props) {
-                this[key] = props[key];
-            }
-
-            // capture stack trace
-            ssf = ssf || arguments.callee;
-            if (ssf && Error.captureStackTrace) {
-                Error.captureStackTrace(this, ssf);
-            }
-        }
-
-        /*!
-         * Inherit from Error.prototype
-         */
-
-        AssertionError.prototype = Object.create(Error.prototype);
-
-        /*!
-         * Statically set name
-         */
-
-        AssertionError.prototype.name = 'AssertionError';
-
-        /*!
-         * Ensure correct constructor
-         */
-
-        AssertionError.prototype.constructor = AssertionError;
-
-        /**
-         * Allow errors to be converted to JSON for static transfer.
-         *
-         * @param {Boolean} include stack (default: `true`)
-         * @return {Object} object that can be `JSON.stringify`
-         */
-
-        AssertionError.prototype.toJSON = function (stack) {
-            var extend = exclude('constructor', 'toJSON', 'stack')
-                , props = extend({ name: this.name }, this);
-
-            // include stack if exists and not turned off
-            if (false !== stack && this.stack) {
-                props.stack = this.stack;
-            }
-
-            return props;
-        };
-
-    });
-
-    require.register("chaijs~type-detect@0.1.1", function (exports, module) {
-        /*!
-         * type-detect
-         * Copyright(c) 2013 jake luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        /*!
-         * Primary Exports
-         */
-
-        var exports = module.exports = getType;
-
-        /*!
-         * Detectable javascript natives
-         */
-
-        var natives = {
-            '[object Array]': 'array'
-            , '[object RegExp]': 'regexp'
-            , '[object Function]': 'function'
-            , '[object Arguments]': 'arguments'
-            , '[object Date]': 'date'
-        };
-
-        /**
-         * ### typeOf (obj)
-         *
-         * Use several different techniques to determine
-         * the type of object being tested.
-         *
-         *
-         * @param {Mixed} object
-         * @return {String} object type
-         * @api public
-         */
-
-        function getType (obj) {
-            var str = Object.prototype.toString.call(obj);
-            if (natives[str]) return natives[str];
-            if (obj === null) return 'null';
-            if (obj === undefined) return 'undefined';
-            if (obj === Object(obj)) return 'object';
-            return typeof obj;
-        }
-
-        exports.Library = Library;
-
-        /**
-         * ### Library
-         *
-         * Create a repository for custom type detection.
-         *
-         * ```js
-         * var lib = new type.Library;
-         * ```
-         *
-         */
-
-        function Library () {
-            this.tests = {};
-        }
-
-        /**
-         * #### .of (obj)
-         *
-         * Expose replacement `typeof` detection to the library.
-         *
-         * ```js
-         * if ('string' === lib.of('hello world')) {
- *   // ...
- * }
-         * ```
-         *
-         * @param {Mixed} object to test
-         * @return {String} type
-         */
-
-        Library.prototype.of = getType;
-
-        /**
-         * #### .define (type, test)
-         *
-         * Add a test to for the `.test()` assertion.
-         *
-         * Can be defined as a regular expression:
-         *
-         * ```js
-         * lib.define('int', /^[0-9]+$/);
-         * ```
-         *
-         * ... or as a function:
-         *
-         * ```js
-         * lib.define('bln', function (obj) {
- *   if ('boolean' === lib.of(obj)) return true;
- *   var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ];
- *   if ('string' === lib.of(obj)) obj = obj.toLowerCase();
- *   return !! ~blns.indexOf(obj);
- * });
-         * ```
-         *
-         * @param {String} type
-         * @param {RegExp|Function} test
-         * @api public
-         */
-
-        Library.prototype.define = function (type, test) {
-            if (arguments.length === 1) return this.tests[type];
-            this.tests[type] = test;
-            return this;
-        };
-
-        /**
-         * #### .test (obj, test)
-         *
-         * Assert that an object is of type. Will first
-         * check natives, and if that does not pass it will
-         * use the user defined custom tests.
-         *
-         * ```js
-         * assert(lib.test('1', 'int'));
-         * assert(lib.test('yes', 'bln'));
-         * ```
-         *
-         * @param {Mixed} object
-         * @param {String} type
-         * @return {Boolean} result
-         * @api public
-         */
-
-        Library.prototype.test = function (obj, type) {
-            if (type === getType(obj)) return true;
-            var test = this.tests[type];
-
-            if (test && 'regexp' === getType(test)) {
-                return test.test(obj);
-            } else if (test && 'function' === getType(test)) {
-                return test(obj);
-            } else {
-                throw new ReferenceError('Type test "' + type + '" not defined or invalid.');
-            }
-        };
-
-    });
-
-    require.register("chaijs~deep-eql@0.1.3", function (exports, module) {
-        /*!
-         * deep-eql
-         * Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        /*!
-         * Module dependencies
-         */
-
-        var type = require('chaijs~type-detect@0.1.1');
-
-        /*!
-         * Buffer.isBuffer browser shim
-         */
-
-        var Buffer;
-        try { Buffer = require('buffer').Buffer; }
-        catch(ex) {
-            Buffer = {};
-            Buffer.isBuffer = function() { return false; }
-        }
-
-        /*!
-         * Primary Export
-         */
-
-        module.exports = deepEqual;
-
-        /**
-         * Assert super-strict (egal) equality between
-         * two objects of any type.
-         *
-         * @param {Mixed} a
-         * @param {Mixed} b
-         * @param {Array} memoised (optional)
-         * @return {Boolean} equal match
-         */
-
-        function deepEqual(a, b, m) {
-            if (sameValue(a, b)) {
-                return true;
-            } else if ('date' === type(a)) {
-                return dateEqual(a, b);
-            } else if ('regexp' === type(a)) {
-                return regexpEqual(a, b);
-            } else if (Buffer.isBuffer(a)) {
-                return bufferEqual(a, b);
-            } else if ('arguments' === type(a)) {
-                return argumentsEqual(a, b, m);
-            } else if (!typeEqual(a, b)) {
-                return false;
-            } else if (('object' !== type(a) && 'object' !== type(b))
-                && ('array' !== type(a) && 'array' !== type(b))) {
-                return sameValue(a, b);
-            } else {
-                return objectEqual(a, b, m);
-            }
-        }
-
-        /*!
-         * Strict (egal) equality test. Ensures that NaN always
-         * equals NaN and `-0` does not equal `+0`.
-         *
-         * @param {Mixed} a
-         * @param {Mixed} b
-         * @return {Boolean} equal match
-         */
-
-        function sameValue(a, b) {
-            if (a === b) return a !== 0 || 1 / a === 1 / b;
-            return a !== a && b !== b;
-        }
-
-        /*!
-         * Compare the types of two given objects and
-         * return if they are equal. Note that an Array
-         * has a type of `array` (not `object`) and arguments
-         * have a type of `arguments` (not `array`/`object`).
-         *
-         * @param {Mixed} a
-         * @param {Mixed} b
-         * @return {Boolean} result
-         */
-
-        function typeEqual(a, b) {
-            return type(a) === type(b);
-        }
-
-        /*!
-         * Compare two Date objects by asserting that
-         * the time values are equal using `saveValue`.
-         *
-         * @param {Date} a
-         * @param {Date} b
-         * @return {Boolean} result
-         */
-
-        function dateEqual(a, b) {
-            if ('date' !== type(b)) return false;
-            return sameValue(a.getTime(), b.getTime());
-        }
-
-        /*!
-         * Compare two regular expressions by converting them
-         * to string and checking for `sameValue`.
-         *
-         * @param {RegExp} a
-         * @param {RegExp} b
-         * @return {Boolean} result
-         */
-
-        function regexpEqual(a, b) {
-            if ('regexp' !== type(b)) return false;
-            return sameValue(a.toString(), b.toString());
-        }
-
-        /*!
-         * Assert deep equality of two `arguments` objects.
-         * Unfortunately, these must be sliced to arrays
-         * prior to test to ensure no bad behavior.
-         *
-         * @param {Arguments} a
-         * @param {Arguments} b
-         * @param {Array} memoize (optional)
-         * @return {Boolean} result
-         */
-
-        function argumentsEqual(a, b, m) {
-            if ('arguments' !== type(b)) return false;
-            a = [].slice.call(a);
-            b = [].slice.call(b);
-            return deepEqual(a, b, m);
-        }
-
-        /*!
-         * Get enumerable properties of a given object.
-         *
-         * @param {Object} a
-         * @return {Array} property names
-         */
-
-        function enumerable(a) {
-            var res = [];
-            for (var key in a) res.push(key);
-            return res;
-        }
-
-        /*!
-         * Simple equality for flat iterable objects
-         * such as Arrays or Node.js buffers.
-         *
-         * @param {Iterable} a
-         * @param {Iterable} b
-         * @return {Boolean} result
-         */
-
-        function iterableEqual(a, b) {
-            if (a.length !==  b.length) return false;
-
-            var i = 0;
-            var match = true;
-
-            for (; i < a.length; i++) {
-                if (a[i] !== b[i]) {
-                    match = false;
-                    break;
-                }
-            }
-
-            return match;
-        }
-
-        /*!
-         * Extension to `iterableEqual` specifically
-         * for Node.js Buffers.
-         *
-         * @param {Buffer} a
-         * @param {Mixed} b
-         * @return {Boolean} result
-         */
-
-        function bufferEqual(a, b) {
-            if (!Buffer.isBuffer(b)) return false;
-            return iterableEqual(a, b);
-        }
-
-        /*!
-         * Block for `objectEqual` ensuring non-existing
-         * values don't get in.
-         *
-         * @param {Mixed} object
-         * @return {Boolean} result
-         */
-
-        function isValue(a) {
-            return a !== null && a !== undefined;
-        }
-
-        /*!
-         * Recursively check the equality of two objects.
-         * Once basic sameness has been established it will
-         * defer to `deepEqual` for each enumerable key
-         * in the object.
-         *
-         * @param {Mixed} a
-         * @param {Mixed} b
-         * @return {Boolean} result
-         */
-
-        function objectEqual(a, b, m) {
-            if (!isValue(a) || !isValue(b)) {
-                return false;
-            }
-
-            if (a.prototype !== b.prototype) {
-                return false;
-            }
-
-            var i;
-            if (m) {
-                for (i = 0; i < m.length; i++) {
-                    if ((m[i][0] === a && m[i][1] === b)
-                        ||  (m[i][0] === b && m[i][1] === a)) {
-                        return true;
-                    }
-                }
-            } else {
-                m = [];
-            }
-
-            try {
-                var ka = enumerable(a);
-                var kb = enumerable(b);
-            } catch (ex) {
-                return false;
-            }
-
-            ka.sort();
-            kb.sort();
-
-            if (!iterableEqual(ka, kb)) {
-                return false;
-            }
-
-            m.push([ a, b ]);
-
-            var key;
-            for (i = ka.length - 1; i >= 0; i--) {
-                key = ka[i];
-                if (!deepEqual(a[key], b[key], m)) {
-                    return false;
-                }
-            }
-
-            return true;
-        }
-
-    });
-
-    require.register("chai", function (exports, module) {
-        module.exports = require('chai/lib/chai.js');
-
-    });
-
-    require.register("chai/lib/chai.js", function (exports, module) {
-        /*!
-         * chai
-         * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        var used = []
-            , exports = module.exports = {};
-
-        /*!
-         * Chai version
-         */
-
-        exports.version = '1.10.0';
-
-        /*!
-         * Assertion Error
-         */
-
-        exports.AssertionError = require('chaijs~assertion-error@1.0.0');
-
-        /*!
-         * Utils for plugins (not exported)
-         */
-
-        var util = require('chai/lib/chai/utils/index.js');
-
-        /**
-         * # .use(function)
-         *
-         * Provides a way to extend the internals of Chai
-         *
-         * @param {Function}
-         * @returns {this} for chaining
-         * @api public
-         */
-
-        exports.use = function (fn) {
-            if (!~used.indexOf(fn)) {
-                fn(this, util);
-                used.push(fn);
-            }
-
-            return this;
-        };
-
-        /*!
-         * Configuration
-         */
-
-        var config = require('chai/lib/chai/config.js');
-        exports.config = config;
-
-        /*!
-         * Primary `Assertion` prototype
-         */
-
-        var assertion = require('chai/lib/chai/assertion.js');
-        exports.use(assertion);
-
-        /*!
-         * Core Assertions
-         */
-
-        var core = require('chai/lib/chai/core/assertions.js');
-        exports.use(core);
-
-        /*!
-         * Expect interface
-         */
-
-        var expect = require('chai/lib/chai/interface/expect.js');
-        exports.use(expect);
-
-        /*!
-         * Should interface
-         */
-
-        var should = require('chai/lib/chai/interface/should.js');
-        exports.use(should);
-
-        /*!
-         * Assert interface
-         */
-
-        var assert = require('chai/lib/chai/interface/assert.js');
-        exports.use(assert);
-
-    });
-
-    require.register("chai/lib/chai/assertion.js", function (exports, module) {
-        /*!
-         * chai
-         * http://chaijs.com
-         * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        var config = require('chai/lib/chai/config.js');
-        var NOOP = function() { };
-
-        module.exports = function (_chai, util) {
-            /*!
-             * Module dependencies.
-             */
-
-            var AssertionError = _chai.AssertionError
-                , flag = util.flag;
-
-            /*!
-             * Module export.
-             */
-
-            _chai.Assertion = Assertion;
-
-            /*!
-             * Assertion Constructor
-             *
-             * Creates object for chaining.
-             *
-             * @api private
-             */
-
-            function Assertion (obj, msg, stack) {
-                flag(this, 'ssfi', stack || arguments.callee);
-                flag(this, 'object', obj);
-                flag(this, 'message', msg);
-            }
-
-            Object.defineProperty(Assertion, 'includeStack', {
-                get: function() {
-                    console.warn('Assertion.includeStack is deprecated, use chai.config.includeStack instead.');
-                    return config.includeStack;
-                },
-                set: function(value) {
-                    console.warn('Assertion.includeStack is deprecated, use chai.config.includeStack instead.');
-                    config.includeStack = value;
-                }
-            });
-
-            Object.defineProperty(Assertion, 'showDiff', {
-                get: function() {
-                    console.warn('Assertion.showDiff is deprecated, use chai.config.showDiff instead.');
-                    return config.showDiff;
-                },
-                set: function(value) {
-                    console.warn('Assertion.showDiff is deprecated, use chai.config.showDiff instead.');
-                    config.showDiff = value;
-                }
-            });
-
-            Assertion.addProperty = function (name, fn) {
-                util.addProperty(this.prototype, name, fn);
-            };
-
-            Assertion.addMethod = function (name, fn) {
-                util.addMethod(this.prototype, name, fn);
-            };
-
-            Assertion.addChainableMethod = function (name, fn, chainingBehavior) {
-                util.addChainableMethod(this.prototype, name, fn, chainingBehavior);
-            };
-
-            Assertion.addChainableNoop = function(name, fn) {
-                util.addChainableMethod(this.prototype, name, NOOP, fn);
-            };
-
-            Assertion.overwriteProperty = function (name, fn) {
-                util.overwriteProperty(this.prototype, name, fn);
-            };
-
-            Assertion.overwriteMethod = function (name, fn) {
-                util.overwriteMethod(this.prototype, name, fn);
-            };
-
-            Assertion.overwriteChainableMethod = function (name, fn, chainingBehavior) {
-                util.overwriteChainableMethod(this.prototype, name, fn, chainingBehavior);
-            };
-
-            /*!
-             * ### .assert(expression, message, negateMessage, expected, actual)
-             *
-             * Executes an expression and check expectations. Throws AssertionError for reporting if test doesn't pass.
-             *
-             * @name assert
-             * @param {Philosophical} expression to be tested
-             * @param {String or Function} message or function that returns message to display if fails
-             * @param {String or Function} negatedMessage or function that returns negatedMessage to display if negated expression fails
-             * @param {Mixed} expected value (remember to check for negation)
-             * @param {Mixed} actual (optional) will default to `this.obj`
-             * @api private
-             */
-
-            Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual, showDiff) {
-                var ok = util.test(this, arguments);
-                if (true !== showDiff) showDiff = false;
-                if (true !== config.showDiff) showDiff = false;
-
-                if (!ok) {
-                    var msg = util.getMessage(this, arguments)
-                        , actual = util.getActual(this, arguments);
-                    throw new AssertionError(msg, {
-                        actual: actual
-                        , expected: expected
-                        , showDiff: showDiff
-                    }, (config.includeStack) ? this.assert : flag(this, 'ssfi'));
-                }
-            };
-
-            /*!
-             * ### ._obj
-             *
-             * Quick reference to stored `actual` value for plugin developers.
-             *
-             * @api private
-             */
-
-            Object.defineProperty(Assertion.prototype, '_obj',
-                { get: function () {
-                    return flag(this, 'object');
-                }
-                    , set: function (val) {
-                    flag(this, 'object', val);
-                }
-                });
-        };
-
-    });
-
-    require.register("chai/lib/chai/config.js", function (exports, module) {
-        module.exports = {
-
-            /**
-             * ### config.includeStack
-             *
-             * User configurable property, influences whether stack trace
-             * is included in Assertion error message. Default of false
-             * suppresses stack trace in the error message.
-             *
-             *     chai.config.includeStack = true;  // enable stack on error
-             *
-             * @param {Boolean}
-             * @api public
-             */
-
-            includeStack: false,
-
-            /**
-             * ### config.showDiff
-             *
-             * User configurable property, influences whether or not
-             * the `showDiff` flag should be included in the thrown
-             * AssertionErrors. `false` will always be `false`; `true`
-             * will be true when the assertion has requested a diff
-             * be shown.
-             *
-             * @param {Boolean}
-             * @api public
-             */
-
-            showDiff: true,
-
-            /**
-             * ### config.truncateThreshold
-             *
-             * User configurable property, sets length threshold for actual and
-             * expected values in assertion errors. If this threshold is exceeded,
-             * the value is truncated.
-             *
-             * Set it to zero if you want to disable truncating altogether.
-             *
-             *     chai.config.truncateThreshold = 0;  // disable truncating
-             *
-             * @param {Number}
-             * @api public
-             */
-
-            truncateThreshold: 40
-
-        };
-
-    });
-
-    require.register("chai/lib/chai/core/assertions.js", function (exports, module) {
-        /*!
-         * chai
-         * http://chaijs.com
-         * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        module.exports = function (chai, _) {
-            var Assertion = chai.Assertion
-                , toString = Object.prototype.toString
-                , flag = _.flag;
-
-            /**
-             * ### Language Chains
-             *
-             * The following are provided as chainable getters to
-             * improve the readability of your assertions. They
-             * do not provide testing capabilities unless they
-             * have been overwritten by a plugin.
-             *
-             * **Chains**
-             *
-             * - to
-             * - be
-             * - been
-             * - is
-             * - that
-             * - and
-             * - has
-             * - have
-             * - with
-             * - at
-             * - of
-             * - same
-             *
-             * @name language chains
-             * @api public
-             */
-
-            [ 'to', 'be', 'been'
-                , 'is', 'and', 'has', 'have'
-                , 'with', 'that', 'at'
-                , 'of', 'same' ].forEach(function (chain) {
-                    Assertion.addProperty(chain, function () {
-                        return this;
-                    });
-                });
-
-            /**
-             * ### .not
-             *
-             * Negates any of assertions following in the chain.
-             *
-             *     expect(foo).to.not.equal('bar');
-             *     expect(goodFn).to.not.throw(Error);
-             *     expect({ foo: 'baz' }).to.have.property('foo')
-             *       .and.not.equal('bar');
-             *
-             * @name not
-             * @api public
-             */
-
-            Assertion.addProperty('not', function () {
-                flag(this, 'negate', true);
-            });
-
-            /**
-             * ### .deep
-             *
-             * Sets the `deep` flag, later used by the `equal` and
-             * `property` assertions.
-             *
-             *     expect(foo).to.deep.equal({ bar: 'baz' });
-             *     expect({ foo: { bar: { baz: 'quux' } } })
-             *       .to.have.deep.property('foo.bar.baz', 'quux');
-             *
-             * @name deep
-             * @api public
-             */
-
-            Assertion.addProperty('deep', function () {
-                flag(this, 'deep', true);
-            });
-
-            /**
-             * ### .a(type)
-             *
-             * The `a` and `an` assertions are aliases that can be
-             * used either as language chains or to assert a value's
-             * type.
-             *
-             *     // typeof
-             *     expect('test').to.be.a('string');
-             *     expect({ foo: 'bar' }).to.be.an('object');
-             *     expect(null).to.be.a('null');
-             *     expect(undefined).to.be.an('undefined');
-             *
-             *     // language chain
-             *     expect(foo).to.be.an.instanceof(Foo);
-             *
-             * @name a
-             * @alias an
-             * @param {String} type
-             * @param {String} message _optional_
-             * @api public
-             */
-
-            function an (type, msg) {
-                if (msg) flag(this, 'message', msg);
-                type = type.toLowerCase();
-                var obj = flag(this, 'object')
-                    , article = ~[ 'a', 'e', 'i', 'o', 'u' ].indexOf(type.charAt(0)) ? 'an ' : 'a ';
-
-                this.assert(
-                    type === _.type(obj)
-                    , 'expected #{this} to be ' + article + type
-                    , 'expected #{this} not to be ' + article + type
-                );
-            }
-
-            Assertion.addChainableMethod('an', an);
-            Assertion.addChainableMethod('a', an);
-
-            /**
-             * ### .include(value)
-             *
-             * The `include` and `contain` assertions can be used as either property
-             * based language chains or as methods to assert the inclusion of an object
-             * in an array or a substring in a string. When used as language chains,
-             * they toggle the `contain` flag for the `keys` assertion.
-             *
-             *     expect([1,2,3]).to.include(2);
-             *     expect('foobar').to.contain('foo');
-             *     expect({ foo: 'bar', hello: 'universe' }).to.include.keys('foo');
-             *
-             * @name include
-             * @alias contain
-             * @param {Object|String|Number} obj
-             * @param {String} message _optional_
-             * @api public
-             */
-
-            function includeChainingBehavior () {
-                flag(this, 'contains', true);
-            }
-
-            function include (val, msg) {
-                if (msg) flag(this, 'message', msg);
-                var obj = flag(this, 'object');
-                var expected = false;
-                if (_.type(obj) === 'array' && _.type(val) === 'object') {
-                    for (var i in obj) {
-                        if (_.eql(obj[i], val)) {
-                            expected = true;
-                            break;
-                        }
-                    }
-                } else if (_.type(val) === 'object') {
-                    if (!flag(this, 'negate')) {
-                        for (var k in val) new Assertion(obj).property(k, val[k]);
-                        return;
-                    }
-                    var subset = {}
-                    for (var k in val) subset[k] = obj[k]
-                    expected = _.eql(subset, val);
-                } else {
-                    expected = obj && ~obj.indexOf(val)
-                }
-                this.assert(
-                    expected
-                    , 'expected #{this} to include ' + _.inspect(val)
-                    , 'expected #{this} to not include ' + _.inspect(val));
-            }
-
-            Assertion.addChainableMethod('include', include, includeChainingBehavior);
-            Assertion.addChainableMethod('contain', include, includeChainingBehavior);
-
-            /**
-             * ### .ok
-             *
-             * Asserts that the target is truthy.
-             *
-             *     expect('everthing').to.be.ok;
-             *     expect(1).to.be.ok;
-             *     expect(false).to.not.be.ok;
-             *     expect(undefined).to.not.be.ok;
-             *     expect(null).to.not.be.ok;
-             *
-             * Can also be used as a function, which prevents some linter errors.
-             *
-             *     expect('everthing').to.be.ok();
-             *
-             * @name ok
-             * @api public
-             */
-
-            Assertion.addChainableNoop('ok', function () {
-                this.assert(
-                    flag(this, 'object')
-                    , 'expected #{this} to be truthy'
-                    , 'expected #{this} to be falsy');
-            });
-
-            /**
-             * ### .true
-             *
-             * Asserts that the target is `true`.
-             *
-             *     expect(true).to.be.true;
-             *     expect(1).to.not.be.true;
-             *
-             * Can also be used as a function, which prevents some linter errors.
-             *
-             *     expect(true).to.be.true();
-             *
-             * @name true
-             * @api public
-             */
-
-            Assertion.addChainableNoop('true', function () {
-                this.assert(
-                    true === flag(this, 'object')
-                    , 'expected #{this} to be true'
-                    , 'expected #{this} to be false'
-                    , this.negate ? false : true
-                );
-            });
-
-            /**
-             * ### .false
-             *
-             * Asserts that the target is `false`.
-             *
-             *     expect(false).to.be.false;
-             *     expect(0).to.not.be.false;
-             *
-             * Can also be used as a function, which prevents some linter errors.
-             *
-             *     expect(false).to.be.false();
-             *
-             * @name false
-             * @api public
-             */
-
-            Assertion.addChainableNoop('false', function () {
-                this.assert(
-                    false === flag(this, 'object')
-                    , 'expected #{this} to be false'
-                    , 'expected #{this} to be true'
-                    , this.negate ? true : false
-                );
-            });
-
-            /**
-             * ### .null
-             *
-             * Asserts that the target is `null`.
-             *
-             *     expect(null).to.be.null;
-             *     expect(undefined).not.to.be.null;
-             *
-             * Can also be used as a function, which prevents some linter errors.
-             *
-             *     expect(null).to.be.null();
-             *
-             * @name null
-             * @api public
-             */
-
-            Assertion.addChainableNoop('null', function () {
-                this.assert(
-                    null === flag(this, 'object')
-                    , 'expected #{this} to be null'
-                    , 'expected #{this} not to be null'
-                );
-            });
-
-            /**
-             * ### .undefined
-             *
-             * Asserts that the target is `undefined`.
-             *
-             *     expect(undefined).to.be.undefined;
-             *     expect(null).to.not.be.undefined;
-             *
-             * Can also be used as a function, which prevents some linter errors.
-             *
-             *     expect(undefined).to.be.undefined();
-             *
-             * @name undefined
-             * @api public
-             */
-
-            Assertion.addChainableNoop('undefined', function () {
-                this.assert(
-                    undefined === flag(this, 'object')
-                    , 'expected #{this} to be undefined'
-                    , 'expected #{this} not to be undefined'
-                );
-            });
-
-            /**
-             * ### .exist
-             *
-             * Asserts that the target is neither `null` nor `undefined`.
-             *
-             *     var foo = 'hi'
-             *       , bar = null
-             *       , baz;
-             *
-             *     expect(foo).to.exist;
-             *     expect(bar).to.not.exist;
-             *     expect(baz).to.not.exist;
-             *
-             * Can also be used as a function, which prevents some linter errors.
-             *
-             *     expect(foo).to.exist();
-             *
-             * @name exist
-             * @api public
-             */
-
-            Assertion.addChainableNoop('exist', function () {
-                this.assert(
-                    null != flag(this, 'object')
-                    , 'expected #{this} to exist'
-                    , 'expected #{this} to not exist'
-                );
-            });
-
-
-            /**
-             * ### .empty
-             *
-             * Asserts that the target's length is `0`. For arrays, it checks
-             * the `length` property. For objects, it gets the count of
-             * enumerable keys.
-             *
-             *     expect([]).to.be.empty;
-             *     expect('').to.be.empty;
-             *     expect({}).to.be.empty;
-             *
-             * Can also be used as a function, which prevents some linter errors.
-             *
-             *     expect([]).to.be.empty();
-             *
-             * @name empty
-             * @api public
-             */
-
-            Assertion.addChainableNoop('empty', function () {
-                var obj = flag(this, 'object')
-                    , expected = obj;
-
-                if (Array.isArray(obj) || 'string' === typeof object) {
-                    expected = obj.length;
-                } else if (typeof obj === 'object') {
-                    expected = Object.keys(obj).length;
-                }
-
-                this.assert(
-                    !expected
-                    , 'expected #{this} to be empty'
-                    , 'expected #{this} not to be empty'
-                );
-            });
-
-            /**
-             * ### .arguments
-             *
-             * Asserts that the target is an arguments object.
-             *
-             *     function test () {
-   *       expect(arguments).to.be.arguments;
-   *     }
-             *
-             * Can also be used as a function, which prevents some linter errors.
-             *
-             *     function test () {
-   *       expect(arguments).to.be.arguments();
-   *     }
-             *
-             * @name arguments
-             * @alias Arguments
-             * @api public
-             */
-
-            function checkArguments () {
-                var obj = flag(this, 'object')
-                    , type = Object.prototype.toString.call(obj);
-                this.assert(
-                    '[object Arguments]' === type
-                    , 'expected #{this} to be arguments but got ' + type
-                    , 'expected #{this} to not be arguments'
-                );
-            }
-
-            Assertion.addChainableNoop('arguments', checkArguments);
-            Assertion.addChainableNoop('Arguments', checkArguments);
-
-            /**
-             * ### .equal(value)
-             *
-             * Asserts that the target is strictly equal (`===`) to `value`.
-             * Alternately, if the `deep` flag is set, asserts that
-             * the target is deeply equal to `value`.
-             *
-             *     expect('hello').to.equal('hello');
-             *     expect(42).to.equal(42);
-             *     expect(1).to.not.equal(true);
-             *     expect({ foo: 'bar' }).to.not.equal({ foo: 'bar' });
-             *     expect({ foo: 'bar' }).to.deep.equal({ foo: 'bar' });
-             *
-             * @name equal
-             * @alias equals
-             * @alias eq
-             * @alias deep.equal
-             * @param {Mixed} value
-             * @param {String} message _optional_
-             * @api public
-             */
-
-            function assertEqual (val, msg) {
-                if (msg) flag(this, 'message', msg);
-                var obj = flag(this, 'object');
-                if (flag(this, 'deep')) {
-                    return this.eql(val);
-                } else {
-                    this.assert(
-                        val === obj
-                        , 'expected #{this} to equal #{exp}'
-                        , 'expected #{this} to not equal #{exp}'
-                        , val
-                        , this._obj
-                        , true
-                    );
-                }
-            }
-
-            Assertion.addMethod('equal', assertEqual);
-            Assertion.addMethod('equals', assertEqual);
-            Assertion.addMethod('eq', assertEqual);
-
-            /**
-             * ### .eql(value)
-             *
-             * Asserts that the target is deeply equal to `value`.
-             *
-             *     expect({ foo: 'bar' }).to.eql({ foo: 'bar' });
-             *     expect([ 1, 2, 3 ]).to.eql([ 1, 2, 3 ]);
-             *
-             * @name eql
-             * @alias eqls
-             * @param {Mixed} value
-             * @param {String} message _optional_
-             * @api public
-             */
-
-            function assertEql(obj, msg) {
-                if (msg) flag(this, 'message', msg);
-                this.assert(
-                    _.eql(obj, flag(this, 'object'))
-                    , 'expected #{this} to deeply equal #{exp}'
-                    , 'expected #{this} to not deeply equal #{exp}'
-                    , obj
-                    , this._obj
-                    , true
-                );
-            }
-
-            Assertion.addMethod('eql', assertEql);
-            Assertion.addMethod('eqls', assertEql);
-
-            /**
-             * ### .above(value)
-             *
-             * Asserts that the target is greater than `value`.
-             *
-             *     expect(10).to.be.above(5);
-             *
-             * Can also be used in conjunction with `length` to
-             * assert a minimum length. The benefit being a
-             * more informative error message than if the length
-             * was supplied directly.
-             *
-             *     expect('foo').to.have.length.above(2);
-             *     expect([ 1, 2, 3 ]).to.have.length.above(2);
-             *
-             * @name above
-             * @alias gt
-             * @alias greaterThan
-             * @param {Number} value
-             * @param {String} message _optional_
-             * @api public
-             */
-
-            function assertAbove (n, msg) {
-                if (msg) flag(this, 'message', msg);
-                var obj = flag(this, 'object');
-                if (flag(this, 'doLength')) {
-                    new Assertion(obj, msg).to.have.property('length');
-                    var len = obj.length;
-                    this.assert(
-                        len > n
-                        , 'expected #{this} to have a length above #{exp} but got #{act}'
-                        , 'expected #{this} to not have a length above #{exp}'
-                        , n
-                        , len
-                    );
-                } else {
-                    this.assert(
-                        obj > n
-                        , 'expected #{this} to be above ' + n
-                        , 'expected #{this} to be at most ' + n
-                    );
-                }
-            }
-
-            Assertion.addMethod('above', assertAbove);
-            Assertion.addMethod('gt', assertAbove);
-            Assertion.addMethod('greaterThan', assertAbove);
-
-            /**
-             * ### .least(value)
-             *
-             * Asserts that the target is greater than or equal to `value`.
-             *
-             *     expect(10).to.be.at.least(10);
-             *
-             * Can also be used in conjunction with `length` to
-             * assert a minimum length. The benefit being a
-             * more informative error message than if the length
-             * was supplied directly.
-             *
-             *     expect('foo').to.have.length.of.at.least(2);
-             *     expect([ 1, 2, 3 ]).to.have.length.of.at.least(3);
-             *
-             * @name least
-             * @alias gte
-             * @param {Number} value
-             * @param {String} message _optional_
-             * @api public
-             */
-
-            function assertLeast (n, msg) {
-                if (msg) flag(this, 'message', msg);
-                var obj = flag(this, 'object');
-                if (flag(this, 'doLength')) {
-                    new Assertion(obj, msg).to.have.property('length');
-                    var len = obj.length;
-                    this.assert(
-                        len >= n
-                        , 'expected #{this} to have a length at least #{exp} but got #{act}'
-                        , 'expected #{this} to have a length below #{exp}'
-                        , n
-                        , len
-                    );
-                } else {
-                    this.assert(
-                        obj >= n
-                        , 'expected #{this} to be at least ' + n
-                        , 'expected #{this} to be below ' + n
-                    );
-                }
-            }
-
-            Assertion.addMethod('least', assertLeast);
-            Assertion.addMethod('gte', assertLeast);
-
-            /**
-             * ### .below(value)
-             *
-             * Asserts that the target is less than `value`.
-             *
-             *     expect(5).to.be.below(10);
-             *
-             * Can also be used in conjunction with `length` to
-             * assert a maximum length. The benefit being a
-             * more informative error message than if the length
-             * was supplied directly.
-             *
-             *     expect('foo').to.have.length.below(4);
-             *     expect([ 1, 2, 3 ]).to.have.length.below(4);
-             *
-             * @name below
-             * @alias lt
-             * @alias lessThan
-             * @param {Number} value
-             * @param {String} message _optional_
-             * @api public
-             */
-
-            function assertBelow (n, msg) {
-                if (msg) flag(this, 'message', msg);
-                var obj = flag(this, 'object');
-                if (flag(this, 'doLength')) {
-                    new Assertion(obj, msg).to.have.property('length');
-                    var len = obj.length;
-                    this.assert(
-                        len < n
-                        , 'expected #{this} to have a length below #{exp} but got #{act}'
-                        , 'expected #{this} to not have a length below #{exp}'
-                        , n
-                        , len
-                    );
-                } else {
-                    this.assert(
-                        obj < n
-                        , 'expected #{this} to be below ' + n
-                        , 'expected #{this} to be at least ' + n
-                    );
-                }
-            }
-
-            Assertion.addMethod('below', assertBelow);
-            Assertion.addMethod('lt', assertBelow);
-            Assertion.addMethod('lessThan', assertBelow);
-
-            /**
-             * ### .most(value)
-             *
-             * Asserts that the target is less than or equal to `value`.
-             *
-             *     expect(5).to.be.at.most(5);
-             *
-             * Can also be used in conjunction with `length` to
-             * assert a maximum length. The benefit being a
-             * more informative error message than if the length
-             * was supplied directly.
-             *
-             *     expect('foo').to.have.length.of.at.most(4);
-             *     expect([ 1, 2, 3 ]).to.have.length.of.at.most(3);
-             *
-             * @name most
-             * @alias lte
-             * @param {Number} value
-             * @param {String} message _optional_
-             * @api public
-             */
-
-            function assertMost (n, msg) {
-                if (msg) flag(this, 'message', msg);
-                var obj = flag(this, 'object');
-                if (flag(this, 'doLength')) {
-                    new Assertion(obj, msg).to.have.property('length');
-                    var len = obj.length;
-                    this.assert(
-                        len <= n
-                        , 'expected #{this} to have a length at most #{exp} but got #{act}'
-                        , 'expected #{this} to have a length above #{exp}'
-                        , n
-                        , len
-                    );
-                } else {
-                    this.assert(
-                        obj <= n
-                        , 'expected #{this} to be at most ' + n
-                        , 'expected #{this} to be above ' + n
-                    );
-                }
-            }
-
-            Assertion.addMethod('most', assertMost);
-            Assertion.addMethod('lte', assertMost);
-
-            /**
-             * ### .within(start, finish)
-             *
-             * Asserts that the target is within a range.
-             *
-             *     expect(7).to.be.within(5,10);
-             *
-             * Can also be used in conjunction with `length` to
-             * assert a length range. The benefit being a
-             * more informative error message than if the length
-             * was supplied directly.
-             *
-             *     expect('foo').to.have.length.within(2,4);
-             *     expect([ 1, 2, 3 ]).to.have.length.within(2,4);
-             *
-             * @name within
-             * @param {Number} start lowerbound inclusive
-             * @param {Number} finish upperbound inclusive
-             * @param {String} message _optional_
-             * @api public
-             */
-
-            Assertion.addMethod('within', function (start, finish, msg) {
-                if (msg) flag(this, 'message', msg);
-                var obj = flag(this, 'object')
-                    , range = start + '..' + finish;
-                if (flag(this, 'doLength')) {
-                    new Assertion(obj, msg).to.have.property('length');
-                    var len = obj.length;
-                    this.assert(
-                        len >= start && len <= finish
-                        , 'expected #{this} to have a length within ' + range
-                        , 'expected #{this} to not have a length within ' + range
-                    );
-                } else {
-                    this.assert(
-                        obj >= start && obj <= finish
-                        , 'expected #{this} to be within ' + range
-                        , 'expected #{this} to not be within ' + range
-                    );
-                }
-            });
-
-            /**
-             * ### .instanceof(constructor)
-             *
-             * Asserts that the target is an instance of `constructor`.
-             *
-             *     var Tea = function (name) { this.name = name; }
-             *       , Chai = new Tea('chai');
-             *
-             *     expect(Chai).to.be.an.instanceof(Tea);
-             *     expect([ 1, 2, 3 ]).to.be.instanceof(Array);
-             *
-             * @name instanceof
-             * @param {Constructor} constructor
-             * @param {String} message _optional_
-             * @alias instanceOf
-             * @api public
-             */
-
-            function assertInstanceOf (constructor, msg) {
-                if (msg) flag(this, 'message', msg);
-                var name = _.getName(constructor);
-                this.assert(
-                    flag(this, 'object') instanceof constructor
-                    , 'expected #{this} to be an instance of ' + name
-                    , 'expected #{this} to not be an instance of ' + name
-                );
-            };
-
-            Assertion.addMethod('instanceof', assertInstanceOf);
-            Assertion.addMethod('instanceOf', assertInstanceOf);
-
-            /**
-             * ### .property(name, [value])
-             *
-             * Asserts that the target has a property `name`, optionally asserting that
-             * the value of that property is strictly equal to  `value`.
-             * If the `deep` flag is set, you can use dot- and bracket-notation for deep
-             * references into objects and arrays.
-             *
-             *     // simple referencing
-             *     var obj = { foo: 'bar' };
-             *     expect(obj).to.have.property('foo');
-             *     expect(obj).to.have.property('foo', 'bar');
-             *
-             *     // deep referencing
-             *     var deepObj = {
-   *         green: { tea: 'matcha' }
-   *       , teas: [ 'chai', 'matcha', { tea: 'konacha' } ]
-   *     };
-
-             *     expect(deepObj).to.have.deep.property('green.tea', 'matcha');
-             *     expect(deepObj).to.have.deep.property('teas[1]', 'matcha');
-             *     expect(deepObj).to.have.deep.property('teas[2].tea', 'konacha');
-             *
-             * You can also use an array as the starting point of a `deep.property`
-             * assertion, or traverse nested arrays.
-             *
-             *     var arr = [
-             *         [ 'chai', 'matcha', 'konacha' ]
-             *       , [ { tea: 'chai' }
-             *         , { tea: 'matcha' }
-             *         , { tea: 'konacha' } ]
-             *     ];
-             *
-             *     expect(arr).to.have.deep.property('[0][1]', 'matcha');
-             *     expect(arr).to.have.deep.property('[1][2].tea', 'konacha');
-             *
-             * Furthermore, `property` changes the subject of the assertion
-             * to be the value of that property from the original object. This
-             * permits for further chainable assertions on that property.
-             *
-             *     expect(obj).to.have.property('foo')
-             *       .that.is.a('string');
-             *     expect(deepObj).to.have.property('green')
-             *       .that.is.an('object')
-             *       .that.deep.equals({ tea: 'matcha' });
-             *     expect(deepObj).to.have.property('teas')
-             *       .that.is.an('array')
-             *       .with.deep.property('[2]')
-             *         .that.deep.equals({ tea: 'konacha' });
-             *
-             * @name property
-             * @alias deep.property
-             * @param {String} name
-             * @param {Mixed} value (optional)
-             * @param {String} message _optional_
-             * @returns value of property for chaining
-             * @api public
-             */
-
-            Assertion.addMethod('property', function (name, val, msg) {
-                if (msg) flag(this, 'message', msg);
-
-                var descriptor = flag(this, 'deep') ? 'deep property ' : 'property '
-                    , negate = flag(this, 'negate')
-                    , obj = flag(this, 'object')
-                    , value = flag(this, 'deep')
-                        ? _.getPathValue(name, obj)
-                        : obj[name];
-
-                if (negate && undefined !== val) {
-                    if (undefined === value) {
-                        msg = (msg != null) ? msg + ': ' : '';
-                        throw new Error(msg + _.inspect(obj) + ' has no ' + descriptor + _.inspect(name));
-                    }
-                } else {
-                    this.assert(
-                        undefined !== value
-                        , 'expected #{this} to have a ' + descriptor + _.inspect(name)
-                        , 'expected #{this} to not have ' + descriptor + _.inspect(name));
-                }
-
-                if (undefined !== val) {
-                    this.assert(
-                        val === value
-                        , 'expected #{this} to have a ' + descriptor + _.inspect(name) + ' of #{exp}, but got #{act}'
-                        , 'expected #{this} to not have a ' + descriptor + _.inspect(name) + ' of #{act}'
-                        , val
-                        , value
-                    );
-                }
-
-                flag(this, 'object', value);
-            });
-
-
-            /**
-             * ### .ownProperty(name)
-             *
-             * Asserts that the target has an own property `name`.
-             *
-             *     expect('test').to.have.ownProperty('length');
-             *
-             * @name ownProperty
-             * @alias haveOwnProperty
-             * @param {String} name
-             * @param {String} message _optional_
-             * @api public
-             */
-
-            function assertOwnProperty (name, msg) {
-                if (msg) flag(this, 'message', msg);
-                var obj = flag(this, 'object');
-                this.assert(
-                    obj.hasOwnProperty(name)
-                    , 'expected #{this} to have own property ' + _.inspect(name)
-                    , 'expected #{this} to not have own property ' + _.inspect(name)
-                );
-            }
-
-            Assertion.addMethod('ownProperty', assertOwnProperty);
-            Assertion.addMethod('haveOwnProperty', assertOwnProperty);
-
-            /**
-             * ### .length(value)
-             *
-             * Asserts that the target's `length` property has
-             * the expected value.
-             *
-             *     expect([ 1, 2, 3]).to.have.length(3);
-             *     expect('foobar').to.have.length(6);
-             *
-             * Can also be used as a chain precursor to a value
-             * comparison for the length property.
-             *
-             *     expect('foo').to.have.length.above(2);
-             *     expect([ 1, 2, 3 ]).to.have.length.above(2);
-             *     expect('foo').to.have.length.below(4);
-             *     expect([ 1, 2, 3 ]).to.have.length.below(4);
-             *     expect('foo').to.have.length.within(2,4);
-             *     expect([ 1, 2, 3 ]).to.have.length.within(2,4);
-             *
-             * @name length
-             * @alias lengthOf
-             * @param {Number} length
-             * @param {String} message _optional_
-             * @api public
-             */
-
-            function assertLengthChain () {
-                flag(this, 'doLength', true);
-            }
-
-            function assertLength (n, msg) {
-                if (msg) flag(this, 'message', msg);
-                var obj = flag(this, 'object');
-                new Assertion(obj, msg).to.have.property('length');
-                var len = obj.length;
-
-                this.assert(
-                    len == n
-                    , 'expected #{this} to have a length of #{exp} but got #{act}'
-                    , 'expected #{this} to not have a length of #{act}'
-                    , n
-                    , len
-                );
-            }
-
-            Assertion.addChainableMethod('length', assertLength, assertLengthChain);
-            Assertion.addMethod('lengthOf', assertLength);
-
-            /**
-             * ### .match(regexp)
-             *
-             * Asserts that the target matches a regular expression.
-             *
-             *     expect('foobar').to.match(/^foo/);
-             *
-             * @name match
-             * @param {RegExp} RegularExpression
-             * @param {String} message _optional_
-             * @api public
-             */
-
-            Assertion.addMethod('match', function (re, msg) {
-                if (msg) flag(this, 'message', msg);
-                var obj = flag(this, 'object');
-                this.assert(
-                    re.exec(obj)
-                    , 'expected #{this} to match ' + re
-                    , 'expected #{this} not to match ' + re
-                );
-            });
-
-            /**
-             * ### .string(string)
-             *
-             * Asserts that the string target contains another string.
-             *
-             *     expect('foobar').to.have.string('bar');
-             *
-             * @name string
-             * @param {String} string
-             * @param {String} message _optional_
-             * @api public
-             */
-
-            Assertion.addMethod('string', function (str, msg) {
-                if (msg) flag(this, 'message', msg);
-                var obj = flag(this, 'object');
-                new Assertion(obj, msg).is.a('string');
-
-                this.assert(
-                    ~obj.indexOf(str)
-                    , 'expected #{this} to contain ' + _.inspect(str)
-                    , 'expected #{this} to not contain ' + _.inspect(str)
-                );
-            });
-
-
-            /**
-             * ### .keys(key1, [key2], [...])
-             *
-             * Asserts that the target has exactly the given keys, or
-             * asserts the inclusion of some keys when using the
-             * `include` or `contain` modifiers.
-             *
-             *     expect({ foo: 1, bar: 2 }).to.have.keys(['foo', 'bar']);
-             *     expect({ foo: 1, bar: 2, baz: 3 }).to.contain.keys('foo', 'bar');
-             *
-             * @name keys
-             * @alias key
-             * @param {String...|Array} keys
-             * @api public
-             */
-
-            function assertKeys (keys) {
-                var obj = flag(this, 'object')
-                    , str
-                    , ok = true;
-
-                keys = keys instanceof Array
-                    ? keys
-                    : Array.prototype.slice.call(arguments);
-
-                if (!keys.length) throw new Error('keys required');
-
-                var actual = Object.keys(obj)
-                    , expected = keys
-                    , len = keys.length;
-
-                // Inclusion
-                ok = keys.every(function(key){
-                    return ~actual.indexOf(key);
-                });
-
-                // Strict
-                if (!flag(this, 'negate') && !flag(this, 'contains')) {
-                    ok = ok && keys.length == actual.length;
-                }
-
-                // Key string
-                if (len > 1) {
-                    keys = keys.map(function(key){
-                        return _.inspect(key);
-                    });
-                    var last = keys.pop();
-                    str = keys.join(', ') + ', and ' + last;
-                } else {
-                    str = _.inspect(keys[0]);
-                }
-
-                // Form
-                str = (len > 1 ? 'keys ' : 'key ') + str;
-
-                // Have / include
-                str = (flag(this, 'contains') ? 'contain ' : 'have ') + str;
-
-                // Assertion
-                this.assert(
-                    ok
-                    , 'expected #{this} to ' + str
-                    , 'expected #{this} to not ' + str
-                    , expected.sort()
-                    , actual.sort()
-                    , true
-                );
-            }
-
-            Assertion.addMethod('keys', assertKeys);
-            Assertion.addMethod('key', assertKeys);
-
-            /**
-             * ### .throw(constructor)
-             *
-             * Asserts that the function target will throw a specific error, or specific type of error
-             * (as determined using `instanceof`), optionally with a RegExp or string inclusion test
-             * for the error's message.
-             *
-             *     var err = new ReferenceError('This is a bad function.');
-             *     var fn = function () { throw err; }
-             *     expect(fn).to.throw(ReferenceError);
-             *     expect(fn).to.throw(Error);
-             *     expect(fn).to.throw(/bad function/);
-             *     expect(fn).to.not.throw('good function');
-             *     expect(fn).to.throw(ReferenceError, /bad function/);
-             *     expect(fn).to.throw(err);
-             *     expect(fn).to.not.throw(new RangeError('Out of range.'));
-             *
-             * Please note that when a throw expectation is negated, it will check each
-             * parameter independently, starting with error constructor type. The appropriate way
-             * to check for the existence of a type of error but for a message that does not match
-             * is to use `and`.
-             *
-             *     expect(fn).to.throw(ReferenceError)
-             *        .and.not.throw(/good function/);
-             *
-             * @name throw
-             * @alias throws
-             * @alias Throw
-             * @param {ErrorConstructor} constructor
-             * @param {String|RegExp} expected error message
-             * @param {String} message _optional_
-             * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types
-             * @returns error for chaining (null if no error)
-             * @api public
-             */
-
-            function assertThrows (constructor, errMsg, msg) {
-                if (msg) flag(this, 'message', msg);
-                var obj = flag(this, 'object');
-                new Assertion(obj, msg).is.a('function');
-
-                var thrown = false
-                    , desiredError = null
-                    , name = null
-                    , thrownError = null;
-
-                if (arguments.length === 0) {
-                    errMsg = null;
-                    constructor = null;
-                } else if (constructor && (constructor instanceof RegExp || 'string' === typeof constructor)) {
-                    errMsg = constructor;
-                    constructor = null;
-                } else if (constructor && constructor instanceof Error) {
-                    desiredError = constructor;
-                    constructor = null;
-                    errMsg = null;
-                } else if (typeof constructor === 'function') {
-                    name = constructor.prototype.name || constructor.name;
-                    if (name === 'Error' && constructor !== Error) {
-                        name = (new constructor()).name;
-                    }
-                } else {
-                    constructor = null;
-                }
-
-                try {
-                    obj();
-                } catch (err) {
-                    // first, check desired error
-                    if (desiredError) {
-                        this.assert(
-                            err === desiredError
-                            , 'expected #{this} to throw #{exp} but #{act} was thrown'
-                            , 'expected #{this} to not throw #{exp}'
-                            , (desiredError instanceof Error ? desiredError.toString() : desiredError)
-                            , (err instanceof Error ? err.toString() : err)
-                        );
-
-                        flag(this, 'object', err);
-                        return this;
-                    }
-
-                    // next, check constructor
-                    if (constructor) {
-                        this.assert(
-                            err instanceof constructor
-                            , 'expected #{this} to throw #{exp} but #{act} was thrown'
-                            , 'expected #{this} to not throw #{exp} but #{act} was thrown'
-                            , name
-                            , (err instanceof Error ? err.toString() : err)
-                        );
-
-                        if (!errMsg) {
-                            flag(this, 'object', err);
-                            return this;
-                        }
-                    }
-
-                    // next, check message
-                    var message = 'object' === _.type(err) && "message" in err
-                        ? err.message
-                        : '' + err;
-
-                    if ((message != null) && errMsg && errMsg instanceof RegExp) {
-                        this.assert(
-                            errMsg.exec(message)
-                            , 'expected #{this} to throw error matching #{exp} but got #{act}'
-                            , 'expected #{this} to throw error not matching #{exp}'
-                            , errMsg
-                            , message
-                        );
-
-                        flag(this, 'object', err);
-                        return this;
-                    } else if ((message != null) && errMsg && 'string' === typeof errMsg) {
-                        this.assert(
-                            ~message.indexOf(errMsg)
-                            , 'expected #{this} to throw error including #{exp} but got #{act}'
-                            , 'expected #{this} to throw error not including #{act}'
-                            , errMsg
-                            , message
-                        );
-
-                        flag(this, 'object', err);
-                        return this;
-                    } else {
-                        thrown = true;
-                        thrownError = err;
-                    }
-                }
-
-                var actuallyGot = ''
-                    , expectedThrown = name !== null
-                        ? name
-                        : desiredError
-                        ? '#{exp}' //_.inspect(desiredError)
-                        : 'an error';
-
-                if (thrown) {
-                    actuallyGot = ' but #{act} was thrown'
-                }
-
-                this.assert(
-                    thrown === true
-                    , 'expected #{this} to throw ' + expectedThrown + actuallyGot
-                    , 'expected #{this} to not throw ' + expectedThrown + actuallyGot
-                    , (desiredError instanceof Error ? desiredError.toString() : desiredError)
-                    , (thrownError instanceof Error ? thrownError.toString() : thrownError)
-                );
-
-                flag(this, 'object', thrownError);
-            };
-
-            Assertion.addMethod('throw', assertThrows);
-            Assertion.addMethod('throws', assertThrows);
-            Assertion.addMethod('Throw', assertThrows);
-
-            /**
-             * ### .respondTo(method)
-             *
-             * Asserts that the object or class target will respond to a method.
-             *
-             *     Klass.prototype.bar = function(){};
-             *     expect(Klass).to.respondTo('bar');
-             *     expect(obj).to.respondTo('bar');
-             *
-             * To check if a constructor will respond to a static function,
-             * set the `itself` flag.
-             *
-             *     Klass.baz = function(){};
-             *     expect(Klass).itself.to.respondTo('baz');
-             *
-             * @name respondTo
-             * @param {String} method
-             * @param {String} message _optional_
-             * @api public
-             */
-
-            Assertion.addMethod('respondTo', function (method, msg) {
-                if (msg) flag(this, 'message', msg);
-                var obj = flag(this, 'object')
-                    , itself = flag(this, 'itself')
-                    , context = ('function' === _.type(obj) && !itself)
-                        ? obj.prototype[method]
-                        : obj[method];
-
-                this.assert(
-                    'function' === typeof context
-                    , 'expected #{this} to respond to ' + _.inspect(method)
-                    , 'expected #{this} to not respond to ' + _.inspect(method)
-                );
-            });
-
-            /**
-             * ### .itself
-             *
-             * Sets the `itself` flag, later used by the `respondTo` assertion.
-             *
-             *     function Foo() {}
-             *     Foo.bar = function() {}
-             *     Foo.prototype.baz = function() {}
-             *
-             *     expect(Foo).itself.to.respondTo('bar');
-             *     expect(Foo).itself.not.to.respondTo('baz');
-             *
-             * @name itself
-             * @api public
-             */
-
-            Assertion.addProperty('itself', function () {
-                flag(this, 'itself', true);
-            });
-
-            /**
-             * ### .satisfy(method)
-             *
-             * Asserts that the target passes a given truth test.
-             *
-             *     expect(1).to.satisfy(function(num) { return num > 0; });
-             *
-             * @name satisfy
-             * @param {Function} matcher
-             * @param {String} message _optional_
-             * @api public
-             */
-
-            Assertion.addMethod('satisfy', function (matcher, msg) {
-                if (msg) flag(this, 'message', msg);
-                var obj = flag(this, 'object');
-                var result = matcher(obj);
-                this.assert(
-                    result
-                    , 'expected #{this} to satisfy ' + _.objDisplay(matcher)
-                    , 'expected #{this} to not satisfy' + _.objDisplay(matcher)
-                    , this.negate ? false : true
-                    , result
-                );
-            });
-
-            /**
-             * ### .closeTo(expected, delta)
-             *
-             * Asserts that the target is equal `expected`, to within a +/- `delta` range.
-             *
-             *     expect(1.5).to.be.closeTo(1, 0.5);
-             *
-             * @name closeTo
-             * @param {Number} expected
-             * @param {Number} delta
-             * @param {String} message _optional_
-             * @api public
-             */
-
-            Assertion.addMethod('closeTo', function (expected, delta, msg) {
-                if (msg) flag(this, 'message', msg);
-                var obj = flag(this, 'object');
-
-                new Assertion(obj, msg).is.a('number');
-                if (_.type(expected) !== 'number' || _.type(delta) !== 'number') {
-                    throw new Error('the arguments to closeTo must be numbers');
-                }
-
-                this.assert(
-                    Math.abs(obj - expected) <= delta
-                    , 'expected #{this} to be close to ' + expected + ' +/- ' + delta
-                    , 'expected #{this} not to be close to ' + expected + ' +/- ' + delta
-                );
-            });
-
-            function isSubsetOf(subset, superset, cmp) {
-                return subset.every(function(elem) {
-                    if (!cmp) return superset.indexOf(elem) !== -1;
-
-                    return superset.some(function(elem2) {
-                        return cmp(elem, elem2);
-                    });
-                })
-            }
-
-            /**
-             * ### .members(set)
-             *
-             * Asserts that the target is a superset of `set`,
-             * or that the target and `set` have the same strictly-equal (===) members.
-             * Alternately, if the `deep` flag is set, set members are compared for deep
-             * equality.
-             *
-             *     expect([1, 2, 3]).to.include.members([3, 2]);
-             *     expect([1, 2, 3]).to.not.include.members([3, 2, 8]);
-             *
-             *     expect([4, 2]).to.have.members([2, 4]);
-             *     expect([5, 2]).to.not.have.members([5, 2, 1]);
-             *
-             *     expect([{ id: 1 }]).to.deep.include.members([{ id: 1 }]);
-             *
-             * @name members
-             * @param {Array} set
-             * @param {String} message _optional_
-             * @api public
-             */
-
-            Assertion.addMethod('members', function (subset, msg) {
-                if (msg) flag(this, 'message', msg);
-                var obj = flag(this, 'object');
-
-                new Assertion(obj).to.be.an('array');
-                new Assertion(subset).to.be.an('array');
-
-                var cmp = flag(this, 'deep') ? _.eql : undefined;
-
-                if (flag(this, 'contains')) {
-                    return this.assert(
-                        isSubsetOf(subset, obj, cmp)
-                        , 'expected #{this} to be a superset of #{act}'
-                        , 'expected #{this} to not be a superset of #{act}'
-                        , obj
-                        , subset
-                    );
-                }
-
-                this.assert(
-                    isSubsetOf(obj, subset, cmp) && isSubsetOf(subset, obj, cmp)
-                    , 'expected #{this} to have the same members as #{act}'
-                    , 'expected #{this} to not have the same members as #{act}'
-                    , obj
-                    , subset
-                );
-            });
-        };
-
-    });
-
-    require.register("chai/lib/chai/interface/assert.js", function (exports, module) {
-        /*!
-         * chai
-         * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-
-        module.exports = function (chai, util) {
-
-            /*!
-             * Chai dependencies.
-             */
-
-            var Assertion = chai.Assertion
-                , flag = util.flag;
-
-            /*!
-             * Module export.
-             */
-
-            /**
-             * ### assert(expression, message)
-             *
-             * Write your own test expressions.
-             *
-             *     assert('foo' !== 'bar', 'foo is not bar');
-             *     assert(Array.isArray([]), 'empty arrays are arrays');
-             *
-             * @param {Mixed} expression to test for truthiness
-             * @param {String} message to display on error
-             * @name assert
-             * @api public
-             */
-
-            var assert = chai.assert = function (express, errmsg) {
-                var test = new Assertion(null, null, chai.assert);
-                test.assert(
-                    express
-                    , errmsg
-                    , '[ negation message unavailable ]'
-                );
-            };
-
-            /**
-             * ### .fail(actual, expected, [message], [operator])
-             *
-             * Throw a failure. Node.js `assert` module-compatible.
-             *
-             * @name fail
-             * @param {Mixed} actual
-             * @param {Mixed} expected
-             * @param {String} message
-             * @param {String} operator
-             * @api public
-             */
-
-            assert.fail = function (actual, expected, message, operator) {
-                message = message || 'assert.fail()';
-                throw new chai.AssertionError(message, {
-                    actual: actual
-                    , expected: expected
-                    , operator: operator
-                }, assert.fail);
-            };
-
-            /**
-             * ### .ok(object, [message])
-             *
-             * Asserts that `object` is truthy.
-             *
-             *     assert.ok('everything', 'everything is ok');
-             *     assert.ok(false, 'this will fail');
-             *
-             * @name ok
-             * @param {Mixed} object to test
-             * @param {String} message
-             * @api public
-             */
-
-            assert.ok = function (val, msg) {
-                new Assertion(val, msg).is.ok;
-            };
-
-            /**
-             * ### .notOk(object, [message])
-             *
-             * Asserts that `object` is falsy.
-             *
-             *     assert.notOk('everything', 'this will fail');
-             *     assert.notOk(false, 'this will pass');
-             *
-             * @name notOk
-             * @param {Mixed} object to test
-             * @param {String} message
-             * @api public
-             */
-
-            assert.notOk = function (val, msg) {
-                new Assertion(val, msg).is.not.ok;
-            };
-
-            /**
-             * ### .equal(actual, expected, [message])
-             *
-             * Asserts non-strict equality (`==`) of `actual` and `expected`.
-             *
-             *     assert.equal(3, '3', '== coerces values to strings');
-             *
-             * @name equal
-             * @param {Mixed} actual
-             * @param {Mixed} expected
-             * @param {String} message
-             * @api public
-             */
-
-            assert.equal = function (act, exp, msg) {
-                var test = new Assertion(act, msg, assert.equal);
-
-                test.assert(
-                    exp == flag(test, 'object')
-                    , 'expected #{this} to equal #{exp}'
-                    , 'expected #{this} to not equal #{act}'
-                    , exp
-                    , act
-                );
-            };
-
-            /**
-             * ### .notEqual(actual, expected, [message])
-             *
-             * Asserts non-strict inequality (`!=`) of `actual` and `expected`.
-             *
-             *     assert.notEqual(3, 4, 'these numbers are not equal');
-             *
-             * @name notEqual
-             * @param {Mixed} actual
-             * @param {Mixed} expected
-             * @param {String} message
-             * @api public
-             */
-
-            assert.notEqual = function (act, exp, msg) {
-                var test = new Assertion(act, msg, assert.notEqual);
-
-                test.assert(
-                    exp != flag(test, 'object')
-                    , 'expected #{this} to not equal #{exp}'
-                    , 'expected #{this} to equal #{act}'
-                    , exp
-                    , act
-                );
-            };
-
-            /**
-             * ### .strictEqual(actual, expected, [message])
-             *
-             * Asserts strict equality (`===`) of `actual` and `expected`.
-             *
-             *     assert.strictEqual(true, true, 'these booleans are strictly equal');
-             *
-             * @name strictEqual
-             * @param {Mixed} actual
-             * @param {Mixed} expected
-             * @param {String} message
-             * @api public
-             */
-
-            assert.strictEqual = function (act, exp, msg) {
-                new Assertion(act, msg).to.equal(exp);
-            };
-
-            /**
-             * ### .notStrictEqual(actual, expected, [message])
-             *
-             * Asserts strict inequality (`!==`) of `actual` and `expected`.
-             *
-             *     assert.notStrictEqual(3, '3', 'no coercion for strict equality');
-             *
-             * @name notStrictEqual
-             * @param {Mixed} actual
-             * @param {Mixed} expected
-             * @param {String} message
-             * @api public
-             */
-
-            assert.notStrictEqual = function (act, exp, msg) {
-                new Assertion(act, msg).to.not.equal(exp);
-            };
-
-            /**
-             * ### .deepEqual(actual, expected, [message])
-             *
-             * Asserts that `actual` is deeply equal to `expected`.
-             *
-             *     assert.deepEqual({ tea: 'green' }, { tea: 'green' });
-             *
-             * @name deepEqual
-             * @param {Mixed} actual
-             * @param {Mixed} expected
-             * @param {String} message
-             * @api public
-             */
-
-            assert.deepEqual = function (act, exp, msg) {
-                new Assertion(act, msg).to.eql(exp);
-            };
-
-            /**
-             * ### .notDeepEqual(actual, expected, [message])
-             *
-             * Assert that `actual` is not deeply equal to `expected`.
-             *
-             *     assert.notDeepEqual({ tea: 'green' }, { tea: 'jasmine' });
-             *
-             * @name notDeepEqual
-             * @param {Mixed} actual
-             * @param {Mixed} expected
-             * @param {String} message
-             * @api public
-             */
-
-            assert.notDeepEqual = function (act, exp, msg) {
-                new Assertion(act, msg).to.not.eql(exp);
-            };
-
-            /**
-             * ### .isTrue(value, [message])
-             *
-             * Asserts that `value` is true.
-             *
-             *     var teaServed = true;
-             *     assert.isTrue(teaServed, 'the tea has been served');
-             *
-             * @name isTrue
-             * @param {Mixed} value
-             * @param {String} message
-             * @api public
-             */
-
-            assert.isTrue = function (val, msg) {
-                new Assertion(val, msg).is['true'];
-            };
-
-            /**
-             * ### .isFalse(value, [message])
-             *
-             * Asserts that `value` is false.
-             *
-             *     var teaServed = false;
-             *     assert.isFalse(teaServed, 'no tea yet? hmm...');
-             *
-             * @name isFalse
-             * @param {Mixed} value
-             * @param {String} message
-             * @api public
-             */
-
-            assert.isFalse = function (val, msg) {
-                new Assertion(val, msg).is['false'];
-            };
-
-            /**
-             * ### .isNull(value, [message])
-             *
-             * Asserts that `value` is null.
-             *
-             *     assert.isNull(err, 'there was no error');
-             *
-             * @name isNull
-             * @param {Mixed} value
-             * @param {String} message
-             * @api public
-             */
-
-            assert.isNull = function (val, msg) {
-                new Assertion(val, msg).to.equal(null);
-            };
-
-            /**
-             * ### .isNotNull(value, [message])
-             *
-             * Asserts that `value` is not null.
-             *
-             *     var tea = 'tasty chai';
-             *     assert.isNotNull(tea, 'great, time for tea!');
-             *
-             * @name isNotNull
-             * @param {Mixed} value
-             * @param {String} message
-             * @api public
-             */
-
-            assert.isNotNull = function (val, msg) {
-                new Assertion(val, msg).to.not.equal(null);
-            };
-
-            /**
-             * ### .isUndefined(value, [message])
-             *
-             * Asserts that `value` is `undefined`.
-             *
-             *     var tea;
-             *     assert.isUndefined(tea, 'no tea defined');
-             *
-             * @name isUndefined
-             * @param {Mixed} value
-             * @param {String} message
-             * @api public
-             */
-
-            assert.isUndefined = function (val, msg) {
-                new Assertion(val, msg).to.equal(undefined);
-            };
-
-            /**
-             * ### .isDefined(value, [message])
-             *
-             * Asserts that `value` is not `undefined`.
-             *
-             *     var tea = 'cup of chai';
-             *     assert.isDefined(tea, 'tea has been defined');
-             *
-             * @name isDefined
-             * @param {Mixed} value
-             * @param {String} message
-             * @api public
-             */
-
-            assert.isDefined = function (val, msg) {
-                new Assertion(val, msg).to.not.equal(undefined);
-            };
-
-            /**
-             * ### .isFunction(value, [message])
-             *
-             * Asserts that `value` is a function.
-             *
-             *     function serveTea() { return 'cup of tea'; };
-             *     assert.isFunction(serveTea, 'great, we can have tea now');
-             *
-             * @name isFunction
-             * @param {Mixed} value
-             * @param {String} message
-             * @api public
-             */
-
-            assert.isFunction = function (val, msg) {
-                new Assertion(val, msg).to.be.a('function');
-            };
-
-            /**
-             * ### .isNotFunction(value, [message])
-             *
-             * Asserts that `value` is _not_ a function.
-             *
-             *     var serveTea = [ 'heat', 'pour', 'sip' ];
-             *     assert.isNotFunction(serveTea, 'great, we have listed the steps');
-             *
-             * @name isNotFunction
-             * @param {Mixed} value
-             * @param {String} message
-             * @api public
-             */
-
-            assert.isNotFunction = function (val, msg) {
-                new Assertion(val, msg).to.not.be.a('function');
-            };
-
-            /**
-             * ### .isObject(value, [message])
-             *
-             * Asserts that `value` is an object (as revealed by
-             * `Object.prototype.toString`).
-             *
-             *     var selection = { name: 'Chai', serve: 'with spices' };
-             *     assert.isObject(selection, 'tea selection is an object');
-             *
-             * @name isObject
-             * @param {Mixed} value
-             * @param {String} message
-             * @api public
-             */
-
-            assert.isObject = function (val, msg) {
-                new Assertion(val, msg).to.be.a('object');
-            };
-
-            /**
-             * ### .isNotObject(value, [message])
-             *
-             * Asserts that `value` is _not_ an object.
-             *
-             *     var selection = 'chai'
-             *     assert.isNotObject(selection, 'tea selection is not an object');
-             *     assert.isNotObject(null, 'null is not an object');
-             *
-             * @name isNotObject
-             * @param {Mixed} value
-             * @param {String} message
-             * @api public
-             */
-
-            assert.isNotObject = function (val, msg) {
-                new Assertion(val, msg).to.not.be.a('object');
-            };
-
-            /**
-             * ### .isArray(value, [message])
-             *
-             * Asserts that `value` is an array.
-             *
-             *     var menu = [ 'green', 'chai', 'oolong' ];
-             *     assert.isArray(menu, 'what kind of tea do we want?');
-             *
-             * @name isArray
-             * @param {Mixed} value
-             * @param {String} message
-             * @api public
-             */
-
-            assert.isArray = function (val, msg) {
-                new Assertion(val, msg).to.be.an('array');
-            };
-
-            /**
-             * ### .isNotArray(value, [message])
-             *
-             * Asserts that `value` is _not_ an array.
-             *
-             *     var menu = 'green|chai|oolong';
-             *     assert.isNotArray(menu, 'what kind of tea do we want?');
-             *
-             * @name isNotArray
-             * @param {Mixed} value
-             * @param {String} message
-             * @api public
-             */
-
-            assert.isNotArray = function (val, msg) {
-                new Assertion(val, msg).to.not.be.an('array');
-            };
-
-            /**
-             * ### .isString(value, [message])
-             *
-             * Asserts that `value` is a string.
-             *
-             *     var teaOrder = 'chai';
-             *     assert.isString(teaOrder, 'order placed');
-             *
-             * @name isString
-             * @param {Mixed} value
-             * @param {String} message
-             * @api public
-             */
-
-            assert.isString = function (val, msg) {
-                new Assertion(val, msg).to.be.a('string');
-            };
-
-            /**
-             * ### .isNotString(value, [message])
-             *
-             * Asserts that `value` is _not_ a string.
-             *
-             *     var teaOrder = 4;
-             *     assert.isNotString(teaOrder, 'order placed');
-             *
-             * @name isNotString
-             * @param {Mixed} value
-             * @param {String} message
-             * @api public
-             */
-
-            assert.isNotString = function (val, msg) {
-                new Assertion(val, msg).to.not.be.a('string');
-            };
-
-            /**
-             * ### .isNumber(value, [message])
-             *
-             * Asserts that `value` is a number.
-             *
-             *     var cups = 2;
-             *     assert.isNumber(cups, 'how many cups');
-             *
-             * @name isNumber
-             * @param {Number} value
-             * @param {String} message
-             * @api public
-             */
-
-            assert.isNumber = function (val, msg) {
-                new Assertion(val, msg).to.be.a('number');
-            };
-
-            /**
-             * ### .isNotNumber(value, [message])
-             *
-             * Asserts that `value` is _not_ a number.
-             *
-             *     var cups = '2 cups please';
-             *     assert.isNotNumber(cups, 'how many cups');
-             *
-             * @name isNotNumber
-             * @param {Mixed} value
-             * @param {String} message
-             * @api public
-             */
-
-            assert.isNotNumber = function (val, msg) {
-                new Assertion(val, msg).to.not.be.a('number');
-            };
-
-            /**
-             * ### .isBoolean(value, [message])
-             *
-             * Asserts that `value` is a boolean.
-             *
-             *     var teaReady = true
-             *       , teaServed = false;
-             *
-             *     assert.isBoolean(teaReady, 'is the tea ready');
-             *     assert.isBoolean(teaServed, 'has tea been served');
-             *
-             * @name isBoolean
-             * @param {Mixed} value
-             * @param {String} message
-             * @api public
-             */
-
-            assert.isBoolean = function (val, msg) {
-                new Assertion(val, msg).to.be.a('boolean');
-            };
-
-            /**
-             * ### .isNotBoolean(value, [message])
-             *
-             * Asserts that `value` is _not_ a boolean.
-             *
-             *     var teaReady = 'yep'
-             *       , teaServed = 'nope';
-             *
-             *     assert.isNotBoolean(teaReady, 'is the tea ready');
-             *     assert.isNotBoolean(teaServed, 'has tea been served');
-             *
-             * @name isNotBoolean
-             * @param {Mixed} value
-             * @param {String} message
-             * @api public
-             */
-
-            assert.isNotBoolean = function (val, msg) {
-                new Assertion(val, msg).to.not.be.a('boolean');
-            };
-
-            /**
-             * ### .typeOf(value, name, [message])
-             *
-             * Asserts that `value`'s type is `name`, as determined by
-             * `Object.prototype.toString`.
-             *
-             *     assert.typeOf({ tea: 'chai' }, 'object', 'we have an object');
-             *     assert.typeOf(['chai', 'jasmine'], 'array', 'we have an array');
-             *     assert.typeOf('tea', 'string', 'we have a string');
-             *     assert.typeOf(/tea/, 'regexp', 'we have a regular expression');
-             *     assert.typeOf(null, 'null', 'we have a null');
-             *     assert.typeOf(undefined, 'undefined', 'we have an undefined');
-             *
-             * @name typeOf
-             * @param {Mixed} value
-             * @param {String} name
-             * @param {String} message
-             * @api public
-             */
-
-            assert.typeOf = function (val, type, msg) {
-                new Assertion(val, msg).to.be.a(type);
-            };
-
-            /**
-             * ### .notTypeOf(value, name, [message])
-             *
-             * Asserts that `value`'s type is _not_ `name`, as determined by
-             * `Object.prototype.toString`.
-             *
-             *     assert.notTypeOf('tea', 'number', 'strings are not numbers');
-             *
-             * @name notTypeOf
-             * @param {Mixed} value
-             * @param {String} typeof name
-             * @param {String} message
-             * @api public
-             */
-
-            assert.notTypeOf = function (val, type, msg) {
-                new Assertion(val, msg).to.not.be.a(type);
-            };
-
-            /**
-             * ### .instanceOf(object, constructor, [message])
-             *
-             * Asserts that `value` is an instance of `constructor`.
-             *
-             *     var Tea = function (name) { this.name = name; }
-             *       , chai = new Tea('chai');
-             *
-             *     assert.instanceOf(chai, Tea, 'chai is an instance of tea');
-             *
-             * @name instanceOf
-             * @param {Object} object
-             * @param {Constructor} constructor
-             * @param {String} message
-             * @api public
-             */
-
-            assert.instanceOf = function (val, type, msg) {
-                new Assertion(val, msg).to.be.instanceOf(type);
-            };
-
-            /**
-             * ### .notInstanceOf(object, constructor, [message])
-             *
-             * Asserts `value` is not an instance of `constructor`.
-             *
-             *     var Tea = function (name) { this.name = name; }
-             *       , chai = new String('chai');
-             *
-             *     assert.notInstanceOf(chai, Tea, 'chai is not an instance of tea');
-             *
-             * @name notInstanceOf
-             * @param {Object} object
-             * @param {Constructor} constructor
-             * @param {String} message
-             * @api public
-             */
-
-            assert.notInstanceOf = function (val, type, msg) {
-                new Assertion(val, msg).to.not.be.instanceOf(type);
-            };
-
-            /**
-             * ### .include(haystack, needle, [message])
-             *
-             * Asserts that `haystack` includes `needle`. Works
-             * for strings and arrays.
-             *
-             *     assert.include('foobar', 'bar', 'foobar contains string "bar"');
-             *     assert.include([ 1, 2, 3 ], 3, 'array contains value');
-             *
-             * @name include
-             * @param {Array|String} haystack
-             * @param {Mixed} needle
-             * @param {String} message
-             * @api public
-             */
-
-            assert.include = function (exp, inc, msg) {
-                new Assertion(exp, msg, assert.include).include(inc);
-            };
-
-            /**
-             * ### .notInclude(haystack, needle, [message])
-             *
-             * Asserts that `haystack` does not include `needle`. Works
-             * for strings and arrays.
-             *i
-             *     assert.notInclude('foobar', 'baz', 'string not include substring');
-             *     assert.notInclude([ 1, 2, 3 ], 4, 'array not include contain value');
-             *
-             * @name notInclude
-             * @param {Array|String} haystack
-             * @param {Mixed} needle
-             * @param {String} message
-             * @api public
-             */
-
-            assert.notInclude = function (exp, inc, msg) {
-                new Assertion(exp, msg, assert.notInclude).not.include(inc);
-            };
-
-            /**
-             * ### .match(value, regexp, [message])
-             *
-             * Asserts that `value` matches the regular expression `regexp`.
-             *
-             *     assert.match('foobar', /^foo/, 'regexp matches');
-             *
-             * @name match
-             * @param {Mixed} value
-             * @param {RegExp} regexp
-             * @param {String} message
-             * @api public
-             */
-
-            assert.match = function (exp, re, msg) {
-                new Assertion(exp, msg).to.match(re);
-            };
-
-            /**
-             * ### .notMatch(value, regexp, [message])
-             *
-             * Asserts that `value` does not match the regular expression `regexp`.
-             *
-             *     assert.notMatch('foobar', /^foo/, 'regexp does not match');
-             *
-             * @name notMatch
-             * @param {Mixed} value
-             * @param {RegExp} regexp
-             * @param {String} message
-             * @api public
-             */
-
-            assert.notMatch = function (exp, re, msg) {
-                new Assertion(exp, msg).to.not.match(re);
-            };
-
-            /**
-             * ### .property(object, property, [message])
-             *
-             * Asserts that `object` has a property named by `property`.
-             *
-             *     assert.property({ tea: { green: 'matcha' }}, 'tea');
-             *
-             * @name property
-             * @param {Object} object
-             * @param {String} property
-             * @param {String} message
-             * @api public
-             */
-
-            assert.property = function (obj, prop, msg) {
-                new Assertion(obj, msg).to.have.property(prop);
-            };
-
-            /**
-             * ### .notProperty(object, property, [message])
-             *
-             * Asserts that `object` does _not_ have a property named by `property`.
-             *
-             *     assert.notProperty({ tea: { green: 'matcha' }}, 'coffee');
-             *
-             * @name notProperty
-             * @param {Object} object
-             * @param {String} property
-             * @param {String} message
-             * @api public
-             */
-
-            assert.notProperty = function (obj, prop, msg) {
-                new Assertion(obj, msg).to.not.have.property(prop);
-            };
-
-            /**
-             * ### .deepProperty(object, property, [message])
-             *
-             * Asserts that `object` has a property named by `property`, which can be a
-             * string using dot- and bracket-notation for deep reference.
-             *
-             *     assert.deepProperty({ tea: { green: 'matcha' }}, 'tea.green');
-             *
-             * @name deepProperty
-             * @param {Object} object
-             * @param {String} property
-             * @param {String} message
-             * @api public
-             */
-
-            assert.deepProperty = function (obj, prop, msg) {
-                new Assertion(obj, msg).to.have.deep.property(prop);
-            };
-
-            /**
-             * ### .notDeepProperty(object, property, [message])
-             *
-             * Asserts that `object` does _not_ have a property named by `property`, which
-             * can be a string using dot- and bracket-notation for deep reference.
-             *
-             *     assert.notDeepProperty({ tea: { green: 'matcha' }}, 'tea.oolong');
-             *
-             * @name notDeepProperty
-             * @param {Object} object
-             * @param {String} property
-             * @param {String} message
-             * @api public
-             */
-
-            assert.notDeepProperty = function (obj, prop, msg) {
-                new Assertion(obj, msg).to.not.have.deep.property(prop);
-            };
-
-            /**
-             * ### .propertyVal(object, property, value, [message])
-             *
-             * Asserts that `object` has a property named by `property` with value given
-             * by `value`.
-             *
-             *     assert.propertyVal({ tea: 'is good' }, 'tea', 'is good');
-             *
-             * @name propertyVal
-             * @param {Object} object
-             * @param {String} property
-             * @param {Mixed} value
-             * @param {String} message
-             * @api public
-             */
-
-            assert.propertyVal = function (obj, prop, val, msg) {
-                new Assertion(obj, msg).to.have.property(prop, val);
-            };
-
-            /**
-             * ### .propertyNotVal(object, property, value, [message])
-             *
-             * Asserts that `object` has a property named by `property`, but with a value
-             * different from that given by `value`.
-             *
-             *     assert.propertyNotVal({ tea: 'is good' }, 'tea', 'is bad');
-             *
-             * @name propertyNotVal
-             * @param {Object} object
-             * @param {String} property
-             * @param {Mixed} value
-             * @param {String} message
-             * @api public
-             */
-
-            assert.propertyNotVal = function (obj, prop, val, msg) {
-                new Assertion(obj, msg).to.not.have.property(prop, val);
-            };
-
-            /**
-             * ### .deepPropertyVal(object, property, value, [message])
-             *
-             * Asserts that `object` has a property named by `property` with value given
-             * by `value`. `property` can use dot- and bracket-notation for deep
-             * reference.
-             *
-             *     assert.deepPropertyVal({ tea: { green: 'matcha' }}, 'tea.green', 'matcha');
-             *
-             * @name deepPropertyVal
-             * @param {Object} object
-             * @param {String} property
-             * @param {Mixed} value
-             * @param {String} message
-             * @api public
-             */
-
-            assert.deepPropertyVal = function (obj, prop, val, msg) {
-                new Assertion(obj, msg).to.have.deep.property(prop, val);
-            };
-
-            /**
-             * ### .deepPropertyNotVal(object, property, value, [message])
-             *
-             * Asserts that `object` has a property named by `property`, but with a value
-             * different from that given by `value`. `property` can use dot- and
-             * bracket-notation for deep reference.
-             *
-             *     assert.deepPropertyNotVal({ tea: { green: 'matcha' }}, 'tea.green', 'konacha');
-             *
-             * @name deepPropertyNotVal
-             * @param {Object} object
-             * @param {String} property
-             * @param {Mixed} value
-             * @param {String} message
-             * @api public
-             */
-
-            assert.deepPropertyNotVal = function (obj, prop, val, msg) {
-                new Assertion(obj, msg).to.not.have.deep.property(prop, val);
-            };
-
-            /**
-             * ### .lengthOf(object, length, [message])
-             *
-             * Asserts that `object` has a `length` property with the expected value.
-             *
-             *     assert.lengthOf([1,2,3], 3, 'array has length of 3');
-             *     assert.lengthOf('foobar', 5, 'string has length of 6');
-             *
-             * @name lengthOf
-             * @param {Mixed} object
-             * @param {Number} length
-             * @param {String} message
-             * @api public
-             */
-
-            assert.lengthOf = function (exp, len, msg) {
-                new Assertion(exp, msg).to.have.length(len);
-            };
-
-            /**
-             * ### .throws(function, [constructor/string/regexp], [string/regexp], [message])
-             *
-             * Asserts that `function` will throw an error that is an instance of
-             * `constructor`, or alternately that it will throw an error with message
-             * matching `regexp`.
-             *
-             *     assert.throw(fn, 'function throws a reference error');
-             *     assert.throw(fn, /function throws a reference error/);
-             *     assert.throw(fn, ReferenceError);
-             *     assert.throw(fn, ReferenceError, 'function throws a reference error');
-             *     assert.throw(fn, ReferenceError, /function throws a reference error/);
-             *
-             * @name throws
-             * @alias throw
-             * @alias Throw
-             * @param {Function} function
-             * @param {ErrorConstructor} constructor
-             * @param {RegExp} regexp
-             * @param {String} message
-             * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types
-             * @api public
-             */
-
-            assert.Throw = function (fn, errt, errs, msg) {
-                if ('string' === typeof errt || errt instanceof RegExp) {
-                    errs = errt;
-                    errt = null;
-                }
-
-                var assertErr = new Assertion(fn, msg).to.Throw(errt, errs);
-                return flag(assertErr, 'object');
-            };
-
-            /**
-             * ### .doesNotThrow(function, [constructor/regexp], [message])
-             *
-             * Asserts that `function` will _not_ throw an error that is an instance of
-             * `constructor`, or alternately that it will not throw an error with message
-             * matching `regexp`.
-             *
-             *     assert.doesNotThrow(fn, Error, 'function does not throw');
-             *
-             * @name doesNotThrow
-             * @param {Function} function
-             * @param {ErrorConstructor} constructor
-             * @param {RegExp} regexp
-             * @param {String} message
-             * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types
-             * @api public
-             */
-
-            assert.doesNotThrow = function (fn, type, msg) {
-                if ('string' === typeof type) {
-                    msg = type;
-                    type = null;
-                }
-
-                new Assertion(fn, msg).to.not.Throw(type);
-            };
-
-            /**
-             * ### .operator(val1, operator, val2, [message])
-             *
-             * Compares two values using `operator`.
-             *
-             *     assert.operator(1, '<', 2, 'everything is ok');
-             *     assert.operator(1, '>', 2, 'this will fail');
-             *
-             * @name operator
-             * @param {Mixed} val1
-             * @param {String} operator
-             * @param {Mixed} val2
-             * @param {String} message
-             * @api public
-             */
-
-            assert.operator = function (val, operator, val2, msg) {
-                if (!~['==', '===', '>', '>=', '<', '<=', '!=', '!=='].indexOf(operator)) {
-                    throw new Error('Invalid operator "' + operator + '"');
-                }
-                var test = new Assertion(eval(val + operator + val2), msg);
-                test.assert(
-                    true === flag(test, 'object')
-                    , 'expected ' + util.inspect(val) + ' to be ' + operator + ' ' + util.inspect(val2)
-                    , 'expected ' + util.inspect(val) + ' to not be ' + operator + ' ' + util.inspect(val2) );
-            };
-
-            /**
-             * ### .closeTo(actual, expected, delta, [message])
-             *
-             * Asserts that the target is equal `expected`, to within a +/- `delta` range.
-             *
-             *     assert.closeTo(1.5, 1, 0.5, 'numbers are close');
-             *
-             * @name closeTo
-             * @param {Number} actual
-             * @param {Number} expected
-             * @param {Number} delta
-             * @param {String} message
-             * @api public
-             */
-
-            assert.closeTo = function (act, exp, delta, msg) {
-                new Assertion(act, msg).to.be.closeTo(exp, delta);
-            };
-
-            /**
-             * ### .sameMembers(set1, set2, [message])
-             *
-             * Asserts that `set1` and `set2` have the same members.
-             * Order is not taken into account.
-             *
-             *     assert.sameMembers([ 1, 2, 3 ], [ 2, 1, 3 ], 'same members');
-             *
-             * @name sameMembers
-             * @param {Array} set1
-             * @param {Array} set2
-             * @param {String} message
-             * @api public
-             */
-
-            assert.sameMembers = function (set1, set2, msg) {
-                new Assertion(set1, msg).to.have.same.members(set2);
-            }
-
-            /**
-             * ### .includeMembers(superset, subset, [message])
-             *
-             * Asserts that `subset` is included in `superset`.
-             * Order is not taken into account.
-             *
-             *     assert.includeMembers([ 1, 2, 3 ], [ 2, 1 ], 'include members');
-             *
-             * @name includeMembers
-             * @param {Array} superset
-             * @param {Array} subset
-             * @param {String} message
-             * @api public
-             */
-
-            assert.includeMembers = function (superset, subset, msg) {
-                new Assertion(superset, msg).to.include.members(subset);
-            }
-
-            /*!
-             * Undocumented / untested
-             */
-
-            assert.ifError = function (val, msg) {
-                new Assertion(val, msg).to.not.be.ok;
-            };
-
-            /*!
-             * Aliases.
-             */
-
-            (function alias(name, as){
-                assert[as] = assert[name];
-                return alias;
-            })
-            ('Throw', 'throw')
-            ('Throw', 'throws');
-        };
-
-    });
-
-    require.register("chai/lib/chai/interface/expect.js", function (exports, module) {
-        /*!
-         * chai
-         * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        module.exports = function (chai, util) {
-            chai.expect = function (val, message) {
-                return new chai.Assertion(val, message);
-            };
-        };
-
-
-    });
-
-    require.register("chai/lib/chai/interface/should.js", function (exports, module) {
-        /*!
-         * chai
-         * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        module.exports = function (chai, util) {
-            var Assertion = chai.Assertion;
-
-            function loadShould () {
-                // explicitly define this method as function as to have it's name to include as `ssfi`
-                function shouldGetter() {
-                    if (this instanceof String || this instanceof Number) {
-                        return new Assertion(this.constructor(this), null, shouldGetter);
-                    } else if (this instanceof Boolean) {
-                        return new Assertion(this == true, null, shouldGetter);
-                    }
-                    return new Assertion(this, null, shouldGetter);
-                }
-                function shouldSetter(value) {
-                    // See https://github.com/chaijs/chai/issues/86: this makes
-                    // `whatever.should = someValue` actually set `someValue`, which is
-                    // especially useful for `global.should = require('chai').should()`.
-                    //
-                    // Note that we have to use [[DefineProperty]] instead of [[Put]]
-                    // since otherwise we would trigger this very setter!
-                    Object.defineProperty(this, 'should', {
-                        value: value,
-                        enumerable: true,
-                        configurable: true,
-                        writable: true
-                    });
-                }
-                // modify Object.prototype to have `should`
-                Object.defineProperty(Object.prototype, 'should', {
-                    set: shouldSetter
-                    , get: shouldGetter
-                    , configurable: true
-                });
-
-                var should = {};
-
-                should.equal = function (val1, val2, msg) {
-                    new Assertion(val1, msg).to.equal(val2);
-                };
-
-                should.Throw = function (fn, errt, errs, msg) {
-                    new Assertion(fn, msg).to.Throw(errt, errs);
-                };
-
-                should.exist = function (val, msg) {
-                    new Assertion(val, msg).to.exist;
-                }
-
-                // negation
-                should.not = {}
-
-                should.not.equal = function (val1, val2, msg) {
-                    new Assertion(val1, msg).to.not.equal(val2);
-                };
-
-                should.not.Throw = function (fn, errt, errs, msg) {
-                    new Assertion(fn, msg).to.not.Throw(errt, errs);
-                };
-
-                should.not.exist = function (val, msg) {
-                    new Assertion(val, msg).to.not.exist;
-                }
-
-                should['throw'] = should['Throw'];
-                should.not['throw'] = should.not['Throw'];
-
-                return should;
-            };
-
-            chai.should = loadShould;
-            chai.Should = loadShould;
-        };
-
-    });
-
-    require.register("chai/lib/chai/utils/addChainableMethod.js", function (exports, module) {
-        /*!
-         * Chai - addChainingMethod utility
-         * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        /*!
-         * Module dependencies
-         */
-
-        var transferFlags = require('chai/lib/chai/utils/transferFlags.js');
-        var flag = require('chai/lib/chai/utils/flag.js');
-        var config = require('chai/lib/chai/config.js');
-
-        /*!
-         * Module variables
-         */
-
-// Check whether `__proto__` is supported
-        var hasProtoSupport = '__proto__' in Object;
-
-// Without `__proto__` support, this module will need to add properties to a function.
-// However, some Function.prototype methods cannot be overwritten,
-// and there seems no easy cross-platform way to detect them (@see chaijs/chai/issues/69).
-        var excludeNames = /^(?:length|name|arguments|caller)$/;
-
-// Cache `Function` properties
-        var call  = Function.prototype.call,
-            apply = Function.prototype.apply;
-
-        /**
-         * ### addChainableMethod (ctx, name, method, chainingBehavior)
-         *
-         * Adds a method to an object, such that the method can also be chained.
-         *
-         *     utils.addChainableMethod(chai.Assertion.prototype, 'foo', function (str) {
- *       var obj = utils.flag(this, 'object');
- *       new chai.Assertion(obj).to.be.equal(str);
- *     });
-         *
-         * Can also be accessed directly from `chai.Assertion`.
-         *
-         *     chai.Assertion.addChainableMethod('foo', fn, chainingBehavior);
-         *
-         * The result can then be used as both a method assertion, executing both `method` and
-         * `chainingBehavior`, or as a language chain, which only executes `chainingBehavior`.
-         *
-         *     expect(fooStr).to.be.foo('bar');
-         *     expect(fooStr).to.be.foo.equal('foo');
-         *
-         * @param {Object} ctx object to which the method is added
-         * @param {String} name of method to add
-         * @param {Function} method function to be used for `name`, when called
-         * @param {Function} chainingBehavior function to be called every time the property is accessed
-         * @name addChainableMethod
-         * @api public
-         */
-
-        module.exports = function (ctx, name, method, chainingBehavior) {
-            if (typeof chainingBehavior !== 'function') {
-                chainingBehavior = function () { };
-            }
-
-            var chainableBehavior = {
-                method: method
-                , chainingBehavior: chainingBehavior
-            };
-
-            // save the methods so we can overwrite them later, if we need to.
-            if (!ctx.__methods) {
-                ctx.__methods = {};
-            }
-            ctx.__methods[name] = chainableBehavior;
-
-            Object.defineProperty(ctx, name,
-                { get: function () {
-                    chainableBehavior.chainingBehavior.call(this);
-
-                    var assert = function assert() {
-                        var old_ssfi = flag(this, 'ssfi');
-                        if (old_ssfi && config.includeStack === false)
-                            flag(this, 'ssfi', assert);
-                        var result = chainableBehavior.method.apply(this, arguments);
-                        return result === undefined ? this : result;
-                    };
-
-                    // Use `__proto__` if available
-                    if (hasProtoSupport) {
-                        // Inherit all properties from the object by replacing the `Function` prototype
-                        var prototype = assert.__proto__ = Object.create(this);
-                        // Restore the `call` and `apply` methods from `Function`
-                        prototype.call = call;
-                        prototype.apply = apply;
-                    }
-                    // Otherwise, redefine all properties (slow!)
-                    else {
-                        var asserterNames = Object.getOwnPropertyNames(ctx);
-                        asserterNames.forEach(function (asserterName) {
-                            if (!excludeNames.test(asserterName)) {
-                                var pd = Object.getOwnPropertyDescriptor(ctx, asserterName);
-                                Object.defineProperty(assert, asserterName, pd);
-                            }
-                        });
-                    }
-
-                    transferFlags(this, assert);
-                    return assert;
-                }
-                    , configurable: true
-                });
-        };
-
-    });
-
-    require.register("chai/lib/chai/utils/addMethod.js", function (exports, module) {
-        /*!
-         * Chai - addMethod utility
-         * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        var config = require('chai/lib/chai/config.js');
-
-        /**
-         * ### .addMethod (ctx, name, method)
-         *
-         * Adds a method to the prototype of an object.
-         *
-         *     utils.addMethod(chai.Assertion.prototype, 'foo', function (str) {
- *       var obj = utils.flag(this, 'object');
- *       new chai.Assertion(obj).to.be.equal(str);
- *     });
-         *
-         * Can also be accessed directly from `chai.Assertion`.
-         *
-         *     chai.Assertion.addMethod('foo', fn);
-         *
-         * Then can be used as any other assertion.
-         *
-         *     expect(fooStr).to.be.foo('bar');
-         *
-         * @param {Object} ctx object to which the method is added
-         * @param {String} name of method to add
-         * @param {Function} method function to be used for name
-         * @name addMethod
-         * @api public
-         */
-        var flag = require('chai/lib/chai/utils/flag.js');
-
-        module.exports = function (ctx, name, method) {
-            ctx[name] = function () {
-                var old_ssfi = flag(this, 'ssfi');
-                if (old_ssfi && config.includeStack === false)
-                    flag(this, 'ssfi', ctx[name]);
-                var result = method.apply(this, arguments);
-                return result === undefined ? this : result;
-            };
-        };
-
-    });
-
-    require.register("chai/lib/chai/utils/addProperty.js", function (exports, module) {
-        /*!
-         * Chai - addProperty utility
-         * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        /**
-         * ### addProperty (ctx, name, getter)
-         *
-         * Adds a property to the prototype of an object.
-         *
-         *     utils.addProperty(chai.Assertion.prototype, 'foo', function () {
- *       var obj = utils.flag(this, 'object');
- *       new chai.Assertion(obj).to.be.instanceof(Foo);
- *     });
-         *
-         * Can also be accessed directly from `chai.Assertion`.
-         *
-         *     chai.Assertion.addProperty('foo', fn);
-         *
-         * Then can be used as any other assertion.
-         *
-         *     expect(myFoo).to.be.foo;
-         *
-         * @param {Object} ctx object to which the property is added
-         * @param {String} name of property to add
-         * @param {Function} getter function to be used for name
-         * @name addProperty
-         * @api public
-         */
-
-        module.exports = function (ctx, name, getter) {
-            Object.defineProperty(ctx, name,
-                { get: function () {
-                    var result = getter.call(this);
-                    return result === undefined ? this : result;
-                }
-                    , configurable: true
-                });
-        };
-
-    });
-
-    require.register("chai/lib/chai/utils/flag.js", function (exports, module) {
-        /*!
-         * Chai - flag utility
-         * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        /**
-         * ### flag(object ,key, [value])
-         *
-         * Get or set a flag value on an object. If a
-         * value is provided it will be set, else it will
-         * return the currently set value or `undefined` if
-         * the value is not set.
-         *
-         *     utils.flag(this, 'foo', 'bar'); // setter
-         *     utils.flag(this, 'foo'); // getter, returns `bar`
-         *
-         * @param {Object} object (constructed Assertion
-         * @param {String} key
-         * @param {Mixed} value (optional)
-         * @name flag
-         * @api private
-         */
-
-        module.exports = function (obj, key, value) {
-            var flags = obj.__flags || (obj.__flags = Object.create(null));
-            if (arguments.length === 3) {
-                flags[key] = value;
-            } else {
-                return flags[key];
-            }
-        };
-
-    });
-
-    require.register("chai/lib/chai/utils/getActual.js", function (exports, module) {
-        /*!
-         * Chai - getActual utility
-         * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        /**
-         * # getActual(object, [actual])
-         *
-         * Returns the `actual` value for an Assertion
-         *
-         * @param {Object} object (constructed Assertion)
-         * @param {Arguments} chai.Assertion.prototype.assert arguments
-         */
-
-        module.exports = function (obj, args) {
-            return args.length > 4 ? args[4] : obj._obj;
-        };
-
-    });
-
-    require.register("chai/lib/chai/utils/getEnumerableProperties.js", function (exports, module) {
-        /*!
-         * Chai - getEnumerableProperties utility
-         * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        /**
-         * ### .getEnumerableProperties(object)
-         *
-         * This allows the retrieval of enumerable property names of an object,
-         * inherited or not.
-         *
-         * @param {Object} object
-         * @returns {Array}
-         * @name getEnumerableProperties
-         * @api public
-         */
-
-        module.exports = function getEnumerableProperties(object) {
-            var result = [];
-            for (var name in object) {
-                result.push(name);
-            }
-            return result;
-        };
-
-    });
-
-    require.register("chai/lib/chai/utils/getMessage.js", function (exports, module) {
-        /*!
-         * Chai - message composition utility
-         * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        /*!
-         * Module dependancies
-         */
-
-        var flag = require('chai/lib/chai/utils/flag.js')
-            , getActual = require('chai/lib/chai/utils/getActual.js')
-            , inspect = require('chai/lib/chai/utils/inspect.js')
-            , objDisplay = require('chai/lib/chai/utils/objDisplay.js');
-
-        /**
-         * ### .getMessage(object, message, negateMessage)
-         *
-         * Construct the error message based on flags
-         * and template tags. Template tags will return
-         * a stringified inspection of the object referenced.
-         *
-         * Message template tags:
-         * - `#{this}` current asserted object
-         * - `#{act}` actual value
-         * - `#{exp}` expected value
-         *
-         * @param {Object} object (constructed Assertion)
-         * @param {Arguments} chai.Assertion.prototype.assert arguments
-         * @name getMessage
-         * @api public
-         */
-
-        module.exports = function (obj, args) {
-            var negate = flag(obj, 'negate')
-                , val = flag(obj, 'object')
-                , expected = args[3]
-                , actual = getActual(obj, args)
-                , msg = negate ? args[2] : args[1]
-                , flagMsg = flag(obj, 'message');
-
-            if(typeof msg === "function") msg = msg();
-            msg = msg || '';
-            msg = msg
-                .replace(/#{this}/g, objDisplay(val))
-                .replace(/#{act}/g, objDisplay(actual))
-                .replace(/#{exp}/g, objDisplay(expected));
-
-            return flagMsg ? flagMsg + ': ' + msg : msg;
-        };
-
-    });
-
-    require.register("chai/lib/chai/utils/getName.js", function (exports, module) {
-        /*!
-         * Chai - getName utility
-         * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        /**
-         * # getName(func)
-         *
-         * Gets the name of a function, in a cross-browser way.
-         *
-         * @param {Function} a function (usually a constructor)
-         */
-
-        module.exports = function (func) {
-            if (func.name) return func.name;
-
-            var match = /^\s?function ([^(]*)\(/.exec(func);
-            return match && match[1] ? match[1] : "";
-        };
-
-    });
-
-    require.register("chai/lib/chai/utils/getPathValue.js", function (exports, module) {
-        /*!
-         * Chai - getPathValue utility
-         * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
-         * @see https://github.com/logicalparadox/filtr
-         * MIT Licensed
-         */
-
-        /**
-         * ### .getPathValue(path, object)
-         *
-         * This allows the retrieval of values in an
-         * object given a string path.
-         *
-         *     var obj = {
- *         prop1: {
- *             arr: ['a', 'b', 'c']
- *           , str: 'Hello'
- *         }
- *       , prop2: {
- *             arr: [ { nested: 'Universe' } ]
- *           , str: 'Hello again!'
- *         }
- *     }
-         *
-         * The following would be the results.
-         *
-         *     getPathValue('prop1.str', obj); // Hello
-         *     getPathValue('prop1.att[2]', obj); // b
-         *     getPathValue('prop2.arr[0].nested', obj); // Universe
-         *
-         * @param {String} path
-         * @param {Object} object
-         * @returns {Object} value or `undefined`
-         * @name getPathValue
-         * @api public
-         */
-
-        var getPathValue = module.exports = function (path, obj) {
-            var parsed = parsePath(path);
-            return _getPathValue(parsed, obj);
-        };
-
-        /*!
-         * ## parsePath(path)
-         *
-         * Helper function used to parse string object
-         * paths. Use in conjunction with `_getPathValue`.
-         *
-         *      var parsed = parsePath('myobject.property.subprop');
-         *
-         * ### Paths:
-         *
-         * * Can be as near infinitely deep and nested
-         * * Arrays are also valid using the formal `myobject.document[3].property`.
-         *
-         * @param {String} path
-         * @returns {Object} parsed
-         * @api private
-         */
-
-        function parsePath (path) {
-            var str = path.replace(/\[/g, '.[')
-                , parts = str.match(/(\\\.|[^.]+?)+/g);
-            return parts.map(function (value) {
-                var re = /\[(\d+)\]$/
-                    , mArr = re.exec(value)
-                if (mArr) return { i: parseFloat(mArr[1]) };
-                else return { p: value };
-            });
-        };
-
-        /*!
-         * ## _getPathValue(parsed, obj)
-         *
-         * Helper companion function for `.parsePath` that returns
-         * the value located at the parsed address.
-         *
-         *      var value = getPathValue(parsed, obj);
-         *
-         * @param {Object} parsed definition from `parsePath`.
-         * @param {Object} object to search against
-         * @returns {Object|Undefined} value
-         * @api private
-         */
-
-        function _getPathValue (parsed, obj) {
-            var tmp = obj
-                , res;
-            for (var i = 0, l = parsed.length; i < l; i++) {
-                var part = parsed[i];
-                if (tmp) {
-                    if ('undefined' !== typeof part.p)
-                        tmp = tmp[part.p];
-                    else if ('undefined' !== typeof part.i)
-                        tmp = tmp[part.i];
-                    if (i == (l - 1)) res = tmp;
-                } else {
-                    res = undefined;
-                }
-            }
-            return res;
-        };
-
-    });
-
-    require.register("chai/lib/chai/utils/getProperties.js", function (exports, module) {
-        /*!
-         * Chai - getProperties utility
-         * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        /**
-         * ### .getProperties(object)
-         *
-         * This allows the retrieval of property names of an object, enumerable or not,
-         * inherited or not.
-         *
-         * @param {Object} object
-         * @returns {Array}
-         * @name getProperties
-         * @api public
-         */
-
-        module.exports = function getProperties(object) {
-            var result = Object.getOwnPropertyNames(subject);
-
-            function addProperty(property) {
-                if (result.indexOf(property) === -1) {
-                    result.push(property);
-                }
-            }
-
-            var proto = Object.getPrototypeOf(subject);
-            while (proto !== null) {
-                Object.getOwnPropertyNames(proto).forEach(addProperty);
-                proto = Object.getPrototypeOf(proto);
-            }
-
-            return result;
-        };
-
-    });
-
-    require.register("chai/lib/chai/utils/index.js", function (exports, module) {
-        /*!
-         * chai
-         * Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        /*!
-         * Main exports
-         */
-
-        var exports = module.exports = {};
-
-        /*!
-         * test utility
-         */
-
-        exports.test = require('chai/lib/chai/utils/test.js');
-
-        /*!
-         * type utility
-         */
-
-        exports.type = require('chai/lib/chai/utils/type.js');
-
-        /*!
-         * message utility
-         */
-
-        exports.getMessage = require('chai/lib/chai/utils/getMessage.js');
-
-        /*!
-         * actual utility
-         */
-
-        exports.getActual = require('chai/lib/chai/utils/getActual.js');
-
-        /*!
-         * Inspect util
-         */
-
-        exports.inspect = require('chai/lib/chai/utils/inspect.js');
-
-        /*!
-         * Object Display util
-         */
-
-        exports.objDisplay = require('chai/lib/chai/utils/objDisplay.js');
-
-        /*!
-         * Flag utility
-         */
-
-        exports.flag = require('chai/lib/chai/utils/flag.js');
-
-        /*!
-         * Flag transferring utility
-         */
-
-        exports.transferFlags = require('chai/lib/chai/utils/transferFlags.js');
-
-        /*!
-         * Deep equal utility
-         */
-
-        exports.eql = require('chaijs~deep-eql@0.1.3');
-
-        /*!
-         * Deep path value
-         */
-
-        exports.getPathValue = require('chai/lib/chai/utils/getPathValue.js');
-
-        /*!
-         * Function name
-         */
-
-        exports.getName = require('chai/lib/chai/utils/getName.js');
-
-        /*!
-         * add Property
-         */
-
-        exports.addProperty = require('chai/lib/chai/utils/addProperty.js');
-
-        /*!
-         * add Method
-         */
-
-        exports.addMethod = require('chai/lib/chai/utils/addMethod.js');
-
-        /*!
-         * overwrite Property
-         */
-
-        exports.overwriteProperty = require('chai/lib/chai/utils/overwriteProperty.js');
-
-        /*!
-         * overwrite Method
-         */
-
-        exports.overwriteMethod = require('chai/lib/chai/utils/overwriteMethod.js');
-
-        /*!
-         * Add a chainable method
-         */
-
-        exports.addChainableMethod = require('chai/lib/chai/utils/addChainableMethod.js');
-
-        /*!
-         * Overwrite chainable method
-         */
-
-        exports.overwriteChainableMethod = require('chai/lib/chai/utils/overwriteChainableMethod.js');
-
-
-    });
-
-    require.register("chai/lib/chai/utils/inspect.js", function (exports, module) {
-// This is (almost) directly from Node.js utils
-// https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js
-
-        var getName = require('chai/lib/chai/utils/getName.js');
-        var getProperties = require('chai/lib/chai/utils/getProperties.js');
-        var getEnumerableProperties = require('chai/lib/chai/utils/getEnumerableProperties.js');
-
-        module.exports = inspect;
-
-        /**
-         * Echos the value of a value. Trys to print the value out
-         * in the best way possible given the different types.
-         *
-         * @param {Object} obj The object to print out.
-         * @param {Boolean} showHidden Flag that shows hidden (not enumerable)
-         *    properties of objects.
-         * @param {Number} depth Depth in which to descend in object. Default is 2.
-         * @param {Boolean} colors Flag to turn on ANSI escape codes to color the
-         *    output. Default is false (no coloring).
-         */
-        function inspect(obj, showHidden, depth, colors) {
-            var ctx = {
-                showHidden: showHidden,
-                seen: [],
-                stylize: function (str) { return str; }
-            };
-            return formatValue(ctx, obj, (typeof depth === 'undefined' ? 2 : depth));
-        }
-
-// Returns true if object is a DOM element.
-        var isDOMElement = function (object) {
-            if (typeof HTMLElement === 'object') {
-                return object instanceof HTMLElement;
-            } else {
-                return object &&
-                    typeof object === 'object' &&
-                    object.nodeType === 1 &&
-                    typeof object.nodeName === 'string';
-            }
-        };
-
-        function formatValue(ctx, value, recurseTimes) {
-            // Provide a hook for user-specified inspect functions.
-            // Check that value is an object with an inspect function on it
-            if (value && typeof value.inspect === 'function' &&
-                    // Filter out the util module, it's inspect function is special
-                value.inspect !== exports.inspect &&
-                    // Also filter out any prototype objects using the circular check.
-                !(value.constructor && value.constructor.prototype === value)) {
-                var ret = value.inspect(recurseTimes);
-                if (typeof ret !== 'string') {
-                    ret = formatValue(ctx, ret, recurseTimes);
-                }
-                return ret;
-            }
-
-            // Primitive types cannot have properties
-            var primitive = formatPrimitive(ctx, value);
-            if (primitive) {
-                return primitive;
-            }
-
-            // If this is a DOM element, try to get the outer HTML.
-            if (isDOMElement(value)) {
-                if ('outerHTML' in value) {
-                    return value.outerHTML;
-                    // This value does not have an outerHTML attribute,
-                    //   it could still be an XML element
-                } else {
-                    // Attempt to serialize it
-                    try {
-                        if (document.xmlVersion) {
-                            var xmlSerializer = new XMLSerializer();
-                            return xmlSerializer.serializeToString(value);
-                        } else {
-                            // Firefox 11- do not support outerHTML
-                            //   It does, however, support innerHTML
-                            //   Use the following to render the element
-                            var ns = "http://www.w3.org/1999/xhtml";
-                            var container = document.createElementNS(ns, '_');
-
-                            container.appendChild(value.cloneNode(false));
-                            html = container.innerHTML
-                                .replace('><', '>' + value.innerHTML + '<');
-                            container.innerHTML = '';
-                            return html;
-                        }
-                    } catch (err) {
-                        // This could be a non-native DOM implementation,
-                        //   continue with the normal flow:
-                        //   printing the element as if it is an object.
-                    }
-                }
-            }
-
-            // Look up the keys of the object.
-            var visibleKeys = getEnumerableProperties(value);
-            var keys = ctx.showHidden ? getProperties(value) : visibleKeys;
-
-            // Some type of object without properties can be shortcutted.
-            // In IE, errors have a single `stack` property, or if they are vanilla `Error`,
-            // a `stack` plus `description` property; ignore those for consistency.
-            if (keys.length === 0 || (isError(value) && (
-                (keys.length === 1 && keys[0] === 'stack') ||
-                (keys.length === 2 && keys[0] === 'description' && keys[1] === 'stack')
-                ))) {
-                if (typeof value === 'function') {
-                    var name = getName(value);
-                    var nameSuffix = name ? ': ' + name : '';
-                    return ctx.stylize('[Function' + nameSuffix + ']', 'special');
-                }
-                if (isRegExp(value)) {
-                    return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
-                }
-                if (isDate(value)) {
-                    return ctx.stylize(Date.prototype.toUTCString.call(value), 'date');
-                }
-                if (isError(value)) {
-                    return formatError(value);
-                }
-            }
-
-            var base = '', array = false, braces = ['{', '}'];
-
-            // Make Array say that they are Array
-            if (isArray(value)) {
-                array = true;
-                braces = ['[', ']'];
-            }
-
-            // Make functions say that they are functions
-            if (typeof value === 'function') {
-                var name = getName(value);
-                var nameSuffix = name ? ': ' + name : '';
-                base = ' [Function' + nameSuffix + ']';
-            }
-
-            // Make RegExps say that they are RegExps
-            if (isRegExp(value)) {
-                base = ' ' + RegExp.prototype.toString.call(value);
-            }
-
-            // Make dates with properties first say the date
-            if (isDate(value)) {
-                base = ' ' + Date.prototype.toUTCString.call(value);
-            }
-
-            // Make error with message first say the error
-            if (isError(value)) {
-                return formatError(value);
-            }
-
-            if (keys.length === 0 && (!array || value.length == 0)) {
-                return braces[0] + base + braces[1];
-            }
-
-            if (recurseTimes < 0) {
-                if (isRegExp(value)) {
-                    return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
-                } else {
-                    return ctx.stylize('[Object]', 'special');
-                }
-            }
-
-            ctx.seen.push(value);
-
-            var output;
-            if (array) {
-                output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
-            } else {
-                output = keys.map(function(key) {
-                    return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
-                });
-            }
-
-            ctx.seen.pop();
-
-            return reduceToSingleString(output, base, braces);
-        }
-
-
-        function formatPrimitive(ctx, value) {
-            switch (typeof value) {
-                case 'undefined':
-                    return ctx.stylize('undefined', 'undefined');
-
-                case 'string':
-                    var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
-                            .replace(/'/g, "\\'")
-                            .replace(/\\"/g, '"') + '\'';
-                    return ctx.stylize(simple, 'string');
-
-                case 'number':
-                    if (value === 0 && (1/value) === -Infinity) {
-                        return ctx.stylize('-0', 'number');
-                    }
-                    return ctx.stylize('' + value, 'number');
-
-                case 'boolean':
-                    return ctx.stylize('' + value, 'boolean');
-            }
-            // For some reason typeof null is "object", so special case here.
-            if (value === null) {
-                return ctx.stylize('null', 'null');
-            }
-        }
-
-
-        function formatError(value) {
-            return '[' + Error.prototype.toString.call(value) + ']';
-        }
-
-
-        function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
-            var output = [];
-            for (var i = 0, l = value.length; i < l; ++i) {
-                if (Object.prototype.hasOwnProperty.call(value, String(i))) {
-                    output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
-                        String(i), true));
-                } else {
-                    output.push('');
-                }
-            }
-            keys.forEach(function(key) {
-                if (!key.match(/^\d+$/)) {
-                    output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
-                        key, true));
-                }
-            });
-            return output;
-        }
-
-
-        function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
-            var name, str;
-            if (value.__lookupGetter__) {
-                if (value.__lookupGetter__(key)) {
-                    if (value.__lookupSetter__(key)) {
-                        str = ctx.stylize('[Getter/Setter]', 'special');
-                    } else {
-                        str = ctx.stylize('[Getter]', 'special');
-                    }
-                } else {
-                    if (value.__lookupSetter__(key)) {
-                        str = ctx.stylize('[Setter]', 'special');
-                    }
-                }
-            }
-            if (visibleKeys.indexOf(key) < 0) {
-                name = '[' + key + ']';
-            }
-            if (!str) {
-                if (ctx.seen.indexOf(value[key]) < 0) {
-                    if (recurseTimes === null) {
-                        str = formatValue(ctx, value[key], null);
-                    } else {
-                        str = formatValue(ctx, value[key], recurseTimes - 1);
-                    }
-                    if (str.indexOf('\n') > -1) {
-                        if (array) {
-                            str = str.split('\n').map(function(line) {
-                                return '  ' + line;
-                            }).join('\n').substr(2);
-                        } else {
-                            str = '\n' + str.split('\n').map(function(line) {
-                                return '   ' + line;
-                            }).join('\n');
-                        }
-                    }
-                } else {
-                    str = ctx.stylize('[Circular]', 'special');
-                }
-            }
-            if (typeof name === 'undefined') {
-                if (array && key.match(/^\d+$/)) {
-                    return str;
-                }
-                name = JSON.stringify('' + key);
-                if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
-                    name = name.substr(1, name.length - 2);
-                    name = ctx.stylize(name, 'name');
-                } else {
-                    name = name.replace(/'/g, "\\'")
-                        .replace(/\\"/g, '"')
-                        .replace(/(^"|"$)/g, "'");
-                    name = ctx.stylize(name, 'string');
-                }
-            }
-
-            return name + ': ' + str;
-        }
-
-
-        function reduceToSingleString(output, base, braces) {
-            var numLinesEst = 0;
-            var length = output.reduce(function(prev, cur) {
-                numLinesEst++;
-                if (cur.indexOf('\n') >= 0) numLinesEst++;
-                return prev + cur.length + 1;
-            }, 0);
-
-            if (length > 60) {
-                return braces[0] +
-                    (base === '' ? '' : base + '\n ') +
-                    ' ' +
-                    output.join(',\n  ') +
-                    ' ' +
-                    braces[1];
-            }
-
-            return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
-        }
-
-        function isArray(ar) {
-            return Array.isArray(ar) ||
-                (typeof ar === 'object' && objectToString(ar) === '[object Array]');
-        }
-
-        function isRegExp(re) {
-            return typeof re === 'object' && objectToString(re) === '[object RegExp]';
-        }
-
-        function isDate(d) {
-            return typeof d === 'object' && objectToString(d) === '[object Date]';
-        }
-
-        function isError(e) {
-            return typeof e === 'object' && objectToString(e) === '[object Error]';
-        }
-
-        function objectToString(o) {
-            return Object.prototype.toString.call(o);
-        }
-
-    });
-
-    require.register("chai/lib/chai/utils/objDisplay.js", function (exports, module) {
-        /*!
-         * Chai - flag utility
-         * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        /*!
-         * Module dependancies
-         */
-
-        var inspect = require('chai/lib/chai/utils/inspect.js');
-        var config = require('chai/lib/chai/config.js');
-
-        /**
-         * ### .objDisplay (object)
-         *
-         * Determines if an object or an array matches
-         * criteria to be inspected in-line for error
-         * messages or should be truncated.
-         *
-         * @param {Mixed} javascript object to inspect
-         * @name objDisplay
-         * @api public
-         */
-
-        module.exports = function (obj) {
-            var str = inspect(obj)
-                , type = Object.prototype.toString.call(obj);
-
-            if (config.truncateThreshold && str.length >= config.truncateThreshold) {
-                if (type === '[object Function]') {
-                    return !obj.name || obj.name === ''
-                        ? '[Function]'
-                        : '[Function: ' + obj.name + ']';
-                } else if (type === '[object Array]') {
-                    return '[ Array(' + obj.length + ') ]';
-                } else if (type === '[object Object]') {
-                    var keys = Object.keys(obj)
-                        , kstr = keys.length > 2
-                            ? keys.splice(0, 2).join(', ') + ', ...'
-                            : keys.join(', ');
-                    return '{ Object (' + kstr + ') }';
-                } else {
-                    return str;
-                }
-            } else {
-                return str;
-            }
-        };
-
-    });
-
-    require.register("chai/lib/chai/utils/overwriteMethod.js", function (exports, module) {
-        /*!
-         * Chai - overwriteMethod utility
-         * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        /**
-         * ### overwriteMethod (ctx, name, fn)
-         *
-         * Overwites an already existing method and provides
-         * access to previous function. Must return function
-         * to be used for name.
-         *
-         *     utils.overwriteMethod(chai.Assertion.prototype, 'equal', function (_super) {
- *       return function (str) {
- *         var obj = utils.flag(this, 'object');
- *         if (obj instanceof Foo) {
- *           new chai.Assertion(obj.value).to.equal(str);
- *         } else {
- *           _super.apply(this, arguments);
- *         }
- *       }
- *     });
-         *
-         * Can also be accessed directly from `chai.Assertion`.
-         *
-         *     chai.Assertion.overwriteMethod('foo', fn);
-         *
-         * Then can be used as any other assertion.
-         *
-         *     expect(myFoo).to.equal('bar');
-         *
-         * @param {Object} ctx object whose method is to be overwritten
-         * @param {String} name of method to overwrite
-         * @param {Function} method function that returns a function to be used for name
-         * @name overwriteMethod
-         * @api public
-         */
-
-        module.exports = function (ctx, name, method) {
-            var _method = ctx[name]
-                , _super = function () { return this; };
-
-            if (_method && 'function' === typeof _method)
-                _super = _method;
-
-            ctx[name] = function () {
-                var result = method(_super).apply(this, arguments);
-                return result === undefined ? this : result;
-            }
-        };
-
-    });
-
-    require.register("chai/lib/chai/utils/overwriteProperty.js", function (exports, module) {
-        /*!
-         * Chai - overwriteProperty utility
-         * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        /**
-         * ### overwriteProperty (ctx, name, fn)
-         *
-         * Overwites an already existing property getter and provides
-         * access to previous value. Must return function to use as getter.
-         *
-         *     utils.overwriteProperty(chai.Assertion.prototype, 'ok', function (_super) {
- *       return function () {
- *         var obj = utils.flag(this, 'object');
- *         if (obj instanceof Foo) {
- *           new chai.Assertion(obj.name).to.equal('bar');
- *         } else {
- *           _super.call(this);
- *         }
- *       }
- *     });
-         *
-         *
-         * Can also be accessed directly from `chai.Assertion`.
-         *
-         *     chai.Assertion.overwriteProperty('foo', fn);
-         *
-         * Then can be used as any other assertion.
-         *
-         *     expect(myFoo).to.be.ok;
-         *
-         * @param {Object} ctx object whose property is to be overwritten
-         * @param {String} name of property to overwrite
-         * @param {Function} getter function that returns a getter function to be used for name
-         * @name overwriteProperty
-         * @api public
-         */
-
-        module.exports = function (ctx, name, getter) {
-            var _get = Object.getOwnPropertyDescriptor(ctx, name)
-                , _super = function () {};
-
-            if (_get && 'function' === typeof _get.get)
-                _super = _get.get
-
-            Object.defineProperty(ctx, name,
-                { get: function () {
-                    var result = getter(_super).call(this);
-                    return result === undefined ? this : result;
-                }
-                    , configurable: true
-                });
-        };
-
-    });
-
-    require.register("chai/lib/chai/utils/overwriteChainableMethod.js", function (exports, module) {
-        /*!
-         * Chai - overwriteChainableMethod utility
-         * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        /**
-         * ### overwriteChainableMethod (ctx, name, fn)
-         *
-         * Overwites an already existing chainable method
-         * and provides access to the previous function or
-         * property.  Must return functions to be used for
-         * name.
-         *
-         *     utils.overwriteChainableMethod(chai.Assertion.prototype, 'length',
-         *       function (_super) {
- *       }
-         *     , function (_super) {
- *       }
-         *     );
-         *
-         * Can also be accessed directly from `chai.Assertion`.
-         *
-         *     chai.Assertion.overwriteChainableMethod('foo', fn, fn);
-         *
-         * Then can be used as any other assertion.
-         *
-         *     expect(myFoo).to.have.length(3);
-         *     expect(myFoo).to.have.length.above(3);
-         *
-         * @param {Object} ctx object whose method / property is to be overwritten
-         * @param {String} name of method / property to overwrite
-         * @param {Function} method function that returns a function to be used for name
-         * @param {Function} chainingBehavior function that returns a function to be used for property
-         * @name overwriteChainableMethod
-         * @api public
-         */
-
-        module.exports = function (ctx, name, method, chainingBehavior) {
-            var chainableBehavior = ctx.__methods[name];
-
-            var _chainingBehavior = chainableBehavior.chainingBehavior;
-            chainableBehavior.chainingBehavior = function () {
-                var result = chainingBehavior(_chainingBehavior).call(this);
-                return result === undefined ? this : result;
-            };
-
-            var _method = chainableBehavior.method;
-            chainableBehavior.method = function () {
-                var result = method(_method).apply(this, arguments);
-                return result === undefined ? this : result;
-            };
-        };
-
-    });
-
-    require.register("chai/lib/chai/utils/test.js", function (exports, module) {
-        /*!
-         * Chai - test utility
-         * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        /*!
-         * Module dependancies
-         */
-
-        var flag = require('chai/lib/chai/utils/flag.js');
-
-        /**
-         * # test(object, expression)
-         *
-         * Test and object for expression.
-         *
-         * @param {Object} object (constructed Assertion)
-         * @param {Arguments} chai.Assertion.prototype.assert arguments
-         */
-
-        module.exports = function (obj, args) {
-            var negate = flag(obj, 'negate')
-                , expr = args[0];
-            return negate ? !expr : expr;
-        };
-
-    });
-
-    require.register("chai/lib/chai/utils/transferFlags.js", function (exports, module) {
-        /*!
-         * Chai - transferFlags utility
-         * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        /**
-         * ### transferFlags(assertion, object, includeAll = true)
-         *
-         * Transfer all the flags for `assertion` to `object`. If
-         * `includeAll` is set to `false`, then the base Chai
-         * assertion flags (namely `object`, `ssfi`, and `message`)
-         * will not be transferred.
-         *
-         *
-         *     var newAssertion = new Assertion();
-         *     utils.transferFlags(assertion, newAssertion);
-         *
-         *     var anotherAsseriton = new Assertion(myObj);
-         *     utils.transferFlags(assertion, anotherAssertion, false);
-         *
-         * @param {Assertion} assertion the assertion to transfer the flags from
-         * @param {Object} object the object to transfer the flags too; usually a new assertion
-         * @param {Boolean} includeAll
-         * @name getAllFlags
-         * @api private
-         */
-
-        module.exports = function (assertion, object, includeAll) {
-            var flags = assertion.__flags || (assertion.__flags = Object.create(null));
-
-            if (!object.__flags) {
-                object.__flags = Object.create(null);
-            }
-
-            includeAll = arguments.length === 3 ? includeAll : true;
-
-            for (var flag in flags) {
-                if (includeAll ||
-                    (flag !== 'object' && flag !== 'ssfi' && flag != 'message')) {
-                    object.__flags[flag] = flags[flag];
-                }
-            }
-        };
-
-    });
-
-    require.register("chai/lib/chai/utils/type.js", function (exports, module) {
-        /*!
-         * Chai - type utility
-         * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
-         * MIT Licensed
-         */
-
-        /*!
-         * Detectable javascript natives
-         */
-
-        var natives = {
-            '[object Arguments]': 'arguments'
-            , '[object Array]': 'array'
-            , '[object Date]': 'date'
-            , '[object Function]': 'function'
-            , '[object Number]': 'number'
-            , '[object RegExp]': 'regexp'
-            , '[object String]': 'string'
-        };
-
-        /**
-         * ### type(object)
-         *
-         * Better implementation of `typeof` detection that can
-         * be used cross-browser. Handles the inconsistencies of
-         * Array, `null`, and `undefined` detection.
-         *
-         *     utils.type({}) // 'object'
-         *     utils.type(null) // `null'
-         *     utils.type(undefined) // `undefined`
-         *     utils.type([]) // `array`
-         *
-         * @param {Mixed} object to detect type of
-         * @name type
-         * @api private
-         */
-
-        module.exports = function (obj) {
-            var str = Object.prototype.toString.call(obj);
-            if (natives[str]) return natives[str];
-            if (obj === null) return 'null';
-            if (obj === undefined) return 'undefined';
-            if (obj === Object(obj)) return 'object';
-            return typeof obj;
-        };
-
-    });
-
-    if (typeof exports == "object") {
-        module.exports = require("chai");
-    } else if (typeof define == "function" && define.amd) {
-        define("chai", [], function(){ return require("chai"); });
-    } else {
-        (this || window)["chai"] = require("chai");
-    }
-})();
diff --git a/public/js/lib/codemirror-accessible/.gitignore b/public/js/lib/codemirror-accessible/.gitignore
deleted file mode 100755
index 496ee2c..0000000
--- a/public/js/lib/codemirror-accessible/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-.DS_Store
\ No newline at end of file
diff --git a/public/js/lib/codemirror-accessible/README.md b/public/js/lib/codemirror-accessible/README.md
deleted file mode 100755
index 470e474..0000000
--- a/public/js/lib/codemirror-accessible/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# CodeMirror Accessible
-
-Read more at the project page: http://bgrins.github.io/codemirror-accessible/
\ No newline at end of file
diff --git a/public/js/lib/codemirror-accessible/accessible.js b/public/js/lib/codemirror-accessible/accessible.js
deleted file mode 100755
index ea233f0..0000000
--- a/public/js/lib/codemirror-accessible/accessible.js
+++ /dev/null
@@ -1,80 +0,0 @@
-window.onload=function(){
-    if (!window.waitToLoad) {
-        load();
-    }
-};
-
-function load() {
-    if (window.loaded) {
-        return;
-    }
-    window.loaded = true;
-
-    var myTextArea = document.getElementById("editor");
-    var textareaEditor = document.getElementById('textarea-editor');
-    var clonedTextArea = document.getElementById('editor2');
-
-    textareaEditor.value = clonedTextArea.value = myTextArea.value;
-
-    document.getElementById("original-demo").appendChild(clonedTextArea);
-    var myScreenreader = document.getElementById("editor-screenreader");
-
-    var myContentEditable = document.getElementById("content-editable");
-    var button = document.getElementById("toggle-textarea-visibility");
-
-
-    var editor = window.editor = CodeMirror.fromTextArea(myTextArea, {
-            lineNumbers: true,
-            matchBrackets: true,
-            continueComments: "Enter",
-            extraKeys: {"Ctrl-Q": "toggleComment"}
-    });
-
-    var editor2 = window.editor2 = CodeMirrorOriginal.fromTextArea(clonedTextArea, {
-            lineNumbers: true,
-            matchBrackets: true,
-            continueComments: "Enter",
-            extraKeys: {"Ctrl-Q": "toggleComment"}
-    });
-
-
-    var textareaVisible = false;
-    function toggleTextareaDisplay() {
-
-        if (!editor.display.input.getAttribute("backup-style")) {
-            editor.display.input.setAttribute("backup-style", editor.display.input.getAttribute("style"));
-            editor.display.input.parentNode.setAttribute("backup-style", editor.display.input.parentNode.getAttribute("style"));
-        }
-
-        if (textareaVisible) {
-            editor.display.input.setAttribute("style", editor.display.input.getAttribute("backup-style"));
-            editor.display.input.parentNode.setAttribute("style", editor.display.input.parentNode.getAttribute("backup-style"));
-            editor2.display.input.setAttribute("style", editor.display.input.getAttribute("backup-style"));
-            editor2.display.input.parentNode.setAttribute("style", editor.display.input.parentNode.getAttribute("backup-style"));
-        }
-        else {
-            editor.display.input.setAttribute("style", "height: 100px; width: 95%; margin-left: 3%; ");
-            editor.display.input.parentNode.setAttribute("style", "");
-            editor2.display.input.setAttribute("style", "height: 100px; width: 95%; margin-left: 3%; ");
-            editor2.display.input.parentNode.setAttribute("style", "");
-        }
-
-        textareaVisible = !textareaVisible;
-
-        if (window.localStorage) {
-            if (textareaVisible) {
-                window.localStorage["toggleTextareaDisplay"] = "1";
-            }
-            else {
-                window.localStorage.removeKey("toggleTextareaDisplay");
-            }
-        }
-    }
-
-    button.onclick = toggleTextareaDisplay;
-
-    if (window.localStorage && window.localStorage["toggleTextareaDisplay"]) {
-        toggleTextareaDisplay();
-    }
-
-}
\ No newline at end of file
diff --git a/public/js/lib/codemirror-accessible/codemirror-accessible.js b/public/js/lib/codemirror-accessible/codemirror-accessible.js
deleted file mode 100755
index bd37cfb..0000000
--- a/public/js/lib/codemirror-accessible/codemirror-accessible.js
+++ /dev/null
@@ -1,5828 +0,0 @@
-// CodeMirror version 3.15
-//
-// CodeMirror is the only global var we claim
-window.CodeMirror = (function() {
-  "use strict";
-
-  // BROWSER SNIFFING
-
-  // Crude, but necessary to handle a number of hard-to-feature-detect
-  // bugs and behavior differences.
-  var gecko = /gecko\/\d/i.test(navigator.userAgent);
-  var ie = /MSIE \d/.test(navigator.userAgent);
-  var ie_lt8 = ie && (document.documentMode == null || document.documentMode < 8);
-  var ie_lt9 = ie && (document.documentMode == null || document.documentMode < 9);
-  var webkit = /WebKit\//.test(navigator.userAgent);
-  var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(navigator.userAgent);
-  var chrome = /Chrome\//.test(navigator.userAgent);
-  var opera = /Opera\//.test(navigator.userAgent);
-  var safari = /Apple Computer/.test(navigator.vendor);
-  var khtml = /KHTML\//.test(navigator.userAgent);
-  var mac_geLion = /Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent);
-  var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent);
-  var phantom = /PhantomJS/.test(navigator.userAgent);
-
-  var ios = /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent);
-  // This is woefully incomplete. Suggestions for alternative methods welcome.
-  var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent);
-  var mac = ios || /Mac/.test(navigator.platform);
-  var windows = /windows/i.test(navigator.platform);
-
-  var opera_version = opera && navigator.userAgent.match(/Version\/(\d*\.\d*)/);
-  if (opera_version) opera_version = Number(opera_version[1]);
-  if (opera_version && opera_version >= 15) { opera = false; webkit = true; }
-  // Some browsers use the wrong event properties to signal cmd/ctrl on OS X
-  var flipCtrlCmd = mac && (qtwebkit || opera && (opera_version == null || opera_version < 12.11));
-  var captureMiddleClick = gecko || (ie && !ie_lt9);
-
-  // Optimize some code when these features are not used
-  var sawReadOnlySpans = false, sawCollapsedSpans = false;
-
-  // CONSTRUCTOR
-
-  function CodeMirror(place, options) {
-    if (!(this instanceof CodeMirror)) return new CodeMirror(place, options);
-
-    this.options = options = options || {};
-    // Determine effective options based on given values and defaults.
-    for (var opt in defaults) if (!options.hasOwnProperty(opt) && defaults.hasOwnProperty(opt))
-      options[opt] = defaults[opt];
-    setGuttersForLineNumbers(options);
-
-    var docStart = typeof options.value == "string" ? 0 : options.value.first;
-    var display = this.display = makeDisplay(place, docStart);
-    display.wrapper.CodeMirror = this;
-    updateGutters(this);
-    if (options.autofocus && !mobile) focusInput(this);
-
-    this.state = {keyMaps: [],
-                  overlays: [],
-                  modeGen: 0,
-                  overwrite: false, focused: false,
-                  suppressEdits: false, pasteIncoming: false,
-                  draggingText: false,
-                  highlight: new Delayed()};
-
-    themeChanged(this);
-    if (options.lineWrapping)
-      this.display.wrapper.className += " CodeMirror-wrap";
-
-    var doc = options.value;
-    if (typeof doc == "string") doc = new Doc(options.value, options.mode);
-    operation(this, attachDoc)(this, doc);
-
-    // Override magic textarea content restore that IE sometimes does
-    // on our hidden textarea on reload
-    if (ie) setTimeout(bind(resetInput, this, true), 20);
-
-    registerEventHandlers(this);
-    // IE throws unspecified error in certain cases, when
-    // trying to access activeElement before onload
-    var hasFocus; try { hasFocus = (document.activeElement == display.input); } catch(e) { }
-    if (hasFocus || (options.autofocus && !mobile)) setTimeout(bind(onFocus, this), 20);
-    else onBlur(this);
-
-    operation(this, function() {
-      for (var opt in optionHandlers)
-        if (optionHandlers.propertyIsEnumerable(opt))
-          optionHandlers[opt](this, options[opt], Init);
-      for (var i = 0; i < initHooks.length; ++i) initHooks[i](this);
-    })();
-  }
-
-  // DISPLAY CONSTRUCTOR
-
-  function makeDisplay(place, docStart) {
-    var d = {};
-
-    var input = d.input = elt("textarea", null, null, "position: absolute; padding: 0; width: 1px; height: 1em; outline: none; font-size: 4px;");
-    if (webkit) input.style.width = "1000px";
-    else input.setAttribute("wrap", "off");
-    // if border: 0; -- iOS fails to open keyboard (issue #1287)
-    if (ios) input.style.border = "1px solid black";
-    input.setAttribute("autocorrect", "off"); input.setAttribute("autocapitalize", "off"); input.setAttribute("spellcheck", "false");
-
-    // Wraps and hides input textarea
-    d.inputDiv = elt("div", [input], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
-    // The actual fake scrollbars.
-    d.scrollbarH = elt("div", [elt("div", null, null, "height: 1px")], "CodeMirror-hscrollbar");
-    d.scrollbarV = elt("div", [elt("div", null, null, "width: 1px")], "CodeMirror-vscrollbar");
-    d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler");
-    d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler");
-    // DIVs containing the selection and the actual code
-    d.lineDiv = elt("div", null, "CodeMirror-code");
-    d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1");
-    // Blinky cursor, and element used to ensure cursor fits at the end of a line
-    d.cursor = elt("div", "\u00a0", "CodeMirror-cursor");
-    // Secondary cursor, shown when on a 'jump' in bi-directional text
-    d.otherCursor = elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor");
-    // Used to measure text size
-    d.measure = elt("div", null, "CodeMirror-measure");
-    // Wraps everything that needs to exist inside the vertically-padded coordinate system
-    d.lineSpace = elt("div", [d.measure, d.selectionDiv, d.lineDiv, d.cursor, d.otherCursor],
-                         null, "position: relative; outline: none");
-    // Moved around its parent to cover visible view
-    d.mover = elt("div", [elt("div", [d.lineSpace], "CodeMirror-lines")], null, "position: relative");
-    // Set to the height of the text, causes scrolling
-    d.sizer = elt("div", [d.mover], "CodeMirror-sizer");
-    // D is needed because behavior of elts with overflow: auto and padding is inconsistent across browsers
-    d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerCutOff + "px; width: 1px;");
-    // Will contain the gutters, if any
-    d.gutters = elt("div", null, "CodeMirror-gutters");
-    d.lineGutter = null;
-    // Provides scrolling
-    d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll");
-    d.scroller.setAttribute("tabIndex", "-1");
-    // The element in which the editor lives.
-    d.wrapper = elt("div", [d.inputDiv, d.scrollbarH, d.scrollbarV,
-                            d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror");
-    // Work around IE7 z-index bug
-    if (ie_lt8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }
-    if (place.appendChild) place.appendChild(d.wrapper); else place(d.wrapper);
-
-    // Needed to hide big blue blinking cursor on Mobile Safari
-    if (ios) input.style.width = "0px";
-    if (!webkit) d.scroller.draggable = true;
-    // Needed to handle Tab key in KHTML
-    if (khtml) { d.inputDiv.style.height = "1px"; d.inputDiv.style.position = "absolute"; }
-    // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).
-    else if (ie_lt8) d.scrollbarH.style.minWidth = d.scrollbarV.style.minWidth = "18px";
-
-    // Current visible range (may be bigger than the view window).
-    d.viewOffset = d.lastSizeC = 0;
-    d.showingFrom = d.showingTo = docStart;
-
-    // Used to only resize the line number gutter when necessary (when
-    // the amount of lines crosses a boundary that makes its width change)
-    d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;
-    // See readInput and resetInput
-    d.prevInput = "";
-    // Set to true when a non-horizontal-scrolling widget is added. As
-    // an optimization, widget aligning is skipped when d is false.
-    d.alignWidgets = false;
-    // Flag that indicates whether we currently expect input to appear
-    // (after some event like 'keypress' or 'input') and are polling
-    // intensively.
-    d.pollingFast = false;
-    // Self-resetting timeout for the poller
-    d.poll = new Delayed();
-
-    d.cachedCharWidth = d.cachedTextHeight = null;
-    d.measureLineCache = [];
-    d.measureLineCachePos = 0;
-
-    // Tracks when resetInput has punted to just putting a short
-    // string instead of the (large) selection.
-    d.inaccurateSelection = false;
-
-    // Tracks the maximum line length so that the horizontal scrollbar
-    // can be kept static when scrolling.
-    d.maxLine = null;
-    d.maxLineLength = 0;
-    d.maxLineChanged = false;
-
-    // Used for measuring wheel scrolling granularity
-    d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;
-
-    return d;
-  }
-
-  // STATE UPDATES
-
-  // Used to get the editor into a consistent state again when options change.
-
-  function loadMode(cm) {
-    cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption);
-    cm.doc.iter(function(line) {
-      if (line.stateAfter) line.stateAfter = null;
-      if (line.styles) line.styles = null;
-    });
-    cm.doc.frontier = cm.doc.first;
-    startWorker(cm, 100);
-    cm.state.modeGen++;
-    if (cm.curOp) regChange(cm);
-  }
-
-  function wrappingChanged(cm) {
-    if (cm.options.lineWrapping) {
-      cm.display.wrapper.className += " CodeMirror-wrap";
-      cm.display.sizer.style.minWidth = "";
-    } else {
-      cm.display.wrapper.className = cm.display.wrapper.className.replace(" CodeMirror-wrap", "");
-      computeMaxLength(cm);
-    }
-    estimateLineHeights(cm);
-    regChange(cm);
-    clearCaches(cm);
-    setTimeout(function(){updateScrollbars(cm);}, 100);
-  }
-
-  function estimateHeight(cm) {
-    var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;
-    var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);
-    return function(line) {
-      if (lineIsHidden(cm.doc, line))
-        return 0;
-      else if (wrapping)
-        return (Math.ceil(line.text.length / perLine) || 1) * th;
-      else
-        return th;
-    };
-  }
-
-  function estimateLineHeights(cm) {
-    var doc = cm.doc, est = estimateHeight(cm);
-    doc.iter(function(line) {
-      var estHeight = est(line);
-      if (estHeight != line.height) updateLineHeight(line, estHeight);
-    });
-  }
-
-  function keyMapChanged(cm) {
-    var map = keyMap[cm.options.keyMap], style = map.style;
-    cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-keymap-\S+/g, "") +
-      (style ? " cm-keymap-" + style : "");
-    cm.state.disableInput = map.disableInput;
-  }
-
-  function themeChanged(cm) {
-    cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") +
-      cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-");
-    clearCaches(cm);
-  }
-
-  function guttersChanged(cm) {
-    updateGutters(cm);
-    regChange(cm);
-    setTimeout(function(){alignHorizontally(cm);}, 20);
-  }
-
-  function updateGutters(cm) {
-    var gutters = cm.display.gutters, specs = cm.options.gutters;
-    removeChildren(gutters);
-    for (var i = 0; i < specs.length; ++i) {
-      var gutterClass = specs[i];
-      var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + gutterClass));
-      if (gutterClass == "CodeMirror-linenumbers") {
-        cm.display.lineGutter = gElt;
-        gElt.style.width = (cm.display.lineNumWidth || 1) + "px";
-      }
-    }
-    gutters.style.display = i ? "" : "none";
-  }
-
-  function lineLength(doc, line) {
-    if (line.height == 0) return 0;
-    var len = line.text.length, merged, cur = line;
-    while (merged = collapsedSpanAtStart(cur)) {
-      var found = merged.find();
-      cur = getLine(doc, found.from.line);
-      len += found.from.ch - found.to.ch;
-    }
-    cur = line;
-    while (merged = collapsedSpanAtEnd(cur)) {
-      var found = merged.find();
-      len -= cur.text.length - found.from.ch;
-      cur = getLine(doc, found.to.line);
-      len += cur.text.length - found.to.ch;
-    }
-    return len;
-  }
-
-  function computeMaxLength(cm) {
-    var d = cm.display, doc = cm.doc;
-    d.maxLine = getLine(doc, doc.first);
-    d.maxLineLength = lineLength(doc, d.maxLine);
-    d.maxLineChanged = true;
-    doc.iter(function(line) {
-      var len = lineLength(doc, line);
-      if (len > d.maxLineLength) {
-        d.maxLineLength = len;
-        d.maxLine = line;
-      }
-    });
-  }
-
-  // Make sure the gutters options contains the element
-  // "CodeMirror-linenumbers" when the lineNumbers option is true.
-  function setGuttersForLineNumbers(options) {
-    var found = false;
-    for (var i = 0; i < options.gutters.length; ++i) {
-      if (options.gutters[i] == "CodeMirror-linenumbers") {
-        if (options.lineNumbers) found = true;
-        else options.gutters.splice(i--, 1);
-      }
-    }
-    if (!found && options.lineNumbers)
-      options.gutters.push("CodeMirror-linenumbers");
-  }
-
-  // SCROLLBARS
-
-  // Re-synchronize the fake scrollbars with the actual size of the
-  // content. Optionally force a scrollTop.
-  function updateScrollbars(cm) {
-    var d = cm.display, docHeight = cm.doc.height;
-    var totalHeight = docHeight + paddingVert(d);
-    d.sizer.style.minHeight = d.heightForcer.style.top = totalHeight + "px";
-    d.gutters.style.height = Math.max(totalHeight, d.scroller.clientHeight - scrollerCutOff) + "px";
-    var scrollHeight = Math.max(totalHeight, d.scroller.scrollHeight);
-    var needsH = d.scroller.scrollWidth > (d.scroller.clientWidth + 1);
-    var needsV = scrollHeight > (d.scroller.clientHeight + 1);
-    if (needsV) {
-      d.scrollbarV.style.display = "block";
-      d.scrollbarV.style.bottom = needsH ? scrollbarWidth(d.measure) + "px" : "0";
-      d.scrollbarV.firstChild.style.height =
-        (scrollHeight - d.scroller.clientHeight + d.scrollbarV.clientHeight) + "px";
-    } else d.scrollbarV.style.display = "";
-    if (needsH) {
-      d.scrollbarH.style.display = "block";
-      d.scrollbarH.style.right = needsV ? scrollbarWidth(d.measure) + "px" : "0";
-      d.scrollbarH.firstChild.style.width =
-        (d.scroller.scrollWidth - d.scroller.clientWidth + d.scrollbarH.clientWidth) + "px";
-    } else d.scrollbarH.style.display = "";
-    if (needsH && needsV) {
-      d.scrollbarFiller.style.display = "block";
-      d.scrollbarFiller.style.height = d.scrollbarFiller.style.width = scrollbarWidth(d.measure) + "px";
-    } else d.scrollbarFiller.style.display = "";
-    if (needsH && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {
-      d.gutterFiller.style.display = "block";
-      d.gutterFiller.style.height = scrollbarWidth(d.measure) + "px";
-      d.gutterFiller.style.width = d.gutters.offsetWidth + "px";
-    } else d.gutterFiller.style.display = "";
-
-    if (mac_geLion && scrollbarWidth(d.measure) === 0)
-      d.scrollbarV.style.minWidth = d.scrollbarH.style.minHeight = mac_geMountainLion ? "18px" : "12px";
-  }
-
-  function visibleLines(display, doc, viewPort) {
-    var top = display.scroller.scrollTop, height = display.wrapper.clientHeight;
-    if (typeof viewPort == "number") top = viewPort;
-    else if (viewPort) {top = viewPort.top; height = viewPort.bottom - viewPort.top;}
-    top = Math.floor(top - paddingTop(display));
-    var bottom = Math.ceil(top + height);
-    return {from: lineAtHeight(doc, top), to: lineAtHeight(doc, bottom)};
-  }
-
-  // LINE NUMBERS
-
-  function alignHorizontally(cm) {
-    var display = cm.display;
-    if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) return;
-    var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;
-    var gutterW = display.gutters.offsetWidth, l = comp + "px";
-    for (var n = display.lineDiv.firstChild; n; n = n.nextSibling) if (n.alignable) {
-      for (var i = 0, a = n.alignable; i < a.length; ++i) a[i].style.left = l;
-    }
-    if (cm.options.fixedGutter)
-      display.gutters.style.left = (comp + gutterW) + "px";
-  }
-
-  function maybeUpdateLineNumberWidth(cm) {
-    if (!cm.options.lineNumbers) return false;
-    var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;
-    if (last.length != display.lineNumChars) {
-      var test = display.measure.appendChild(elt("div", [elt("div", last)],
-                                                 "CodeMirror-linenumber CodeMirror-gutter-elt"));
-      var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;
-      display.lineGutter.style.width = "";
-      display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding);
-      display.lineNumWidth = display.lineNumInnerWidth + padding;
-      display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;
-      display.lineGutter.style.width = display.lineNumWidth + "px";
-      return true;
-    }
-    return false;
-  }
-
-  function lineNumberFor(options, i) {
-    return String(options.lineNumberFormatter(i + options.firstLineNumber));
-  }
-  function compensateForHScroll(display) {
-    return getRect(display.scroller).left - getRect(display.sizer).left;
-  }
-
-  // DISPLAY DRAWING
-
-  function updateDisplay(cm, changes, viewPort, forced) {
-    var oldFrom = cm.display.showingFrom, oldTo = cm.display.showingTo, updated;
-    var visible = visibleLines(cm.display, cm.doc, viewPort);
-    for (;;) {
-      if (!updateDisplayInner(cm, changes, visible, forced)) break;
-      forced = false;
-      updated = true;
-      updateSelection(cm);
-      updateScrollbars(cm);
-
-      // Clip forced viewport to actual scrollable area
-      if (viewPort)
-        viewPort = Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight,
-                            typeof viewPort == "number" ? viewPort : viewPort.top);
-      visible = visibleLines(cm.display, cm.doc, viewPort);
-      if (visible.from >= cm.display.showingFrom && visible.to <= cm.display.showingTo)
-        break;
-      changes = [];
-    }
-
-    if (updated) {
-      signalLater(cm, "update", cm);
-      if (cm.display.showingFrom != oldFrom || cm.display.showingTo != oldTo)
-        signalLater(cm, "viewportChange", cm, cm.display.showingFrom, cm.display.showingTo);
-    }
-    return updated;
-  }
-
-  // Uses a set of changes plus the current scroll position to
-  // determine which DOM updates have to be made, and makes the
-  // updates.
-  function updateDisplayInner(cm, changes, visible, forced) {
-    var display = cm.display, doc = cm.doc;
-    if (!display.wrapper.clientWidth) {
-      display.showingFrom = display.showingTo = doc.first;
-      display.viewOffset = 0;
-      return;
-    }
-
-    // Bail out if the visible area is already rendered and nothing changed.
-    if (!forced && changes.length == 0 &&
-        visible.from > display.showingFrom && visible.to < display.showingTo)
-      return;
-
-    if (maybeUpdateLineNumberWidth(cm))
-      changes = [{from: doc.first, to: doc.first + doc.size}];
-    var gutterW = display.sizer.style.marginLeft = display.gutters.offsetWidth + "px";
-    display.scrollbarH.style.left = cm.options.fixedGutter ? gutterW : "0";
-
-    // Used to determine which lines need their line numbers updated
-    var positionsChangedFrom = Infinity;
-    if (cm.options.lineNumbers)
-      for (var i = 0; i < changes.length; ++i)
-        if (changes[i].diff) { positionsChangedFrom = changes[i].from; break; }
-
-    var end = doc.first + doc.size;
-    var from = Math.max(visible.from - cm.options.viewportMargin, doc.first);
-    var to = Math.min(end, visible.to + cm.options.viewportMargin);
-    if (display.showingFrom < from && from - display.showingFrom < 20) from = Math.max(doc.first, display.showingFrom);
-    if (display.showingTo > to && display.showingTo - to < 20) to = Math.min(end, display.showingTo);
-    if (sawCollapsedSpans) {
-      from = lineNo(visualLine(doc, getLine(doc, from)));
-      while (to < end && lineIsHidden(doc, getLine(doc, to))) ++to;
-    }
-
-    // Create a range of theoretically intact lines, and punch holes
-    // in that using the change info.
-    var intact = [{from: Math.max(display.showingFrom, doc.first),
-                   to: Math.min(display.showingTo, end)}];
-    if (intact[0].from >= intact[0].to) intact = [];
-    else intact = computeIntact(intact, changes);
-    // When merged lines are present, we might have to reduce the
-    // intact ranges because changes in continued fragments of the
-    // intact lines do require the lines to be redrawn.
-    if (sawCollapsedSpans)
-      for (var i = 0; i < intact.length; ++i) {
-        var range = intact[i], merged;
-        while (merged = collapsedSpanAtEnd(getLine(doc, range.to - 1))) {
-          var newTo = merged.find().from.line;
-          if (newTo > range.from) range.to = newTo;
-          else { intact.splice(i--, 1); break; }
-        }
-      }
-
-    // Clip off the parts that won't be visible
-    var intactLines = 0;
-    for (var i = 0; i < intact.length; ++i) {
-      var range = intact[i];
-      if (range.from < from) range.from = from;
-      if (range.to > to) range.to = to;
-      if (range.from >= range.to) intact.splice(i--, 1);
-      else intactLines += range.to - range.from;
-    }
-    if (!forced && intactLines == to - from && from == display.showingFrom && to == display.showingTo) {
-      updateViewOffset(cm);
-      return;
-    }
-    intact.sort(function(a, b) {return a.from - b.from;});
-
-    // Avoid crashing on IE's "unspecified error" when in iframes
-    try {
-      var focused = document.activeElement;
-    } catch(e) {}
-    if (intactLines < (to - from) * .7) display.lineDiv.style.display = "none";
-    patchDisplay(cm, from, to, intact, positionsChangedFrom);
-    display.lineDiv.style.display = "";
-    if (focused && document.activeElement != focused && focused.offsetHeight) focused.focus();
-
-    var different = from != display.showingFrom || to != display.showingTo ||
-      display.lastSizeC != display.wrapper.clientHeight;
-    // This is just a bogus formula that detects when the editor is
-    // resized or the font size changes.
-    if (different) {
-      display.lastSizeC = display.wrapper.clientHeight;
-      startWorker(cm, 400);
-    }
-    display.showingFrom = from; display.showingTo = to;
-
-    updateHeightsInViewport(cm);
-    updateViewOffset(cm);
-
-    return true;
-  }
-
-  function updateHeightsInViewport(cm) {
-    var display = cm.display;
-    var prevBottom = display.lineDiv.offsetTop;
-    for (var node = display.lineDiv.firstChild, height; node; node = node.nextSibling) if (node.lineObj) {
-      if (ie_lt8) {
-        var bot = node.offsetTop + node.offsetHeight;
-        height = bot - prevBottom;
-        prevBottom = bot;
-      } else {
-        var box = getRect(node);
-        height = box.bottom - box.top;
-      }
-      var diff = node.lineObj.height - height;
-      if (height < 2) height = textHeight(display);
-      if (diff > .001 || diff < -.001) {
-        updateLineHeight(node.lineObj, height);
-        var widgets = node.lineObj.widgets;
-        if (widgets) for (var i = 0; i < widgets.length; ++i)
-          widgets[i].height = widgets[i].node.offsetHeight;
-      }
-    }
-  }
-
-  function updateViewOffset(cm) {
-    var off = cm.display.viewOffset = heightAtLine(cm, getLine(cm.doc, cm.display.showingFrom));
-    // Position the mover div to align with the current virtual scroll position
-    cm.display.mover.style.top = off + "px";
-  }
-
-  function computeIntact(intact, changes) {
-    for (var i = 0, l = changes.length || 0; i < l; ++i) {
-      var change = changes[i], intact2 = [], diff = change.diff || 0;
-      for (var j = 0, l2 = intact.length; j < l2; ++j) {
-        var range = intact[j];
-        if (change.to <= range.from && change.diff) {
-          intact2.push({from: range.from + diff, to: range.to + diff});
-        } else if (change.to <= range.from || change.from >= range.to) {
-          intact2.push(range);
-        } else {
-          if (change.from > range.from)
-            intact2.push({from: range.from, to: change.from});
-          if (change.to < range.to)
-            intact2.push({from: change.to + diff, to: range.to + diff});
-        }
-      }
-      intact = intact2;
-    }
-    return intact;
-  }
-
-  function getDimensions(cm) {
-    var d = cm.display, left = {}, width = {};
-    for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {
-      left[cm.options.gutters[i]] = n.offsetLeft;
-      width[cm.options.gutters[i]] = n.offsetWidth;
-    }
-    return {fixedPos: compensateForHScroll(d),
-            gutterTotalWidth: d.gutters.offsetWidth,
-            gutterLeft: left,
-            gutterWidth: width,
-            wrapperWidth: d.wrapper.clientWidth};
-  }
-
-  function patchDisplay(cm, from, to, intact, updateNumbersFrom) {
-    var dims = getDimensions(cm);
-    var display = cm.display, lineNumbers = cm.options.lineNumbers;
-    if (!intact.length && (!webkit || !cm.display.currentWheelTarget))
-      removeChildren(display.lineDiv);
-    var container = display.lineDiv, cur = container.firstChild;
-
-    function rm(node) {
-      var next = node.nextSibling;
-      if (webkit && mac && cm.display.currentWheelTarget == node) {
-        node.style.display = "none";
-        node.lineObj = null;
-      } else {
-        node.parentNode.removeChild(node);
-      }
-      return next;
-    }
-
-    var nextIntact = intact.shift(), lineN = from;
-    cm.doc.iter(from, to, function(line) {
-      if (nextIntact && nextIntact.to == lineN) nextIntact = intact.shift();
-      if (lineIsHidden(cm.doc, line)) {
-        if (line.height != 0) updateLineHeight(line, 0);
-        if (line.widgets && cur.previousSibling) for (var i = 0; i < line.widgets.length; ++i) {
-          var w = line.widgets[i];
-          if (w.showIfHidden) {
-            var prev = cur.previousSibling;
-            if (/pre/i.test(prev.nodeName)) {
-              var wrap = elt("div", null, null, "position: relative");
-              prev.parentNode.replaceChild(wrap, prev);
-              wrap.appendChild(prev);
-              prev = wrap;
-            }
-            var wnode = prev.appendChild(elt("div", [w.node], "CodeMirror-linewidget"));
-            if (!w.handleMouseEvents) wnode.ignoreEvents = true;
-            positionLineWidget(w, wnode, prev, dims);
-          }
-        }
-      } else if (nextIntact && nextIntact.from <= lineN && nextIntact.to > lineN) {
-        // This line is intact. Skip to the actual node. Update its
-        // line number if needed.
-        while (cur.lineObj != line) cur = rm(cur);
-        if (lineNumbers && updateNumbersFrom <= lineN && cur.lineNumber)
-          setTextContent(cur.lineNumber, lineNumberFor(cm.options, lineN));
-        cur = cur.nextSibling;
-      } else {
-        // For lines with widgets, make an attempt to find and reuse
-        // the existing element, so that widgets aren't needlessly
-        // removed and re-inserted into the dom
-        if (line.widgets) for (var j = 0, search = cur, reuse; search && j < 20; ++j, search = search.nextSibling)
-          if (search.lineObj == line && /div/i.test(search.nodeName)) { reuse = search; break; }
-        // This line needs to be generated.
-        var lineNode = buildLineElement(cm, line, lineN, dims, reuse);
-        if (lineNode != reuse) {
-          container.insertBefore(lineNode, cur);
-        } else {
-          while (cur != reuse) cur = rm(cur);
-          cur = cur.nextSibling;
-        }
-
-        lineNode.lineObj = line;
-      }
-      ++lineN;
-    });
-    while (cur) cur = rm(cur);
-  }
-
-  function buildLineElement(cm, line, lineNo, dims, reuse) {
-    var lineElement = lineContent(cm, line);
-    var markers = line.gutterMarkers, display = cm.display, wrap;
-
-    if (!cm.options.lineNumbers && !markers && !line.bgClass && !line.wrapClass && !line.widgets)
-      return lineElement;
-
-    // Lines with gutter elements, widgets or a background class need
-    // to be wrapped again, and have the extra elements added to the
-    // wrapper div
-
-    if (reuse) {
-      reuse.alignable = null;
-      var isOk = true, widgetsSeen = 0, insertBefore = null;
-      for (var n = reuse.firstChild, next; n; n = next) {
-        next = n.nextSibling;
-        if (!/\bCodeMirror-linewidget\b/.test(n.className)) {
-          reuse.removeChild(n);
-        } else {
-          for (var i = 0; i < line.widgets.length; ++i) {
-            var widget = line.widgets[i];
-            if (widget.node == n.firstChild) {
-              if (!widget.above && !insertBefore) insertBefore = n;
-              positionLineWidget(widget, n, reuse, dims);
-              ++widgetsSeen;
-              break;
-            }
-          }
-          if (i == line.widgets.length) { isOk = false; break; }
-        }
-      }
-      reuse.insertBefore(lineElement, insertBefore);
-      if (isOk && widgetsSeen == line.widgets.length) {
-        wrap = reuse;
-        reuse.className = line.wrapClass || "";
-      }
-    }
-    if (!wrap) {
-      wrap = elt("div", null, line.wrapClass, "position: relative");
-      wrap.appendChild(lineElement);
-    }
-    // Kludge to make sure the styled element lies behind the selection (by z-index)
-    if (line.bgClass)
-      wrap.insertBefore(elt("div", null, line.bgClass + " CodeMirror-linebackground"), wrap.firstChild);
-    if (cm.options.lineNumbers || markers) {
-      var gutterWrap = wrap.insertBefore(elt("div", null, null, "position: absolute; left: " +
-                                             (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px"),
-                                         wrap.firstChild);
-      if (cm.options.fixedGutter) (wrap.alignable || (wrap.alignable = [])).push(gutterWrap);
-      if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"]))
-        wrap.lineNumber = gutterWrap.appendChild(
-          elt("div", lineNumberFor(cm.options, lineNo),
-              "CodeMirror-linenumber CodeMirror-gutter-elt",
-              "left: " + dims.gutterLeft["CodeMirror-linenumbers"] + "px; width: "
-              + display.lineNumInnerWidth + "px"));
-      if (markers)
-        for (var k = 0; k < cm.options.gutters.length; ++k) {
-          var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id];
-          if (found)
-            gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt", "left: " +
-                                       dims.gutterLeft[id] + "px; width: " + dims.gutterWidth[id] + "px"));
-        }
-    }
-    if (ie_lt8) wrap.style.zIndex = 2;
-    if (line.widgets && wrap != reuse) for (var i = 0, ws = line.widgets; i < ws.length; ++i) {
-      var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget");
-      if (!widget.handleMouseEvents) node.ignoreEvents = true;
-      positionLineWidget(widget, node, wrap, dims);
-      if (widget.above)
-        wrap.insertBefore(node, cm.options.lineNumbers && line.height != 0 ? gutterWrap : lineElement);
-      else
-        wrap.appendChild(node);
-      signalLater(widget, "redraw");
-    }
-    return wrap;
-  }
-
-  function positionLineWidget(widget, node, wrap, dims) {
-    if (widget.noHScroll) {
-      (wrap.alignable || (wrap.alignable = [])).push(node);
-      var width = dims.wrapperWidth;
-      node.style.left = dims.fixedPos + "px";
-      if (!widget.coverGutter) {
-        width -= dims.gutterTotalWidth;
-        node.style.paddingLeft = dims.gutterTotalWidth + "px";
-      }
-      node.style.width = width + "px";
-    }
-    if (widget.coverGutter) {
-      node.style.zIndex = 5;
-      node.style.position = "relative";
-      if (!widget.noHScroll) node.style.marginLeft = -dims.gutterTotalWidth + "px";
-    }
-  }
-
-  // SELECTION / CURSOR
-
-  function updateSelection(cm) {
-    var display = cm.display;
-    var collapsed = posEq(cm.doc.sel.from, cm.doc.sel.to);
-    if (collapsed || cm.options.showCursorWhenSelecting)
-      updateSelectionCursor(cm);
-    else
-      display.cursor.style.display = display.otherCursor.style.display = "none";
-    if (!collapsed)
-      updateSelectionRange(cm);
-    else
-      display.selectionDiv.style.display = "none";
-
-    // Move the hidden textarea near the cursor to prevent scrolling artifacts
-    if (cm.options.moveInputWithCursor) {
-      var headPos = cursorCoords(cm, cm.doc.sel.head, "div");
-      var wrapOff = getRect(display.wrapper), lineOff = getRect(display.lineDiv);
-      display.inputDiv.style.top = Math.max(0, Math.min(display.wrapper.clientHeight - 10,
-                                                        headPos.top + lineOff.top - wrapOff.top)) + "px";
-      display.inputDiv.style.left = Math.max(0, Math.min(display.wrapper.clientWidth - 10,
-                                                         headPos.left + lineOff.left - wrapOff.left)) + "px";
-    }
-  }
-
-  // No selection, plain cursor
-  function updateSelectionCursor(cm) {
-    var display = cm.display, pos = cursorCoords(cm, cm.doc.sel.head, "div");
-    display.cursor.style.left = pos.left + "px";
-    display.cursor.style.top = pos.top + "px";
-    display.cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px";
-    display.cursor.style.display = "";
-
-    if (pos.other) {
-      display.otherCursor.style.display = "";
-      display.otherCursor.style.left = pos.other.left + "px";
-      display.otherCursor.style.top = pos.other.top + "px";
-      display.otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px";
-    } else { display.otherCursor.style.display = "none"; }
-  }
-
-  // Highlight selection
-  function updateSelectionRange(cm) {
-    var display = cm.display, doc = cm.doc, sel = cm.doc.sel;
-    var fragment = document.createDocumentFragment();
-    var clientWidth = display.lineSpace.offsetWidth, pl = paddingLeft(cm.display);
-
-    function add(left, top, width, bottom) {
-      if (top < 0) top = 0;
-      fragment.appendChild(elt("div", null, "CodeMirror-selected", "position: absolute; left: " + left +
-                               "px; top: " + top + "px; width: " + (width == null ? clientWidth - left : width) +
-                               "px; height: " + (bottom - top) + "px"));
-    }
-
-    function drawForLine(line, fromArg, toArg) {
-      var lineObj = getLine(doc, line);
-      var lineLen = lineObj.text.length;
-      var start, end;
-      function coords(ch, bias) {
-        return charCoords(cm, Pos(line, ch), "div", lineObj, bias);
-      }
-
-      iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {
-        var leftPos = coords(from, "left"), rightPos, left, right;
-        if (from == to) {
-          rightPos = leftPos;
-          left = right = leftPos.left;
-        } else {
-          rightPos = coords(to - 1, "right");
-          if (dir == "rtl") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }
-          left = leftPos.left;
-          right = rightPos.right;
-        }
-        if (fromArg == null && from == 0) left = pl;
-        if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part
-          add(left, leftPos.top, null, leftPos.bottom);
-          left = pl;
-          if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);
-        }
-        if (toArg == null && to == lineLen) right = clientWidth;
-        if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)
-          start = leftPos;
-        if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)
-          end = rightPos;
-        if (left < pl + 1) left = pl;
-        add(left, rightPos.top, right - left, rightPos.bottom);
-      });
-      return {start: start, end: end};
-    }
-
-    if (sel.from.line == sel.to.line) {
-      drawForLine(sel.from.line, sel.from.ch, sel.to.ch);
-    } else {
-      var fromLine = getLine(doc, sel.from.line), toLine = getLine(doc, sel.to.line);
-      var singleVLine = visualLine(doc, fromLine) == visualLine(doc, toLine);
-      var leftEnd = drawForLine(sel.from.line, sel.from.ch, singleVLine ? fromLine.text.length : null).end;
-      var rightStart = drawForLine(sel.to.line, singleVLine ? 0 : null, sel.to.ch).start;
-      if (singleVLine) {
-        if (leftEnd.top < rightStart.top - 2) {
-          add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);
-          add(pl, rightStart.top, rightStart.left, rightStart.bottom);
-        } else {
-          add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);
-        }
-      }
-      if (leftEnd.bottom < rightStart.top)
-        add(pl, leftEnd.bottom, null, rightStart.top);
-    }
-
-    removeChildrenAndAdd(display.selectionDiv, fragment);
-    display.selectionDiv.style.display = "";
-  }
-
-  // Cursor-blinking
-  function restartBlink(cm) {
-    if (!cm.state.focused) return;
-    var display = cm.display;
-    clearInterval(display.blinker);
-    var on = true;
-    display.cursor.style.visibility = display.otherCursor.style.visibility = "";
-    display.blinker = setInterval(function() {
-      display.cursor.style.visibility = display.otherCursor.style.visibility = (on = !on) ? "" : "hidden";
-    }, cm.options.cursorBlinkRate);
-  }
-
-  // HIGHLIGHT WORKER
-
-  function startWorker(cm, time) {
-    if (cm.doc.mode.startState && cm.doc.frontier < cm.display.showingTo)
-      cm.state.highlight.set(time, bind(highlightWorker, cm));
-  }
-
-  function highlightWorker(cm) {
-    var doc = cm.doc;
-    if (doc.frontier < doc.first) doc.frontier = doc.first;
-    if (doc.frontier >= cm.display.showingTo) return;
-    var end = +new Date + cm.options.workTime;
-    var state = copyState(doc.mode, getStateBefore(cm, doc.frontier));
-    var changed = [], prevChange;
-    doc.iter(doc.frontier, Math.min(doc.first + doc.size, cm.display.showingTo + 500), function(line) {
-      if (doc.frontier >= cm.display.showingFrom) { // Visible
-        var oldStyles = line.styles;
-        line.styles = highlightLine(cm, line, state);
-        var ischange = !oldStyles || oldStyles.length != line.styles.length;
-        for (var i = 0; !ischange && i < oldStyles.length; ++i) ischange = oldStyles[i] != line.styles[i];
-        if (ischange) {
-          if (prevChange && prevChange.end == doc.frontier) prevChange.end++;
-          else changed.push(prevChange = {start: doc.frontier, end: doc.frontier + 1});
-        }
-        line.stateAfter = copyState(doc.mode, state);
-      } else {
-        processLine(cm, line, state);
-        line.stateAfter = doc.frontier % 5 == 0 ? copyState(doc.mode, state) : null;
-      }
-      ++doc.frontier;
-      if (+new Date > end) {
-        startWorker(cm, cm.options.workDelay);
-        return true;
-      }
-    });
-    if (changed.length)
-      operation(cm, function() {
-        for (var i = 0; i < changed.length; ++i)
-          regChange(this, changed[i].start, changed[i].end);
-      })();
-  }
-
-  // Finds the line to start with when starting a parse. Tries to
-  // find a line with a stateAfter, so that it can start with a
-  // valid state. If that fails, it returns the line with the
-  // smallest indentation, which tends to need the least context to
-  // parse correctly.
-  function findStartLine(cm, n, precise) {
-    var minindent, minline, doc = cm.doc;
-    for (var search = n, lim = n - 100; search > lim; --search) {
-      if (search <= doc.first) return doc.first;
-      var line = getLine(doc, search - 1);
-      if (line.stateAfter && (!precise || search <= doc.frontier)) return search;
-      var indented = countColumn(line.text, null, cm.options.tabSize);
-      if (minline == null || minindent > indented) {
-        minline = search - 1;
-        minindent = indented;
-      }
-    }
-    return minline;
-  }
-
-  function getStateBefore(cm, n, precise) {
-    var doc = cm.doc, display = cm.display;
-      if (!doc.mode.startState) return true;
-    var pos = findStartLine(cm, n, precise), state = pos > doc.first && getLine(doc, pos-1).stateAfter;
-    if (!state) state = startState(doc.mode);
-    else state = copyState(doc.mode, state);
-    doc.iter(pos, n, function(line) {
-      processLine(cm, line, state);
-      var save = pos == n - 1 || pos % 5 == 0 || pos >= display.showingFrom && pos < display.showingTo;
-      line.stateAfter = save ? copyState(doc.mode, state) : null;
-      ++pos;
-    });
-    return state;
-  }
-
-  // POSITION MEASUREMENT
-
-  function paddingTop(display) {return display.lineSpace.offsetTop;}
-  function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight;}
-  function paddingLeft(display) {
-    var e = removeChildrenAndAdd(display.measure, elt("pre", null, null, "text-align: left")).appendChild(elt("span", "x"));
-    return e.offsetLeft;
-  }
-
-  function measureChar(cm, line, ch, data, bias) {
-    var dir = -1;
-    data = data || measureLine(cm, line);
-
-    for (var pos = ch;; pos += dir) {
-      var r = data[pos];
-      if (r) break;
-      if (dir < 0 && pos == 0) dir = 1;
-    }
-    bias = pos > ch ? "left" : pos < ch ? "right" : bias;
-    if (bias == "left" && r.leftSide) r = r.leftSide;
-    else if (bias == "right" && r.rightSide) r = r.rightSide;
-    return {left: pos < ch ? r.right : r.left,
-            right: pos > ch ? r.left : r.right,
-            top: r.top,
-            bottom: r.bottom};
-  }
-
-  function findCachedMeasurement(cm, line) {
-    var cache = cm.display.measureLineCache;
-    for (var i = 0; i < cache.length; ++i) {
-      var memo = cache[i];
-      if (memo.text == line.text && memo.markedSpans == line.markedSpans &&
-          cm.display.scroller.clientWidth == memo.width &&
-          memo.classes == line.textClass + "|" + line.bgClass + "|" + line.wrapClass)
-        return memo;
-    }
-  }
-
-  function clearCachedMeasurement(cm, line) {
-    var exists = findCachedMeasurement(cm, line);
-    if (exists) exists.text = exists.measure = exists.markedSpans = null;
-  }
-
-  function measureLine(cm, line) {
-    // First look in the cache
-    var cached = findCachedMeasurement(cm, line);
-    if (cached) return cached.measure;
-
-    // Failing that, recompute and store result in cache
-    var measure = measureLineInner(cm, line);
-    var cache = cm.display.measureLineCache;
-    var memo = {text: line.text, width: cm.display.scroller.clientWidth,
-                markedSpans: line.markedSpans, measure: measure,
-                classes: line.textClass + "|" + line.bgClass + "|" + line.wrapClass};
-    if (cache.length == 16) cache[++cm.display.measureLineCachePos % 16] = memo;
-    else cache.push(memo);
-    return measure;
-  }
-
-  function measureLineInner(cm, line) {
-    var display = cm.display, measure = emptyArray(line.text.length);
-    var pre = lineContent(cm, line, measure, true);
-
-    // IE does not cache element positions of inline elements between
-    // calls to getBoundingClientRect. This makes the loop below,
-    // which gathers the positions of all the characters on the line,
-    // do an amount of layout work quadratic to the number of
-    // characters. When line wrapping is off, we try to improve things
-    // by first subdividing the line into a bunch of inline blocks, so
-    // that IE can reuse most of the layout information from caches
-    // for those blocks. This does interfere with line wrapping, so it
-    // doesn't work when wrapping is on, but in that case the
-    // situation is slightly better, since IE does cache line-wrapping
-    // information and only recomputes per-line.
-    if (ie && !ie_lt8 && !cm.options.lineWrapping && pre.childNodes.length > 100) {
-      var fragment = document.createDocumentFragment();
-      var chunk = 10, n = pre.childNodes.length;
-      for (var i = 0, chunks = Math.ceil(n / chunk); i < chunks; ++i) {
-        var wrap = elt("div", null, null, "display: inline-block");
-        for (var j = 0; j < chunk && n; ++j) {
-          wrap.appendChild(pre.firstChild);
-          --n;
-        }
-        fragment.appendChild(wrap);
-      }
-      pre.appendChild(fragment);
-    }
-
-    removeChildrenAndAdd(display.measure, pre);
-
-    var outer = getRect(display.lineDiv);
-    var vranges = [], data = emptyArray(line.text.length), maxBot = pre.offsetHeight;
-    // Work around an IE7/8 bug where it will sometimes have randomly
-    // replaced our pre with a clone at this point.
-    if (ie_lt9 && display.measure.first != pre)
-      removeChildrenAndAdd(display.measure, pre);
-
-    function measureRect(rect) {
-      var top = rect.top - outer.top, bot = rect.bottom - outer.top;
-      if (bot > maxBot) bot = maxBot;
-      if (top < 0) top = 0;
-      for (var i = vranges.length - 2; i >= 0; i -= 2) {
-        var rtop = vranges[i], rbot = vranges[i+1];
-        if (rtop > bot || rbot < top) continue;
-        if (rtop <= top && rbot >= bot ||
-            top <= rtop && bot >= rbot ||
-            Math.min(bot, rbot) - Math.max(top, rtop) >= (bot - top) >> 1) {
-          vranges[i] = Math.min(top, rtop);
-          vranges[i+1] = Math.max(bot, rbot);
-          break;
-        }
-      }
-      if (i < 0) { i = vranges.length; vranges.push(top, bot); }
-      return {left: rect.left - outer.left,
-              right: rect.right - outer.left,
-              top: i, bottom: null};
-    }
-    function finishRect(rect) {
-      rect.bottom = vranges[rect.top+1];
-      rect.top = vranges[rect.top];
-    }
-
-    for (var i = 0, cur; i < measure.length; ++i) if (cur = measure[i]) {
-      var node = cur, rect = null;
-      // A widget might wrap, needs special care
-      if (/\bCodeMirror-widget\b/.test(cur.className) && cur.getClientRects) {
-        if (cur.firstChild.nodeType == 1) node = cur.firstChild;
-        var rects = node.getClientRects();
-        if (rects.length > 1) {
-          rect = data[i] = measureRect(rects[0]);
-          rect.rightSide = measureRect(rects[rects.length - 1]);
-        }
-      }
-      if (!rect) rect = data[i] = measureRect(getRect(node));
-      if (cur.measureRight) rect.right = getRect(cur.measureRight).left;
-      if (cur.leftSide) rect.leftSide = measureRect(getRect(cur.leftSide));
-    }
-    for (var i = 0, cur; i < data.length; ++i) if (cur = data[i]) {
-      finishRect(cur);
-      if (cur.leftSide) finishRect(cur.leftSide);
-      if (cur.rightSide) finishRect(cur.rightSide);
-    }
-    return data;
-  }
-
-  function measureLineWidth(cm, line) {
-    var hasBadSpan = false;
-    if (line.markedSpans) for (var i = 0; i < line.markedSpans; ++i) {
-      var sp = line.markedSpans[i];
-      if (sp.collapsed && (sp.to == null || sp.to == line.text.length)) hasBadSpan = true;
-    }
-    var cached = !hasBadSpan && findCachedMeasurement(cm, line);
-    if (cached) return measureChar(cm, line, line.text.length, cached.measure, "right").right;
-
-    var pre = lineContent(cm, line, null, true);
-    var end = pre.appendChild(zeroWidthElement(cm.display.measure));
-    removeChildrenAndAdd(cm.display.measure, pre);
-    return getRect(end).right - getRect(cm.display.lineDiv).left;
-  }
-
-  function clearCaches(cm) {
-    cm.display.measureLineCache.length = cm.display.measureLineCachePos = 0;
-    cm.display.cachedCharWidth = cm.display.cachedTextHeight = null;
-    if (!cm.options.lineWrapping) cm.display.maxLineChanged = true;
-    cm.display.lineNumChars = null;
-  }
-
-  function pageScrollX() { return window.pageXOffset || (document.documentElement || document.body).scrollLeft; }
-  function pageScrollY() { return window.pageYOffset || (document.documentElement || document.body).scrollTop; }
-
-  // Context is one of "line", "div" (display.lineDiv), "local"/null (editor), or "page"
-  function intoCoordSystem(cm, lineObj, rect, context) {
-    if (lineObj.widgets) for (var i = 0; i < lineObj.widgets.length; ++i) if (lineObj.widgets[i].above) {
-      var size = widgetHeight(lineObj.widgets[i]);
-      rect.top += size; rect.bottom += size;
-    }
-    if (context == "line") return rect;
-    if (!context) context = "local";
-    var yOff = heightAtLine(cm, lineObj);
-    if (context == "local") yOff += paddingTop(cm.display);
-    else yOff -= cm.display.viewOffset;
-    if (context == "page" || context == "window") {
-      var lOff = getRect(cm.display.lineSpace);
-      yOff += lOff.top + (context == "window" ? 0 : pageScrollY());
-      var xOff = lOff.left + (context == "window" ? 0 : pageScrollX());
-      rect.left += xOff; rect.right += xOff;
-    }
-    rect.top += yOff; rect.bottom += yOff;
-    return rect;
-  }
-
-  // Context may be "window", "page", "div", or "local"/null
-  // Result is in "div" coords
-  function fromCoordSystem(cm, coords, context) {
-    if (context == "div") return coords;
-    var left = coords.left, top = coords.top;
-    // First move into "page" coordinate system
-    if (context == "page") {
-      left -= pageScrollX();
-      top -= pageScrollY();
-    } else if (context == "local" || !context) {
-      var localBox = getRect(cm.display.sizer);
-      left += localBox.left;
-      top += localBox.top;
-    }
-
-    var lineSpaceBox = getRect(cm.display.lineSpace);
-    return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};
-  }
-
-  function charCoords(cm, pos, context, lineObj, bias) {
-    if (!lineObj) lineObj = getLine(cm.doc, pos.line);
-    return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, null, bias), context);
-  }
-
-  function cursorCoords(cm, pos, context, lineObj, measurement) {
-    lineObj = lineObj || getLine(cm.doc, pos.line);
-    if (!measurement) measurement = measureLine(cm, lineObj);
-    function get(ch, right) {
-      var m = measureChar(cm, lineObj, ch, measurement, right ? "right" : "left");
-      if (right) m.left = m.right; else m.right = m.left;
-      return intoCoordSystem(cm, lineObj, m, context);
-    }
-    function getBidi(ch, partPos) {
-      var part = order[partPos], right = part.level % 2;
-      if (ch == bidiLeft(part) && partPos && part.level < order[partPos - 1].level) {
-        part = order[--partPos];
-        ch = bidiRight(part) - (part.level % 2 ? 0 : 1);
-        right = true;
-      } else if (ch == bidiRight(part) && partPos < order.length - 1 && part.level < order[partPos + 1].level) {
-        part = order[++partPos];
-        ch = bidiLeft(part) - part.level % 2;
-        right = false;
-      }
-      if (right && ch == part.to && ch > part.from) return get(ch - 1);
-      return get(ch, right);
-    }
-    var order = getOrder(lineObj), ch = pos.ch;
-    if (!order) return get(ch);
-    var partPos = getBidiPartAt(order, ch);
-    var val = getBidi(ch, partPos);
-    if (bidiOther != null) val.other = getBidi(ch, bidiOther);
-    return val;
-  }
-
-  function PosWithInfo(line, ch, outside, xRel) {
-    var pos = new Pos(line, ch);
-    pos.xRel = xRel;
-    if (outside) pos.outside = true;
-    return pos;
-  }
-
-  // Coords must be lineSpace-local
-  function coordsChar(cm, x, y) {
-    var doc = cm.doc;
-    y += cm.display.viewOffset;
-    if (y < 0) return PosWithInfo(doc.first, 0, true, -1);
-    var lineNo = lineAtHeight(doc, y), last = doc.first + doc.size - 1;
-    if (lineNo > last)
-      return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, true, 1);
-    if (x < 0) x = 0;
-
-    for (;;) {
-      var lineObj = getLine(doc, lineNo);
-      var found = coordsCharInner(cm, lineObj, lineNo, x, y);
-      var merged = collapsedSpanAtEnd(lineObj);
-      var mergedPos = merged && merged.find();
-      if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0))
-        lineNo = mergedPos.to.line;
-      else
-        return found;
-    }
-  }
-
-  function coordsCharInner(cm, lineObj, lineNo, x, y) {
-    var innerOff = y - heightAtLine(cm, lineObj);
-    var wrongLine = false, adjust = 2 * cm.display.wrapper.clientWidth;
-    var measurement = measureLine(cm, lineObj);
-
-    function getX(ch) {
-      var sp = cursorCoords(cm, Pos(lineNo, ch), "line",
-                            lineObj, measurement);
-      wrongLine = true;
-      if (innerOff > sp.bottom) return sp.left - adjust;
-      else if (innerOff < sp.top) return sp.left + adjust;
-      else wrongLine = false;
-      return sp.left;
-    }
-
-    var bidi = getOrder(lineObj), dist = lineObj.text.length;
-    var from = lineLeft(lineObj), to = lineRight(lineObj);
-    var fromX = getX(from), fromOutside = wrongLine, toX = getX(to), toOutside = wrongLine;
-
-    if (x > toX) return PosWithInfo(lineNo, to, toOutside, 1);
-    // Do a binary search between these bounds.
-    for (;;) {
-      if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) {
-        var ch = x < fromX || x - fromX <= toX - x ? from : to;
-        var xDiff = x - (ch == from ? fromX : toX);
-        while (isExtendingChar.test(lineObj.text.charAt(ch))) ++ch;
-        var pos = PosWithInfo(lineNo, ch, ch == from ? fromOutside : toOutside,
-                              xDiff < 0 ? -1 : xDiff ? 1 : 0);
-        return pos;
-      }
-      var step = Math.ceil(dist / 2), middle = from + step;
-      if (bidi) {
-        middle = from;
-        for (var i = 0; i < step; ++i) middle = moveVisually(lineObj, middle, 1);
-      }
-      var middleX = getX(middle);
-      if (middleX > x) {to = middle; toX = middleX; if (toOutside = wrongLine) toX += 1000; dist = step;}
-      else {from = middle; fromX = middleX; fromOutside = wrongLine; dist -= step;}
-    }
-  }
-
-  var measureText;
-  function textHeight(display) {
-    if (display.cachedTextHeight != null) return display.cachedTextHeight;
-    if (measureText == null) {
-      measureText = elt("pre");
-      // Measure a bunch of lines, for browsers that compute
-      // fractional heights.
-      for (var i = 0; i < 49; ++i) {
-        measureText.appendChild(document.createTextNode("x"));
-        measureText.appendChild(elt("br"));
-      }
-      measureText.appendChild(document.createTextNode("x"));
-    }
-    removeChildrenAndAdd(display.measure, measureText);
-    var height = measureText.offsetHeight / 50;
-    if (height > 3) display.cachedTextHeight = height;
-    removeChildren(display.measure);
-    return height || 1;
-  }
-
-  function charWidth(display) {
-    if (display.cachedCharWidth != null) return display.cachedCharWidth;
-    var anchor = elt("span", "x");
-    var pre = elt("pre", [anchor]);
-    removeChildrenAndAdd(display.measure, pre);
-    var width = anchor.offsetWidth;
-    if (width > 2) display.cachedCharWidth = width;
-    return width || 10;
-  }
-
-  // OPERATIONS
-
-  // Operations are used to wrap changes in such a way that each
-  // change won't have to update the cursor and display (which would
-  // be awkward, slow, and error-prone), but instead updates are
-  // batched and then all combined and executed at once.
-
-  var nextOpId = 0;
-  function startOperation(cm) {
-    cm.curOp = {
-      // An array of ranges of lines that have to be updated. See
-      // updateDisplay.
-      changes: [],
-      forceUpdate: false,
-      updateInput: null,
-      userSelChange: null,
-      textChanged: null,
-      selectionChanged: false,
-      cursorActivity: false,
-      updateMaxLine: false,
-      updateScrollPos: false,
-      id: ++nextOpId
-    };
-    if (!delayedCallbackDepth++) delayedCallbacks = [];
-  }
-
-  function endOperation(cm) {
-    var op = cm.curOp, doc = cm.doc, display = cm.display;
-    cm.curOp = null;
-
-    if (op.updateMaxLine) computeMaxLength(cm);
-    if (display.maxLineChanged && !cm.options.lineWrapping && display.maxLine) {
-      var width = measureLineWidth(cm, display.maxLine);
-      display.sizer.style.minWidth = Math.max(0, width + 3 + scrollerCutOff) + "px";
-      display.maxLineChanged = false;
-      var maxScrollLeft = Math.max(0, display.sizer.offsetLeft + display.sizer.offsetWidth - display.scroller.clientWidth);
-      if (maxScrollLeft < doc.scrollLeft && !op.updateScrollPos)
-        setScrollLeft(cm, Math.min(display.scroller.scrollLeft, maxScrollLeft), true);
-    }
-    var newScrollPos, updated;
-    if (op.updateScrollPos) {
-      newScrollPos = op.updateScrollPos;
-    } else if (op.selectionChanged && display.scroller.clientHeight) { // don't rescroll if not visible
-      var coords = cursorCoords(cm, doc.sel.head);
-      newScrollPos = calculateScrollPos(cm, coords.left, coords.top, coords.left, coords.bottom);
-    }
-    if (op.changes.length || op.forceUpdate || newScrollPos && newScrollPos.scrollTop != null) {
-      updated = updateDisplay(cm, op.changes, newScrollPos && newScrollPos.scrollTop, op.forceUpdate);
-      if (cm.display.scroller.offsetHeight) cm.doc.scrollTop = cm.display.scroller.scrollTop;
-    }
-    if (!updated && op.selectionChanged) updateSelection(cm);
-    if (op.updateScrollPos) {
-      display.scroller.scrollTop = display.scrollbarV.scrollTop = doc.scrollTop = newScrollPos.scrollTop;
-      display.scroller.scrollLeft = display.scrollbarH.scrollLeft = doc.scrollLeft = newScrollPos.scrollLeft;
-      alignHorizontally(cm);
-      if (op.scrollToPos)
-        scrollPosIntoView(cm, clipPos(cm.doc, op.scrollToPos), op.scrollToPosMargin);
-    } else if (newScrollPos) {
-      scrollCursorIntoView(cm);
-    }
-    if (op.selectionChanged) restartBlink(cm);
-
-    if (cm.state.focused && op.updateInput)
-      resetInput(cm, op.userSelChange);
-
-    var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;
-    if (hidden) for (var i = 0; i < hidden.length; ++i)
-      if (!hidden[i].lines.length) signal(hidden[i], "hide");
-    if (unhidden) for (var i = 0; i < unhidden.length; ++i)
-      if (unhidden[i].lines.length) signal(unhidden[i], "unhide");
-
-    var delayed;
-    if (!--delayedCallbackDepth) {
-      delayed = delayedCallbacks;
-      delayedCallbacks = null;
-    }
-    if (op.textChanged)
-      signal(cm, "change", cm, op.textChanged);
-    if (op.cursorActivity) signal(cm, "cursorActivity", cm);
-    if (delayed) for (var i = 0; i < delayed.length; ++i) delayed[i]();
-  }
-
-  // Wraps a function in an operation. Returns the wrapped function.
-  function operation(cm1, f) {
-    return function() {
-      var cm = cm1 || this, withOp = !cm.curOp;
-      if (withOp) startOperation(cm);
-      try { var result = f.apply(cm, arguments); }
-      finally { if (withOp) endOperation(cm); }
-      return result;
-    };
-  }
-  function docOperation(f) {
-    return function() {
-      var withOp = this.cm && !this.cm.curOp, result;
-      if (withOp) startOperation(this.cm);
-      try { result = f.apply(this, arguments); }
-      finally { if (withOp) endOperation(this.cm); }
-      return result;
-    };
-  }
-  function runInOp(cm, f) {
-    var withOp = !cm.curOp, result;
-    if (withOp) startOperation(cm);
-    try { result = f(); }
-    finally { if (withOp) endOperation(cm); }
-    return result;
-  }
-
-  function regChange(cm, from, to, lendiff) {
-    if (from == null) from = cm.doc.first;
-    if (to == null) to = cm.doc.first + cm.doc.size;
-    cm.curOp.changes.push({from: from, to: to, diff: lendiff});
-  }
-
-  // INPUT HANDLING
-
-  function slowPoll(cm) {
-    if (cm.display.pollingFast) return;
-    cm.display.poll.set(cm.options.pollInterval, function() {
-      readInput(cm);
-      if (cm.state.focused) slowPoll(cm);
-    });
-  }
-
-  function fastPoll(cm) {
-    var missed = false;
-    cm.display.pollingFast = true;
-    function p() {
-      var changed = readInput(cm);
-      if (!changed && !missed) {missed = true; cm.display.poll.set(60, p);}
-      else {cm.display.pollingFast = false; slowPoll(cm);}
-    }
-    cm.display.poll.set(20, p);
-  }
-
-  // prevInput is a hack to work with IME. If we reset the textarea
-  // on every change, that breaks IME. So we look for changes
-  // compared to the previous content instead. (Modern browsers have
-  // events that indicate IME taking place, but these are not widely
-  // supported or compatible enough yet to rely on.)
-  function readInput(cm) {
-    var input = cm.display.input, prevInput = cm.display.prevInput, doc = cm.doc, sel = doc.sel;
-    if (!cm.state.focused || hasSelection(input) || isReadOnly(cm) || cm.state.disableInput || cm.state.accessibleTextareaWaiting) return false;
-    var text = input.value;
-    if (text == prevInput && posEq(sel.from, sel.to)) return false;
-    if (ie && !ie_lt9 && cm.display.inputHasSelection === text) {
-      resetInput(cm, true);
-      return false;
-    }
-
-    var withOp = !cm.curOp;
-    if (withOp) startOperation(cm);
-    sel.shift = false;
-    var same = 0, l = Math.min(prevInput.length, text.length);
-    while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same;
-    var from = sel.from, to = sel.to;
-    if (same < prevInput.length)
-      from = Pos(from.line, from.ch - (prevInput.length - same));
-    else if (cm.state.overwrite && posEq(from, to) && !cm.state.pasteIncoming)
-      to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + (text.length - same)));
-
-    var updateInput = cm.curOp.updateInput;
-    var changeEvent = {from: from, to: to, text: splitLines(text.slice(same)),
-                       origin: cm.state.pasteIncoming ? "paste" : "+input"};
-    makeChange(cm.doc, changeEvent, "end");
-    cm.curOp.updateInput = updateInput;
-    signalLater(cm, "inputRead", cm, changeEvent);
-
-    if (text.length > 1000 || text.indexOf("\n") > -1) input.value = cm.display.prevInput = "";
-    else cm.display.prevInput = text;
-    if (withOp) endOperation(cm);
-    cm.state.pasteIncoming = false;
-    return true;
-  }
-
-  function resetInput(cm, user) {
-    var minimal, selected, doc = cm.doc;
-    if (!posEq(doc.sel.from, doc.sel.to)) {
-      cm.display.prevInput = "";
-      minimal = false && hasCopyEvent &&
-        (doc.sel.to.line - doc.sel.from.line > 100 || (selected = cm.getSelection()).length > 1000);
-      var content = minimal ? "-" : selected || cm.getSelection();
-      cm.display.input.value = content;
-      if (cm.state.focused) selectInput(cm.display.input);
-      if (ie && !ie_lt9) cm.display.inputHasSelection = content;
-    } else if (user && !cm.state.accessibleTextareaWaiting) {
-      cm.display.prevInput = cm.display.input.value = "";
-      if (ie && !ie_lt9) cm.display.inputHasSelection = null;
-    }
-    cm.display.inaccurateSelection = minimal;
-  }
-
-  function focusInput(cm) {
-    if (cm.options.readOnly != "nocursor" && (!mobile || document.activeElement != cm.display.input))
-      cm.display.input.focus();
-  }
-
-  function isReadOnly(cm) {
-    return cm.options.readOnly || cm.doc.cantEdit;
-  }
-
-  // EVENT HANDLERS
-
-  function registerEventHandlers(cm) {
-    var d = cm.display;
-    on(d.scroller, "mousedown", operation(cm, onMouseDown));
-    if (ie)
-      on(d.scroller, "dblclick", operation(cm, function(e) {
-        if (signalDOMEvent(cm, e)) return;
-        var pos = posFromMouse(cm, e);
-        if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) return;
-        e_preventDefault(e);
-        var word = findWordAt(getLine(cm.doc, pos.line).text, pos);
-        extendSelection(cm.doc, word.from, word.to);
-      }));
-    else
-      on(d.scroller, "dblclick", function(e) { signalDOMEvent(cm, e) || e_preventDefault(e); });
-    on(d.lineSpace, "selectstart", function(e) {
-      if (!eventInWidget(d, e)) e_preventDefault(e);
-    });
-    // Gecko browsers fire contextmenu *after* opening the menu, at
-    // which point we can't mess with it anymore. Context menu is
-    // handled in onMouseDown for Gecko.
-    if (!captureMiddleClick) on(d.scroller, "contextmenu", function(e) {onContextMenu(cm, e);});
-
-    on(d.scroller, "scroll", function() {
-      if (d.scroller.clientHeight) {
-        setScrollTop(cm, d.scroller.scrollTop);
-        setScrollLeft(cm, d.scroller.scrollLeft, true);
-        signal(cm, "scroll", cm);
-      }
-    });
-    on(d.scrollbarV, "scroll", function() {
-      if (d.scroller.clientHeight) setScrollTop(cm, d.scrollbarV.scrollTop);
-    });
-    on(d.scrollbarH, "scroll", function() {
-      if (d.scroller.clientHeight) setScrollLeft(cm, d.scrollbarH.scrollLeft);
-    });
-
-    on(d.scroller, "mousewheel", function(e){onScrollWheel(cm, e);});
-    on(d.scroller, "DOMMouseScroll", function(e){onScrollWheel(cm, e);});
-
-    function reFocus() { if (cm.state.focused) setTimeout(bind(focusInput, cm), 0); }
-    on(d.scrollbarH, "mousedown", reFocus);
-    on(d.scrollbarV, "mousedown", reFocus);
-    // Prevent wrapper from ever scrolling
-    on(d.wrapper, "scroll", function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });
-
-    var resizeTimer;
-    function onResize() {
-      if (resizeTimer == null) resizeTimer = setTimeout(function() {
-        resizeTimer = null;
-        // Might be a text scaling operation, clear size caches.
-        d.cachedCharWidth = d.cachedTextHeight = knownScrollbarWidth = null;
-        clearCaches(cm);
-        runInOp(cm, bind(regChange, cm));
-      }, 100);
-    }
-    on(window, "resize", onResize);
-    // Above handler holds on to the editor and its data structures.
-    // Here we poll to unregister it when the editor is no longer in
-    // the document, so that it can be garbage-collected.
-    function unregister() {
-      for (var p = d.wrapper.parentNode; p && p != document.body; p = p.parentNode) {}
-      if (p) setTimeout(unregister, 5000);
-      else off(window, "resize", onResize);
-    }
-    setTimeout(unregister, 5000);
-
-    on(d.input, "keyup", operation(cm, function(e) {
-      if (signalDOMEvent(cm, e) || cm.options.onKeyEvent && cm.options.onKeyEvent(cm, addStop(e))) return;
-      if (e.keyCode == 16) cm.doc.sel.shift = false;
-    }));
-    on(d.input, "input", bind(fastPoll, cm));
-    on(d.input, "keydown", operation(cm, onKeyDown));
-    on(d.input, "keypress", operation(cm, onKeyPress));
-    on(d.input, "focus", bind(onFocus, cm));
-    on(d.input, "blur", bind(onBlur, cm));
-
-    function drag_(e) {
-      if (signalDOMEvent(cm, e) || cm.options.onDragEvent && cm.options.onDragEvent(cm, addStop(e))) return;
-      e_stop(e);
-    }
-    if (cm.options.dragDrop) {
-      on(d.scroller, "dragstart", function(e){onDragStart(cm, e);});
-      on(d.scroller, "dragenter", drag_);
-      on(d.scroller, "dragover", drag_);
-      on(d.scroller, "drop", operation(cm, onDrop));
-    }
-    on(d.scroller, "paste", function(e){
-      if (eventInWidget(d, e)) return;
-      focusInput(cm);
-      fastPoll(cm);
-    });
-    on(d.input, "paste", function() {
-      cm.state.pasteIncoming = true;
-      fastPoll(cm);
-    });
-
-    function prepareCopy() {
-      if (d.inaccurateSelection) {
-        d.prevInput = "";
-        d.inaccurateSelection = false;
-        d.input.value = cm.getSelection();
-        selectInput(d.input);
-      }
-    }
-    on(d.input, "cut", prepareCopy);
-    on(d.input, "copy", prepareCopy);
-
-    // Needed to handle Tab key in KHTML
-    if (khtml) on(d.sizer, "mouseup", function() {
-        if (document.activeElement == d.input) d.input.blur();
-        focusInput(cm);
-    });
-  }
-
-  function eventInWidget(display, e) {
-    for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {
-      if (!n || n.ignoreEvents || n.parentNode == display.sizer && n != display.mover) return true;
-    }
-  }
-
-  function posFromMouse(cm, e, liberal) {
-    var display = cm.display;
-    if (!liberal) {
-      var target = e_target(e);
-      if (target == display.scrollbarH || target == display.scrollbarH.firstChild ||
-          target == display.scrollbarV || target == display.scrollbarV.firstChild ||
-          target == display.scrollbarFiller || target == display.gutterFiller) return null;
-    }
-    var x, y, space = getRect(display.lineSpace);
-    // Fails unpredictably on IE[67] when mouse is dragged around quickly.
-    try { x = e.clientX; y = e.clientY; } catch (e) { return null; }
-    return coordsChar(cm, x - space.left, y - space.top);
-  }
-
-  var lastClick, lastDoubleClick;
-  function onMouseDown(e) {
-    if (signalDOMEvent(this, e)) return;
-    var cm = this, display = cm.display, doc = cm.doc, sel = doc.sel;
-    sel.shift = e.shiftKey;
-
-    if (eventInWidget(display, e)) {
-      if (!webkit) {
-        display.scroller.draggable = false;
-        setTimeout(function(){display.scroller.draggable = true;}, 100);
-      }
-      return;
-    }
-    if (clickInGutter(cm, e)) return;
-    var start = posFromMouse(cm, e);
-
-    switch (e_button(e)) {
-    case 3:
-      if (captureMiddleClick) onContextMenu.call(cm, cm, e);
-      return;
-    case 2:
-      if (start) extendSelection(cm.doc, start);
-      setTimeout(bind(focusInput, cm), 20);
-      e_preventDefault(e);
-      return;
-    }
-    // For button 1, if it was clicked inside the editor
-    // (posFromMouse returning non-null), we have to adjust the
-    // selection.
-    if (!start) {if (e_target(e) == display.scroller) e_preventDefault(e); return;}
-
-    if (!cm.state.focused) onFocus(cm);
-
-    var now = +new Date, type = "single";
-    if (lastDoubleClick && lastDoubleClick.time > now - 400 && posEq(lastDoubleClick.pos, start)) {
-      type = "triple";
-      e_preventDefault(e);
-      setTimeout(bind(focusInput, cm), 20);
-      selectLine(cm, start.line);
-    } else if (lastClick && lastClick.time > now - 400 && posEq(lastClick.pos, start)) {
-      type = "double";
-      lastDoubleClick = {time: now, pos: start};
-      e_preventDefault(e);
-      var word = findWordAt(getLine(doc, start.line).text, start);
-      extendSelection(cm.doc, word.from, word.to);
-    } else { lastClick = {time: now, pos: start}; }
-
-    var last = start;
-    if (cm.options.dragDrop && dragAndDrop && !isReadOnly(cm) && !posEq(sel.from, sel.to) &&
-        !posLess(start, sel.from) && !posLess(sel.to, start) && type == "single") {
-      var dragEnd = operation(cm, function(e2) {
-        if (webkit) display.scroller.draggable = false;
-        cm.state.draggingText = false;
-        off(document, "mouseup", dragEnd);
-        off(display.scroller, "drop", dragEnd);
-        if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) {
-          e_preventDefault(e2);
-          extendSelection(cm.doc, start);
-          focusInput(cm);
-        }
-      });
-      // Let the drag handler handle this.
-      if (webkit) display.scroller.draggable = true;
-      cm.state.draggingText = dragEnd;
-      // IE's approach to draggable
-      if (display.scroller.dragDrop) display.scroller.dragDrop();
-      on(document, "mouseup", dragEnd);
-      on(display.scroller, "drop", dragEnd);
-      return;
-    }
-    e_preventDefault(e);
-    if (type == "single") extendSelection(cm.doc, clipPos(doc, start));
-
-    var startstart = sel.from, startend = sel.to, lastPos = start;
-
-    function doSelect(cur) {
-      if (posEq(lastPos, cur)) return;
-      lastPos = cur;
-
-      if (type == "single") {
-        extendSelection(cm.doc, clipPos(doc, start), cur);
-        return;
-      }
-
-      startstart = clipPos(doc, startstart);
-      startend = clipPos(doc, startend);
-      if (type == "double") {
-        var word = findWordAt(getLine(doc, cur.line).text, cur);
-        if (posLess(cur, startstart)) extendSelection(cm.doc, word.from, startend);
-        else extendSelection(cm.doc, startstart, word.to);
-      } else if (type == "triple") {
-        if (posLess(cur, startstart)) extendSelection(cm.doc, startend, clipPos(doc, Pos(cur.line, 0)));
-        else extendSelection(cm.doc, startstart, clipPos(doc, Pos(cur.line + 1, 0)));
-      }
-    }
-
-    var editorSize = getRect(display.wrapper);
-    // Used to ensure timeout re-tries don't fire when another extend
-    // happened in the meantime (clearTimeout isn't reliable -- at
-    // least on Chrome, the timeouts still happen even when cleared,
-    // if the clear happens after their scheduled firing time).
-    var counter = 0;
-
-    function extend(e) {
-      var curCount = ++counter;
-      var cur = posFromMouse(cm, e, true);
-      if (!cur) return;
-      if (!posEq(cur, last)) {
-        if (!cm.state.focused) onFocus(cm);
-        last = cur;
-        doSelect(cur);
-        var visible = visibleLines(display, doc);
-        if (cur.line >= visible.to || cur.line < visible.from)
-          setTimeout(operation(cm, function(){if (counter == curCount) extend(e);}), 150);
-      } else {
-        var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;
-        if (outside) setTimeout(operation(cm, function() {
-          if (counter != curCount) return;
-          display.scroller.scrollTop += outside;
-          extend(e);
-        }), 50);
-      }
-    }
-
-    function done(e) {
-      counter = Infinity;
-      e_preventDefault(e);
-      focusInput(cm);
-      off(document, "mousemove", move);
-      off(document, "mouseup", up);
-    }
-
-    var move = operation(cm, function(e) {
-      if (!ie && !e_button(e)) done(e);
-      else extend(e);
-    });
-    var up = operation(cm, done);
-    on(document, "mousemove", move);
-    on(document, "mouseup", up);
-  }
-
-  function clickInGutter(cm, e) {
-    var display = cm.display;
-    try { var mX = e.clientX, mY = e.clientY; }
-    catch(e) { return false; }
-
-    if (mX >= Math.floor(getRect(display.gutters).right)) return false;
-    e_preventDefault(e);
-    if (!hasHandler(cm, "gutterClick")) return true;
-
-    var lineBox = getRect(display.lineDiv);
-    if (mY > lineBox.bottom) return true;
-    mY -= lineBox.top - display.viewOffset;
-
-    for (var i = 0; i < cm.options.gutters.length; ++i) {
-      var g = display.gutters.childNodes[i];
-      if (g && getRect(g).right >= mX) {
-        var line = lineAtHeight(cm.doc, mY);
-        var gutter = cm.options.gutters[i];
-        signalLater(cm, "gutterClick", cm, line, gutter, e);
-        break;
-      }
-    }
-    return true;
-  }
-
-  // Kludge to work around strange IE behavior where it'll sometimes
-  // re-fire a series of drag-related events right after the drop (#1551)
-  var lastDrop = 0;
-
-  function onDrop(e) {
-    var cm = this;
-    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e) || (cm.options.onDragEvent && cm.options.onDragEvent(cm, addStop(e))))
-      return;
-    e_preventDefault(e);
-    if (ie) lastDrop = +new Date;
-    var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;
-    if (!pos || isReadOnly(cm)) return;
-    if (files && files.length && window.FileReader && window.File) {
-      var n = files.length, text = Array(n), read = 0;
-      var loadFile = function(file, i) {
-        var reader = new FileReader;
-        reader.onload = function() {
-          text[i] = reader.result;
-          if (++read == n) {
-            pos = clipPos(cm.doc, pos);
-            makeChange(cm.doc, {from: pos, to: pos, text: splitLines(text.join("\n")), origin: "paste"}, "around");
-          }
-        };
-        reader.readAsText(file);
-      };
-      for (var i = 0; i < n; ++i) loadFile(files[i], i);
-    } else {
-      // Don't do a replace if the drop happened inside of the selected text.
-      if (cm.state.draggingText && !(posLess(pos, cm.doc.sel.from) || posLess(cm.doc.sel.to, pos))) {
-        cm.state.draggingText(e);
-        // Ensure the editor is re-focused
-        setTimeout(bind(focusInput, cm), 20);
-        return;
-      }
-      try {
-        var text = e.dataTransfer.getData("Text");
-        if (text) {
-          var curFrom = cm.doc.sel.from, curTo = cm.doc.sel.to;
-          setSelection(cm.doc, pos, pos);
-          if (cm.state.draggingText) replaceRange(cm.doc, "", curFrom, curTo, "paste");
-          cm.replaceSelection(text, null, "paste");
-          focusInput(cm);
-          onFocus(cm);
-        }
-      }
-      catch(e){}
-    }
-  }
-
-  function onDragStart(cm, e) {
-    if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return; }
-    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) return;
-
-    var txt = cm.getSelection();
-    e.dataTransfer.setData("Text", txt);
-
-    // Use dummy image instead of default browsers image.
-    // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.
-    if (e.dataTransfer.setDragImage && !safari) {
-      var img = elt("img", null, null, "position: fixed; left: 0; top: 0;");
-      if (opera) {
-        img.width = img.height = 1;
-        cm.display.wrapper.appendChild(img);
-        // Force a relayout, or Opera won't use our image for some obscure reason
-        img._top = img.offsetTop;
-      }
-      e.dataTransfer.setDragImage(img, 0, 0);
-      if (opera) img.parentNode.removeChild(img);
-    }
-  }
-
-  function setScrollTop(cm, val) {
-    if (Math.abs(cm.doc.scrollTop - val) < 2) return;
-    cm.doc.scrollTop = val;
-    if (!gecko) updateDisplay(cm, [], val);
-    if (cm.display.scroller.scrollTop != val) cm.display.scroller.scrollTop = val;
-    if (cm.display.scrollbarV.scrollTop != val) cm.display.scrollbarV.scrollTop = val;
-    if (gecko) updateDisplay(cm, []);
-    startWorker(cm, 100);
-  }
-  function setScrollLeft(cm, val, isScroller) {
-    if (isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) return;
-    val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth);
-    cm.doc.scrollLeft = val;
-    alignHorizontally(cm);
-    if (cm.display.scroller.scrollLeft != val) cm.display.scroller.scrollLeft = val;
-    if (cm.display.scrollbarH.scrollLeft != val) cm.display.scrollbarH.scrollLeft = val;
-  }
-
-  // Since the delta values reported on mouse wheel events are
-  // unstandardized between browsers and even browser versions, and
-  // generally horribly unpredictable, this code starts by measuring
-  // the scroll effect that the first few mouse wheel events have,
-  // and, from that, detects the way it can convert deltas to pixel
-  // offsets afterwards.
-  //
-  // The reason we want to know the amount a wheel event will scroll
-  // is that it gives us a chance to update the display before the
-  // actual scrolling happens, reducing flickering.
-
-  var wheelSamples = 0, wheelPixelsPerUnit = null;
-  // Fill in a browser-detected starting value on browsers where we
-  // know one. These don't have to be accurate -- the result of them
-  // being wrong would just be a slight flicker on the first wheel
-  // scroll (if it is large enough).
-  if (ie) wheelPixelsPerUnit = -.53;
-  else if (gecko) wheelPixelsPerUnit = 15;
-  else if (chrome) wheelPixelsPerUnit = -.7;
-  else if (safari) wheelPixelsPerUnit = -1/3;
-
-  function onScrollWheel(cm, e) {
-    var dx = e.wheelDeltaX, dy = e.wheelDeltaY;
-    if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) dx = e.detail;
-    if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) dy = e.detail;
-    else if (dy == null) dy = e.wheelDelta;
-
-    var display = cm.display, scroll = display.scroller;
-    // Quit if there's nothing to scroll here
-    if (!(dx && scroll.scrollWidth > scroll.clientWidth ||
-          dy && scroll.scrollHeight > scroll.clientHeight)) return;
-
-    // Webkit browsers on OS X abort momentum scrolls when the target
-    // of the scroll event is removed from the scrollable element.
-    // This hack (see related code in patchDisplay) makes sure the
-    // element is kept around.
-    if (dy && mac && webkit) {
-      for (var cur = e.target; cur != scroll; cur = cur.parentNode) {
-        if (cur.lineObj) {
-          cm.display.currentWheelTarget = cur;
-          break;
-        }
-      }
-    }
-
-    // On some browsers, horizontal scrolling will cause redraws to
-    // happen before the gutter has been realigned, causing it to
-    // wriggle around in a most unseemly way. When we have an
-    // estimated pixels/delta value, we just handle horizontal
-    // scrolling entirely here. It'll be slightly off from native, but
-    // better than glitching out.
-    if (dx && !gecko && !opera && wheelPixelsPerUnit != null) {
-      if (dy)
-        setScrollTop(cm, Math.max(0, Math.min(scroll.scrollTop + dy * wheelPixelsPerUnit, scroll.scrollHeight - scroll.clientHeight)));
-      setScrollLeft(cm, Math.max(0, Math.min(scroll.scrollLeft + dx * wheelPixelsPerUnit, scroll.scrollWidth - scroll.clientWidth)));
-      e_preventDefault(e);
-      display.wheelStartX = null; // Abort measurement, if in progress
-      return;
-    }
-
-    if (dy && wheelPixelsPerUnit != null) {
-      var pixels = dy * wheelPixelsPerUnit;
-      var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;
-      if (pixels < 0) top = Math.max(0, top + pixels - 50);
-      else bot = Math.min(cm.doc.height, bot + pixels + 50);
-      updateDisplay(cm, [], {top: top, bottom: bot});
-    }
-
-    if (wheelSamples < 20) {
-      if (display.wheelStartX == null) {
-        display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;
-        display.wheelDX = dx; display.wheelDY = dy;
-        setTimeout(function() {
-          if (display.wheelStartX == null) return;
-          var movedX = scroll.scrollLeft - display.wheelStartX;
-          var movedY = scroll.scrollTop - display.wheelStartY;
-          var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||
-            (movedX && display.wheelDX && movedX / display.wheelDX);
-          display.wheelStartX = display.wheelStartY = null;
-          if (!sample) return;
-          wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);
-          ++wheelSamples;
-        }, 200);
-      } else {
-        display.wheelDX += dx; display.wheelDY += dy;
-      }
-    }
-  }
-
-  function doHandleBinding(cm, bound, dropShift) {
-    if (typeof bound == "string") {
-      bound = commands[bound];
-      if (!bound) return false;
-    }
-    // Ensure previous input has been read, so that the handler sees a
-    // consistent view of the document
-    if (cm.display.pollingFast && readInput(cm)) cm.display.pollingFast = false;
-    var doc = cm.doc, prevShift = doc.sel.shift, done = false;
-    try {
-      if (isReadOnly(cm)) cm.state.suppressEdits = true;
-      if (dropShift) doc.sel.shift = false;
-      done = bound(cm) != Pass;
-    } finally {
-      doc.sel.shift = prevShift;
-      cm.state.suppressEdits = false;
-    }
-    return done;
-  }
-
-  function allKeyMaps(cm) {
-    var maps = cm.state.keyMaps.slice(0);
-    if (cm.options.extraKeys) maps.push(cm.options.extraKeys);
-    maps.push(cm.options.keyMap);
-    return maps;
-  }
-
-  var maybeTransition;
-  function handleKeyBinding(cm, e) {
-    // Handle auto keymap transitions
-    var startMap = getKeyMap(cm.options.keyMap), next = startMap.auto;
-    clearTimeout(maybeTransition);
-    if (next && !isModifierKey(e)) maybeTransition = setTimeout(function() {
-      if (getKeyMap(cm.options.keyMap) == startMap) {
-        cm.options.keyMap = (next.call ? next.call(null, cm) : next);
-        keyMapChanged(cm);
-      }
-    }, 50);
-
-    var name = keyName(e, true), handled = false;
-    if (!name) return false;
-    var keymaps = allKeyMaps(cm);
-
-    if (e.shiftKey) {
-      // First try to resolve full name (including 'Shift-'). Failing
-      // that, see if there is a cursor-motion command (starting with
-      // 'go') bound to the keyname without 'Shift-'.
-      handled = lookupKey("Shift-" + name, keymaps, function(b) {return doHandleBinding(cm, b, true);})
-             || lookupKey(name, keymaps, function(b) {
-                  if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion)
-                    return doHandleBinding(cm, b);
-                });
-    } else {
-      handled = lookupKey(name, keymaps, function(b) { return doHandleBinding(cm, b); });
-    }
-
-    if (handled) {
-      e_preventDefault(e);
-      restartBlink(cm);
-      if (ie_lt9) { e.oldKeyCode = e.keyCode; e.keyCode = 0; }
-      signalLater(cm, "keyHandled", cm, name, e);
-    }
-    return handled;
-  }
-
-  function handleCharBinding(cm, e, ch) {
-    var handled = lookupKey("'" + ch + "'", allKeyMaps(cm),
-                            function(b) { return doHandleBinding(cm, b, true); });
-    if (handled) {
-      e_preventDefault(e);
-      restartBlink(cm);
-      signalLater(cm, "keyHandled", cm, "'" + ch + "'", e);
-    }
-    return handled;
-  }
-
-  var lastStoppedKey = null;
-  function onKeyDown(e) {
-    var cm = this;
-    if (!cm.state.focused) onFocus(cm);
-    if (ie && e.keyCode == 27) { e.returnValue = false; }
-    if (signalDOMEvent(cm, e) || cm.options.onKeyEvent && cm.options.onKeyEvent(cm, addStop(e))) return;
-    var code = e.keyCode;
-    // IE does strange things with escape.
-    cm.doc.sel.shift = code == 16 || e.shiftKey;
-    // First give onKeyEvent option a chance to handle this.
-    var handled = handleKeyBinding(cm, e);
-
-    // On text input if value was temporaritly set for a screenreader, clear it out.
-    if (!handled && cm.state.accessibleTextareaWaiting) {
-      clearAccessibleTextarea(cm);
-    }
-
-    if (opera) {
-      lastStoppedKey = handled ? code : null;
-      // Opera has no cut event... we try to at least catch the key combo
-      if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))
-        cm.replaceSelection("");
-    }
-  }
-
-  function onKeyPress(e) {
-    var cm = this;
-    if (signalDOMEvent(cm, e) || cm.options.onKeyEvent && cm.options.onKeyEvent(cm, addStop(e))) return;
-    var keyCode = e.keyCode, charCode = e.charCode;
-    if (opera && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;}
-    if (((opera && (!e.which || e.which < 10)) || khtml) && handleKeyBinding(cm, e)) return;
-    var ch = String.fromCharCode(charCode == null ? keyCode : charCode);
-    if (this.options.electricChars && this.doc.mode.electricChars &&
-        this.options.smartIndent && !isReadOnly(this) &&
-        this.doc.mode.electricChars.indexOf(ch) > -1)
-      setTimeout(operation(cm, function() {indentLine(cm, cm.doc.sel.to.line, "smart");}), 75);
-    if (handleCharBinding(cm, e, ch)) return;
-    if (ie && !ie_lt9) cm.display.inputHasSelection = null;
-    fastPoll(cm);
-  }
-
-  function onFocus(cm) {
-    if (cm.options.readOnly == "nocursor") return;
-    if (!cm.state.focused) {
-      signal(cm, "focus", cm);
-      cm.state.focused = true;
-      if (cm.display.wrapper.className.search(/\bCodeMirror-focused\b/) == -1)
-        cm.display.wrapper.className += " CodeMirror-focused";
-      resetInput(cm, true);
-    }
-    slowPoll(cm);
-    restartBlink(cm);
-  }
-  function onBlur(cm) {
-    if (cm.state.focused) {
-      signal(cm, "blur", cm);
-      cm.state.focused = false;
-      cm.display.wrapper.className = cm.display.wrapper.className.replace(" CodeMirror-focused", "");
-    }
-    clearInterval(cm.display.blinker);
-    setTimeout(function() {if (!cm.state.focused) cm.doc.sel.shift = false;}, 150);
-  }
-
-  var detectingSelectAll;
-  function onContextMenu(cm, e) {
-    if (signalDOMEvent(cm, e, "contextmenu")) return;
-    var display = cm.display, sel = cm.doc.sel;
-    if (eventInWidget(display, e)) return;
-
-    var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;
-    if (!pos || opera) return; // Opera is difficult.
-    if (posEq(sel.from, sel.to) || posLess(pos, sel.from) || !posLess(pos, sel.to))
-      operation(cm, setSelection)(cm.doc, pos, pos);
-
-    var oldCSS = display.input.style.cssText;
-    display.inputDiv.style.position = "absolute";
-    display.input.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e.clientY - 5) +
-      "px; left: " + (e.clientX - 5) + "px; z-index: 1000; background: white; outline: none;" +
-      "border-width: 0; outline: none; overflow: hidden; opacity: .05; -ms-opacity: .05; filter: alpha(opacity=5);";
-    focusInput(cm);
-    resetInput(cm, true);
-    // Adds "Select all" to context menu in FF
-    if (posEq(sel.from, sel.to)) display.input.value = display.prevInput = " ";
-
-    function prepareSelectAllHack() {
-      if (display.input.selectionStart != null) {
-        var extval = display.input.value = " " + (posEq(sel.from, sel.to) ? "" : display.input.value);
-        display.prevInput = " ";
-        display.input.selectionStart = 1; display.input.selectionEnd = extval.length;
-      }
-    }
-    function rehide() {
-      display.inputDiv.style.position = "relative";
-      display.input.style.cssText = oldCSS;
-      if (ie_lt9) display.scrollbarV.scrollTop = display.scroller.scrollTop = scrollPos;
-      slowPoll(cm);
-
-      // Try to detect the user choosing select-all
-      if (display.input.selectionStart != null) {
-        if (!ie || ie_lt9) prepareSelectAllHack();
-        clearTimeout(detectingSelectAll);
-        var i = 0, poll = function(){
-          if (display.prevInput == " " && display.input.selectionStart == 0)
-            operation(cm, commands.selectAll)(cm);
-          else if (i++ < 10) detectingSelectAll = setTimeout(poll, 500);
-          else resetInput(cm);
-        };
-        detectingSelectAll = setTimeout(poll, 200);
-      }
-    }
-
-    if (ie && !ie_lt9) prepareSelectAllHack();
-    if (captureMiddleClick) {
-      e_stop(e);
-      var mouseup = function() {
-        off(window, "mouseup", mouseup);
-        setTimeout(rehide, 20);
-      };
-      on(window, "mouseup", mouseup);
-    } else {
-      setTimeout(rehide, 50);
-    }
-  }
-
-  // UPDATING
-
-  var changeEnd = CodeMirror.changeEnd = function(change) {
-    if (!change.text) return change.to;
-    return Pos(change.from.line + change.text.length - 1,
-               lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0));
-  };
-
-  // Make sure a position will be valid after the given change.
-  function clipPostChange(doc, change, pos) {
-    if (!posLess(change.from, pos)) return clipPos(doc, pos);
-    var diff = (change.text.length - 1) - (change.to.line - change.from.line);
-    if (pos.line > change.to.line + diff) {
-      var preLine = pos.line - diff, lastLine = doc.first + doc.size - 1;
-      if (preLine > lastLine) return Pos(lastLine, getLine(doc, lastLine).text.length);
-      return clipToLen(pos, getLine(doc, preLine).text.length);
-    }
-    if (pos.line == change.to.line + diff)
-      return clipToLen(pos, lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0) +
-                       getLine(doc, change.to.line).text.length - change.to.ch);
-    var inside = pos.line - change.from.line;
-    return clipToLen(pos, change.text[inside].length + (inside ? 0 : change.from.ch));
-  }
-
-  // Hint can be null|"end"|"start"|"around"|{anchor,head}
-  function computeSelAfterChange(doc, change, hint) {
-    if (hint && typeof hint == "object") // Assumed to be {anchor, head} object
-      return {anchor: clipPostChange(doc, change, hint.anchor),
-              head: clipPostChange(doc, change, hint.head)};
-
-    if (hint == "start") return {anchor: change.from, head: change.from};
-
-    var end = changeEnd(change);
-    if (hint == "around") return {anchor: change.from, head: end};
-    if (hint == "end") return {anchor: end, head: end};
-
-    // hint is null, leave the selection alone as much as possible
-    var adjustPos = function(pos) {
-      if (posLess(pos, change.from)) return pos;
-      if (!posLess(change.to, pos)) return end;
-
-      var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;
-      if (pos.line == change.to.line) ch += end.ch - change.to.ch;
-      return Pos(line, ch);
-    };
-    return {anchor: adjustPos(doc.sel.anchor), head: adjustPos(doc.sel.head)};
-  }
-
-  function filterChange(doc, change, update) {
-    var obj = {
-      canceled: false,
-      from: change.from,
-      to: change.to,
-      text: change.text,
-      origin: change.origin,
-      cancel: function() { this.canceled = true; }
-    };
-    if (update) obj.update = function(from, to, text, origin) {
-      if (from) this.from = clipPos(doc, from);
-      if (to) this.to = clipPos(doc, to);
-      if (text) this.text = text;
-      if (origin !== undefined) this.origin = origin;
-    };
-    signal(doc, "beforeChange", doc, obj);
-    if (doc.cm) signal(doc.cm, "beforeChange", doc.cm, obj);
-
-    if (obj.canceled) return null;
-    return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin};
-  }
-
-  // Replace the range from from to to by the strings in replacement.
-  // change is a {from, to, text [, origin]} object
-  function makeChange(doc, change, selUpdate, ignoreReadOnly) {
-    if (doc.cm) {
-      if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, selUpdate, ignoreReadOnly);
-      if (doc.cm.state.suppressEdits) return;
-    }
-
-    if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) {
-      change = filterChange(doc, change, true);
-      if (!change) return;
-    }
-
-    // Possibly split or suppress the update based on the presence
-    // of read-only spans in its range.
-    var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);
-    if (split) {
-      for (var i = split.length - 1; i >= 1; --i)
-        makeChangeNoReadonly(doc, {from: split[i].from, to: split[i].to, text: [""]});
-      if (split.length)
-        makeChangeNoReadonly(doc, {from: split[0].from, to: split[0].to, text: change.text}, selUpdate);
-    } else {
-      makeChangeNoReadonly(doc, change, selUpdate);
-    }
-  }
-
-  function makeChangeNoReadonly(doc, change, selUpdate) {
-    var selAfter = computeSelAfterChange(doc, change, selUpdate);
-    addToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);
-
-    makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));
-    var rebased = [];
-
-    linkedDocs(doc, function(doc, sharedHist) {
-      if (!sharedHist && indexOf(rebased, doc.history) == -1) {
-        rebaseHist(doc.history, change);
-        rebased.push(doc.history);
-      }
-      makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));
-    });
-  }
-
-  function makeChangeFromHistory(doc, type) {
-    if (doc.cm && doc.cm.state.suppressEdits) return;
-
-    var hist = doc.history;
-    var event = (type == "undo" ? hist.done : hist.undone).pop();
-    if (!event) return;
-
-    var anti = {changes: [], anchorBefore: event.anchorAfter, headBefore: event.headAfter,
-                anchorAfter: event.anchorBefore, headAfter: event.headBefore,
-                generation: hist.generation};
-    (type == "undo" ? hist.undone : hist.done).push(anti);
-    hist.generation = event.generation || ++hist.maxGeneration;
-
-    var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange");
-
-    for (var i = event.changes.length - 1; i >= 0; --i) {
-      var change = event.changes[i];
-      change.origin = type;
-      if (filter && !filterChange(doc, change, false)) {
-        (type == "undo" ? hist.done : hist.undone).length = 0;
-        return;
-      }
-
-      anti.changes.push(historyChangeFromChange(doc, change));
-
-      var after = i ? computeSelAfterChange(doc, change, null)
-                    : {anchor: event.anchorBefore, head: event.headBefore};
-      makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));
-      var rebased = [];
-
-      linkedDocs(doc, function(doc, sharedHist) {
-        if (!sharedHist && indexOf(rebased, doc.history) == -1) {
-          rebaseHist(doc.history, change);
-          rebased.push(doc.history);
-        }
-        makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));
-      });
-    }
-  }
-
-  function shiftDoc(doc, distance) {
-    function shiftPos(pos) {return Pos(pos.line + distance, pos.ch);}
-    doc.first += distance;
-    if (doc.cm) regChange(doc.cm, doc.first, doc.first, distance);
-    doc.sel.head = shiftPos(doc.sel.head); doc.sel.anchor = shiftPos(doc.sel.anchor);
-    doc.sel.from = shiftPos(doc.sel.from); doc.sel.to = shiftPos(doc.sel.to);
-  }
-
-  function makeChangeSingleDoc(doc, change, selAfter, spans) {
-    if (doc.cm && !doc.cm.curOp)
-      return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans);
-
-    if (change.to.line < doc.first) {
-      shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));
-      return;
-    }
-    if (change.from.line > doc.lastLine()) return;
-
-    // Clip the change to the size of this doc
-    if (change.from.line < doc.first) {
-      var shift = change.text.length - 1 - (doc.first - change.from.line);
-      shiftDoc(doc, shift);
-      change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),
-                text: [lst(change.text)], origin: change.origin};
-    }
-    var last = doc.lastLine();
-    if (change.to.line > last) {
-      change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),
-                text: [change.text[0]], origin: change.origin};
-    }
-
-    change.removed = getBetween(doc, change.from, change.to);
-
-    if (!selAfter) selAfter = computeSelAfterChange(doc, change, null);
-    if (doc.cm) makeChangeSingleDocInEditor(doc.cm, change, spans, selAfter);
-    else updateDoc(doc, change, spans, selAfter);
-  }
-
-  function makeChangeSingleDocInEditor(cm, change, spans, selAfter) {
-    var doc = cm.doc, display = cm.display, from = change.from, to = change.to;
-
-    var recomputeMaxLength = false, checkWidthStart = from.line;
-    if (!cm.options.lineWrapping) {
-      checkWidthStart = lineNo(visualLine(doc, getLine(doc, from.line)));
-      doc.iter(checkWidthStart, to.line + 1, function(line) {
-        if (line == display.maxLine) {
-          recomputeMaxLength = true;
-          return true;
-        }
-      });
-    }
-
-    if (!posLess(doc.sel.head, change.from) && !posLess(change.to, doc.sel.head))
-      cm.curOp.cursorActivity = true;
-
-    updateDoc(doc, change, spans, selAfter, estimateHeight(cm));
-
-    if (!cm.options.lineWrapping) {
-      doc.iter(checkWidthStart, from.line + change.text.length, function(line) {
-        var len = lineLength(doc, line);
-        if (len > display.maxLineLength) {
-          display.maxLine = line;
-          display.maxLineLength = len;
-          display.maxLineChanged = true;
-          recomputeMaxLength = false;
-        }
-      });
-      if (recomputeMaxLength) cm.curOp.updateMaxLine = true;
-    }
-
-    // Adjust frontier, schedule worker
-    doc.frontier = Math.min(doc.frontier, from.line);
-    startWorker(cm, 400);
-
-    var lendiff = change.text.length - (to.line - from.line) - 1;
-    // Remember that these lines changed, for updating the display
-    regChange(cm, from.line, to.line + 1, lendiff);
-
-    if (hasHandler(cm, "change")) {
-      var changeObj = {from: from, to: to,
-                       text: change.text,
-                       removed: change.removed,
-                       origin: change.origin};
-      if (cm.curOp.textChanged) {
-        for (var cur = cm.curOp.textChanged; cur.next; cur = cur.next) {}
-        cur.next = changeObj;
-      } else cm.curOp.textChanged = changeObj;
-    }
-  }
-
-  function replaceRange(doc, code, from, to, origin) {
-    if (!to) to = from;
-    if (posLess(to, from)) { var tmp = to; to = from; from = tmp; }
-    if (typeof code == "string") code = splitLines(code);
-    makeChange(doc, {from: from, to: to, text: code, origin: origin}, null);
-  }
-
-  // POSITION OBJECT
-
-  function Pos(line, ch) {
-    if (!(this instanceof Pos)) return new Pos(line, ch);
-    this.line = line; this.ch = ch;
-  }
-  CodeMirror.Pos = Pos;
-
-  function posEq(a, b) {return a.line == b.line && a.ch == b.ch;}
-  function posLess(a, b) {return a.line < b.line || (a.line == b.line && a.ch < b.ch);}
-  function copyPos(x) {return Pos(x.line, x.ch);}
-
-  // SELECTION
-
-  function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1));}
-  function clipPos(doc, pos) {
-    if (pos.line < doc.first) return Pos(doc.first, 0);
-    var last = doc.first + doc.size - 1;
-    if (pos.line > last) return Pos(last, getLine(doc, last).text.length);
-    return clipToLen(pos, getLine(doc, pos.line).text.length);
-  }
-  function clipToLen(pos, linelen) {
-    var ch = pos.ch;
-    if (ch == null || ch > linelen) return Pos(pos.line, linelen);
-    else if (ch < 0) return Pos(pos.line, 0);
-    else return pos;
-  }
-  function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size;}
-
-  // If shift is held, this will move the selection anchor. Otherwise,
-  // it'll set the whole selection.
-  function extendSelection(doc, pos, other, bias) {
-    if (doc.sel.shift || doc.sel.extend) {
-      var anchor = doc.sel.anchor;
-      if (other) {
-        var posBefore = posLess(pos, anchor);
-        if (posBefore != posLess(other, anchor)) {
-          anchor = pos;
-          pos = other;
-        } else if (posBefore != posLess(pos, other)) {
-          pos = other;
-        }
-      }
-      setSelection(doc, anchor, pos, bias);
-    } else {
-      setSelection(doc, pos, other || pos, bias);
-    }
-    if (doc.cm) doc.cm.curOp.userSelChange = true;
-
-    if (doc.cm) {
-      var from = doc.sel.from;
-      var to = doc.sel.to;
-
-      if (posEq(from, to) && doc.cm.display.input.setSelectionRange) {
-        clearTimeout(doc.cm.state.accessibleTextareaTimeout);
-        doc.cm.state.accessibleTextareaWaiting = true;
-
-        doc.cm.display.input.value = doc.getLine(from.line) + "\n";
-        doc.cm.display.input.setSelectionRange(from.ch, from.ch);
-
-        doc.cm.state.accessibleTextareaTimeout = setTimeout(function() {
-          clearAccessibleTextarea(doc.cm);
-        }, 80);
-      }
-    }
-  }
-
-  function clearAccessibleTextarea(cm) {
-    clearTimeout(cm.state.accessibleTextareaTimeout);
-    cm.state.accessibleTextareaWaiting = false;
-    resetInput(cm, true);
-  }
-
-  function filterSelectionChange(doc, anchor, head) {
-    var obj = {anchor: anchor, head: head};
-    signal(doc, "beforeSelectionChange", doc, obj);
-    if (doc.cm) signal(doc.cm, "beforeSelectionChange", doc.cm, obj);
-    obj.anchor = clipPos(doc, obj.anchor); obj.head = clipPos(doc, obj.head);
-    return obj;
-  }
-
-  // Update the selection. Last two args are only used by
-  // updateDoc, since they have to be expressed in the line
-  // numbers before the update.
-  function setSelection(doc, anchor, head, bias, checkAtomic) {
-    if (!checkAtomic && hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange")) {
-      var filtered = filterSelectionChange(doc, anchor, head);
-      head = filtered.head;
-      anchor = filtered.anchor;
-    }
-
-    var sel = doc.sel;
-    sel.goalColumn = null;
-    // Skip over atomic spans.
-    if (checkAtomic || !posEq(anchor, sel.anchor))
-      anchor = skipAtomic(doc, anchor, bias, checkAtomic != "push");
-    if (checkAtomic || !posEq(head, sel.head))
-      head = skipAtomic(doc, head, bias, checkAtomic != "push");
-
-    if (posEq(sel.anchor, anchor) && posEq(sel.head, head)) return;
-
-    sel.anchor = anchor; sel.head = head;
-    var inv = posLess(head, anchor);
-    sel.from = inv ? head : anchor;
-    sel.to = inv ? anchor : head;
-
-    if (doc.cm)
-      doc.cm.curOp.updateInput = doc.cm.curOp.selectionChanged =
-        doc.cm.curOp.cursorActivity = true;
-
-    signalLater(doc, "cursorActivity", doc);
-  }
-
-  function reCheckSelection(cm) {
-    setSelection(cm.doc, cm.doc.sel.from, cm.doc.sel.to, null, "push");
-  }
-
-  function skipAtomic(doc, pos, bias, mayClear) {
-    var flipped = false, curPos = pos;
-    var dir = bias || 1;
-    doc.cantEdit = false;
-    search: for (;;) {
-      var line = getLine(doc, curPos.line);
-      if (line.markedSpans) {
-        for (var i = 0; i < line.markedSpans.length; ++i) {
-          var sp = line.markedSpans[i], m = sp.marker;
-          if ((sp.from == null || (m.inclusiveLeft ? sp.from <= curPos.ch : sp.from < curPos.ch)) &&
-              (sp.to == null || (m.inclusiveRight ? sp.to >= curPos.ch : sp.to > curPos.ch))) {
-            if (mayClear) {
-              signal(m, "beforeCursorEnter");
-              if (m.explicitlyCleared) {
-                if (!line.markedSpans) break;
-                else {--i; continue;}
-              }
-            }
-            if (!m.atomic) continue;
-            var newPos = m.find()[dir < 0 ? "from" : "to"];
-            if (posEq(newPos, curPos)) {
-              newPos.ch += dir;
-              if (newPos.ch < 0) {
-                if (newPos.line > doc.first) newPos = clipPos(doc, Pos(newPos.line - 1));
-                else newPos = null;
-              } else if (newPos.ch > line.text.length) {
-                if (newPos.line < doc.first + doc.size - 1) newPos = Pos(newPos.line + 1, 0);
-                else newPos = null;
-              }
-              if (!newPos) {
-                if (flipped) {
-                  // Driven in a corner -- no valid cursor position found at all
-                  // -- try again *with* clearing, if we didn't already
-                  if (!mayClear) return skipAtomic(doc, pos, bias, true);
-                  // Otherwise, turn off editing until further notice, and return the start of the doc
-                  doc.cantEdit = true;
-                  return Pos(doc.first, 0);
-                }
-                flipped = true; newPos = pos; dir = -dir;
-              }
-            }
-            curPos = newPos;
-            continue search;
-          }
-        }
-      }
-      return curPos;
-    }
-  }
-
-  // SCROLLING
-
-  function scrollCursorIntoView(cm) {
-    var coords = scrollPosIntoView(cm, cm.doc.sel.head, cm.options.cursorScrollMargin);
-    if (!cm.state.focused) return;
-    var display = cm.display, box = getRect(display.sizer), doScroll = null;
-    if (coords.top + box.top < 0) doScroll = true;
-    else if (coords.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) doScroll = false;
-    if (doScroll != null && !phantom) {
-      var hidden = display.cursor.style.display == "none";
-      if (hidden) {
-        display.cursor.style.display = "";
-        display.cursor.style.left = coords.left + "px";
-        display.cursor.style.top = (coords.top - display.viewOffset) + "px";
-      }
-      display.cursor.scrollIntoView(doScroll);
-      if (hidden) display.cursor.style.display = "none";
-    }
-  }
-
-  function scrollPosIntoView(cm, pos, margin) {
-    if (margin == null) margin = 0;
-    for (;;) {
-      var changed = false, coords = cursorCoords(cm, pos);
-      var scrollPos = calculateScrollPos(cm, coords.left, coords.top - margin, coords.left, coords.bottom + margin);
-      var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;
-      if (scrollPos.scrollTop != null) {
-        setScrollTop(cm, scrollPos.scrollTop);
-        if (Math.abs(cm.doc.scrollTop - startTop) > 1) changed = true;
-      }
-      if (scrollPos.scrollLeft != null) {
-        setScrollLeft(cm, scrollPos.scrollLeft);
-        if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) changed = true;
-      }
-      if (!changed) return coords;
-    }
-  }
-
-  function scrollIntoView(cm, x1, y1, x2, y2) {
-    var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);
-    if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);
-    if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);
-  }
-
-  function calculateScrollPos(cm, x1, y1, x2, y2) {
-    var display = cm.display, snapMargin = textHeight(cm.display);
-    if (y1 < 0) y1 = 0;
-    var screen = display.scroller.clientHeight - scrollerCutOff, screentop = display.scroller.scrollTop, result = {};
-    var docBottom = cm.doc.height + paddingVert(display);
-    var atTop = y1 < snapMargin, atBottom = y2 > docBottom - snapMargin;
-    if (y1 < screentop) {
-      result.scrollTop = atTop ? 0 : y1;
-    } else if (y2 > screentop + screen) {
-      var newTop = Math.min(y1, (atBottom ? docBottom : y2) - screen);
-      if (newTop != screentop) result.scrollTop = newTop;
-    }
-
-    var screenw = display.scroller.clientWidth - scrollerCutOff, screenleft = display.scroller.scrollLeft;
-    x1 += display.gutters.offsetWidth; x2 += display.gutters.offsetWidth;
-    var gutterw = display.gutters.offsetWidth;
-    var atLeft = x1 < gutterw + 10;
-    if (x1 < screenleft + gutterw || atLeft) {
-      if (atLeft) x1 = 0;
-      result.scrollLeft = Math.max(0, x1 - 10 - gutterw);
-    } else if (x2 > screenw + screenleft - 3) {
-      result.scrollLeft = x2 + 10 - screenw;
-    }
-    return result;
-  }
-
-  function updateScrollPos(cm, left, top) {
-    cm.curOp.updateScrollPos = {scrollLeft: left == null ? cm.doc.scrollLeft : left,
-                                scrollTop: top == null ? cm.doc.scrollTop : top};
-  }
-
-  function addToScrollPos(cm, left, top) {
-    var pos = cm.curOp.updateScrollPos || (cm.curOp.updateScrollPos = {scrollLeft: cm.doc.scrollLeft, scrollTop: cm.doc.scrollTop});
-    var scroll = cm.display.scroller;
-    pos.scrollTop = Math.max(0, Math.min(scroll.scrollHeight - scroll.clientHeight, pos.scrollTop + top));
-    pos.scrollLeft = Math.max(0, Math.min(scroll.scrollWidth - scroll.clientWidth, pos.scrollLeft + left));
-  }
-
-  // API UTILITIES
-
-  function indentLine(cm, n, how, aggressive) {
-    var doc = cm.doc;
-    if (how == null) how = "add";
-    if (how == "smart") {
-      if (!cm.doc.mode.indent) how = "prev";
-      else var state = getStateBefore(cm, n);
-    }
-
-    var tabSize = cm.options.tabSize;
-    var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);
-    var curSpaceString = line.text.match(/^\s*/)[0], indentation;
-    if (how == "smart") {
-      indentation = cm.doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);
-      if (indentation == Pass) {
-        if (!aggressive) return;
-        how = "prev";
-      }
-    }
-    if (how == "prev") {
-      if (n > doc.first) indentation = countColumn(getLine(doc, n-1).text, null, tabSize);
-      else indentation = 0;
-    } else if (how == "add") {
-      indentation = curSpace + cm.options.indentUnit;
-    } else if (how == "subtract") {
-      indentation = curSpace - cm.options.indentUnit;
-    } else if (typeof how == "number") {
-      indentation = curSpace + how;
-    }
-    indentation = Math.max(0, indentation);
-
-    var indentString = "", pos = 0;
-    if (cm.options.indentWithTabs)
-      for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";}
-    if (pos < indentation) indentString += spaceStr(indentation - pos);
-
-    if (indentString != curSpaceString)
-      replaceRange(cm.doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input");
-    line.stateAfter = null;
-  }
-
-  function changeLine(cm, handle, op) {
-    var no = handle, line = handle, doc = cm.doc;
-    if (typeof handle == "number") line = getLine(doc, clipLine(doc, handle));
-    else no = lineNo(handle);
-    if (no == null) return null;
-    if (op(line, no)) regChange(cm, no, no + 1);
-    else return null;
-    return line;
-  }
-
-  function findPosH(doc, pos, dir, unit, visually) {
-    var line = pos.line, ch = pos.ch, origDir = dir;
-    var lineObj = getLine(doc, line);
-    var possible = true;
-    function findNextLine() {
-      var l = line + dir;
-      if (l < doc.first || l >= doc.first + doc.size) return (possible = false);
-      line = l;
-      return lineObj = getLine(doc, l);
-    }
-    function moveOnce(boundToLine) {
-      var next = (visually ? moveVisually : moveLogically)(lineObj, ch, dir, true);
-      if (next == null) {
-        if (!boundToLine && findNextLine()) {
-          if (visually) ch = (dir < 0 ? lineRight : lineLeft)(lineObj);
-          else ch = dir < 0 ? lineObj.text.length : 0;
-        } else return (possible = false);
-      } else ch = next;
-      return true;
-    }
-
-    if (unit == "char") moveOnce();
-    else if (unit == "column") moveOnce(true);
-    else if (unit == "word" || unit == "group") {
-      var sawType = null, group = unit == "group";
-      for (var first = true;; first = false) {
-        if (dir < 0 && !moveOnce(!first)) break;
-        var cur = lineObj.text.charAt(ch) || "\n";
-        var type = isWordChar(cur) ? "w"
-          : !group ? null
-          : /\s/.test(cur) ? null
-          : "p";
-        if (sawType && sawType != type) {
-          if (dir < 0) {dir = 1; moveOnce();}
-          break;
-        }
-        if (type) sawType = type;
-        if (dir > 0 && !moveOnce(!first)) break;
-      }
-    }
-    var result = skipAtomic(doc, Pos(line, ch), origDir, true);
-    if (!possible) result.hitSide = true;
-    return result;
-  }
-
-  function findPosV(cm, pos, dir, unit) {
-    var doc = cm.doc, x = pos.left, y;
-    if (unit == "page") {
-      var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);
-      y = pos.top + dir * (pageSize - (dir < 0 ? 1.5 : .5) * textHeight(cm.display));
-    } else if (unit == "line") {
-      y = dir > 0 ? pos.bottom + 3 : pos.top - 3;
-    }
-    for (;;) {
-      var target = coordsChar(cm, x, y);
-      if (!target.outside) break;
-      if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break; }
-      y += dir * 5;
-    }
-    return target;
-  }
-
-  function findWordAt(line, pos) {
-    var start = pos.ch, end = pos.ch;
-    if (line) {
-      if ((pos.xRel < 0 || end == line.length) && start) --start; else ++end;
-      var startChar = line.charAt(start);
-      var check = isWordChar(startChar) ? isWordChar
-        : /\s/.test(startChar) ? function(ch) {return /\s/.test(ch);}
-        : function(ch) {return !/\s/.test(ch) && !isWordChar(ch);};
-      while (start > 0 && check(line.charAt(start - 1))) --start;
-      while (end < line.length && check(line.charAt(end))) ++end;
-    }
-    return {from: Pos(pos.line, start), to: Pos(pos.line, end)};
-  }
-
-  function selectLine(cm, line) {
-    extendSelection(cm.doc, Pos(line, 0), clipPos(cm.doc, Pos(line + 1, 0)));
-  }
-
-  // PROTOTYPE
-
-  // The publicly visible API. Note that operation(null, f) means
-  // 'wrap f in an operation, performed on its `this` parameter'
-
-  CodeMirror.prototype = {
-    constructor: CodeMirror,
-    focus: function(){window.focus(); focusInput(this); onFocus(this); fastPoll(this);},
-
-    setOption: function(option, value) {
-      var options = this.options, old = options[option];
-      if (options[option] == value && option != "mode") return;
-      options[option] = value;
-      if (optionHandlers.hasOwnProperty(option))
-        operation(this, optionHandlers[option])(this, value, old);
-    },
-
-    getOption: function(option) {return this.options[option];},
-    getDoc: function() {return this.doc;},
-
-    addKeyMap: function(map, bottom) {
-      this.state.keyMaps[bottom ? "push" : "unshift"](map);
-    },
-    removeKeyMap: function(map) {
-      var maps = this.state.keyMaps;
-      for (var i = 0; i < maps.length; ++i)
-        if (maps[i] == map || (typeof maps[i] != "string" && maps[i].name == map)) {
-          maps.splice(i, 1);
-          return true;
-        }
-    },
-
-    addOverlay: operation(null, function(spec, options) {
-      var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);
-      if (mode.startState) throw new Error("Overlays may not be stateful.");
-      this.state.overlays.push({mode: mode, modeSpec: spec, opaque: options && options.opaque});
-      this.state.modeGen++;
-      regChange(this);
-    }),
-    removeOverlay: operation(null, function(spec) {
-      var overlays = this.state.overlays;
-      for (var i = 0; i < overlays.length; ++i) {
-        var cur = overlays[i].modeSpec;
-        if (cur == spec || typeof spec == "string" && cur.name == spec) {
-          overlays.splice(i, 1);
-          this.state.modeGen++;
-          regChange(this);
-          return;
-        }
-      }
-    }),
-
-    indentLine: operation(null, function(n, dir, aggressive) {
-      if (typeof dir != "string" && typeof dir != "number") {
-        if (dir == null) dir = this.options.smartIndent ? "smart" : "prev";
-        else dir = dir ? "add" : "subtract";
-      }
-      if (isLine(this.doc, n)) indentLine(this, n, dir, aggressive);
-    }),
-    indentSelection: operation(null, function(how) {
-      var sel = this.doc.sel;
-      if (posEq(sel.from, sel.to)) return indentLine(this, sel.from.line, how);
-      var e = sel.to.line - (sel.to.ch ? 0 : 1);
-      for (var i = sel.from.line; i <= e; ++i) indentLine(this, i, how);
-    }),
-
-    // Fetch the parser token for a given character. Useful for hacks
-    // that want to inspect the mode state (say, for completion).
-    getTokenAt: function(pos, precise) {
-      var doc = this.doc;
-      pos = clipPos(doc, pos);
-      var state = getStateBefore(this, pos.line, precise), mode = this.doc.mode;
-      var line = getLine(doc, pos.line);
-      var stream = new StringStream(line.text, this.options.tabSize);
-      while (stream.pos < pos.ch && !stream.eol()) {
-        stream.start = stream.pos;
-        var style = mode.token(stream, state);
-      }
-      return {start: stream.start,
-              end: stream.pos,
-              string: stream.current(),
-              className: style || null, // Deprecated, use 'type' instead
-              type: style || null,
-              state: state};
-    },
-
-    getTokenTypeAt: function(pos) {
-      pos = clipPos(this.doc, pos);
-      var styles = getLineStyles(this, getLine(this.doc, pos.line));
-      var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;
-      if (ch == 0) return styles[2];
-      for (;;) {
-        var mid = (before + after) >> 1;
-        if ((mid ? styles[mid * 2 - 1] : 0) >= ch) after = mid;
-        else if (styles[mid * 2 + 1] < ch) before = mid + 1;
-        else return styles[mid * 2 + 2];
-      }
-    },
-
-    getModeAt: function(pos) {
-      var mode = this.doc.mode;
-      if (!mode.innerMode) return mode;
-      return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode;
-    },
-
-    getHelper: function(pos, type) {
-      if (!helpers.hasOwnProperty(type)) return;
-      var help = helpers[type], mode = this.getModeAt(pos);
-      return mode[type] && help[mode[type]] ||
-        mode.helperType && help[mode.helperType] ||
-        help[mode.name];
-    },
-
-    getStateAfter: function(line, precise) {
-      var doc = this.doc;
-      line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);
-      return getStateBefore(this, line + 1, precise);
-    },
-
-    cursorCoords: function(start, mode) {
-      var pos, sel = this.doc.sel;
-      if (start == null) pos = sel.head;
-      else if (typeof start == "object") pos = clipPos(this.doc, start);
-      else pos = start ? sel.from : sel.to;
-      return cursorCoords(this, pos, mode || "page");
-    },
-
-    charCoords: function(pos, mode) {
-      return charCoords(this, clipPos(this.doc, pos), mode || "page");
-    },
-
-    coordsChar: function(coords, mode) {
-      coords = fromCoordSystem(this, coords, mode || "page");
-      return coordsChar(this, coords.left, coords.top);
-    },
-
-    lineAtHeight: function(height, mode) {
-      height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top;
-      return lineAtHeight(this.doc, height + this.display.viewOffset);
-    },
-    heightAtLine: function(line, mode) {
-      var end = false, last = this.doc.first + this.doc.size - 1;
-      if (line < this.doc.first) line = this.doc.first;
-      else if (line > last) { line = last; end = true; }
-      var lineObj = getLine(this.doc, line);
-      return intoCoordSystem(this, getLine(this.doc, line), {top: 0, left: 0}, mode || "page").top +
-        (end ? lineObj.height : 0);
-    },
-
-    defaultTextHeight: function() { return textHeight(this.display); },
-    defaultCharWidth: function() { return charWidth(this.display); },
-
-    setGutterMarker: operation(null, function(line, gutterID, value) {
-      return changeLine(this, line, function(line) {
-        var markers = line.gutterMarkers || (line.gutterMarkers = {});
-        markers[gutterID] = value;
-        if (!value && isEmpty(markers)) line.gutterMarkers = null;
-        return true;
-      });
-    }),
-
-    clearGutter: operation(null, function(gutterID) {
-      var cm = this, doc = cm.doc, i = doc.first;
-      doc.iter(function(line) {
-        if (line.gutterMarkers && line.gutterMarkers[gutterID]) {
-          line.gutterMarkers[gutterID] = null;
-          regChange(cm, i, i + 1);
-          if (isEmpty(line.gutterMarkers)) line.gutterMarkers = null;
-        }
-        ++i;
-      });
-    }),
-
-    addLineClass: operation(null, function(handle, where, cls) {
-      return changeLine(this, handle, function(line) {
-        var prop = where == "text" ? "textClass" : where == "background" ? "bgClass" : "wrapClass";
-        if (!line[prop]) line[prop] = cls;
-        else if (new RegExp("(?:^|\\s)" + cls + "(?:$|\\s)").test(line[prop])) return false;
-        else line[prop] += " " + cls;
-        return true;
-      });
-    }),
-
-    removeLineClass: operation(null, function(handle, where, cls) {
-      return changeLine(this, handle, function(line) {
-        var prop = where == "text" ? "textClass" : where == "background" ? "bgClass" : "wrapClass";
-        var cur = line[prop];
-        if (!cur) return false;
-        else if (cls == null) line[prop] = null;
-        else {
-          var found = cur.match(new RegExp("(?:^|\\s+)" + cls + "(?:$|\\s+)"));
-          if (!found) return false;
-          var end = found.index + found[0].length;
-          line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null;
-        }
-        return true;
-      });
-    }),
-
-    addLineWidget: operation(null, function(handle, node, options) {
-      return addLineWidget(this, handle, node, options);
-    }),
-
-    removeLineWidget: function(widget) { widget.clear(); },
-
-    lineInfo: function(line) {
-      if (typeof line == "number") {
-        if (!isLine(this.doc, line)) return null;
-        var n = line;
-        line = getLine(this.doc, line);
-        if (!line) return null;
-      } else {
-        var n = lineNo(line);
-        if (n == null) return null;
-      }
-      return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,
-              textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass,
-              widgets: line.widgets};
-    },
-
-    getViewport: function() { return {from: this.display.showingFrom, to: this.display.showingTo};},
-
-    addWidget: function(pos, node, scroll, vert, horiz) {
-      var display = this.display;
-      pos = cursorCoords(this, clipPos(this.doc, pos));
-      var top = pos.bottom, left = pos.left;
-      node.style.position = "absolute";
-      display.sizer.appendChild(node);
-      if (vert == "over") {
-        top = pos.top;
-      } else if (vert == "above" || vert == "near") {
-        var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),
-        hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);
-        // Default to positioning above (if specified and possible); otherwise default to positioning below
-        if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)
-          top = pos.top - node.offsetHeight;
-        else if (pos.bottom + node.offsetHeight <= vspace)
-          top = pos.bottom;
-        if (left + node.offsetWidth > hspace)
-          left = hspace - node.offsetWidth;
-      }
-      node.style.top = top + "px";
-      node.style.left = node.style.right = "";
-      if (horiz == "right") {
-        left = display.sizer.clientWidth - node.offsetWidth;
-        node.style.right = "0px";
-      } else {
-        if (horiz == "left") left = 0;
-        else if (horiz == "middle") left = (display.sizer.clientWidth - node.offsetWidth) / 2;
-        node.style.left = left + "px";
-      }
-      if (scroll)
-        scrollIntoView(this, left, top, left + node.offsetWidth, top + node.offsetHeight);
-    },
-
-    triggerOnKeyDown: operation(null, onKeyDown),
-
-    execCommand: function(cmd) {return commands[cmd](this);},
-
-    findPosH: function(from, amount, unit, visually) {
-      var dir = 1;
-      if (amount < 0) { dir = -1; amount = -amount; }
-      for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) {
-        cur = findPosH(this.doc, cur, dir, unit, visually);
-        if (cur.hitSide) break;
-      }
-      return cur;
-    },
-
-    moveH: operation(null, function(dir, unit) {
-      var sel = this.doc.sel, pos;
-      if (sel.shift || sel.extend || posEq(sel.from, sel.to))
-        pos = findPosH(this.doc, sel.head, dir, unit, this.options.rtlMoveVisually);
-      else
-        pos = dir < 0 ? sel.from : sel.to;
-      extendSelection(this.doc, pos, pos, dir);
-    }),
-
-    deleteH: operation(null, function(dir, unit) {
-      var sel = this.doc.sel;
-      if (!posEq(sel.from, sel.to)) replaceRange(this.doc, "", sel.from, sel.to, "+delete");
-      else replaceRange(this.doc, "", sel.from, findPosH(this.doc, sel.head, dir, unit, false), "+delete");
-      this.curOp.userSelChange = true;
-    }),
-
-    findPosV: function(from, amount, unit, goalColumn) {
-      var dir = 1, x = goalColumn;
-      if (amount < 0) { dir = -1; amount = -amount; }
-      for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) {
-        var coords = cursorCoords(this, cur, "div");
-        if (x == null) x = coords.left;
-        else coords.left = x;
-        cur = findPosV(this, coords, dir, unit);
-        if (cur.hitSide) break;
-      }
-      return cur;
-    },
-
-    moveV: operation(null, function(dir, unit) {
-      var sel = this.doc.sel;
-      var pos = cursorCoords(this, sel.head, "div");
-      if (sel.goalColumn != null) pos.left = sel.goalColumn;
-      var target = findPosV(this, pos, dir, unit);
-
-      if (unit == "page") addToScrollPos(this, 0, charCoords(this, target, "div").top - pos.top);
-      extendSelection(this.doc, target, target, dir);
-      sel.goalColumn = pos.left;
-    }),
-
-    toggleOverwrite: function(value) {
-      if (value != null && value == this.state.overwrite) return;
-      if (this.state.overwrite = !this.state.overwrite)
-        this.display.cursor.className += " CodeMirror-overwrite";
-      else
-        this.display.cursor.className = this.display.cursor.className.replace(" CodeMirror-overwrite", "");
-    },
-    hasFocus: function() { return this.state.focused; },
-
-    scrollTo: operation(null, function(x, y) {
-      updateScrollPos(this, x, y);
-    }),
-    getScrollInfo: function() {
-      var scroller = this.display.scroller, co = scrollerCutOff;
-      return {left: scroller.scrollLeft, top: scroller.scrollTop,
-              height: scroller.scrollHeight - co, width: scroller.scrollWidth - co,
-              clientHeight: scroller.clientHeight - co, clientWidth: scroller.clientWidth - co};
-    },
-
-    scrollIntoView: operation(null, function(pos, margin) {
-      if (typeof pos == "number") pos = Pos(pos, 0);
-      if (!margin) margin = 0;
-      var coords = pos;
-
-      if (!pos || pos.line != null) {
-        this.curOp.scrollToPos = pos ? clipPos(this.doc, pos) : this.doc.sel.head;
-        this.curOp.scrollToPosMargin = margin;
-        coords = cursorCoords(this, this.curOp.scrollToPos);
-      }
-      var sPos = calculateScrollPos(this, coords.left, coords.top - margin, coords.right, coords.bottom + margin);
-      updateScrollPos(this, sPos.scrollLeft, sPos.scrollTop);
-    }),
-
-    setSize: operation(null, function(width, height) {
-      function interpret(val) {
-        return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val;
-      }
-      if (width != null) this.display.wrapper.style.width = interpret(width);
-      if (height != null) this.display.wrapper.style.height = interpret(height);
-      if (this.options.lineWrapping)
-        this.display.measureLineCache.length = this.display.measureLineCachePos = 0;
-      this.curOp.forceUpdate = true;
-    }),
-
-    operation: function(f){return runInOp(this, f);},
-
-    refresh: operation(null, function() {
-      clearCaches(this);
-      updateScrollPos(this, this.doc.scrollLeft, this.doc.scrollTop);
-      regChange(this);
-    }),
-
-    swapDoc: operation(null, function(doc) {
-      var old = this.doc;
-      old.cm = null;
-      attachDoc(this, doc);
-      clearCaches(this);
-      resetInput(this, true);
-      updateScrollPos(this, doc.scrollLeft, doc.scrollTop);
-      return old;
-    }),
-
-    getInputField: function(){return this.display.input;},
-    getWrapperElement: function(){return this.display.wrapper;},
-    getScrollerElement: function(){return this.display.scroller;},
-    getGutterElement: function(){return this.display.gutters;}
-  };
-  eventMixin(CodeMirror);
-
-  // OPTION DEFAULTS
-
-  var optionHandlers = CodeMirror.optionHandlers = {};
-
-  // The default configuration options.
-  var defaults = CodeMirror.defaults = {};
-
-  function option(name, deflt, handle, notOnInit) {
-    CodeMirror.defaults[name] = deflt;
-    if (handle) optionHandlers[name] =
-      notOnInit ? function(cm, val, old) {if (old != Init) handle(cm, val, old);} : handle;
-  }
-
-  var Init = CodeMirror.Init = {toString: function(){return "CodeMirror.Init";}};
-
-  // These two are, on init, called from the constructor because they
-  // have to be initialized before the editor can start at all.
-  option("value", "", function(cm, val) {
-    cm.setValue(val);
-  }, true);
-  option("mode", null, function(cm, val) {
-    cm.doc.modeOption = val;
-    loadMode(cm);
-  }, true);
-
-  option("indentUnit", 2, loadMode, true);
-  option("indentWithTabs", false);
-  option("smartIndent", true);
-  option("tabSize", 4, function(cm) {
-    loadMode(cm);
-    clearCaches(cm);
-    regChange(cm);
-  }, true);
-  option("electricChars", true);
-  option("rtlMoveVisually", !windows);
-
-  option("theme", "default", function(cm) {
-    themeChanged(cm);
-    guttersChanged(cm);
-  }, true);
-  option("keyMap", "default", keyMapChanged);
-  option("extraKeys", null);
-
-  option("onKeyEvent", null);
-  option("onDragEvent", null);
-
-  option("lineWrapping", false, wrappingChanged, true);
-  option("gutters", [], function(cm) {
-    setGuttersForLineNumbers(cm.options);
-    guttersChanged(cm);
-  }, true);
-  option("fixedGutter", true, function(cm, val) {
-    cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0";
-    cm.refresh();
-  }, true);
-  option("coverGutterNextToScrollbar", false, updateScrollbars, true);
-  option("lineNumbers", false, function(cm) {
-    setGuttersForLineNumbers(cm.options);
-    guttersChanged(cm);
-  }, true);
-  option("firstLineNumber", 1, guttersChanged, true);
-  option("lineNumberFormatter", function(integer) {return integer;}, guttersChanged, true);
-  option("showCursorWhenSelecting", false, updateSelection, true);
-
-  option("readOnly", false, function(cm, val) {
-    if (val == "nocursor") {onBlur(cm); cm.display.input.blur();}
-    else if (!val) resetInput(cm, true);
-  });
-  option("dragDrop", true);
-
-  option("cursorBlinkRate", 530);
-  option("cursorScrollMargin", 0);
-  option("cursorHeight", 1);
-  option("workTime", 100);
-  option("workDelay", 100);
-  option("flattenSpans", true);
-  option("pollInterval", 100);
-  option("undoDepth", 40, function(cm, val){cm.doc.history.undoDepth = val;});
-  option("historyEventDelay", 500);
-  option("viewportMargin", 10, function(cm){cm.refresh();}, true);
-  option("maxHighlightLength", 10000, function(cm){loadMode(cm); cm.refresh();}, true);
-  option("moveInputWithCursor", true, function(cm, val) {
-    if (!val) cm.display.inputDiv.style.top = cm.display.inputDiv.style.left = 0;
-  });
-
-  option("tabindex", null, function(cm, val) {
-    cm.display.input.tabIndex = val || "";
-  });
-  option("autofocus", null);
-
-  // MODE DEFINITION AND QUERYING
-
-  // Known modes, by name and by MIME
-  var modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {};
-
-  CodeMirror.defineMode = function(name, mode) {
-    if (!CodeMirror.defaults.mode && name != "null") CodeMirror.defaults.mode = name;
-    if (arguments.length > 2) {
-      mode.dependencies = [];
-      for (var i = 2; i < arguments.length; ++i) mode.dependencies.push(arguments[i]);
-    }
-    modes[name] = mode;
-  };
-
-  CodeMirror.defineMIME = function(mime, spec) {
-    mimeModes[mime] = spec;
-  };
-
-  CodeMirror.resolveMode = function(spec) {
-    if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) {
-      spec = mimeModes[spec];
-    } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) {
-      var found = mimeModes[spec.name];
-      spec = createObj(found, spec);
-      spec.name = found.name;
-    } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) {
-      return CodeMirror.resolveMode("application/xml");
-    }
-    if (typeof spec == "string") return {name: spec};
-    else return spec || {name: "null"};
-  };
-
-  CodeMirror.getMode = function(options, spec) {
-    var spec = CodeMirror.resolveMode(spec);
-    var mfactory = modes[spec.name];
-    if (!mfactory) return CodeMirror.getMode(options, "text/plain");
-    var modeObj = mfactory(options, spec);
-    if (modeExtensions.hasOwnProperty(spec.name)) {
-      var exts = modeExtensions[spec.name];
-      for (var prop in exts) {
-        if (!exts.hasOwnProperty(prop)) continue;
-        if (modeObj.hasOwnProperty(prop)) modeObj["_" + prop] = modeObj[prop];
-        modeObj[prop] = exts[prop];
-      }
-    }
-    modeObj.name = spec.name;
-
-    return modeObj;
-  };
-
-  CodeMirror.defineMode("null", function() {
-    return {token: function(stream) {stream.skipToEnd();}};
-  });
-  CodeMirror.defineMIME("text/plain", "null");
-
-  var modeExtensions = CodeMirror.modeExtensions = {};
-  CodeMirror.extendMode = function(mode, properties) {
-    var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});
-    copyObj(properties, exts);
-  };
-
-  // EXTENSIONS
-
-  CodeMirror.defineExtension = function(name, func) {
-    CodeMirror.prototype[name] = func;
-  };
-  CodeMirror.defineDocExtension = function(name, func) {
-    Doc.prototype[name] = func;
-  };
-  CodeMirror.defineOption = option;
-
-  var initHooks = [];
-  CodeMirror.defineInitHook = function(f) {initHooks.push(f);};
-
-  var helpers = CodeMirror.helpers = {};
-  CodeMirror.registerHelper = function(type, name, value) {
-    if (!helpers.hasOwnProperty(type)) helpers[type] = CodeMirror[type] = {};
-    helpers[type][name] = value;
-  };
-
-  // UTILITIES
-
-  CodeMirror.isWordChar = isWordChar;
-
-  // MODE STATE HANDLING
-
-  // Utility functions for working with state. Exported because modes
-  // sometimes need to do this.
-  function copyState(mode, state) {
-    if (state === true) return state;
-    if (mode.copyState) return mode.copyState(state);
-    var nstate = {};
-    for (var n in state) {
-      var val = state[n];
-      if (val instanceof Array) val = val.concat([]);
-      nstate[n] = val;
-    }
-    return nstate;
-  }
-  CodeMirror.copyState = copyState;
-
-  function startState(mode, a1, a2) {
-    return mode.startState ? mode.startState(a1, a2) : true;
-  }
-  CodeMirror.startState = startState;
-
-  CodeMirror.innerMode = function(mode, state) {
-    while (mode.innerMode) {
-      var info = mode.innerMode(state);
-      if (!info || info.mode == mode) break;
-      state = info.state;
-      mode = info.mode;
-    }
-    return info || {mode: mode, state: state};
-  };
-
-  // STANDARD COMMANDS
-
-  var commands = CodeMirror.commands = {
-    selectAll: function(cm) {cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()));},
-    killLine: function(cm) {
-      var from = cm.getCursor(true), to = cm.getCursor(false), sel = !posEq(from, to);
-      if (!sel && cm.getLine(from.line).length == from.ch)
-        cm.replaceRange("", from, Pos(from.line + 1, 0), "+delete");
-      else cm.replaceRange("", from, sel ? to : Pos(from.line), "+delete");
-    },
-    deleteLine: function(cm) {
-      var l = cm.getCursor().line;
-      cm.replaceRange("", Pos(l, 0), Pos(l), "+delete");
-    },
-    delLineLeft: function(cm) {
-      var cur = cm.getCursor();
-      cm.replaceRange("", Pos(cur.line, 0), cur, "+delete");
-    },
-    undo: function(cm) {cm.undo();},
-    redo: function(cm) {cm.redo();},
-    goDocStart: function(cm) {cm.extendSelection(Pos(cm.firstLine(), 0));},
-    goDocEnd: function(cm) {cm.extendSelection(Pos(cm.lastLine()));},
-    goLineStart: function(cm) {
-      cm.extendSelection(lineStart(cm, cm.getCursor().line));
-    },
-    goLineStartSmart: function(cm) {
-      var cur = cm.getCursor(), start = lineStart(cm, cur.line);
-      var line = cm.getLineHandle(start.line);
-      var order = getOrder(line);
-      if (!order || order[0].level == 0) {
-        var firstNonWS = Math.max(0, line.text.search(/\S/));
-        var inWS = cur.line == start.line && cur.ch <= firstNonWS && cur.ch;
-        cm.extendSelection(Pos(start.line, inWS ? 0 : firstNonWS));
-      } else cm.extendSelection(start);
-    },
-    goLineEnd: function(cm) {
-      cm.extendSelection(lineEnd(cm, cm.getCursor().line));
-    },
-    goLineRight: function(cm) {
-      var top = cm.charCoords(cm.getCursor(), "div").top + 5;
-      cm.extendSelection(cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div"));
-    },
-    goLineLeft: function(cm) {
-      var top = cm.charCoords(cm.getCursor(), "div").top + 5;
-      cm.extendSelection(cm.coordsChar({left: 0, top: top}, "div"));
-    },
-    goLineUp: function(cm) {cm.moveV(-1, "line");},
-    goLineDown: function(cm) {cm.moveV(1, "line");},
-    goPageUp: function(cm) {cm.moveV(-1, "page");},
-    goPageDown: function(cm) {cm.moveV(1, "page");},
-    goCharLeft: function(cm) {cm.moveH(-1, "char");},
-    goCharRight: function(cm) {cm.moveH(1, "char");},
-    goColumnLeft: function(cm) {cm.moveH(-1, "column");},
-    goColumnRight: function(cm) {cm.moveH(1, "column");},
-    goWordLeft: function(cm) {cm.moveH(-1, "word");},
-    goGroupRight: function(cm) {cm.moveH(1, "group");},
-    goGroupLeft: function(cm) {cm.moveH(-1, "group");},
-    goWordRight: function(cm) {cm.moveH(1, "word");},
-    delCharBefore: function(cm) {cm.deleteH(-1, "char");},
-    delCharAfter: function(cm) {cm.deleteH(1, "char");},
-    delWordBefore: function(cm) {cm.deleteH(-1, "word");},
-    delWordAfter: function(cm) {cm.deleteH(1, "word");},
-    delGroupBefore: function(cm) {cm.deleteH(-1, "group");},
-    delGroupAfter: function(cm) {cm.deleteH(1, "group");},
-    indentAuto: function(cm) {cm.indentSelection("smart");},
-    indentMore: function(cm) {cm.indentSelection("add");},
-    indentLess: function(cm) {cm.indentSelection("subtract");},
-    insertTab: function(cm) {cm.replaceSelection("\t", "end", "+input");},
-    defaultTab: function(cm) {
-      if (cm.somethingSelected()) cm.indentSelection("add");
-      else cm.replaceSelection("\t", "end", "+input");
-    },
-    transposeChars: function(cm) {
-      var cur = cm.getCursor(), line = cm.getLine(cur.line);
-      if (cur.ch > 0 && cur.ch < line.length - 1)
-        cm.replaceRange(line.charAt(cur.ch) + line.charAt(cur.ch - 1),
-                        Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1));
-    },
-    newlineAndIndent: function(cm) {
-      operation(cm, function() {
-        cm.replaceSelection("\n", "end", "+input");
-        cm.indentLine(cm.getCursor().line, null, true);
-      })();
-    },
-    toggleOverwrite: function(cm) {cm.toggleOverwrite();}
-  };
-
-  // STANDARD KEYMAPS
-
-  var keyMap = CodeMirror.keyMap = {};
-  keyMap.basic = {
-    "Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown",
-    "End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown",
-    "Delete": "delCharAfter", "Backspace": "delCharBefore", "Tab": "defaultTab", "Shift-Tab": "indentAuto",
-    "Enter": "newlineAndIndent", "Insert": "toggleOverwrite"
-  };
-  // Note that the save and find-related commands aren't defined by
-  // default. Unknown commands are simply ignored.
-  keyMap.pcDefault = {
-    "Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo",
-    "Ctrl-Home": "goDocStart", "Alt-Up": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Down": "goDocEnd",
-    "Ctrl-Left": "goGroupLeft", "Ctrl-Right": "goGroupRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd",
-    "Ctrl-Backspace": "delGroupBefore", "Ctrl-Delete": "delGroupAfter", "Ctrl-S": "save", "Ctrl-F": "find",
-    "Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll",
-    "Ctrl-[": "indentLess", "Ctrl-]": "indentMore",
-    fallthrough: "basic"
-  };
-  keyMap.macDefault = {
-    "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo",
-    "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft",
-    "Alt-Right": "goGroupRight", "Cmd-Left": "goLineStart", "Cmd-Right": "goLineEnd", "Alt-Backspace": "delGroupBefore",
-    "Ctrl-Alt-Backspace": "delGroupAfter", "Alt-Delete": "delGroupAfter", "Cmd-S": "save", "Cmd-F": "find",
-    "Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll",
-    "Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delLineLeft",
-    fallthrough: ["basic", "emacsy"]
-  };
-  keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault;
-  keyMap.emacsy = {
-    "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown",
-    "Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd",
-    "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore",
-    "Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars"
-  };
-
-  // KEYMAP DISPATCH
-
-  function getKeyMap(val) {
-    if (typeof val == "string") return keyMap[val];
-    else return val;
-  }
-
-  function lookupKey(name, maps, handle) {
-    function lookup(map) {
-      map = getKeyMap(map);
-      var found = map[name];
-      if (found === false) return "stop";
-      if (found != null && handle(found)) return true;
-      if (map.nofallthrough) return "stop";
-
-      var fallthrough = map.fallthrough;
-      if (fallthrough == null) return false;
-      if (Object.prototype.toString.call(fallthrough) != "[object Array]")
-        return lookup(fallthrough);
-      for (var i = 0, e = fallthrough.length; i < e; ++i) {
-        var done = lookup(fallthrough[i]);
-        if (done) return done;
-      }
-      return false;
-    }
-
-    for (var i = 0; i < maps.length; ++i) {
-      var done = lookup(maps[i]);
-      if (done) return done != "stop";
-    }
-  }
-  function isModifierKey(event) {
-    var name = keyNames[event.keyCode];
-    return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod";
-  }
-  function keyName(event, noShift) {
-    if (opera && event.keyCode == 34 && event["char"]) return false;
-    var name = keyNames[event.keyCode];
-    if (name == null || event.altGraphKey) return false;
-    if (event.altKey) name = "Alt-" + name;
-    if (flipCtrlCmd ? event.metaKey : event.ctrlKey) name = "Ctrl-" + name;
-    if (flipCtrlCmd ? event.ctrlKey : event.metaKey) name = "Cmd-" + name;
-    if (!noShift && event.shiftKey) name = "Shift-" + name;
-    return name;
-  }
-  CodeMirror.lookupKey = lookupKey;
-  CodeMirror.isModifierKey = isModifierKey;
-  CodeMirror.keyName = keyName;
-
-  // FROMTEXTAREA
-
-  CodeMirror.fromTextArea = function(textarea, options) {
-    if (!options) options = {};
-    options.value = textarea.value;
-    if (!options.tabindex && textarea.tabindex)
-      options.tabindex = textarea.tabindex;
-    if (!options.placeholder && textarea.placeholder)
-      options.placeholder = textarea.placeholder;
-    // Set autofocus to true if this textarea is focused, or if it has
-    // autofocus and no other element is focused.
-    if (options.autofocus == null) {
-      var hasFocus = document.body;
-      // doc.activeElement occasionally throws on IE
-      try { hasFocus = document.activeElement; } catch(e) {}
-      options.autofocus = hasFocus == textarea ||
-        textarea.getAttribute("autofocus") != null && hasFocus == document.body;
-    }
-
-    function save() {textarea.value = cm.getValue();}
-    if (textarea.form) {
-      on(textarea.form, "submit", save);
-      // Deplorable hack to make the submit method do the right thing.
-      if (!options.leaveSubmitMethodAlone) {
-        var form = textarea.form, realSubmit = form.submit;
-        try {
-          var wrappedSubmit = form.submit = function() {
-            save();
-            form.submit = realSubmit;
-            form.submit();
-            form.submit = wrappedSubmit;
-          };
-        } catch(e) {}
-      }
-    }
-
-    textarea.style.display = "none";
-    var cm = CodeMirror(function(node) {
-      textarea.parentNode.insertBefore(node, textarea.nextSibling);
-    }, options);
-    cm.save = save;
-    cm.getTextArea = function() { return textarea; };
-    cm.toTextArea = function() {
-      save();
-      textarea.parentNode.removeChild(cm.getWrapperElement());
-      textarea.style.display = "";
-      if (textarea.form) {
-        off(textarea.form, "submit", save);
-        if (typeof textarea.form.submit == "function")
-          textarea.form.submit = realSubmit;
-      }
-    };
-    return cm;
-  };
-
-  // STRING STREAM
-
-  // Fed to the mode parsers, provides helper functions to make
-  // parsers more succinct.
-
-  // The character stream used by a mode's parser.
-  function StringStream(string, tabSize) {
-    this.pos = this.start = 0;
-    this.string = string;
-    this.tabSize = tabSize || 8;
-    this.lastColumnPos = this.lastColumnValue = 0;
-  }
-
-  StringStream.prototype = {
-    eol: function() {return this.pos >= this.string.length;},
-    sol: function() {return this.pos == 0;},
-    peek: function() {return this.string.charAt(this.pos) || undefined;},
-    next: function() {
-      if (this.pos < this.string.length)
-        return this.string.charAt(this.pos++);
-    },
-    eat: function(match) {
-      var ch = this.string.charAt(this.pos);
-      if (typeof match == "string") var ok = ch == match;
-      else var ok = ch && (match.test ? match.test(ch) : match(ch));
-      if (ok) {++this.pos; return ch;}
-    },
-    eatWhile: function(match) {
-      var start = this.pos;
-      while (this.eat(match)){}
-      return this.pos > start;
-    },
-    eatSpace: function() {
-      var start = this.pos;
-      while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos;
-      return this.pos > start;
-    },
-    skipToEnd: function() {this.pos = this.string.length;},
-    skipTo: function(ch) {
-      var found = this.string.indexOf(ch, this.pos);
-      if (found > -1) {this.pos = found; return true;}
-    },
-    backUp: function(n) {this.pos -= n;},
-    column: function() {
-      if (this.lastColumnPos < this.start) {
-        this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);
-        this.lastColumnPos = this.start;
-      }
-      return this.lastColumnValue;
-    },
-    indentation: function() {return countColumn(this.string, null, this.tabSize);},
-    match: function(pattern, consume, caseInsensitive) {
-      if (typeof pattern == "string") {
-        var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;};
-        var substr = this.string.substr(this.pos, pattern.length);
-        if (cased(substr) == cased(pattern)) {
-          if (consume !== false) this.pos += pattern.length;
-          return true;
-        }
-      } else {
-        var match = this.string.slice(this.pos).match(pattern);
-        if (match && match.index > 0) return null;
-        if (match && consume !== false) this.pos += match[0].length;
-        return match;
-      }
-    },
-    current: function(){return this.string.slice(this.start, this.pos);}
-  };
-  CodeMirror.StringStream = StringStream;
-
-  // TEXTMARKERS
-
-  function TextMarker(doc, type) {
-    this.lines = [];
-    this.type = type;
-    this.doc = doc;
-  }
-  CodeMirror.TextMarker = TextMarker;
-  eventMixin(TextMarker);
-
-  TextMarker.prototype.clear = function() {
-    if (this.explicitlyCleared) return;
-    var cm = this.doc.cm, withOp = cm && !cm.curOp;
-    if (withOp) startOperation(cm);
-    if (hasHandler(this, "clear")) {
-      var found = this.find();
-      if (found) signalLater(this, "clear", found.from, found.to);
-    }
-    var min = null, max = null;
-    for (var i = 0; i < this.lines.length; ++i) {
-      var line = this.lines[i];
-      var span = getMarkedSpanFor(line.markedSpans, this);
-      if (span.to != null) max = lineNo(line);
-      line.markedSpans = removeMarkedSpan(line.markedSpans, span);
-      if (span.from != null)
-        min = lineNo(line);
-      else if (this.collapsed && !lineIsHidden(this.doc, line) && cm)
-        updateLineHeight(line, textHeight(cm.display));
-    }
-    if (cm && this.collapsed && !cm.options.lineWrapping) for (var i = 0; i < this.lines.length; ++i) {
-      var visual = visualLine(cm.doc, this.lines[i]), len = lineLength(cm.doc, visual);
-      if (len > cm.display.maxLineLength) {
-        cm.display.maxLine = visual;
-        cm.display.maxLineLength = len;
-        cm.display.maxLineChanged = true;
-      }
-    }
-
-    if (min != null && cm) regChange(cm, min, max + 1);
-    this.lines.length = 0;
-    this.explicitlyCleared = true;
-    if (this.atomic && this.doc.cantEdit) {
-      this.doc.cantEdit = false;
-      if (cm) reCheckSelection(cm);
-    }
-    if (withOp) endOperation(cm);
-  };
-
-  TextMarker.prototype.find = function() {
-    var from, to;
-    for (var i = 0; i < this.lines.length; ++i) {
-      var line = this.lines[i];
-      var span = getMarkedSpanFor(line.markedSpans, this);
-      if (span.from != null || span.to != null) {
-        var found = lineNo(line);
-        if (span.from != null) from = Pos(found, span.from);
-        if (span.to != null) to = Pos(found, span.to);
-      }
-    }
-    if (this.type == "bookmark") return from;
-    return from && {from: from, to: to};
-  };
-
-  TextMarker.prototype.changed = function() {
-    var pos = this.find(), cm = this.doc.cm;
-    if (!pos || !cm) return;
-    var line = getLine(this.doc, pos.from.line);
-    clearCachedMeasurement(cm, line);
-    if (pos.from.line >= cm.display.showingFrom && pos.from.line < cm.display.showingTo) {
-      for (var node = cm.display.lineDiv.firstChild; node; node = node.nextSibling) if (node.lineObj == line) {
-        if (node.offsetHeight != line.height) updateLineHeight(line, node.offsetHeight);
-        break;
-      }
-      runInOp(cm, function() {
-        cm.curOp.selectionChanged = cm.curOp.forceUpdate = cm.curOp.updateMaxLine = true;
-      });
-    }
-  };
-
-  TextMarker.prototype.attachLine = function(line) {
-    if (!this.lines.length && this.doc.cm) {
-      var op = this.doc.cm.curOp;
-      if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)
-        (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this);
-    }
-    this.lines.push(line);
-  };
-  TextMarker.prototype.detachLine = function(line) {
-    this.lines.splice(indexOf(this.lines, line), 1);
-    if (!this.lines.length && this.doc.cm) {
-      var op = this.doc.cm.curOp;
-      (op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);
-    }
-  };
-
-  function markText(doc, from, to, options, type) {
-    if (options && options.shared) return markTextShared(doc, from, to, options, type);
-    if (doc.cm && !doc.cm.curOp) return operation(doc.cm, markText)(doc, from, to, options, type);
-
-    var marker = new TextMarker(doc, type);
-    if (type == "range" && !posLess(from, to)) return marker;
-    if (options) copyObj(options, marker);
-    if (marker.replacedWith) {
-      marker.collapsed = true;
-      marker.replacedWith = elt("span", [marker.replacedWith], "CodeMirror-widget");
-      if (!options.handleMouseEvents) marker.replacedWith.ignoreEvents = true;
-    }
-    if (marker.collapsed) sawCollapsedSpans = true;
-
-    if (marker.addToHistory)
-      addToHistory(doc, {from: from, to: to, origin: "markText"},
-                   {head: doc.sel.head, anchor: doc.sel.anchor}, NaN);
-
-    var curLine = from.line, size = 0, collapsedAtStart, collapsedAtEnd, cm = doc.cm, updateMaxLine;
-    doc.iter(curLine, to.line + 1, function(line) {
-      if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(doc, line) == cm.display.maxLine)
-        updateMaxLine = true;
-      var span = {from: null, to: null, marker: marker};
-      size += line.text.length;
-      if (curLine == from.line) {span.from = from.ch; size -= from.ch;}
-      if (curLine == to.line) {span.to = to.ch; size -= line.text.length - to.ch;}
-      if (marker.collapsed) {
-        if (curLine == to.line) collapsedAtEnd = collapsedSpanAt(line, to.ch);
-        if (curLine == from.line) collapsedAtStart = collapsedSpanAt(line, from.ch);
-        else updateLineHeight(line, 0);
-      }
-      addMarkedSpan(line, span);
-      ++curLine;
-    });
-    if (marker.collapsed) doc.iter(from.line, to.line + 1, function(line) {
-      if (lineIsHidden(doc, line)) updateLineHeight(line, 0);
-    });
-
-    if (marker.clearOnEnter) on(marker, "beforeCursorEnter", function() { marker.clear(); });
-
-    if (marker.readOnly) {
-      sawReadOnlySpans = true;
-      if (doc.history.done.length || doc.history.undone.length)
-        doc.clearHistory();
-    }
-    if (marker.collapsed) {
-      if (collapsedAtStart != collapsedAtEnd)
-        throw new Error("Inserting collapsed marker overlapping an existing one");
-      marker.size = size;
-      marker.atomic = true;
-    }
-    if (cm) {
-      if (updateMaxLine) cm.curOp.updateMaxLine = true;
-      if (marker.className || marker.title || marker.startStyle || marker.endStyle || marker.collapsed)
-        regChange(cm, from.line, to.line + 1);
-      if (marker.atomic) reCheckSelection(cm);
-    }
-    return marker;
-  }
-
-  // SHARED TEXTMARKERS
-
-  function SharedTextMarker(markers, primary) {
-    this.markers = markers;
-    this.primary = primary;
-    for (var i = 0, me = this; i < markers.length; ++i) {
-      markers[i].parent = this;
-      on(markers[i], "clear", function(){me.clear();});
-    }
-  }
-  CodeMirror.SharedTextMarker = SharedTextMarker;
-  eventMixin(SharedTextMarker);
-
-  SharedTextMarker.prototype.clear = function() {
-    if (this.explicitlyCleared) return;
-    this.explicitlyCleared = true;
-    for (var i = 0; i < this.markers.length; ++i)
-      this.markers[i].clear();
-    signalLater(this, "clear");
-  };
-  SharedTextMarker.prototype.find = function() {
-    return this.primary.find();
-  };
-
-  function markTextShared(doc, from, to, options, type) {
-    options = copyObj(options);
-    options.shared = false;
-    var markers = [markText(doc, from, to, options, type)], primary = markers[0];
-    var widget = options.replacedWith;
-    linkedDocs(doc, function(doc) {
-      if (widget) options.replacedWith = widget.cloneNode(true);
-      markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));
-      for (var i = 0; i < doc.linked.length; ++i)
-        if (doc.linked[i].isParent) return;
-      primary = lst(markers);
-    });
-    return new SharedTextMarker(markers, primary);
-  }
-
-  // TEXTMARKER SPANS
-
-  function getMarkedSpanFor(spans, marker) {
-    if (spans) for (var i = 0; i < spans.length; ++i) {
-      var span = spans[i];
-      if (span.marker == marker) return span;
-    }
-  }
-  function removeMarkedSpan(spans, span) {
-    for (var r, i = 0; i < spans.length; ++i)
-      if (spans[i] != span) (r || (r = [])).push(spans[i]);
-    return r;
-  }
-  function addMarkedSpan(line, span) {
-    line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];
-    span.marker.attachLine(line);
-  }
-
-  function markedSpansBefore(old, startCh, isInsert) {
-    if (old) for (var i = 0, nw; i < old.length; ++i) {
-      var span = old[i], marker = span.marker;
-      var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);
-      if (startsBefore || marker.type == "bookmark" && span.from == startCh && (!isInsert || !span.marker.insertLeft)) {
-        var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh);
-        (nw || (nw = [])).push({from: span.from,
-                                to: endsAfter ? null : span.to,
-                                marker: marker});
-      }
-    }
-    return nw;
-  }
-
-  function markedSpansAfter(old, endCh, isInsert) {
-    if (old) for (var i = 0, nw; i < old.length; ++i) {
-      var span = old[i], marker = span.marker;
-      var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);
-      if (endsAfter || marker.type == "bookmark" && span.from == endCh && (!isInsert || span.marker.insertLeft)) {
-        var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh);
-        (nw || (nw = [])).push({from: startsBefore ? null : span.from - endCh,
-                                to: span.to == null ? null : span.to - endCh,
-                                marker: marker});
-      }
-    }
-    return nw;
-  }
-
-  function stretchSpansOverChange(doc, change) {
-    var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;
-    var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;
-    if (!oldFirst && !oldLast) return null;
-
-    var startCh = change.from.ch, endCh = change.to.ch, isInsert = posEq(change.from, change.to);
-    // Get the spans that 'stick out' on both sides
-    var first = markedSpansBefore(oldFirst, startCh, isInsert);
-    var last = markedSpansAfter(oldLast, endCh, isInsert);
-
-    // Next, merge those two ends
-    var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);
-    if (first) {
-      // Fix up .to properties of first
-      for (var i = 0; i < first.length; ++i) {
-        var span = first[i];
-        if (span.to == null) {
-          var found = getMarkedSpanFor(last, span.marker);
-          if (!found) span.to = startCh;
-          else if (sameLine) span.to = found.to == null ? null : found.to + offset;
-        }
-      }
-    }
-    if (last) {
-      // Fix up .from in last (or move them into first in case of sameLine)
-      for (var i = 0; i < last.length; ++i) {
-        var span = last[i];
-        if (span.to != null) span.to += offset;
-        if (span.from == null) {
-          var found = getMarkedSpanFor(first, span.marker);
-          if (!found) {
-            span.from = offset;
-            if (sameLine) (first || (first = [])).push(span);
-          }
-        } else {
-          span.from += offset;
-          if (sameLine) (first || (first = [])).push(span);
-        }
-      }
-    }
-    if (sameLine && first) {
-      // Make sure we didn't create any zero-length spans
-      for (var i = 0; i < first.length; ++i)
-        if (first[i].from != null && first[i].from == first[i].to && first[i].marker.type != "bookmark")
-          first.splice(i--, 1);
-      if (!first.length) first = null;
-    }
-
-    var newMarkers = [first];
-    if (!sameLine) {
-      // Fill gap with whole-line-spans
-      var gap = change.text.length - 2, gapMarkers;
-      if (gap > 0 && first)
-        for (var i = 0; i < first.length; ++i)
-          if (first[i].to == null)
-            (gapMarkers || (gapMarkers = [])).push({from: null, to: null, marker: first[i].marker});
-      for (var i = 0; i < gap; ++i)
-        newMarkers.push(gapMarkers);
-      newMarkers.push(last);
-    }
-    return newMarkers;
-  }
-
-  function mergeOldSpans(doc, change) {
-    var old = getOldSpans(doc, change);
-    var stretched = stretchSpansOverChange(doc, change);
-    if (!old) return stretched;
-    if (!stretched) return old;
-
-    for (var i = 0; i < old.length; ++i) {
-      var oldCur = old[i], stretchCur = stretched[i];
-      if (oldCur && stretchCur) {
-        spans: for (var j = 0; j < stretchCur.length; ++j) {
-          var span = stretchCur[j];
-          for (var k = 0; k < oldCur.length; ++k)
-            if (oldCur[k].marker == span.marker) continue spans;
-          oldCur.push(span);
-        }
-      } else if (stretchCur) {
-        old[i] = stretchCur;
-      }
-    }
-    return old;
-  }
-
-  function removeReadOnlyRanges(doc, from, to) {
-    var markers = null;
-    doc.iter(from.line, to.line + 1, function(line) {
-      if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {
-        var mark = line.markedSpans[i].marker;
-        if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))
-          (markers || (markers = [])).push(mark);
-      }
-    });
-    if (!markers) return null;
-    var parts = [{from: from, to: to}];
-    for (var i = 0; i < markers.length; ++i) {
-      var mk = markers[i], m = mk.find();
-      for (var j = 0; j < parts.length; ++j) {
-        var p = parts[j];
-        if (posLess(p.to, m.from) || posLess(m.to, p.from)) continue;
-        var newParts = [j, 1];
-        if (posLess(p.from, m.from) || !mk.inclusiveLeft && posEq(p.from, m.from))
-          newParts.push({from: p.from, to: m.from});
-        if (posLess(m.to, p.to) || !mk.inclusiveRight && posEq(p.to, m.to))
-          newParts.push({from: m.to, to: p.to});
-        parts.splice.apply(parts, newParts);
-        j += newParts.length - 1;
-      }
-    }
-    return parts;
-  }
-
-  function collapsedSpanAt(line, ch) {
-    var sps = sawCollapsedSpans && line.markedSpans, found;
-    if (sps) for (var sp, i = 0; i < sps.length; ++i) {
-      sp = sps[i];
-      if (!sp.marker.collapsed) continue;
-      if ((sp.from == null || sp.from < ch) &&
-          (sp.to == null || sp.to > ch) &&
-          (!found || found.width < sp.marker.width))
-        found = sp.marker;
-    }
-    return found;
-  }
-  function collapsedSpanAtStart(line) { return collapsedSpanAt(line, -1); }
-  function collapsedSpanAtEnd(line) { return collapsedSpanAt(line, line.text.length + 1); }
-
-  function visualLine(doc, line) {
-    var merged;
-    while (merged = collapsedSpanAtStart(line))
-      line = getLine(doc, merged.find().from.line);
-    return line;
-  }
-
-  function lineIsHidden(doc, line) {
-    var sps = sawCollapsedSpans && line.markedSpans;
-    if (sps) for (var sp, i = 0; i < sps.length; ++i) {
-      sp = sps[i];
-      if (!sp.marker.collapsed) continue;
-      if (sp.from == null) return true;
-      if (sp.marker.replacedWith) continue;
-      if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))
-        return true;
-    }
-  }
-  function lineIsHiddenInner(doc, line, span) {
-    if (span.to == null) {
-      var end = span.marker.find().to, endLine = getLine(doc, end.line);
-      return lineIsHiddenInner(doc, endLine, getMarkedSpanFor(endLine.markedSpans, span.marker));
-    }
-    if (span.marker.inclusiveRight && span.to == line.text.length)
-      return true;
-    for (var sp, i = 0; i < line.markedSpans.length; ++i) {
-      sp = line.markedSpans[i];
-      if (sp.marker.collapsed && !sp.marker.replacedWith && sp.from == span.to &&
-          (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&
-          lineIsHiddenInner(doc, line, sp)) return true;
-    }
-  }
-
-  function detachMarkedSpans(line) {
-    var spans = line.markedSpans;
-    if (!spans) return;
-    for (var i = 0; i < spans.length; ++i)
-      spans[i].marker.detachLine(line);
-    line.markedSpans = null;
-  }
-
-  function attachMarkedSpans(line, spans) {
-    if (!spans) return;
-    for (var i = 0; i < spans.length; ++i)
-      spans[i].marker.attachLine(line);
-    line.markedSpans = spans;
-  }
-
-  // LINE WIDGETS
-
-  var LineWidget = CodeMirror.LineWidget = function(cm, node, options) {
-    if (options) for (var opt in options) if (options.hasOwnProperty(opt))
-      this[opt] = options[opt];
-    this.cm = cm;
-    this.node = node;
-  };
-  eventMixin(LineWidget);
-  function widgetOperation(f) {
-    return function() {
-      var withOp = !this.cm.curOp;
-      if (withOp) startOperation(this.cm);
-      try {var result = f.apply(this, arguments);}
-      finally {if (withOp) endOperation(this.cm);}
-      return result;
-    };
-  }
-  LineWidget.prototype.clear = widgetOperation(function() {
-    var ws = this.line.widgets, no = lineNo(this.line);
-    if (no == null || !ws) return;
-    for (var i = 0; i < ws.length; ++i) if (ws[i] == this) ws.splice(i--, 1);
-    if (!ws.length) this.line.widgets = null;
-    var aboveVisible = heightAtLine(this.cm, this.line) < this.cm.doc.scrollTop;
-    updateLineHeight(this.line, Math.max(0, this.line.height - widgetHeight(this)));
-    if (aboveVisible) addToScrollPos(this.cm, 0, -this.height);
-    regChange(this.cm, no, no + 1);
-  });
-  LineWidget.prototype.changed = widgetOperation(function() {
-    var oldH = this.height;
-    this.height = null;
-    var diff = widgetHeight(this) - oldH;
-    if (!diff) return;
-    updateLineHeight(this.line, this.line.height + diff);
-    var no = lineNo(this.line);
-    regChange(this.cm, no, no + 1);
-  });
-
-  function widgetHeight(widget) {
-    if (widget.height != null) return widget.height;
-    if (!widget.node.parentNode || widget.node.parentNode.nodeType != 1)
-      removeChildrenAndAdd(widget.cm.display.measure, elt("div", [widget.node], null, "position: relative"));
-    return widget.height = widget.node.offsetHeight;
-  }
-
-  function addLineWidget(cm, handle, node, options) {
-    var widget = new LineWidget(cm, node, options);
-    if (widget.noHScroll) cm.display.alignWidgets = true;
-    changeLine(cm, handle, function(line) {
-      var widgets = line.widgets || (line.widgets = []);
-      if (widget.insertAt == null) widgets.push(widget);
-      else widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget);
-      widget.line = line;
-      if (!lineIsHidden(cm.doc, line) || widget.showIfHidden) {
-        var aboveVisible = heightAtLine(cm, line) < cm.doc.scrollTop;
-        updateLineHeight(line, line.height + widgetHeight(widget));
-        if (aboveVisible) addToScrollPos(cm, 0, widget.height);
-      }
-      return true;
-    });
-    return widget;
-  }
-
-  // LINE DATA STRUCTURE
-
-  // Line objects. These hold state related to a line, including
-  // highlighting info (the styles array).
-  var Line = CodeMirror.Line = function(text, markedSpans, estimateHeight) {
-    this.text = text;
-    attachMarkedSpans(this, markedSpans);
-    this.height = estimateHeight ? estimateHeight(this) : 1;
-  };
-  eventMixin(Line);
-
-  function updateLine(line, text, markedSpans, estimateHeight) {
-    line.text = text;
-    if (line.stateAfter) line.stateAfter = null;
-    if (line.styles) line.styles = null;
-    if (line.order != null) line.order = null;
-    detachMarkedSpans(line);
-    attachMarkedSpans(line, markedSpans);
-    var estHeight = estimateHeight ? estimateHeight(line) : 1;
-    if (estHeight != line.height) updateLineHeight(line, estHeight);
-  }
-
-  function cleanUpLine(line) {
-    line.parent = null;
-    detachMarkedSpans(line);
-  }
-
-  // Run the given mode's parser over a line, update the styles
-  // array, which contains alternating fragments of text and CSS
-  // classes.
-  function runMode(cm, text, mode, state, f) {
-    var flattenSpans = mode.flattenSpans;
-    if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;
-    var curStart = 0, curStyle = null;
-    var stream = new StringStream(text, cm.options.tabSize), style;
-    if (text == "" && mode.blankLine) mode.blankLine(state);
-    while (!stream.eol()) {
-      if (stream.pos > cm.options.maxHighlightLength) {
-        flattenSpans = false;
-        // Webkit seems to refuse to render text nodes longer than 57444 characters
-        stream.pos = Math.min(text.length, stream.start + 50000);
-        style = null;
-      } else {
-        style = mode.token(stream, state);
-      }
-      if (!flattenSpans || curStyle != style) {
-        if (curStart < stream.start) f(stream.start, curStyle);
-        curStart = stream.start; curStyle = style;
-      }
-      stream.start = stream.pos;
-    }
-    if (curStart < stream.pos) f(stream.pos, curStyle);
-  }
-
-  function highlightLine(cm, line, state) {
-    // A styles array always starts with a number identifying the
-    // mode/overlays that it is based on (for easy invalidation).
-    var st = [cm.state.modeGen];
-    // Compute the base array of styles
-    runMode(cm, line.text, cm.doc.mode, state, function(end, style) {st.push(end, style);});
-
-    // Run overlays, adjust style array.
-    for (var o = 0; o < cm.state.overlays.length; ++o) {
-      var overlay = cm.state.overlays[o], i = 1, at = 0;
-      runMode(cm, line.text, overlay.mode, true, function(end, style) {
-        var start = i;
-        // Ensure there's a token end at the current position, and that i points at it
-        while (at < end) {
-          var i_end = st[i];
-          if (i_end > end)
-            st.splice(i, 1, end, st[i+1], i_end);
-          i += 2;
-          at = Math.min(end, i_end);
-        }
-        if (!style) return;
-        if (overlay.opaque) {
-          st.splice(start, i - start, end, style);
-          i = start + 2;
-        } else {
-          for (; start < i; start += 2) {
-            var cur = st[start+1];
-            st[start+1] = cur ? cur + " " + style : style;
-          }
-        }
-      });
-    }
-
-    return st;
-  }
-
-  function getLineStyles(cm, line) {
-    if (!line.styles || line.styles[0] != cm.state.modeGen)
-      line.styles = highlightLine(cm, line, line.stateAfter = getStateBefore(cm, lineNo(line)));
-    return line.styles;
-  }
-
-  // Lightweight form of highlight -- proceed over this line and
-  // update state, but don't save a style array.
-  function processLine(cm, line, state) {
-    var mode = cm.doc.mode;
-    var stream = new StringStream(line.text, cm.options.tabSize);
-    if (line.text == "" && mode.blankLine) mode.blankLine(state);
-    while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) {
-      mode.token(stream, state);
-      stream.start = stream.pos;
-    }
-  }
-
-  var styleToClassCache = {};
-  function styleToClass(style) {
-    if (!style) return null;
-    return styleToClassCache[style] ||
-      (styleToClassCache[style] = "cm-" + style.replace(/ +/g, " cm-"));
-  }
-
-  function lineContent(cm, realLine, measure, copyWidgets) {
-    var merged, line = realLine, empty = true;
-    while (merged = collapsedSpanAtStart(line))
-      line = getLine(cm.doc, merged.find().from.line);
-
-    var builder = {pre: elt("pre"), col: 0, pos: 0,
-                   measure: null, measuredSomething: false, cm: cm,
-                   copyWidgets: copyWidgets};
-    if (line.textClass) builder.pre.className = line.textClass;
-
-    do {
-      if (line.text) empty = false;
-      builder.measure = line == realLine && measure;
-      builder.pos = 0;
-      builder.addToken = builder.measure ? buildTokenMeasure : buildToken;
-      if ((ie || webkit) && cm.getOption("lineWrapping"))
-        builder.addToken = buildTokenSplitSpaces(builder.addToken);
-      var next = insertLineContent(line, builder, getLineStyles(cm, line));
-      if (measure && line == realLine && !builder.measuredSomething) {
-        measure[0] = builder.pre.appendChild(zeroWidthElement(cm.display.measure));
-        builder.measuredSomething = true;
-      }
-      if (next) line = getLine(cm.doc, next.to.line);
-    } while (next);
-
-    if (measure && !builder.measuredSomething && !measure[0])
-      measure[0] = builder.pre.appendChild(empty ? elt("span", "\u00a0") : zeroWidthElement(cm.display.measure));
-    if (!builder.pre.firstChild && !lineIsHidden(cm.doc, realLine))
-      builder.pre.appendChild(document.createTextNode("\u00a0"));
-
-    var order;
-    // Work around problem with the reported dimensions of single-char
-    // direction spans on IE (issue #1129). See also the comment in
-    // cursorCoords.
-    if (measure && ie && (order = getOrder(line))) {
-      var l = order.length - 1;
-      if (order[l].from == order[l].to) --l;
-      var last = order[l], prev = order[l - 1];
-      if (last.from + 1 == last.to && prev && last.level < prev.level) {
-        var span = measure[builder.pos - 1];
-        if (span) span.parentNode.insertBefore(span.measureRight = zeroWidthElement(cm.display.measure),
-                                               span.nextSibling);
-      }
-    }
-
-    signal(cm, "renderLine", cm, realLine, builder.pre);
-    return builder.pre;
-  }
-
-  var tokenSpecialChars = /[\t\u0000-\u0019\u00ad\u200b\u2028\u2029\uFEFF]/g;
-  function buildToken(builder, text, style, startStyle, endStyle, title) {
-    if (!text) return;
-    if (!tokenSpecialChars.test(text)) {
-      builder.col += text.length;
-      var content = document.createTextNode(text);
-    } else {
-      var content = document.createDocumentFragment(), pos = 0;
-      while (true) {
-        tokenSpecialChars.lastIndex = pos;
-        var m = tokenSpecialChars.exec(text);
-        var skipped = m ? m.index - pos : text.length - pos;
-        if (skipped) {
-          content.appendChild(document.createTextNode(text.slice(pos, pos + skipped)));
-          builder.col += skipped;
-        }
-        if (!m) break;
-        pos += skipped + 1;
-        if (m[0] == "\t") {
-          var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;
-          content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab"));
-          builder.col += tabWidth;
-        } else {
-          var token = elt("span", "\u2022", "cm-invalidchar");
-          token.title = "\\u" + m[0].charCodeAt(0).toString(16);
-          content.appendChild(token);
-          builder.col += 1;
-        }
-      }
-    }
-    if (style || startStyle || endStyle || builder.measure) {
-      var fullStyle = style || "";
-      if (startStyle) fullStyle += startStyle;
-      if (endStyle) fullStyle += endStyle;
-      var token = elt("span", [content], fullStyle);
-      if (title) token.title = title;
-      return builder.pre.appendChild(token);
-    }
-    builder.pre.appendChild(content);
-  }
-
-  function buildTokenMeasure(builder, text, style, startStyle, endStyle) {
-    var wrapping = builder.cm.options.lineWrapping;
-    for (var i = 0; i < text.length; ++i) {
-      var ch = text.charAt(i), start = i == 0;
-      if (ch >= "\ud800" && ch < "\udbff" && i < text.length - 1) {
-        ch = text.slice(i, i + 2);
-        ++i;
-      } else if (i && wrapping && spanAffectsWrapping(text, i)) {
-        builder.pre.appendChild(elt("wbr"));
-      }
-      var old = builder.measure[builder.pos];
-      var span = builder.measure[builder.pos] =
-        buildToken(builder, ch, style,
-                   start && startStyle, i == text.length - 1 && endStyle);
-      if (old) span.leftSide = old.leftSide || old;
-      // In IE single-space nodes wrap differently than spaces
-      // embedded in larger text nodes, except when set to
-      // white-space: normal (issue #1268).
-      if (ie && wrapping && ch == " " && i && !/\s/.test(text.charAt(i - 1)) &&
-          i < text.length - 1 && !/\s/.test(text.charAt(i + 1)))
-        span.style.whiteSpace = "normal";
-      builder.pos += ch.length;
-    }
-    if (text.length) builder.measuredSomething = true;
-  }
-
-  function buildTokenSplitSpaces(inner) {
-    function split(old) {
-      var out = " ";
-      for (var i = 0; i < old.length - 2; ++i) out += i % 2 ? " " : "\u00a0";
-      out += " ";
-      return out;
-    }
-    return function(builder, text, style, startStyle, endStyle, title) {
-      return inner(builder, text.replace(/ {3,}/, split), style, startStyle, endStyle, title);
-    };
-  }
-
-  function buildCollapsedSpan(builder, size, marker, ignoreWidget) {
-    var widget = !ignoreWidget && marker.replacedWith;
-    if (widget) {
-      if (builder.copyWidgets) widget = widget.cloneNode(true);
-      builder.pre.appendChild(widget);
-      if (builder.measure) {
-        if (size) {
-          builder.measure[builder.pos] = widget;
-        } else {
-          var elt = builder.measure[builder.pos] = zeroWidthElement(builder.cm.display.measure);
-          if (marker.type != "bookmark" || marker.insertLeft)
-            builder.pre.insertBefore(elt, widget);
-          else
-            builder.pre.appendChild(elt);
-        }
-        builder.measuredSomething = true;
-      }
-    }
-    builder.pos += size;
-  }
-
-  // Outputs a number of spans to make up a line, taking highlighting
-  // and marked text into account.
-  function insertLineContent(line, builder, styles) {
-    var spans = line.markedSpans, allText = line.text, at = 0;
-    if (!spans) {
-      for (var i = 1; i < styles.length; i+=2)
-        builder.addToken(builder, allText.slice(at, at = styles[i]), styleToClass(styles[i+1]));
-      return;
-    }
-
-    var len = allText.length, pos = 0, i = 1, text = "", style;
-    var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;
-    for (;;) {
-      if (nextChange == pos) { // Update current marker set
-        spanStyle = spanEndStyle = spanStartStyle = title = "";
-        collapsed = null; nextChange = Infinity;
-        var foundBookmark = null;
-        for (var j = 0; j < spans.length; ++j) {
-          var sp = spans[j], m = sp.marker;
-          if (sp.from <= pos && (sp.to == null || sp.to > pos)) {
-            if (sp.to != null && nextChange > sp.to) { nextChange = sp.to; spanEndStyle = ""; }
-            if (m.className) spanStyle += " " + m.className;
-            if (m.startStyle && sp.from == pos) spanStartStyle += " " + m.startStyle;
-            if (m.endStyle && sp.to == nextChange) spanEndStyle += " " + m.endStyle;
-            if (m.title && !title) title = m.title;
-            if (m.collapsed && (!collapsed || collapsed.marker.size < m.size))
-              collapsed = sp;
-          } else if (sp.from > pos && nextChange > sp.from) {
-            nextChange = sp.from;
-          }
-          if (m.type == "bookmark" && sp.from == pos && m.replacedWith) foundBookmark = m;
-        }
-        if (collapsed && (collapsed.from || 0) == pos) {
-          buildCollapsedSpan(builder, (collapsed.to == null ? len : collapsed.to) - pos,
-                             collapsed.marker, collapsed.from == null);
-          if (collapsed.to == null) return collapsed.marker.find();
-        }
-        if (foundBookmark && !collapsed) buildCollapsedSpan(builder, 0, foundBookmark);
-      }
-      if (pos >= len) break;
-
-      var upto = Math.min(len, nextChange);
-      while (true) {
-        if (text) {
-          var end = pos + text.length;
-          if (!collapsed) {
-            var tokenText = end > upto ? text.slice(0, upto - pos) : text;
-            builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,
-                             spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", title);
-          }
-          if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}
-          pos = end;
-          spanStartStyle = "";
-        }
-        text = allText.slice(at, at = styles[i++]);
-        style = styleToClass(styles[i++]);
-      }
-    }
-  }
-
-  // DOCUMENT DATA STRUCTURE
-
-  function updateDoc(doc, change, markedSpans, selAfter, estimateHeight) {
-    function spansFor(n) {return markedSpans ? markedSpans[n] : null;}
-    function update(line, text, spans) {
-      updateLine(line, text, spans, estimateHeight);
-      signalLater(line, "change", line, change);
-    }
-
-    var from = change.from, to = change.to, text = change.text;
-    var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);
-    var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;
-
-    // First adjust the line structure
-    if (from.ch == 0 && to.ch == 0 && lastText == "") {
-      // This is a whole-line replace. Treated specially to make
-      // sure line objects move the way they are supposed to.
-      for (var i = 0, e = text.length - 1, added = []; i < e; ++i)
-        added.push(new Line(text[i], spansFor(i), estimateHeight));
-      update(lastLine, lastLine.text, lastSpans);
-      if (nlines) doc.remove(from.line, nlines);
-      if (added.length) doc.insert(from.line, added);
-    } else if (firstLine == lastLine) {
-      if (text.length == 1) {
-        update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);
-      } else {
-        for (var added = [], i = 1, e = text.length - 1; i < e; ++i)
-          added.push(new Line(text[i], spansFor(i), estimateHeight));
-        added.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight));
-        update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
-        doc.insert(from.line + 1, added);
-      }
-    } else if (text.length == 1) {
-      update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));
-      doc.remove(from.line + 1, nlines);
-    } else {
-      update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
-      update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);
-      for (var i = 1, e = text.length - 1, added = []; i < e; ++i)
-        added.push(new Line(text[i], spansFor(i), estimateHeight));
-      if (nlines > 1) doc.remove(from.line + 1, nlines - 1);
-      doc.insert(from.line + 1, added);
-    }
-
-    signalLater(doc, "change", doc, change);
-    setSelection(doc, selAfter.anchor, selAfter.head, null, true);
-  }
-
-  function LeafChunk(lines) {
-    this.lines = lines;
-    this.parent = null;
-    for (var i = 0, e = lines.length, height = 0; i < e; ++i) {
-      lines[i].parent = this;
-      height += lines[i].height;
-    }
-    this.height = height;
-  }
-
-  LeafChunk.prototype = {
-    chunkSize: function() { return this.lines.length; },
-    removeInner: function(at, n) {
-      for (var i = at, e = at + n; i < e; ++i) {
-        var line = this.lines[i];
-        this.height -= line.height;
-        cleanUpLine(line);
-        signalLater(line, "delete");
-      }
-      this.lines.splice(at, n);
-    },
-    collapse: function(lines) {
-      lines.splice.apply(lines, [lines.length, 0].concat(this.lines));
-    },
-    insertInner: function(at, lines, height) {
-      this.height += height;
-      this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));
-      for (var i = 0, e = lines.length; i < e; ++i) lines[i].parent = this;
-    },
-    iterN: function(at, n, op) {
-      for (var e = at + n; at < e; ++at)
-        if (op(this.lines[at])) return true;
-    }
-  };
-
-  function BranchChunk(children) {
-    this.children = children;
-    var size = 0, height = 0;
-    for (var i = 0, e = children.length; i < e; ++i) {
-      var ch = children[i];
-      size += ch.chunkSize(); height += ch.height;
-      ch.parent = this;
-    }
-    this.size = size;
-    this.height = height;
-    this.parent = null;
-  }
-
-  BranchChunk.prototype = {
-    chunkSize: function() { return this.size; },
-    removeInner: function(at, n) {
-      this.size -= n;
-      for (var i = 0; i < this.children.length; ++i) {
-        var child = this.children[i], sz = child.chunkSize();
-        if (at < sz) {
-          var rm = Math.min(n, sz - at), oldHeight = child.height;
-          child.removeInner(at, rm);
-          this.height -= oldHeight - child.height;
-          if (sz == rm) { this.children.splice(i--, 1); child.parent = null; }
-          if ((n -= rm) == 0) break;
-          at = 0;
-        } else at -= sz;
-      }
-      if (this.size - n < 25) {
-        var lines = [];
-        this.collapse(lines);
-        this.children = [new LeafChunk(lines)];
-        this.children[0].parent = this;
-      }
-    },
-    collapse: function(lines) {
-      for (var i = 0, e = this.children.length; i < e; ++i) this.children[i].collapse(lines);
-    },
-    insertInner: function(at, lines, height) {
-      this.size += lines.length;
-      this.height += height;
-      for (var i = 0, e = this.children.length; i < e; ++i) {
-        var child = this.children[i], sz = child.chunkSize();
-        if (at <= sz) {
-          child.insertInner(at, lines, height);
-          if (child.lines && child.lines.length > 50) {
-            while (child.lines.length > 50) {
-              var spilled = child.lines.splice(child.lines.length - 25, 25);
-              var newleaf = new LeafChunk(spilled);
-              child.height -= newleaf.height;
-              this.children.splice(i + 1, 0, newleaf);
-              newleaf.parent = this;
-            }
-            this.maybeSpill();
-          }
-          break;
-        }
-        at -= sz;
-      }
-    },
-    maybeSpill: function() {
-      if (this.children.length <= 10) return;
-      var me = this;
-      do {
-        var spilled = me.children.splice(me.children.length - 5, 5);
-        var sibling = new BranchChunk(spilled);
-        if (!me.parent) { // Become the parent node
-          var copy = new BranchChunk(me.children);
-          copy.parent = me;
-          me.children = [copy, sibling];
-          me = copy;
-        } else {
-          me.size -= sibling.size;
-          me.height -= sibling.height;
-          var myIndex = indexOf(me.parent.children, me);
-          me.parent.children.splice(myIndex + 1, 0, sibling);
-        }
-        sibling.parent = me.parent;
-      } while (me.children.length > 10);
-      me.parent.maybeSpill();
-    },
-    iterN: function(at, n, op) {
-      for (var i = 0, e = this.children.length; i < e; ++i) {
-        var child = this.children[i], sz = child.chunkSize();
-        if (at < sz) {
-          var used = Math.min(n, sz - at);
-          if (child.iterN(at, used, op)) return true;
-          if ((n -= used) == 0) break;
-          at = 0;
-        } else at -= sz;
-      }
-    }
-  };
-
-  var nextDocId = 0;
-  var Doc = CodeMirror.Doc = function(text, mode, firstLine) {
-    if (!(this instanceof Doc)) return new Doc(text, mode, firstLine);
-    if (firstLine == null) firstLine = 0;
-
-    BranchChunk.call(this, [new LeafChunk([new Line("", null)])]);
-    this.first = firstLine;
-    this.scrollTop = this.scrollLeft = 0;
-    this.cantEdit = false;
-    this.history = makeHistory();
-    this.cleanGeneration = 1;
-    this.frontier = firstLine;
-    var start = Pos(firstLine, 0);
-    this.sel = {from: start, to: start, head: start, anchor: start, shift: false, extend: false, goalColumn: null};
-    this.id = ++nextDocId;
-    this.modeOption = mode;
-
-    if (typeof text == "string") text = splitLines(text);
-    updateDoc(this, {from: start, to: start, text: text}, null, {head: start, anchor: start});
-  };
-
-  Doc.prototype = createObj(BranchChunk.prototype, {
-    constructor: Doc,
-    iter: function(from, to, op) {
-      if (op) this.iterN(from - this.first, to - from, op);
-      else this.iterN(this.first, this.first + this.size, from);
-    },
-
-    insert: function(at, lines) {
-      var height = 0;
-      for (var i = 0, e = lines.length; i < e; ++i) height += lines[i].height;
-      this.insertInner(at - this.first, lines, height);
-    },
-    remove: function(at, n) { this.removeInner(at - this.first, n); },
-
-    getValue: function(lineSep) {
-      var lines = getLines(this, this.first, this.first + this.size);
-      if (lineSep === false) return lines;
-      return lines.join(lineSep || "\n");
-    },
-    setValue: function(code) {
-      var top = Pos(this.first, 0), last = this.first + this.size - 1;
-      makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),
-                        text: splitLines(code), origin: "setValue"},
-                 {head: top, anchor: top}, true);
-    },
-    replaceRange: function(code, from, to, origin) {
-      from = clipPos(this, from);
-      to = to ? clipPos(this, to) : from;
-      replaceRange(this, code, from, to, origin);
-    },
-    getRange: function(from, to, lineSep) {
-      var lines = getBetween(this, clipPos(this, from), clipPos(this, to));
-      if (lineSep === false) return lines;
-      return lines.join(lineSep || "\n");
-    },
-
-    getLine: function(line) {var l = this.getLineHandle(line); return l && l.text;},
-    setLine: function(line, text) {
-      if (isLine(this, line))
-        replaceRange(this, text, Pos(line, 0), clipPos(this, Pos(line)));
-    },
-    removeLine: function(line) {
-      if (line) replaceRange(this, "", clipPos(this, Pos(line - 1)), clipPos(this, Pos(line)));
-      else replaceRange(this, "", Pos(0, 0), clipPos(this, Pos(1, 0)));
-    },
-
-    getLineHandle: function(line) {if (isLine(this, line)) return getLine(this, line);},
-    getLineNumber: function(line) {return lineNo(line);},
-
-    getLineHandleVisualStart: function(line) {
-      if (typeof line == "number") line = getLine(this, line);
-      return visualLine(this, line);
-    },
-
-    lineCount: function() {return this.size;},
-    firstLine: function() {return this.first;},
-    lastLine: function() {return this.first + this.size - 1;},
-
-    clipPos: function(pos) {return clipPos(this, pos);},
-
-    getCursor: function(start) {
-      var sel = this.sel, pos;
-      if (start == null || start == "head") pos = sel.head;
-      else if (start == "anchor") pos = sel.anchor;
-      else if (start == "end" || start === false) pos = sel.to;
-      else pos = sel.from;
-      return copyPos(pos);
-    },
-    somethingSelected: function() {return !posEq(this.sel.head, this.sel.anchor);},
-
-    setCursor: docOperation(function(line, ch, extend) {
-      var pos = clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line);
-      if (extend) extendSelection(this, pos);
-      else setSelection(this, pos, pos);
-    }),
-    setSelection: docOperation(function(anchor, head) {
-      setSelection(this, clipPos(this, anchor), clipPos(this, head || anchor));
-    }),
-    extendSelection: docOperation(function(from, to) {
-      extendSelection(this, clipPos(this, from), to && clipPos(this, to));
-    }),
-
-    getSelection: function(lineSep) {return this.getRange(this.sel.from, this.sel.to, lineSep);},
-    replaceSelection: function(code, collapse, origin) {
-      makeChange(this, {from: this.sel.from, to: this.sel.to, text: splitLines(code), origin: origin}, collapse || "around");
-    },
-    undo: docOperation(function() {makeChangeFromHistory(this, "undo");}),
-    redo: docOperation(function() {makeChangeFromHistory(this, "redo");}),
-
-    setExtending: function(val) {this.sel.extend = val;},
-
-    historySize: function() {
-      var hist = this.history;
-      return {undo: hist.done.length, redo: hist.undone.length};
-    },
-    clearHistory: function() {this.history = makeHistory(this.history.maxGeneration);},
-
-    markClean: function() {
-      this.cleanGeneration = this.changeGeneration();
-    },
-    changeGeneration: function() {
-      this.history.lastOp = this.history.lastOrigin = null;
-      return this.history.generation;
-    },
-    isClean: function (gen) {
-      return this.history.generation == (gen || this.cleanGeneration);
-    },
-
-    getHistory: function() {
-      return {done: copyHistoryArray(this.history.done),
-              undone: copyHistoryArray(this.history.undone)};
-    },
-    setHistory: function(histData) {
-      var hist = this.history = makeHistory(this.history.maxGeneration);
-      hist.done = histData.done.slice(0);
-      hist.undone = histData.undone.slice(0);
-    },
-
-    markText: function(from, to, options) {
-      return markText(this, clipPos(this, from), clipPos(this, to), options, "range");
-    },
-    setBookmark: function(pos, options) {
-      var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),
-                      insertLeft: options && options.insertLeft};
-      pos = clipPos(this, pos);
-      return markText(this, pos, pos, realOpts, "bookmark");
-    },
-    findMarksAt: function(pos) {
-      pos = clipPos(this, pos);
-      var markers = [], spans = getLine(this, pos.line).markedSpans;
-      if (spans) for (var i = 0; i < spans.length; ++i) {
-        var span = spans[i];
-        if ((span.from == null || span.from <= pos.ch) &&
-            (span.to == null || span.to >= pos.ch))
-          markers.push(span.marker.parent || span.marker);
-      }
-      return markers;
-    },
-    getAllMarks: function() {
-      var markers = [];
-      this.iter(function(line) {
-        var sps = line.markedSpans;
-        if (sps) for (var i = 0; i < sps.length; ++i)
-          if (sps[i].from != null) markers.push(sps[i].marker);
-      });
-      return markers;
-    },
-
-    posFromIndex: function(off) {
-      var ch, lineNo = this.first;
-      this.iter(function(line) {
-        var sz = line.text.length + 1;
-        if (sz > off) { ch = off; return true; }
-        off -= sz;
-        ++lineNo;
-      });
-      return clipPos(this, Pos(lineNo, ch));
-    },
-    indexFromPos: function (coords) {
-      coords = clipPos(this, coords);
-      var index = coords.ch;
-      if (coords.line < this.first || coords.ch < 0) return 0;
-      this.iter(this.first, coords.line, function (line) {
-        index += line.text.length + 1;
-      });
-      return index;
-    },
-
-    copy: function(copyHistory) {
-      var doc = new Doc(getLines(this, this.first, this.first + this.size), this.modeOption, this.first);
-      doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;
-      doc.sel = {from: this.sel.from, to: this.sel.to, head: this.sel.head, anchor: this.sel.anchor,
-                 shift: this.sel.shift, extend: false, goalColumn: this.sel.goalColumn};
-      if (copyHistory) {
-        doc.history.undoDepth = this.history.undoDepth;
-        doc.setHistory(this.getHistory());
-      }
-      return doc;
-    },
-
-    linkedDoc: function(options) {
-      if (!options) options = {};
-      var from = this.first, to = this.first + this.size;
-      if (options.from != null && options.from > from) from = options.from;
-      if (options.to != null && options.to < to) to = options.to;
-      var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from);
-      if (options.sharedHist) copy.history = this.history;
-      (this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});
-      copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];
-      return copy;
-    },
-    unlinkDoc: function(other) {
-      if (other instanceof CodeMirror) other = other.doc;
-      if (this.linked) for (var i = 0; i < this.linked.length; ++i) {
-        var link = this.linked[i];
-        if (link.doc != other) continue;
-        this.linked.splice(i, 1);
-        other.unlinkDoc(this);
-        break;
-      }
-      // If the histories were shared, split them again
-      if (other.history == this.history) {
-        var splitIds = [other.id];
-        linkedDocs(other, function(doc) {splitIds.push(doc.id);}, true);
-        other.history = makeHistory();
-        other.history.done = copyHistoryArray(this.history.done, splitIds);
-        other.history.undone = copyHistoryArray(this.history.undone, splitIds);
-      }
-    },
-    iterLinkedDocs: function(f) {linkedDocs(this, f);},
-
-    getMode: function() {return this.mode;},
-    getEditor: function() {return this.cm;}
-  });
-
-  Doc.prototype.eachLine = Doc.prototype.iter;
-
-  // The Doc methods that should be available on CodeMirror instances
-  var dontDelegate = "iter insert remove copy getEditor".split(" ");
-  for (var prop in Doc.prototype) if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)
-    CodeMirror.prototype[prop] = (function(method) {
-      return function() {return method.apply(this.doc, arguments);};
-    })(Doc.prototype[prop]);
-
-  eventMixin(Doc);
-
-  function linkedDocs(doc, f, sharedHistOnly) {
-    function propagate(doc, skip, sharedHist) {
-      if (doc.linked) for (var i = 0; i < doc.linked.length; ++i) {
-        var rel = doc.linked[i];
-        if (rel.doc == skip) continue;
-        var shared = sharedHist && rel.sharedHist;
-        if (sharedHistOnly && !shared) continue;
-        f(rel.doc, shared);
-        propagate(rel.doc, doc, shared);
-      }
-    }
-    propagate(doc, null, true);
-  }
-
-  function attachDoc(cm, doc) {
-    if (doc.cm) throw new Error("This document is already in use.");
-    cm.doc = doc;
-    doc.cm = cm;
-    estimateLineHeights(cm);
-    loadMode(cm);
-    if (!cm.options.lineWrapping) computeMaxLength(cm);
-    cm.options.mode = doc.modeOption;
-    regChange(cm);
-  }
-
-  // LINE UTILITIES
-
-  function getLine(chunk, n) {
-    n -= chunk.first;
-    while (!chunk.lines) {
-      for (var i = 0;; ++i) {
-        var child = chunk.children[i], sz = child.chunkSize();
-        if (n < sz) { chunk = child; break; }
-        n -= sz;
-      }
-    }
-    return chunk.lines[n];
-  }
-
-  function getBetween(doc, start, end) {
-    var out = [], n = start.line;
-    doc.iter(start.line, end.line + 1, function(line) {
-      var text = line.text;
-      if (n == end.line) text = text.slice(0, end.ch);
-      if (n == start.line) text = text.slice(start.ch);
-      out.push(text);
-      ++n;
-    });
-    return out;
-  }
-  function getLines(doc, from, to) {
-    var out = [];
-    doc.iter(from, to, function(line) { out.push(line.text); });
-    return out;
-  }
-
-  function updateLineHeight(line, height) {
-    var diff = height - line.height;
-    for (var n = line; n; n = n.parent) n.height += diff;
-  }
-
-  function lineNo(line) {
-    if (line.parent == null) return null;
-    var cur = line.parent, no = indexOf(cur.lines, line);
-    for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {
-      for (var i = 0;; ++i) {
-        if (chunk.children[i] == cur) break;
-        no += chunk.children[i].chunkSize();
-      }
-    }
-    return no + cur.first;
-  }
-
-  function lineAtHeight(chunk, h) {
-    var n = chunk.first;
-    outer: do {
-      for (var i = 0, e = chunk.children.length; i < e; ++i) {
-        var child = chunk.children[i], ch = child.height;
-        if (h < ch) { chunk = child; continue outer; }
-        h -= ch;
-        n += child.chunkSize();
-      }
-      return n;
-    } while (!chunk.lines);
-    for (var i = 0, e = chunk.lines.length; i < e; ++i) {
-      var line = chunk.lines[i], lh = line.height;
-      if (h < lh) break;
-      h -= lh;
-    }
-    return n + i;
-  }
-
-  function heightAtLine(cm, lineObj) {
-    lineObj = visualLine(cm.doc, lineObj);
-
-    var h = 0, chunk = lineObj.parent;
-    for (var i = 0; i < chunk.lines.length; ++i) {
-      var line = chunk.lines[i];
-      if (line == lineObj) break;
-      else h += line.height;
-    }
-    for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {
-      for (var i = 0; i < p.children.length; ++i) {
-        var cur = p.children[i];
-        if (cur == chunk) break;
-        else h += cur.height;
-      }
-    }
-    return h;
-  }
-
-  function getOrder(line) {
-    var order = line.order;
-    if (order == null) order = line.order = bidiOrdering(line.text);
-    return order;
-  }
-
-  // HISTORY
-
-  function makeHistory(startGen) {
-    return {
-      // Arrays of history events. Doing something adds an event to
-      // done and clears undo. Undoing moves events from done to
-      // undone, redoing moves them in the other direction.
-      done: [], undone: [], undoDepth: Infinity,
-      // Used to track when changes can be merged into a single undo
-      // event
-      lastTime: 0, lastOp: null, lastOrigin: null,
-      // Used by the isClean() method
-      generation: startGen || 1, maxGeneration: startGen || 1
-    };
-  }
-
-  function attachLocalSpans(doc, change, from, to) {
-    var existing = change["spans_" + doc.id], n = 0;
-    doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function(line) {
-      if (line.markedSpans)
-        (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans;
-      ++n;
-    });
-  }
-
-  function historyChangeFromChange(doc, change) {
-    var from = { line: change.from.line, ch: change.from.ch };
-    var histChange = {from: from, to: changeEnd(change), text: getBetween(doc, change.from, change.to)};
-    attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);
-    linkedDocs(doc, function(doc) {attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);}, true);
-    return histChange;
-  }
-
-  function addToHistory(doc, change, selAfter, opId) {
-    var hist = doc.history;
-    hist.undone.length = 0;
-    var time = +new Date, cur = lst(hist.done);
-
-    if (cur &&
-        (hist.lastOp == opId ||
-         hist.lastOrigin == change.origin && change.origin &&
-         ((change.origin.charAt(0) == "+" && doc.cm && hist.lastTime > time - doc.cm.options.historyEventDelay) ||
-          change.origin.charAt(0) == "*"))) {
-      // Merge this change into the last event
-      var last = lst(cur.changes);
-      if (posEq(change.from, change.to) && posEq(change.from, last.to)) {
-        // Optimized case for simple insertion -- don't want to add
-        // new changesets for every character typed
-        last.to = changeEnd(change);
-      } else {
-        // Add new sub-event
-        cur.changes.push(historyChangeFromChange(doc, change));
-      }
-      cur.anchorAfter = selAfter.anchor; cur.headAfter = selAfter.head;
-    } else {
-      // Can not be merged, start a new event.
-      cur = {changes: [historyChangeFromChange(doc, change)],
-             generation: hist.generation,
-             anchorBefore: doc.sel.anchor, headBefore: doc.sel.head,
-             anchorAfter: selAfter.anchor, headAfter: selAfter.head};
-      hist.done.push(cur);
-      hist.generation = ++hist.maxGeneration;
-      while (hist.done.length > hist.undoDepth)
-        hist.done.shift();
-    }
-    hist.lastTime = time;
-    hist.lastOp = opId;
-    hist.lastOrigin = change.origin;
-  }
-
-  function removeClearedSpans(spans) {
-    if (!spans) return null;
-    for (var i = 0, out; i < spans.length; ++i) {
-      if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }
-      else if (out) out.push(spans[i]);
-    }
-    return !out ? spans : out.length ? out : null;
-  }
-
-  function getOldSpans(doc, change) {
-    var found = change["spans_" + doc.id];
-    if (!found) return null;
-    for (var i = 0, nw = []; i < change.text.length; ++i)
-      nw.push(removeClearedSpans(found[i]));
-    return nw;
-  }
-
-  // Used both to provide a JSON-safe object in .getHistory, and, when
-  // detaching a document, to split the history in two
-  function copyHistoryArray(events, newGroup) {
-    for (var i = 0, copy = []; i < events.length; ++i) {
-      var event = events[i], changes = event.changes, newChanges = [];
-      copy.push({changes: newChanges, anchorBefore: event.anchorBefore, headBefore: event.headBefore,
-                 anchorAfter: event.anchorAfter, headAfter: event.headAfter});
-      for (var j = 0; j < changes.length; ++j) {
-        var change = changes[j], m;
-        newChanges.push({from: change.from, to: change.to, text: change.text});
-        if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\d+)$/)) {
-          if (indexOf(newGroup, Number(m[1])) > -1) {
-            lst(newChanges)[prop] = change[prop];
-            delete change[prop];
-          }
-        }
-      }
-    }
-    return copy;
-  }
-
-  // Rebasing/resetting history to deal with externally-sourced changes
-
-  function rebaseHistSel(pos, from, to, diff) {
-    if (to < pos.line) {
-      pos.line += diff;
-    } else if (from < pos.line) {
-      pos.line = from;
-      pos.ch = 0;
-    }
-  }
-
-  // Tries to rebase an array of history events given a change in the
-  // document. If the change touches the same lines as the event, the
-  // event, and everything 'behind' it, is discarded. If the change is
-  // before the event, the event's positions are updated. Uses a
-  // copy-on-write scheme for the positions, to avoid having to
-  // reallocate them all on every rebase, but also avoid problems with
-  // shared position objects being unsafely updated.
-  function rebaseHistArray(array, from, to, diff) {
-    for (var i = 0; i < array.length; ++i) {
-      var sub = array[i], ok = true;
-      for (var j = 0; j < sub.changes.length; ++j) {
-        var cur = sub.changes[j];
-        if (!sub.copied) { cur.from = copyPos(cur.from); cur.to = copyPos(cur.to); }
-        if (to < cur.from.line) {
-          cur.from.line += diff;
-          cur.to.line += diff;
-        } else if (from <= cur.to.line) {
-          ok = false;
-          break;
-        }
-      }
-      if (!sub.copied) {
-        sub.anchorBefore = copyPos(sub.anchorBefore); sub.headBefore = copyPos(sub.headBefore);
-        sub.anchorAfter = copyPos(sub.anchorAfter); sub.readAfter = copyPos(sub.headAfter);
-        sub.copied = true;
-      }
-      if (!ok) {
-        array.splice(0, i + 1);
-        i = 0;
-      } else {
-        rebaseHistSel(sub.anchorBefore); rebaseHistSel(sub.headBefore);
-        rebaseHistSel(sub.anchorAfter); rebaseHistSel(sub.headAfter);
-      }
-    }
-  }
-
-  function rebaseHist(hist, change) {
-    var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;
-    rebaseHistArray(hist.done, from, to, diff);
-    rebaseHistArray(hist.undone, from, to, diff);
-  }
-
-  // EVENT OPERATORS
-
-  function stopMethod() {e_stop(this);}
-  // Ensure an event has a stop method.
-  function addStop(event) {
-    if (!event.stop) event.stop = stopMethod;
-    return event;
-  }
-
-  function e_preventDefault(e) {
-    if (e.preventDefault) e.preventDefault();
-    else e.returnValue = false;
-  }
-  function e_stopPropagation(e) {
-    if (e.stopPropagation) e.stopPropagation();
-    else e.cancelBubble = true;
-  }
-  function e_defaultPrevented(e) {
-    return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false;
-  }
-  function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}
-  CodeMirror.e_stop = e_stop;
-  CodeMirror.e_preventDefault = e_preventDefault;
-  CodeMirror.e_stopPropagation = e_stopPropagation;
-
-  function e_target(e) {return e.target || e.srcElement;}
-  function e_button(e) {
-    var b = e.which;
-    if (b == null) {
-      if (e.button & 1) b = 1;
-      else if (e.button & 2) b = 3;
-      else if (e.button & 4) b = 2;
-    }
-    if (mac && e.ctrlKey && b == 1) b = 3;
-    return b;
-  }
-
-  // EVENT HANDLING
-
-  function on(emitter, type, f) {
-    if (emitter.addEventListener)
-      emitter.addEventListener(type, f, false);
-    else if (emitter.attachEvent)
-      emitter.attachEvent("on" + type, f);
-    else {
-      var map = emitter._handlers || (emitter._handlers = {});
-      var arr = map[type] || (map[type] = []);
-      arr.push(f);
-    }
-  }
-
-  function off(emitter, type, f) {
-    if (emitter.removeEventListener)
-      emitter.removeEventListener(type, f, false);
-    else if (emitter.detachEvent)
-      emitter.detachEvent("on" + type, f);
-    else {
-      var arr = emitter._handlers && emitter._handlers[type];
-      if (!arr) return;
-      for (var i = 0; i < arr.length; ++i)
-        if (arr[i] == f) { arr.splice(i, 1); break; }
-    }
-  }
-
-  function signal(emitter, type /*, values...*/) {
-    var arr = emitter._handlers && emitter._handlers[type];
-    if (!arr) return;
-    var args = Array.prototype.slice.call(arguments, 2);
-    for (var i = 0; i < arr.length; ++i) arr[i].apply(null, args);
-  }
-
-  var delayedCallbacks, delayedCallbackDepth = 0;
-  function signalLater(emitter, type /*, values...*/) {
-    var arr = emitter._handlers && emitter._handlers[type];
-    if (!arr) return;
-    var args = Array.prototype.slice.call(arguments, 2);
-    if (!delayedCallbacks) {
-      ++delayedCallbackDepth;
-      delayedCallbacks = [];
-      setTimeout(fireDelayed, 0);
-    }
-    function bnd(f) {return function(){f.apply(null, args);};};
-    for (var i = 0; i < arr.length; ++i)
-      delayedCallbacks.push(bnd(arr[i]));
-  }
-
-  function signalDOMEvent(cm, e, override) {
-    signal(cm, override || e.type, cm, e);
-    return e_defaultPrevented(e) || e.codemirrorIgnore;
-  }
-
-  function fireDelayed() {
-    --delayedCallbackDepth;
-    var delayed = delayedCallbacks;
-    delayedCallbacks = null;
-    for (var i = 0; i < delayed.length; ++i) delayed[i]();
-  }
-
-  function hasHandler(emitter, type) {
-    var arr = emitter._handlers && emitter._handlers[type];
-    return arr && arr.length > 0;
-  }
-
-  CodeMirror.on = on; CodeMirror.off = off; CodeMirror.signal = signal;
-
-  function eventMixin(ctor) {
-    ctor.prototype.on = function(type, f) {on(this, type, f);};
-    ctor.prototype.off = function(type, f) {off(this, type, f);};
-  }
-
-  // MISC UTILITIES
-
-  // Number of pixels added to scroller and sizer to hide scrollbar
-  var scrollerCutOff = 30;
-
-  // Returned or thrown by various protocols to signal 'I'm not
-  // handling this'.
-  var Pass = CodeMirror.Pass = {toString: function(){return "CodeMirror.Pass";}};
-
-  function Delayed() {this.id = null;}
-  Delayed.prototype = {set: function(ms, f) {clearTimeout(this.id); this.id = setTimeout(f, ms);}};
-
-  // Counts the column offset in a string, taking tabs into account.
-  // Used mostly to find indentation.
-  function countColumn(string, end, tabSize, startIndex, startValue) {
-    if (end == null) {
-      end = string.search(/[^\s\u00a0]/);
-      if (end == -1) end = string.length;
-    }
-    for (var i = startIndex || 0, n = startValue || 0; i < end; ++i) {
-      if (string.charAt(i) == "\t") n += tabSize - (n % tabSize);
-      else ++n;
-    }
-    return n;
-  }
-  CodeMirror.countColumn = countColumn;
-
-  var spaceStrs = [""];
-  function spaceStr(n) {
-    while (spaceStrs.length <= n)
-      spaceStrs.push(lst(spaceStrs) + " ");
-    return spaceStrs[n];
-  }
-
-  function lst(arr) { return arr[arr.length-1]; }
-
-  function selectInput(node) {
-    if (ios) { // Mobile Safari apparently has a bug where select() is broken.
-      node.selectionStart = 0;
-      node.selectionEnd = node.value.length;
-    } else {
-      // Suppress mysterious IE10 errors
-      try { node.select(); }
-      catch(_e) {}
-    }
-  }
-
-  function indexOf(collection, elt) {
-    if (collection.indexOf) return collection.indexOf(elt);
-    for (var i = 0, e = collection.length; i < e; ++i)
-      if (collection[i] == elt) return i;
-    return -1;
-  }
-
-  function createObj(base, props) {
-    function Obj() {}
-    Obj.prototype = base;
-    var inst = new Obj();
-    if (props) copyObj(props, inst);
-    return inst;
-  }
-
-  function copyObj(obj, target) {
-    if (!target) target = {};
-    for (var prop in obj) if (obj.hasOwnProperty(prop)) target[prop] = obj[prop];
-    return target;
-  }
-
-  function emptyArray(size) {
-    for (var a = [], i = 0; i < size; ++i) a.push(undefined);
-    return a;
-  }
-
-  function bind(f) {
-    var args = Array.prototype.slice.call(arguments, 1);
-    return function(){return f.apply(null, args);};
-  }
-
-  var nonASCIISingleCaseWordChar = /[\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
-  function isWordChar(ch) {
-    return /\w/.test(ch) || ch > "\x80" &&
-      (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch));
-  }
-
-  function isEmpty(obj) {
-    for (var n in obj) if (obj.hasOwnProperty(n) && obj[n]) return false;
-    return true;
-  }
-
-  var isExtendingChar = /[\u0300-\u036F\u0483-\u0487\u0488-\u0489\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\uA66F\uA670-\uA672\uA674-\uA67D\uA69F\udc00-\udfff]/;
-
-  // DOM UTILITIES
-
-  function elt(tag, content, className, style) {
-    var e = document.createElement(tag);
-    if (className) e.className = className;
-    if (style) e.style.cssText = style;
-    if (typeof content == "string") setTextContent(e, content);
-    else if (content) for (var i = 0; i < content.length; ++i) e.appendChild(content[i]);
-    return e;
-  }
-
-  function removeChildren(e) {
-    for (var count = e.childNodes.length; count > 0; --count)
-      e.removeChild(e.firstChild);
-    return e;
-  }
-
-  function removeChildrenAndAdd(parent, e) {
-    return removeChildren(parent).appendChild(e);
-  }
-
-  function setTextContent(e, str) {
-    if (ie_lt9) {
-      e.innerHTML = "";
-      e.appendChild(document.createTextNode(str));
-    } else e.textContent = str;
-  }
-
-  function getRect(node) {
-    return node.getBoundingClientRect();
-  }
-  CodeMirror.replaceGetRect = function(f) { getRect = f; };
-
-  // FEATURE DETECTION
-
-  // Detect drag-and-drop
-  var dragAndDrop = function() {
-    // There is *some* kind of drag-and-drop support in IE6-8, but I
-    // couldn't get it to work yet.
-    if (ie_lt9) return false;
-    var div = elt('div');
-    return "draggable" in div || "dragDrop" in div;
-  }();
-
-  // For a reason I have yet to figure out, some browsers disallow
-  // word wrapping between certain characters *only* if a new inline
-  // element is started between them. This makes it hard to reliably
-  // measure the position of things, since that requires inserting an
-  // extra span. This terribly fragile set of tests matches the
-  // character combinations that suffer from this phenomenon on the
-  // various browsers.
-  function spanAffectsWrapping() { return false; }
-  if (gecko) // Only for "$'"
-    spanAffectsWrapping = function(str, i) {
-      return str.charCodeAt(i - 1) == 36 && str.charCodeAt(i) == 39;
-    };
-  else if (safari && !/Version\/([6-9]|\d\d)\b/.test(navigator.userAgent))
-    spanAffectsWrapping = function(str, i) {
-      return /\-[^ \-?]|\?[^ !\'\"\),.\-\/:;\?\]\}]/.test(str.slice(i - 1, i + 1));
-    };
-  else if (webkit && !/Chrome\/(?:29|[3-9]\d|\d\d\d)\./.test(navigator.userAgent))
-    spanAffectsWrapping = function(str, i) {
-      if (i > 1 && str.charCodeAt(i - 1) == 45) {
-        if (/\w/.test(str.charAt(i - 2)) && /[^\-?\.]/.test(str.charAt(i))) return true;
-        if (i > 2 && /[\d\.,]/.test(str.charAt(i - 2)) && /[\d\.,]/.test(str.charAt(i))) return false;
-      }
-      return /[~!#%&*)=+}\]|\"\.>,:;][({[<]|-[^\-?\.\u2010-\u201f\u2026]|\?[\w~`@#$%\^&*(_=+{[|><]|…[\w~`@#$%\^&*(_=+{[><]/.test(str.slice(i - 1, i + 1));
-    };
-
-  var knownScrollbarWidth;
-  function scrollbarWidth(measure) {
-    if (knownScrollbarWidth != null) return knownScrollbarWidth;
-    var test = elt("div", null, null, "width: 50px; height: 50px; overflow-x: scroll");
-    removeChildrenAndAdd(measure, test);
-    if (test.offsetWidth)
-      knownScrollbarWidth = test.offsetHeight - test.clientHeight;
-    return knownScrollbarWidth || 0;
-  }
-
-  var zwspSupported;
-  function zeroWidthElement(measure) {
-    if (zwspSupported == null) {
-      var test = elt("span", "\u200b");
-      removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")]));
-      if (measure.firstChild.offsetHeight != 0)
-        zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !ie_lt8;
-    }
-    if (zwspSupported) return elt("span", "\u200b");
-    else return elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px");
-  }
-
-  // See if "".split is the broken IE version, if so, provide an
-  // alternative way to split lines.
-  var splitLines = "\n\nb".split(/\n/).length != 3 ? function(string) {
-    var pos = 0, result = [], l = string.length;
-    while (pos <= l) {
-      var nl = string.indexOf("\n", pos);
-      if (nl == -1) nl = string.length;
-      var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl);
-      var rt = line.indexOf("\r");
-      if (rt != -1) {
-        result.push(line.slice(0, rt));
-        pos += rt + 1;
-      } else {
-        result.push(line);
-        pos = nl + 1;
-      }
-    }
-    return result;
-  } : function(string){return string.split(/\r\n?|\n/);};
-  CodeMirror.splitLines = splitLines;
-
-  var hasSelection = window.getSelection ? function(te) {
-    try { return te.selectionStart != te.selectionEnd; }
-    catch(e) { return false; }
-  } : function(te) {
-    try {var range = te.ownerDocument.selection.createRange();}
-    catch(e) {}
-    if (!range || range.parentElement() != te) return false;
-    return range.compareEndPoints("StartToEnd", range) != 0;
-  };
-
-  var hasCopyEvent = (function() {
-    var e = elt("div");
-    if ("oncopy" in e) return true;
-    e.setAttribute("oncopy", "return;");
-    return typeof e.oncopy == 'function';
-  })();
-
-  // KEY NAMING
-
-  var keyNames = {3: "Enter", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt",
-                  19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End",
-                  36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert",
-                  46: "Delete", 59: ";", 91: "Mod", 92: "Mod", 93: "Mod", 109: "-", 107: "=", 127: "Delete",
-                  186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\",
-                  221: "]", 222: "'", 63276: "PageUp", 63277: "PageDown", 63275: "End", 63273: "Home",
-                  63234: "Left", 63232: "Up", 63235: "Right", 63233: "Down", 63302: "Insert", 63272: "Delete"};
-  CodeMirror.keyNames = keyNames;
-  (function() {
-    // Number keys
-    for (var i = 0; i < 10; i++) keyNames[i + 48] = String(i);
-    // Alphabetic keys
-    for (var i = 65; i <= 90; i++) keyNames[i] = String.fromCharCode(i);
-    // Function keys
-    for (var i = 1; i <= 12; i++) keyNames[i + 111] = keyNames[i + 63235] = "F" + i;
-  })();
-
-  // BIDI HELPERS
-
-  function iterateBidiSections(order, from, to, f) {
-    if (!order) return f(from, to, "ltr");
-    var found = false;
-    for (var i = 0; i < order.length; ++i) {
-      var part = order[i];
-      if (part.from < to && part.to > from || from == to && part.to == from) {
-        f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr");
-        found = true;
-      }
-    }
-    if (!found) f(from, to, "ltr");
-  }
-
-  function bidiLeft(part) { return part.level % 2 ? part.to : part.from; }
-  function bidiRight(part) { return part.level % 2 ? part.from : part.to; }
-
-  function lineLeft(line) { var order = getOrder(line); return order ? bidiLeft(order[0]) : 0; }
-  function lineRight(line) {
-    var order = getOrder(line);
-    if (!order) return line.text.length;
-    return bidiRight(lst(order));
-  }
-
-  function lineStart(cm, lineN) {
-    var line = getLine(cm.doc, lineN);
-    var visual = visualLine(cm.doc, line);
-    if (visual != line) lineN = lineNo(visual);
-    var order = getOrder(visual);
-    var ch = !order ? 0 : order[0].level % 2 ? lineRight(visual) : lineLeft(visual);
-    return Pos(lineN, ch);
-  }
-  function lineEnd(cm, lineN) {
-    var merged, line;
-    while (merged = collapsedSpanAtEnd(line = getLine(cm.doc, lineN)))
-      lineN = merged.find().to.line;
-    var order = getOrder(line);
-    var ch = !order ? line.text.length : order[0].level % 2 ? lineLeft(line) : lineRight(line);
-    return Pos(lineN, ch);
-  }
-
-  function compareBidiLevel(order, a, b) {
-    var linedir = order[0].level;
-    if (a == linedir) return true;
-    if (b == linedir) return false;
-    return a < b;
-  }
-  var bidiOther;
-  function getBidiPartAt(order, pos) {
-    for (var i = 0, found; i < order.length; ++i) {
-      var cur = order[i];
-      if (cur.from < pos && cur.to > pos) { bidiOther = null; return i; }
-      if (cur.from == pos || cur.to == pos) {
-        if (found == null) {
-          found = i;
-        } else if (compareBidiLevel(order, cur.level, order[found].level)) {
-          bidiOther = found;
-          return i;
-        } else {
-          bidiOther = i;
-          return found;
-        }
-      }
-    }
-    bidiOther = null;
-    return found;
-  }
-
-  function moveInLine(line, pos, dir, byUnit) {
-    if (!byUnit) return pos + dir;
-    do pos += dir;
-    while (pos > 0 && isExtendingChar.test(line.text.charAt(pos)));
-    return pos;
-  }
-
-  // This is somewhat involved. It is needed in order to move
-  // 'visually' through bi-directional text -- i.e., pressing left
-  // should make the cursor go left, even when in RTL text. The
-  // tricky part is the 'jumps', where RTL and LTR text touch each
-  // other. This often requires the cursor offset to move more than
-  // one unit, in order to visually move one unit.
-  function moveVisually(line, start, dir, byUnit) {
-    var bidi = getOrder(line);
-    if (!bidi) return moveLogically(line, start, dir, byUnit);
-    var pos = getBidiPartAt(bidi, start), part = bidi[pos];
-    var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);
-
-    for (;;) {
-      if (target > part.from && target < part.to) return target;
-      if (target == part.from || target == part.to) {
-        if (getBidiPartAt(bidi, target) == pos) return target;
-        part = bidi[pos += dir];
-        return (dir > 0) == part.level % 2 ? part.to : part.from;
-      } else {
-        part = bidi[pos += dir];
-        if (!part) return null;
-        if ((dir > 0) == part.level % 2)
-          target = moveInLine(line, part.to, -1, byUnit);
-        else
-          target = moveInLine(line, part.from, 1, byUnit);
-      }
-    }
-  }
-
-  function moveLogically(line, start, dir, byUnit) {
-    var target = start + dir;
-    if (byUnit) while (target > 0 && isExtendingChar.test(line.text.charAt(target))) target += dir;
-    return target < 0 || target > line.text.length ? null : target;
-  }
-
-  // Bidirectional ordering algorithm
-  // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm
-  // that this (partially) implements.
-
-  // One-char codes used for character types:
-  // L (L):   Left-to-Right
-  // R (R):   Right-to-Left
-  // r (AL):  Right-to-Left Arabic
-  // 1 (EN):  European Number
-  // + (ES):  European Number Separator
-  // % (ET):  European Number Terminator
-  // n (AN):  Arabic Number
-  // , (CS):  Common Number Separator
-  // m (NSM): Non-Spacing Mark
-  // b (BN):  Boundary Neutral
-  // s (B):   Paragraph Separator
-  // t (S):   Segment Separator
-  // w (WS):  Whitespace
-  // N (ON):  Other Neutrals
-
-  // Returns null if characters are ordered as they appear
-  // (left-to-right), or an array of sections ({from, to, level}
-  // objects) in the order in which they occur visually.
-  var bidiOrdering = (function() {
-    // Character types for codepoints 0 to 0xff
-    var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL";
-    // Character types for codepoints 0x600 to 0x6ff
-    var arabicTypes = "rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmmrrrrrrrrrrrrrrrrrr";
-    function charType(code) {
-      if (code <= 0xff) return lowTypes.charAt(code);
-      else if (0x590 <= code && code <= 0x5f4) return "R";
-      else if (0x600 <= code && code <= 0x6ff) return arabicTypes.charAt(code - 0x600);
-      else if (0x700 <= code && code <= 0x8ac) return "r";
-      else return "L";
-    }
-
-    var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
-    var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;
-    // Browsers seem to always treat the boundaries of block elements as being L.
-    var outerType = "L";
-
-    return function(str) {
-      if (!bidiRE.test(str)) return false;
-      var len = str.length, types = [];
-      for (var i = 0, type; i < len; ++i)
-        types.push(type = charType(str.charCodeAt(i)));
-
-      // W1. Examine each non-spacing mark (NSM) in the level run, and
-      // change the type of the NSM to the type of the previous
-      // character. If the NSM is at the start of the level run, it will
-      // get the type of sor.
-      for (var i = 0, prev = outerType; i < len; ++i) {
-        var type = types[i];
-        if (type == "m") types[i] = prev;
-        else prev = type;
-      }
-
-      // W2. Search backwards from each instance of a European number
-      // until the first strong type (R, L, AL, or sor) is found. If an
-      // AL is found, change the type of the European number to Arabic
-      // number.
-      // W3. Change all ALs to R.
-      for (var i = 0, cur = outerType; i < len; ++i) {
-        var type = types[i];
-        if (type == "1" && cur == "r") types[i] = "n";
-        else if (isStrong.test(type)) { cur = type; if (type == "r") types[i] = "R"; }
-      }
-
-      // W4. A single European separator between two European numbers
-      // changes to a European number. A single common separator between
-      // two numbers of the same type changes to that type.
-      for (var i = 1, prev = types[0]; i < len - 1; ++i) {
-        var type = types[i];
-        if (type == "+" && prev == "1" && types[i+1] == "1") types[i] = "1";
-        else if (type == "," && prev == types[i+1] &&
-                 (prev == "1" || prev == "n")) types[i] = prev;
-        prev = type;
-      }
-
-      // W5. A sequence of European terminators adjacent to European
-      // numbers changes to all European numbers.
-      // W6. Otherwise, separators and terminators change to Other
-      // Neutral.
-      for (var i = 0; i < len; ++i) {
-        var type = types[i];
-        if (type == ",") types[i] = "N";
-        else if (type == "%") {
-          for (var end = i + 1; end < len && types[end] == "%"; ++end) {}
-          var replace = (i && types[i-1] == "!") || (end < len - 1 && types[end] == "1") ? "1" : "N";
-          for (var j = i; j < end; ++j) types[j] = replace;
-          i = end - 1;
-        }
-      }
-
-      // W7. Search backwards from each instance of a European number
-      // until the first strong type (R, L, or sor) is found. If an L is
-      // found, then change the type of the European number to L.
-      for (var i = 0, cur = outerType; i < len; ++i) {
-        var type = types[i];
-        if (cur == "L" && type == "1") types[i] = "L";
-        else if (isStrong.test(type)) cur = type;
-      }
-
-      // N1. A sequence of neutrals takes the direction of the
-      // surrounding strong text if the text on both sides has the same
-      // direction. European and Arabic numbers act as if they were R in
-      // terms of their influence on neutrals. Start-of-level-run (sor)
-      // and end-of-level-run (eor) are used at level run boundaries.
-      // N2. Any remaining neutrals take the embedding direction.
-      for (var i = 0; i < len; ++i) {
-        if (isNeutral.test(types[i])) {
-          for (var end = i + 1; end < len && isNeutral.test(types[end]); ++end) {}
-          var before = (i ? types[i-1] : outerType) == "L";
-          var after = (end < len - 1 ? types[end] : outerType) == "L";
-          var replace = before || after ? "L" : "R";
-          for (var j = i; j < end; ++j) types[j] = replace;
-          i = end - 1;
-        }
-      }
-
-      // Here we depart from the documented algorithm, in order to avoid
-      // building up an actual levels array. Since there are only three
-      // levels (0, 1, 2) in an implementation that doesn't take
-      // explicit embedding into account, we can build up the order on
-      // the fly, without following the level-based algorithm.
-      var order = [], m;
-      for (var i = 0; i < len;) {
-        if (countsAsLeft.test(types[i])) {
-          var start = i;
-          for (++i; i < len && countsAsLeft.test(types[i]); ++i) {}
-          order.push({from: start, to: i, level: 0});
-        } else {
-          var pos = i, at = order.length;
-          for (++i; i < len && types[i] != "L"; ++i) {}
-          for (var j = pos; j < i;) {
-            if (countsAsNum.test(types[j])) {
-              if (pos < j) order.splice(at, 0, {from: pos, to: j, level: 1});
-              var nstart = j;
-              for (++j; j < i && countsAsNum.test(types[j]); ++j) {}
-              order.splice(at, 0, {from: nstart, to: j, level: 2});
-              pos = j;
-            } else ++j;
-          }
-          if (pos < i) order.splice(at, 0, {from: pos, to: i, level: 1});
-        }
-      }
-      if (order[0].level == 1 && (m = str.match(/^\s+/))) {
-        order[0].from = m[0].length;
-        order.unshift({from: 0, to: m[0].length, level: 0});
-      }
-      if (lst(order).level == 1 && (m = str.match(/\s+$/))) {
-        lst(order).to -= m[0].length;
-        order.push({from: len - m[0].length, to: len, level: 0});
-      }
-      if (order[0].level != lst(order).level)
-        order.push({from: len, to: len, level: order[0].level});
-
-      return order;
-    };
-  })();
-
-  // THE END
-
-  CodeMirror.version = "3.15.0";
-
-  return CodeMirror;
-})();
diff --git a/public/js/lib/codemirror-accessible/codemirror-accessible2.js b/public/js/lib/codemirror-accessible/codemirror-accessible2.js
deleted file mode 100755
index 10b21ae..0000000
--- a/public/js/lib/codemirror-accessible/codemirror-accessible2.js
+++ /dev/null
@@ -1,5848 +0,0 @@
-// CodeMirror version 3.15
-//
-// CodeMirror is the only global var we claim
-window.CodeMirrorOriginal = (function() {
-  "use strict";
-
-  // BROWSER SNIFFING
-
-  // Crude, but necessary to handle a number of hard-to-feature-detect
-  // bugs and behavior differences.
-  var gecko = /gecko\/\d/i.test(navigator.userAgent);
-  var ie = /MSIE \d/.test(navigator.userAgent);
-  var ie_lt8 = ie && (document.documentMode == null || document.documentMode < 8);
-  var ie_lt9 = ie && (document.documentMode == null || document.documentMode < 9);
-  var webkit = /WebKit\//.test(navigator.userAgent);
-  var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(navigator.userAgent);
-  var chrome = /Chrome\//.test(navigator.userAgent);
-  var opera = /Opera\//.test(navigator.userAgent);
-  var safari = /Apple Computer/.test(navigator.vendor);
-  var khtml = /KHTML\//.test(navigator.userAgent);
-  var mac_geLion = /Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent);
-  var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent);
-  var phantom = /PhantomJS/.test(navigator.userAgent);
-
-  var ios = /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent);
-  // This is woefully incomplete. Suggestions for alternative methods welcome.
-  var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent);
-  var mac = ios || /Mac/.test(navigator.platform);
-  var windows = /windows/i.test(navigator.platform);
-
-  var opera_version = opera && navigator.userAgent.match(/Version\/(\d*\.\d*)/);
-  if (opera_version) opera_version = Number(opera_version[1]);
-  if (opera_version && opera_version >= 15) { opera = false; webkit = true; }
-  // Some browsers use the wrong event properties to signal cmd/ctrl on OS X
-  var flipCtrlCmd = mac && (qtwebkit || opera && (opera_version == null || opera_version < 12.11));
-  var captureMiddleClick = gecko || (ie && !ie_lt9);
-
-  // Optimize some code when these features are not used
-  var sawReadOnlySpans = false, sawCollapsedSpans = false;
-
-  // CONSTRUCTOR
-
-  function CodeMirror(place, options) {
-    if (!(this instanceof CodeMirror)) return new CodeMirror(place, options);
-
-    this.options = options = options || {};
-    // Determine effective options based on given values and defaults.
-    for (var opt in defaults) if (!options.hasOwnProperty(opt) && defaults.hasOwnProperty(opt))
-      options[opt] = defaults[opt];
-    setGuttersForLineNumbers(options);
-
-    var docStart = typeof options.value == "string" ? 0 : options.value.first;
-    var display = this.display = makeDisplay(place, docStart);
-    display.wrapper.CodeMirror = this;
-    updateGutters(this);
-    if (options.autofocus && !mobile) focusInput(this);
-
-    this.state = {keyMaps: [],
-                  overlays: [],
-                  modeGen: 0,
-                  overwrite: false, focused: false,
-                  suppressEdits: false, pasteIncoming: false,
-                  draggingText: false,
-                  highlight: new Delayed()};
-
-    themeChanged(this);
-    if (options.lineWrapping)
-      this.display.wrapper.className += " CodeMirror-wrap";
-
-    var doc = options.value;
-    if (typeof doc == "string") doc = new Doc(options.value, options.mode);
-    operation(this, attachDoc)(this, doc);
-
-    // Override magic textarea content restore that IE sometimes does
-    // on our hidden textarea on reload
-    if (ie) setTimeout(bind(resetInput, this, true), 20);
-
-    registerEventHandlers(this);
-    // IE throws unspecified error in certain cases, when
-    // trying to access activeElement before onload
-    var hasFocus; try { hasFocus = (document.activeElement == display.input); } catch(e) { }
-    if (hasFocus || (options.autofocus && !mobile)) setTimeout(bind(onFocus, this), 20);
-    else onBlur(this);
-
-    operation(this, function() {
-      for (var opt in optionHandlers)
-        if (optionHandlers.propertyIsEnumerable(opt))
-          optionHandlers[opt](this, options[opt], Init);
-      for (var i = 0; i < initHooks.length; ++i) initHooks[i](this);
-    })();
-  }
-
-  // DISPLAY CONSTRUCTOR
-
-  function makeDisplay(place, docStart) {
-    var d = {};
-
-    var input = d.input = elt("textarea", null, null, "position: absolute; padding: 0; width: 1px; height: 1em; outline: none; font-size: 4px;");
-    if (webkit) input.style.width = "1000px";
-    else input.setAttribute("wrap", "off");
-    // if border: 0; -- iOS fails to open keyboard (issue #1287)
-    if (ios) input.style.border = "1px solid black";
-    input.setAttribute("autocorrect", "off"); input.setAttribute("autocapitalize", "off"); input.setAttribute("spellcheck", "false");
-
-    // Wraps and hides input textarea
-    d.inputDiv = elt("div", [input], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
-    // The actual fake scrollbars.
-    d.scrollbarH = elt("div", [elt("div", null, null, "height: 1px")], "CodeMirror-hscrollbar");
-    d.scrollbarV = elt("div", [elt("div", null, null, "width: 1px")], "CodeMirror-vscrollbar");
-    d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler");
-    d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler");
-    // DIVs containing the selection and the actual code
-    d.lineDiv = elt("div", null, "CodeMirror-code");
-    d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1");
-    // Blinky cursor, and element used to ensure cursor fits at the end of a line
-    d.cursor = elt("div", "\u00a0", "CodeMirror-cursor");
-    // Secondary cursor, shown when on a 'jump' in bi-directional text
-    d.otherCursor = elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor");
-    // Used to measure text size
-    d.measure = elt("div", null, "CodeMirror-measure");
-    // Wraps everything that needs to exist inside the vertically-padded coordinate system
-    d.lineSpace = elt("div", [d.measure, d.selectionDiv, d.lineDiv, d.cursor, d.otherCursor],
-                         null, "position: relative; outline: none");
-    // Moved around its parent to cover visible view
-    d.mover = elt("div", [elt("div", [d.lineSpace], "CodeMirror-lines")], null, "position: relative");
-    // Set to the height of the text, causes scrolling
-    d.sizer = elt("div", [d.mover], "CodeMirror-sizer");
-    // D is needed because behavior of elts with overflow: auto and padding is inconsistent across browsers
-    d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerCutOff + "px; width: 1px;");
-    // Will contain the gutters, if any
-    d.gutters = elt("div", null, "CodeMirror-gutters");
-    d.lineGutter = null;
-    // Provides scrolling
-    d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll");
-    d.scroller.setAttribute("tabIndex", "-1");
-    // The element in which the editor lives.
-    d.wrapper = elt("div", [d.inputDiv, d.scrollbarH, d.scrollbarV,
-                            d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror");
-    // Work around IE7 z-index bug
-    if (ie_lt8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }
-    if (place.appendChild) place.appendChild(d.wrapper); else place(d.wrapper);
-
-    // Needed to hide big blue blinking cursor on Mobile Safari
-    if (ios) input.style.width = "0px";
-    if (!webkit) d.scroller.draggable = true;
-    // Needed to handle Tab key in KHTML
-    if (khtml) { d.inputDiv.style.height = "1px"; d.inputDiv.style.position = "absolute"; }
-    // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).
-    else if (ie_lt8) d.scrollbarH.style.minWidth = d.scrollbarV.style.minWidth = "18px";
-
-    // Current visible range (may be bigger than the view window).
-    d.viewOffset = d.lastSizeC = 0;
-    d.showingFrom = d.showingTo = docStart;
-
-    // Used to only resize the line number gutter when necessary (when
-    // the amount of lines crosses a boundary that makes its width change)
-    d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;
-    // See readInput and resetInput
-    d.prevInput = "";
-    // Set to true when a non-horizontal-scrolling widget is added. As
-    // an optimization, widget aligning is skipped when d is false.
-    d.alignWidgets = false;
-    // Flag that indicates whether we currently expect input to appear
-    // (after some event like 'keypress' or 'input') and are polling
-    // intensively.
-    d.pollingFast = false;
-    // Self-resetting timeout for the poller
-    d.poll = new Delayed();
-
-    d.cachedCharWidth = d.cachedTextHeight = null;
-    d.measureLineCache = [];
-    d.measureLineCachePos = 0;
-
-    // Tracks when resetInput has punted to just putting a short
-    // string instead of the (large) selection.
-    d.inaccurateSelection = false;
-
-    // Tracks the maximum line length so that the horizontal scrollbar
-    // can be kept static when scrolling.
-    d.maxLine = null;
-    d.maxLineLength = 0;
-    d.maxLineChanged = false;
-
-    // Used for measuring wheel scrolling granularity
-    d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;
-
-    return d;
-  }
-
-  // STATE UPDATES
-
-  // Used to get the editor into a consistent state again when options change.
-
-  function loadMode(cm) {
-    cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption);
-    cm.doc.iter(function(line) {
-      if (line.stateAfter) line.stateAfter = null;
-      if (line.styles) line.styles = null;
-    });
-    cm.doc.frontier = cm.doc.first;
-    startWorker(cm, 100);
-    cm.state.modeGen++;
-    if (cm.curOp) regChange(cm);
-  }
-
-  function wrappingChanged(cm) {
-    if (cm.options.lineWrapping) {
-      cm.display.wrapper.className += " CodeMirror-wrap";
-      cm.display.sizer.style.minWidth = "";
-    } else {
-      cm.display.wrapper.className = cm.display.wrapper.className.replace(" CodeMirror-wrap", "");
-      computeMaxLength(cm);
-    }
-    estimateLineHeights(cm);
-    regChange(cm);
-    clearCaches(cm);
-    setTimeout(function(){updateScrollbars(cm);}, 100);
-  }
-
-  function estimateHeight(cm) {
-    var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;
-    var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);
-    return function(line) {
-      if (lineIsHidden(cm.doc, line))
-        return 0;
-      else if (wrapping)
-        return (Math.ceil(line.text.length / perLine) || 1) * th;
-      else
-        return th;
-    };
-  }
-
-  function estimateLineHeights(cm) {
-    var doc = cm.doc, est = estimateHeight(cm);
-    doc.iter(function(line) {
-      var estHeight = est(line);
-      if (estHeight != line.height) updateLineHeight(line, estHeight);
-    });
-  }
-
-  function keyMapChanged(cm) {
-    var map = keyMap[cm.options.keyMap], style = map.style;
-    cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-keymap-\S+/g, "") +
-      (style ? " cm-keymap-" + style : "");
-    cm.state.disableInput = map.disableInput;
-  }
-
-  function themeChanged(cm) {
-    cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") +
-      cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-");
-    clearCaches(cm);
-  }
-
-  function guttersChanged(cm) {
-    updateGutters(cm);
-    regChange(cm);
-    setTimeout(function(){alignHorizontally(cm);}, 20);
-  }
-
-  function updateGutters(cm) {
-    var gutters = cm.display.gutters, specs = cm.options.gutters;
-    removeChildren(gutters);
-    for (var i = 0; i < specs.length; ++i) {
-      var gutterClass = specs[i];
-      var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + gutterClass));
-      if (gutterClass == "CodeMirror-linenumbers") {
-        cm.display.lineGutter = gElt;
-        gElt.style.width = (cm.display.lineNumWidth || 1) + "px";
-      }
-    }
-    gutters.style.display = i ? "" : "none";
-  }
-
-  function lineLength(doc, line) {
-    if (line.height == 0) return 0;
-    var len = line.text.length, merged, cur = line;
-    while (merged = collapsedSpanAtStart(cur)) {
-      var found = merged.find();
-      cur = getLine(doc, found.from.line);
-      len += found.from.ch - found.to.ch;
-    }
-    cur = line;
-    while (merged = collapsedSpanAtEnd(cur)) {
-      var found = merged.find();
-      len -= cur.text.length - found.from.ch;
-      cur = getLine(doc, found.to.line);
-      len += cur.text.length - found.to.ch;
-    }
-    return len;
-  }
-
-  function computeMaxLength(cm) {
-    var d = cm.display, doc = cm.doc;
-    d.maxLine = getLine(doc, doc.first);
-    d.maxLineLength = lineLength(doc, d.maxLine);
-    d.maxLineChanged = true;
-    doc.iter(function(line) {
-      var len = lineLength(doc, line);
-      if (len > d.maxLineLength) {
-        d.maxLineLength = len;
-        d.maxLine = line;
-      }
-    });
-  }
-
-  // Make sure the gutters options contains the element
-  // "CodeMirror-linenumbers" when the lineNumbers option is true.
-  function setGuttersForLineNumbers(options) {
-    var found = false;
-    for (var i = 0; i < options.gutters.length; ++i) {
-      if (options.gutters[i] == "CodeMirror-linenumbers") {
-        if (options.lineNumbers) found = true;
-        else options.gutters.splice(i--, 1);
-      }
-    }
-    if (!found && options.lineNumbers)
-      options.gutters.push("CodeMirror-linenumbers");
-  }
-
-  // SCROLLBARS
-
-  // Re-synchronize the fake scrollbars with the actual size of the
-  // content. Optionally force a scrollTop.
-  function updateScrollbars(cm) {
-    var d = cm.display, docHeight = cm.doc.height;
-    var totalHeight = docHeight + paddingVert(d);
-    d.sizer.style.minHeight = d.heightForcer.style.top = totalHeight + "px";
-    d.gutters.style.height = Math.max(totalHeight, d.scroller.clientHeight - scrollerCutOff) + "px";
-    var scrollHeight = Math.max(totalHeight, d.scroller.scrollHeight);
-    var needsH = d.scroller.scrollWidth > (d.scroller.clientWidth + 1);
-    var needsV = scrollHeight > (d.scroller.clientHeight + 1);
-    if (needsV) {
-      d.scrollbarV.style.display = "block";
-      d.scrollbarV.style.bottom = needsH ? scrollbarWidth(d.measure) + "px" : "0";
-      d.scrollbarV.firstChild.style.height =
-        (scrollHeight - d.scroller.clientHeight + d.scrollbarV.clientHeight) + "px";
-    } else d.scrollbarV.style.display = "";
-    if (needsH) {
-      d.scrollbarH.style.display = "block";
-      d.scrollbarH.style.right = needsV ? scrollbarWidth(d.measure) + "px" : "0";
-      d.scrollbarH.firstChild.style.width =
-        (d.scroller.scrollWidth - d.scroller.clientWidth + d.scrollbarH.clientWidth) + "px";
-    } else d.scrollbarH.style.display = "";
-    if (needsH && needsV) {
-      d.scrollbarFiller.style.display = "block";
-      d.scrollbarFiller.style.height = d.scrollbarFiller.style.width = scrollbarWidth(d.measure) + "px";
-    } else d.scrollbarFiller.style.display = "";
-    if (needsH && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {
-      d.gutterFiller.style.display = "block";
-      d.gutterFiller.style.height = scrollbarWidth(d.measure) + "px";
-      d.gutterFiller.style.width = d.gutters.offsetWidth + "px";
-    } else d.gutterFiller.style.display = "";
-
-    if (mac_geLion && scrollbarWidth(d.measure) === 0)
-      d.scrollbarV.style.minWidth = d.scrollbarH.style.minHeight = mac_geMountainLion ? "18px" : "12px";
-  }
-
-  function visibleLines(display, doc, viewPort) {
-    var top = display.scroller.scrollTop, height = display.wrapper.clientHeight;
-    if (typeof viewPort == "number") top = viewPort;
-    else if (viewPort) {top = viewPort.top; height = viewPort.bottom - viewPort.top;}
-    top = Math.floor(top - paddingTop(display));
-    var bottom = Math.ceil(top + height);
-    return {from: lineAtHeight(doc, top), to: lineAtHeight(doc, bottom)};
-  }
-
-  // LINE NUMBERS
-
-  function alignHorizontally(cm) {
-    var display = cm.display;
-    if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) return;
-    var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;
-    var gutterW = display.gutters.offsetWidth, l = comp + "px";
-    for (var n = display.lineDiv.firstChild; n; n = n.nextSibling) if (n.alignable) {
-      for (var i = 0, a = n.alignable; i < a.length; ++i) a[i].style.left = l;
-    }
-    if (cm.options.fixedGutter)
-      display.gutters.style.left = (comp + gutterW) + "px";
-  }
-
-  function maybeUpdateLineNumberWidth(cm) {
-    if (!cm.options.lineNumbers) return false;
-    var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;
-    if (last.length != display.lineNumChars) {
-      var test = display.measure.appendChild(elt("div", [elt("div", last)],
-                                                 "CodeMirror-linenumber CodeMirror-gutter-elt"));
-      var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;
-      display.lineGutter.style.width = "";
-      display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding);
-      display.lineNumWidth = display.lineNumInnerWidth + padding;
-      display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;
-      display.lineGutter.style.width = display.lineNumWidth + "px";
-      return true;
-    }
-    return false;
-  }
-
-  function lineNumberFor(options, i) {
-    return String(options.lineNumberFormatter(i + options.firstLineNumber));
-  }
-  function compensateForHScroll(display) {
-    return getRect(display.scroller).left - getRect(display.sizer).left;
-  }
-
-  // DISPLAY DRAWING
-
-  function updateDisplay(cm, changes, viewPort, forced) {
-    var oldFrom = cm.display.showingFrom, oldTo = cm.display.showingTo, updated;
-    var visible = visibleLines(cm.display, cm.doc, viewPort);
-    for (;;) {
-      if (!updateDisplayInner(cm, changes, visible, forced)) break;
-      forced = false;
-      updated = true;
-      updateSelection(cm);
-      updateScrollbars(cm);
-
-      // Clip forced viewport to actual scrollable area
-      if (viewPort)
-        viewPort = Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight,
-                            typeof viewPort == "number" ? viewPort : viewPort.top);
-      visible = visibleLines(cm.display, cm.doc, viewPort);
-      if (visible.from >= cm.display.showingFrom && visible.to <= cm.display.showingTo)
-        break;
-      changes = [];
-    }
-
-    if (updated) {
-      signalLater(cm, "update", cm);
-      if (cm.display.showingFrom != oldFrom || cm.display.showingTo != oldTo)
-        signalLater(cm, "viewportChange", cm, cm.display.showingFrom, cm.display.showingTo);
-    }
-    return updated;
-  }
-
-  // Uses a set of changes plus the current scroll position to
-  // determine which DOM updates have to be made, and makes the
-  // updates.
-  function updateDisplayInner(cm, changes, visible, forced) {
-    var display = cm.display, doc = cm.doc;
-    if (!display.wrapper.clientWidth) {
-      display.showingFrom = display.showingTo = doc.first;
-      display.viewOffset = 0;
-      return;
-    }
-
-    // Bail out if the visible area is already rendered and nothing changed.
-    if (!forced && changes.length == 0 &&
-        visible.from > display.showingFrom && visible.to < display.showingTo)
-      return;
-
-    if (maybeUpdateLineNumberWidth(cm))
-      changes = [{from: doc.first, to: doc.first + doc.size}];
-    var gutterW = display.sizer.style.marginLeft = display.gutters.offsetWidth + "px";
-    display.scrollbarH.style.left = cm.options.fixedGutter ? gutterW : "0";
-
-    // Used to determine which lines need their line numbers updated
-    var positionsChangedFrom = Infinity;
-    if (cm.options.lineNumbers)
-      for (var i = 0; i < changes.length; ++i)
-        if (changes[i].diff) { positionsChangedFrom = changes[i].from; break; }
-
-    var end = doc.first + doc.size;
-    var from = Math.max(visible.from - cm.options.viewportMargin, doc.first);
-    var to = Math.min(end, visible.to + cm.options.viewportMargin);
-    if (display.showingFrom < from && from - display.showingFrom < 20) from = Math.max(doc.first, display.showingFrom);
-    if (display.showingTo > to && display.showingTo - to < 20) to = Math.min(end, display.showingTo);
-    if (sawCollapsedSpans) {
-      from = lineNo(visualLine(doc, getLine(doc, from)));
-      while (to < end && lineIsHidden(doc, getLine(doc, to))) ++to;
-    }
-
-    // Create a range of theoretically intact lines, and punch holes
-    // in that using the change info.
-    var intact = [{from: Math.max(display.showingFrom, doc.first),
-                   to: Math.min(display.showingTo, end)}];
-    if (intact[0].from >= intact[0].to) intact = [];
-    else intact = computeIntact(intact, changes);
-    // When merged lines are present, we might have to reduce the
-    // intact ranges because changes in continued fragments of the
-    // intact lines do require the lines to be redrawn.
-    if (sawCollapsedSpans)
-      for (var i = 0; i < intact.length; ++i) {
-        var range = intact[i], merged;
-        while (merged = collapsedSpanAtEnd(getLine(doc, range.to - 1))) {
-          var newTo = merged.find().from.line;
-          if (newTo > range.from) range.to = newTo;
-          else { intact.splice(i--, 1); break; }
-        }
-      }
-
-    // Clip off the parts that won't be visible
-    var intactLines = 0;
-    for (var i = 0; i < intact.length; ++i) {
-      var range = intact[i];
-      if (range.from < from) range.from = from;
-      if (range.to > to) range.to = to;
-      if (range.from >= range.to) intact.splice(i--, 1);
-      else intactLines += range.to - range.from;
-    }
-    if (!forced && intactLines == to - from && from == display.showingFrom && to == display.showingTo) {
-      updateViewOffset(cm);
-      return;
-    }
-    intact.sort(function(a, b) {return a.from - b.from;});
-
-    // Avoid crashing on IE's "unspecified error" when in iframes
-    try {
-      var focused = document.activeElement;
-    } catch(e) {}
-    if (intactLines < (to - from) * .7) display.lineDiv.style.display = "none";
-    patchDisplay(cm, from, to, intact, positionsChangedFrom);
-    display.lineDiv.style.display = "";
-    if (focused && document.activeElement != focused && focused.offsetHeight) focused.focus();
-
-    var different = from != display.showingFrom || to != display.showingTo ||
-      display.lastSizeC != display.wrapper.clientHeight;
-    // This is just a bogus formula that detects when the editor is
-    // resized or the font size changes.
-    if (different) {
-      display.lastSizeC = display.wrapper.clientHeight;
-      startWorker(cm, 400);
-    }
-    display.showingFrom = from; display.showingTo = to;
-
-    updateHeightsInViewport(cm);
-    updateViewOffset(cm);
-
-    return true;
-  }
-
-  function updateHeightsInViewport(cm) {
-    var display = cm.display;
-    var prevBottom = display.lineDiv.offsetTop;
-    for (var node = display.lineDiv.firstChild, height; node; node = node.nextSibling) if (node.lineObj) {
-      if (ie_lt8) {
-        var bot = node.offsetTop + node.offsetHeight;
-        height = bot - prevBottom;
-        prevBottom = bot;
-      } else {
-        var box = getRect(node);
-        height = box.bottom - box.top;
-      }
-      var diff = node.lineObj.height - height;
-      if (height < 2) height = textHeight(display);
-      if (diff > .001 || diff < -.001) {
-        updateLineHeight(node.lineObj, height);
-        var widgets = node.lineObj.widgets;
-        if (widgets) for (var i = 0; i < widgets.length; ++i)
-          widgets[i].height = widgets[i].node.offsetHeight;
-      }
-    }
-  }
-
-  function updateViewOffset(cm) {
-    var off = cm.display.viewOffset = heightAtLine(cm, getLine(cm.doc, cm.display.showingFrom));
-    // Position the mover div to align with the current virtual scroll position
-    cm.display.mover.style.top = off + "px";
-  }
-
-  function computeIntact(intact, changes) {
-    for (var i = 0, l = changes.length || 0; i < l; ++i) {
-      var change = changes[i], intact2 = [], diff = change.diff || 0;
-      for (var j = 0, l2 = intact.length; j < l2; ++j) {
-        var range = intact[j];
-        if (change.to <= range.from && change.diff) {
-          intact2.push({from: range.from + diff, to: range.to + diff});
-        } else if (change.to <= range.from || change.from >= range.to) {
-          intact2.push(range);
-        } else {
-          if (change.from > range.from)
-            intact2.push({from: range.from, to: change.from});
-          if (change.to < range.to)
-            intact2.push({from: change.to + diff, to: range.to + diff});
-        }
-      }
-      intact = intact2;
-    }
-    return intact;
-  }
-
-  function getDimensions(cm) {
-    var d = cm.display, left = {}, width = {};
-    for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {
-      left[cm.options.gutters[i]] = n.offsetLeft;
-      width[cm.options.gutters[i]] = n.offsetWidth;
-    }
-    return {fixedPos: compensateForHScroll(d),
-            gutterTotalWidth: d.gutters.offsetWidth,
-            gutterLeft: left,
-            gutterWidth: width,
-            wrapperWidth: d.wrapper.clientWidth};
-  }
-
-  function patchDisplay(cm, from, to, intact, updateNumbersFrom) {
-    var dims = getDimensions(cm);
-    var display = cm.display, lineNumbers = cm.options.lineNumbers;
-    if (!intact.length && (!webkit || !cm.display.currentWheelTarget))
-      removeChildren(display.lineDiv);
-    var container = display.lineDiv, cur = container.firstChild;
-
-    function rm(node) {
-      var next = node.nextSibling;
-      if (webkit && mac && cm.display.currentWheelTarget == node) {
-        node.style.display = "none";
-        node.lineObj = null;
-      } else {
-        node.parentNode.removeChild(node);
-      }
-      return next;
-    }
-
-    var nextIntact = intact.shift(), lineN = from;
-    cm.doc.iter(from, to, function(line) {
-      if (nextIntact && nextIntact.to == lineN) nextIntact = intact.shift();
-      if (lineIsHidden(cm.doc, line)) {
-        if (line.height != 0) updateLineHeight(line, 0);
-        if (line.widgets && cur.previousSibling) for (var i = 0; i < line.widgets.length; ++i) {
-          var w = line.widgets[i];
-          if (w.showIfHidden) {
-            var prev = cur.previousSibling;
-            if (/pre/i.test(prev.nodeName)) {
-              var wrap = elt("div", null, null, "position: relative");
-              prev.parentNode.replaceChild(wrap, prev);
-              wrap.appendChild(prev);
-              prev = wrap;
-            }
-            var wnode = prev.appendChild(elt("div", [w.node], "CodeMirror-linewidget"));
-            if (!w.handleMouseEvents) wnode.ignoreEvents = true;
-            positionLineWidget(w, wnode, prev, dims);
-          }
-        }
-      } else if (nextIntact && nextIntact.from <= lineN && nextIntact.to > lineN) {
-        // This line is intact. Skip to the actual node. Update its
-        // line number if needed.
-        while (cur.lineObj != line) cur = rm(cur);
-        if (lineNumbers && updateNumbersFrom <= lineN && cur.lineNumber)
-          setTextContent(cur.lineNumber, lineNumberFor(cm.options, lineN));
-        cur = cur.nextSibling;
-      } else {
-        // For lines with widgets, make an attempt to find and reuse
-        // the existing element, so that widgets aren't needlessly
-        // removed and re-inserted into the dom
-        if (line.widgets) for (var j = 0, search = cur, reuse; search && j < 20; ++j, search = search.nextSibling)
-          if (search.lineObj == line && /div/i.test(search.nodeName)) { reuse = search; break; }
-        // This line needs to be generated.
-        var lineNode = buildLineElement(cm, line, lineN, dims, reuse);
-        if (lineNode != reuse) {
-          container.insertBefore(lineNode, cur);
-        } else {
-          while (cur != reuse) cur = rm(cur);
-          cur = cur.nextSibling;
-        }
-
-        lineNode.lineObj = line;
-      }
-      ++lineN;
-    });
-    while (cur) cur = rm(cur);
-  }
-
-  function buildLineElement(cm, line, lineNo, dims, reuse) {
-    var lineElement = lineContent(cm, line);
-    var markers = line.gutterMarkers, display = cm.display, wrap;
-
-    if (!cm.options.lineNumbers && !markers && !line.bgClass && !line.wrapClass && !line.widgets)
-      return lineElement;
-
-    // Lines with gutter elements, widgets or a background class need
-    // to be wrapped again, and have the extra elements added to the
-    // wrapper div
-
-    if (reuse) {
-      reuse.alignable = null;
-      var isOk = true, widgetsSeen = 0, insertBefore = null;
-      for (var n = reuse.firstChild, next; n; n = next) {
-        next = n.nextSibling;
-        if (!/\bCodeMirror-linewidget\b/.test(n.className)) {
-          reuse.removeChild(n);
-        } else {
-          for (var i = 0; i < line.widgets.length; ++i) {
-            var widget = line.widgets[i];
-            if (widget.node == n.firstChild) {
-              if (!widget.above && !insertBefore) insertBefore = n;
-              positionLineWidget(widget, n, reuse, dims);
-              ++widgetsSeen;
-              break;
-            }
-          }
-          if (i == line.widgets.length) { isOk = false; break; }
-        }
-      }
-      reuse.insertBefore(lineElement, insertBefore);
-      if (isOk && widgetsSeen == line.widgets.length) {
-        wrap = reuse;
-        reuse.className = line.wrapClass || "";
-      }
-    }
-    if (!wrap) {
-      wrap = elt("div", null, line.wrapClass, "position: relative");
-      wrap.appendChild(lineElement);
-    }
-    // Kludge to make sure the styled element lies behind the selection (by z-index)
-    if (line.bgClass)
-      wrap.insertBefore(elt("div", null, line.bgClass + " CodeMirror-linebackground"), wrap.firstChild);
-    if (cm.options.lineNumbers || markers) {
-      var gutterWrap = wrap.insertBefore(elt("div", null, null, "position: absolute; left: " +
-                                             (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px"),
-                                         wrap.firstChild);
-      if (cm.options.fixedGutter) (wrap.alignable || (wrap.alignable = [])).push(gutterWrap);
-      if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"]))
-        wrap.lineNumber = gutterWrap.appendChild(
-          elt("div", lineNumberFor(cm.options, lineNo),
-              "CodeMirror-linenumber CodeMirror-gutter-elt",
-              "left: " + dims.gutterLeft["CodeMirror-linenumbers"] + "px; width: "
-              + display.lineNumInnerWidth + "px"));
-      if (markers)
-        for (var k = 0; k < cm.options.gutters.length; ++k) {
-          var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id];
-          if (found)
-            gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt", "left: " +
-                                       dims.gutterLeft[id] + "px; width: " + dims.gutterWidth[id] + "px"));
-        }
-    }
-    if (ie_lt8) wrap.style.zIndex = 2;
-    if (line.widgets && wrap != reuse) for (var i = 0, ws = line.widgets; i < ws.length; ++i) {
-      var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget");
-      if (!widget.handleMouseEvents) node.ignoreEvents = true;
-      positionLineWidget(widget, node, wrap, dims);
-      if (widget.above)
-        wrap.insertBefore(node, cm.options.lineNumbers && line.height != 0 ? gutterWrap : lineElement);
-      else
-        wrap.appendChild(node);
-      signalLater(widget, "redraw");
-    }
-    return wrap;
-  }
-
-  function positionLineWidget(widget, node, wrap, dims) {
-    if (widget.noHScroll) {
-      (wrap.alignable || (wrap.alignable = [])).push(node);
-      var width = dims.wrapperWidth;
-      node.style.left = dims.fixedPos + "px";
-      if (!widget.coverGutter) {
-        width -= dims.gutterTotalWidth;
-        node.style.paddingLeft = dims.gutterTotalWidth + "px";
-      }
-      node.style.width = width + "px";
-    }
-    if (widget.coverGutter) {
-      node.style.zIndex = 5;
-      node.style.position = "relative";
-      if (!widget.noHScroll) node.style.marginLeft = -dims.gutterTotalWidth + "px";
-    }
-  }
-
-  // SELECTION / CURSOR
-
-  function updateSelection(cm) {
-    var display = cm.display;
-    var collapsed = posEq(cm.doc.sel.from, cm.doc.sel.to);
-    if (collapsed || cm.options.showCursorWhenSelecting)
-      updateSelectionCursor(cm);
-    else
-      display.cursor.style.display = display.otherCursor.style.display = "none";
-    if (!collapsed)
-      updateSelectionRange(cm);
-    else
-      display.selectionDiv.style.display = "none";
-
-    // Move the hidden textarea near the cursor to prevent scrolling artifacts
-    if (cm.options.moveInputWithCursor) {
-      var headPos = cursorCoords(cm, cm.doc.sel.head, "div");
-      var wrapOff = getRect(display.wrapper), lineOff = getRect(display.lineDiv);
-      display.inputDiv.style.top = Math.max(0, Math.min(display.wrapper.clientHeight - 10,
-                                                        headPos.top + lineOff.top - wrapOff.top)) + "px";
-      display.inputDiv.style.left = Math.max(0, Math.min(display.wrapper.clientWidth - 10,
-                                                         headPos.left + lineOff.left - wrapOff.left)) + "px";
-    }
-  }
-
-  // No selection, plain cursor
-  function updateSelectionCursor(cm) {
-    var display = cm.display, pos = cursorCoords(cm, cm.doc.sel.head, "div");
-    display.cursor.style.left = pos.left + "px";
-    display.cursor.style.top = pos.top + "px";
-    display.cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px";
-    display.cursor.style.display = "";
-
-    if (pos.other) {
-      display.otherCursor.style.display = "";
-      display.otherCursor.style.left = pos.other.left + "px";
-      display.otherCursor.style.top = pos.other.top + "px";
-      display.otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px";
-    } else { display.otherCursor.style.display = "none"; }
-  }
-
-  // Highlight selection
-  function updateSelectionRange(cm) {
-    var display = cm.display, doc = cm.doc, sel = cm.doc.sel;
-    var fragment = document.createDocumentFragment();
-    var clientWidth = display.lineSpace.offsetWidth, pl = paddingLeft(cm.display);
-
-    function add(left, top, width, bottom) {
-      if (top < 0) top = 0;
-      fragment.appendChild(elt("div", null, "CodeMirror-selected", "position: absolute; left: " + left +
-                               "px; top: " + top + "px; width: " + (width == null ? clientWidth - left : width) +
-                               "px; height: " + (bottom - top) + "px"));
-    }
-
-    function drawForLine(line, fromArg, toArg) {
-      var lineObj = getLine(doc, line);
-      var lineLen = lineObj.text.length;
-      var start, end;
-      function coords(ch, bias) {
-        return charCoords(cm, Pos(line, ch), "div", lineObj, bias);
-      }
-
-      iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {
-        var leftPos = coords(from, "left"), rightPos, left, right;
-        if (from == to) {
-          rightPos = leftPos;
-          left = right = leftPos.left;
-        } else {
-          rightPos = coords(to - 1, "right");
-          if (dir == "rtl") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }
-          left = leftPos.left;
-          right = rightPos.right;
-        }
-        if (fromArg == null && from == 0) left = pl;
-        if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part
-          add(left, leftPos.top, null, leftPos.bottom);
-          left = pl;
-          if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);
-        }
-        if (toArg == null && to == lineLen) right = clientWidth;
-        if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)
-          start = leftPos;
-        if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)
-          end = rightPos;
-        if (left < pl + 1) left = pl;
-        add(left, rightPos.top, right - left, rightPos.bottom);
-      });
-      return {start: start, end: end};
-    }
-
-    if (sel.from.line == sel.to.line) {
-      drawForLine(sel.from.line, sel.from.ch, sel.to.ch);
-    } else {
-      var fromLine = getLine(doc, sel.from.line), toLine = getLine(doc, sel.to.line);
-      var singleVLine = visualLine(doc, fromLine) == visualLine(doc, toLine);
-      var leftEnd = drawForLine(sel.from.line, sel.from.ch, singleVLine ? fromLine.text.length : null).end;
-      var rightStart = drawForLine(sel.to.line, singleVLine ? 0 : null, sel.to.ch).start;
-      if (singleVLine) {
-        if (leftEnd.top < rightStart.top - 2) {
-          add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);
-          add(pl, rightStart.top, rightStart.left, rightStart.bottom);
-        } else {
-          add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);
-        }
-      }
-      if (leftEnd.bottom < rightStart.top)
-        add(pl, leftEnd.bottom, null, rightStart.top);
-    }
-
-    removeChildrenAndAdd(display.selectionDiv, fragment);
-    display.selectionDiv.style.display = "";
-  }
-
-  // Cursor-blinking
-  function restartBlink(cm) {
-    if (!cm.state.focused) return;
-    var display = cm.display;
-    clearInterval(display.blinker);
-    var on = true;
-    display.cursor.style.visibility = display.otherCursor.style.visibility = "";
-    display.blinker = setInterval(function() {
-      display.cursor.style.visibility = display.otherCursor.style.visibility = (on = !on) ? "" : "hidden";
-    }, cm.options.cursorBlinkRate);
-  }
-
-  // HIGHLIGHT WORKER
-
-  function startWorker(cm, time) {
-    if (cm.doc.mode.startState && cm.doc.frontier < cm.display.showingTo)
-      cm.state.highlight.set(time, bind(highlightWorker, cm));
-  }
-
-  function highlightWorker(cm) {
-    var doc = cm.doc;
-    if (doc.frontier < doc.first) doc.frontier = doc.first;
-    if (doc.frontier >= cm.display.showingTo) return;
-    var end = +new Date + cm.options.workTime;
-    var state = copyState(doc.mode, getStateBefore(cm, doc.frontier));
-    var changed = [], prevChange;
-    doc.iter(doc.frontier, Math.min(doc.first + doc.size, cm.display.showingTo + 500), function(line) {
-      if (doc.frontier >= cm.display.showingFrom) { // Visible
-        var oldStyles = line.styles;
-        line.styles = highlightLine(cm, line, state);
-        var ischange = !oldStyles || oldStyles.length != line.styles.length;
-        for (var i = 0; !ischange && i < oldStyles.length; ++i) ischange = oldStyles[i] != line.styles[i];
-        if (ischange) {
-          if (prevChange && prevChange.end == doc.frontier) prevChange.end++;
-          else changed.push(prevChange = {start: doc.frontier, end: doc.frontier + 1});
-        }
-        line.stateAfter = copyState(doc.mode, state);
-      } else {
-        processLine(cm, line, state);
-        line.stateAfter = doc.frontier % 5 == 0 ? copyState(doc.mode, state) : null;
-      }
-      ++doc.frontier;
-      if (+new Date > end) {
-        startWorker(cm, cm.options.workDelay);
-        return true;
-      }
-    });
-    if (changed.length)
-      operation(cm, function() {
-        for (var i = 0; i < changed.length; ++i)
-          regChange(this, changed[i].start, changed[i].end);
-      })();
-  }
-
-  // Finds the line to start with when starting a parse. Tries to
-  // find a line with a stateAfter, so that it can start with a
-  // valid state. If that fails, it returns the line with the
-  // smallest indentation, which tends to need the least context to
-  // parse correctly.
-  function findStartLine(cm, n, precise) {
-    var minindent, minline, doc = cm.doc;
-    for (var search = n, lim = n - 100; search > lim; --search) {
-      if (search <= doc.first) return doc.first;
-      var line = getLine(doc, search - 1);
-      if (line.stateAfter && (!precise || search <= doc.frontier)) return search;
-      var indented = countColumn(line.text, null, cm.options.tabSize);
-      if (minline == null || minindent > indented) {
-        minline = search - 1;
-        minindent = indented;
-      }
-    }
-    return minline;
-  }
-
-  function getStateBefore(cm, n, precise) {
-    var doc = cm.doc, display = cm.display;
-      if (!doc.mode.startState) return true;
-    var pos = findStartLine(cm, n, precise), state = pos > doc.first && getLine(doc, pos-1).stateAfter;
-    if (!state) state = startState(doc.mode);
-    else state = copyState(doc.mode, state);
-    doc.iter(pos, n, function(line) {
-      processLine(cm, line, state);
-      var save = pos == n - 1 || pos % 5 == 0 || pos >= display.showingFrom && pos < display.showingTo;
-      line.stateAfter = save ? copyState(doc.mode, state) : null;
-      ++pos;
-    });
-    return state;
-  }
-
-  // POSITION MEASUREMENT
-
-  function paddingTop(display) {return display.lineSpace.offsetTop;}
-  function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight;}
-  function paddingLeft(display) {
-    var e = removeChildrenAndAdd(display.measure, elt("pre", null, null, "text-align: left")).appendChild(elt("span", "x"));
-    return e.offsetLeft;
-  }
-
-  function measureChar(cm, line, ch, data, bias) {
-    var dir = -1;
-    data = data || measureLine(cm, line);
-
-    for (var pos = ch;; pos += dir) {
-      var r = data[pos];
-      if (r) break;
-      if (dir < 0 && pos == 0) dir = 1;
-    }
-    bias = pos > ch ? "left" : pos < ch ? "right" : bias;
-    if (bias == "left" && r.leftSide) r = r.leftSide;
-    else if (bias == "right" && r.rightSide) r = r.rightSide;
-    return {left: pos < ch ? r.right : r.left,
-            right: pos > ch ? r.left : r.right,
-            top: r.top,
-            bottom: r.bottom};
-  }
-
-  function findCachedMeasurement(cm, line) {
-    var cache = cm.display.measureLineCache;
-    for (var i = 0; i < cache.length; ++i) {
-      var memo = cache[i];
-      if (memo.text == line.text && memo.markedSpans == line.markedSpans &&
-          cm.display.scroller.clientWidth == memo.width &&
-          memo.classes == line.textClass + "|" + line.bgClass + "|" + line.wrapClass)
-        return memo;
-    }
-  }
-
-  function clearCachedMeasurement(cm, line) {
-    var exists = findCachedMeasurement(cm, line);
-    if (exists) exists.text = exists.measure = exists.markedSpans = null;
-  }
-
-  function measureLine(cm, line) {
-    // First look in the cache
-    var cached = findCachedMeasurement(cm, line);
-    if (cached) return cached.measure;
-
-    // Failing that, recompute and store result in cache
-    var measure = measureLineInner(cm, line);
-    var cache = cm.display.measureLineCache;
-    var memo = {text: line.text, width: cm.display.scroller.clientWidth,
-                markedSpans: line.markedSpans, measure: measure,
-                classes: line.textClass + "|" + line.bgClass + "|" + line.wrapClass};
-    if (cache.length == 16) cache[++cm.display.measureLineCachePos % 16] = memo;
-    else cache.push(memo);
-    return measure;
-  }
-
-  function measureLineInner(cm, line) {
-    var display = cm.display, measure = emptyArray(line.text.length);
-    var pre = lineContent(cm, line, measure, true);
-
-    // IE does not cache element positions of inline elements between
-    // calls to getBoundingClientRect. This makes the loop below,
-    // which gathers the positions of all the characters on the line,
-    // do an amount of layout work quadratic to the number of
-    // characters. When line wrapping is off, we try to improve things
-    // by first subdividing the line into a bunch of inline blocks, so
-    // that IE can reuse most of the layout information from caches
-    // for those blocks. This does interfere with line wrapping, so it
-    // doesn't work when wrapping is on, but in that case the
-    // situation is slightly better, since IE does cache line-wrapping
-    // information and only recomputes per-line.
-    if (ie && !ie_lt8 && !cm.options.lineWrapping && pre.childNodes.length > 100) {
-      var fragment = document.createDocumentFragment();
-      var chunk = 10, n = pre.childNodes.length;
-      for (var i = 0, chunks = Math.ceil(n / chunk); i < chunks; ++i) {
-        var wrap = elt("div", null, null, "display: inline-block");
-        for (var j = 0; j < chunk && n; ++j) {
-          wrap.appendChild(pre.firstChild);
-          --n;
-        }
-        fragment.appendChild(wrap);
-      }
-      pre.appendChild(fragment);
-    }
-
-    removeChildrenAndAdd(display.measure, pre);
-
-    var outer = getRect(display.lineDiv);
-    var vranges = [], data = emptyArray(line.text.length), maxBot = pre.offsetHeight;
-    // Work around an IE7/8 bug where it will sometimes have randomly
-    // replaced our pre with a clone at this point.
-    if (ie_lt9 && display.measure.first != pre)
-      removeChildrenAndAdd(display.measure, pre);
-
-    function measureRect(rect) {
-      var top = rect.top - outer.top, bot = rect.bottom - outer.top;
-      if (bot > maxBot) bot = maxBot;
-      if (top < 0) top = 0;
-      for (var i = vranges.length - 2; i >= 0; i -= 2) {
-        var rtop = vranges[i], rbot = vranges[i+1];
-        if (rtop > bot || rbot < top) continue;
-        if (rtop <= top && rbot >= bot ||
-            top <= rtop && bot >= rbot ||
-            Math.min(bot, rbot) - Math.max(top, rtop) >= (bot - top) >> 1) {
-          vranges[i] = Math.min(top, rtop);
-          vranges[i+1] = Math.max(bot, rbot);
-          break;
-        }
-      }
-      if (i < 0) { i = vranges.length; vranges.push(top, bot); }
-      return {left: rect.left - outer.left,
-              right: rect.right - outer.left,
-              top: i, bottom: null};
-    }
-    function finishRect(rect) {
-      rect.bottom = vranges[rect.top+1];
-      rect.top = vranges[rect.top];
-    }
-
-    for (var i = 0, cur; i < measure.length; ++i) if (cur = measure[i]) {
-      var node = cur, rect = null;
-      // A widget might wrap, needs special care
-      if (/\bCodeMirror-widget\b/.test(cur.className) && cur.getClientRects) {
-        if (cur.firstChild.nodeType == 1) node = cur.firstChild;
-        var rects = node.getClientRects();
-        if (rects.length > 1) {
-          rect = data[i] = measureRect(rects[0]);
-          rect.rightSide = measureRect(rects[rects.length - 1]);
-        }
-      }
-      if (!rect) rect = data[i] = measureRect(getRect(node));
-      if (cur.measureRight) rect.right = getRect(cur.measureRight).left;
-      if (cur.leftSide) rect.leftSide = measureRect(getRect(cur.leftSide));
-    }
-    for (var i = 0, cur; i < data.length; ++i) if (cur = data[i]) {
-      finishRect(cur);
-      if (cur.leftSide) finishRect(cur.leftSide);
-      if (cur.rightSide) finishRect(cur.rightSide);
-    }
-    return data;
-  }
-
-  function measureLineWidth(cm, line) {
-    var hasBadSpan = false;
-    if (line.markedSpans) for (var i = 0; i < line.markedSpans; ++i) {
-      var sp = line.markedSpans[i];
-      if (sp.collapsed && (sp.to == null || sp.to == line.text.length)) hasBadSpan = true;
-    }
-    var cached = !hasBadSpan && findCachedMeasurement(cm, line);
-    if (cached) return measureChar(cm, line, line.text.length, cached.measure, "right").right;
-
-    var pre = lineContent(cm, line, null, true);
-    var end = pre.appendChild(zeroWidthElement(cm.display.measure));
-    removeChildrenAndAdd(cm.display.measure, pre);
-    return getRect(end).right - getRect(cm.display.lineDiv).left;
-  }
-
-  function clearCaches(cm) {
-    cm.display.measureLineCache.length = cm.display.measureLineCachePos = 0;
-    cm.display.cachedCharWidth = cm.display.cachedTextHeight = null;
-    if (!cm.options.lineWrapping) cm.display.maxLineChanged = true;
-    cm.display.lineNumChars = null;
-  }
-
-  function pageScrollX() { return window.pageXOffset || (document.documentElement || document.body).scrollLeft; }
-  function pageScrollY() { return window.pageYOffset || (document.documentElement || document.body).scrollTop; }
-
-  // Context is one of "line", "div" (display.lineDiv), "local"/null (editor), or "page"
-  function intoCoordSystem(cm, lineObj, rect, context) {
-    if (lineObj.widgets) for (var i = 0; i < lineObj.widgets.length; ++i) if (lineObj.widgets[i].above) {
-      var size = widgetHeight(lineObj.widgets[i]);
-      rect.top += size; rect.bottom += size;
-    }
-    if (context == "line") return rect;
-    if (!context) context = "local";
-    var yOff = heightAtLine(cm, lineObj);
-    if (context == "local") yOff += paddingTop(cm.display);
-    else yOff -= cm.display.viewOffset;
-    if (context == "page" || context == "window") {
-      var lOff = getRect(cm.display.lineSpace);
-      yOff += lOff.top + (context == "window" ? 0 : pageScrollY());
-      var xOff = lOff.left + (context == "window" ? 0 : pageScrollX());
-      rect.left += xOff; rect.right += xOff;
-    }
-    rect.top += yOff; rect.bottom += yOff;
-    return rect;
-  }
-
-  // Context may be "window", "page", "div", or "local"/null
-  // Result is in "div" coords
-  function fromCoordSystem(cm, coords, context) {
-    if (context == "div") return coords;
-    var left = coords.left, top = coords.top;
-    // First move into "page" coordinate system
-    if (context == "page") {
-      left -= pageScrollX();
-      top -= pageScrollY();
-    } else if (context == "local" || !context) {
-      var localBox = getRect(cm.display.sizer);
-      left += localBox.left;
-      top += localBox.top;
-    }
-
-    var lineSpaceBox = getRect(cm.display.lineSpace);
-    return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};
-  }
-
-  function charCoords(cm, pos, context, lineObj, bias) {
-    if (!lineObj) lineObj = getLine(cm.doc, pos.line);
-    return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, null, bias), context);
-  }
-
-  function cursorCoords(cm, pos, context, lineObj, measurement) {
-    lineObj = lineObj || getLine(cm.doc, pos.line);
-    if (!measurement) measurement = measureLine(cm, lineObj);
-    function get(ch, right) {
-      var m = measureChar(cm, lineObj, ch, measurement, right ? "right" : "left");
-      if (right) m.left = m.right; else m.right = m.left;
-      return intoCoordSystem(cm, lineObj, m, context);
-    }
-    function getBidi(ch, partPos) {
-      var part = order[partPos], right = part.level % 2;
-      if (ch == bidiLeft(part) && partPos && part.level < order[partPos - 1].level) {
-        part = order[--partPos];
-        ch = bidiRight(part) - (part.level % 2 ? 0 : 1);
-        right = true;
-      } else if (ch == bidiRight(part) && partPos < order.length - 1 && part.level < order[partPos + 1].level) {
-        part = order[++partPos];
-        ch = bidiLeft(part) - part.level % 2;
-        right = false;
-      }
-      if (right && ch == part.to && ch > part.from) return get(ch - 1);
-      return get(ch, right);
-    }
-    var order = getOrder(lineObj), ch = pos.ch;
-    if (!order) return get(ch);
-    var partPos = getBidiPartAt(order, ch);
-    var val = getBidi(ch, partPos);
-    if (bidiOther != null) val.other = getBidi(ch, bidiOther);
-    return val;
-  }
-
-  function PosWithInfo(line, ch, outside, xRel) {
-    var pos = new Pos(line, ch);
-    pos.xRel = xRel;
-    if (outside) pos.outside = true;
-    return pos;
-  }
-
-  // Coords must be lineSpace-local
-  function coordsChar(cm, x, y) {
-    var doc = cm.doc;
-    y += cm.display.viewOffset;
-    if (y < 0) return PosWithInfo(doc.first, 0, true, -1);
-    var lineNo = lineAtHeight(doc, y), last = doc.first + doc.size - 1;
-    if (lineNo > last)
-      return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, true, 1);
-    if (x < 0) x = 0;
-
-    for (;;) {
-      var lineObj = getLine(doc, lineNo);
-      var found = coordsCharInner(cm, lineObj, lineNo, x, y);
-      var merged = collapsedSpanAtEnd(lineObj);
-      var mergedPos = merged && merged.find();
-      if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0))
-        lineNo = mergedPos.to.line;
-      else
-        return found;
-    }
-  }
-
-  function coordsCharInner(cm, lineObj, lineNo, x, y) {
-    var innerOff = y - heightAtLine(cm, lineObj);
-    var wrongLine = false, adjust = 2 * cm.display.wrapper.clientWidth;
-    var measurement = measureLine(cm, lineObj);
-
-    function getX(ch) {
-      var sp = cursorCoords(cm, Pos(lineNo, ch), "line",
-                            lineObj, measurement);
-      wrongLine = true;
-      if (innerOff > sp.bottom) return sp.left - adjust;
-      else if (innerOff < sp.top) return sp.left + adjust;
-      else wrongLine = false;
-      return sp.left;
-    }
-
-    var bidi = getOrder(lineObj), dist = lineObj.text.length;
-    var from = lineLeft(lineObj), to = lineRight(lineObj);
-    var fromX = getX(from), fromOutside = wrongLine, toX = getX(to), toOutside = wrongLine;
-
-    if (x > toX) return PosWithInfo(lineNo, to, toOutside, 1);
-    // Do a binary search between these bounds.
-    for (;;) {
-      if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) {
-        var ch = x < fromX || x - fromX <= toX - x ? from : to;
-        var xDiff = x - (ch == from ? fromX : toX);
-        while (isExtendingChar.test(lineObj.text.charAt(ch))) ++ch;
-        var pos = PosWithInfo(lineNo, ch, ch == from ? fromOutside : toOutside,
-                              xDiff < 0 ? -1 : xDiff ? 1 : 0);
-        return pos;
-      }
-      var step = Math.ceil(dist / 2), middle = from + step;
-      if (bidi) {
-        middle = from;
-        for (var i = 0; i < step; ++i) middle = moveVisually(lineObj, middle, 1);
-      }
-      var middleX = getX(middle);
-      if (middleX > x) {to = middle; toX = middleX; if (toOutside = wrongLine) toX += 1000; dist = step;}
-      else {from = middle; fromX = middleX; fromOutside = wrongLine; dist -= step;}
-    }
-  }
-
-  var measureText;
-  function textHeight(display) {
-    if (display.cachedTextHeight != null) return display.cachedTextHeight;
-    if (measureText == null) {
-      measureText = elt("pre");
-      // Measure a bunch of lines, for browsers that compute
-      // fractional heights.
-      for (var i = 0; i < 49; ++i) {
-        measureText.appendChild(document.createTextNode("x"));
-        measureText.appendChild(elt("br"));
-      }
-      measureText.appendChild(document.createTextNode("x"));
-    }
-    removeChildrenAndAdd(display.measure, measureText);
-    var height = measureText.offsetHeight / 50;
-    if (height > 3) display.cachedTextHeight = height;
-    removeChildren(display.measure);
-    return height || 1;
-  }
-
-  function charWidth(display) {
-    if (display.cachedCharWidth != null) return display.cachedCharWidth;
-    var anchor = elt("span", "x");
-    var pre = elt("pre", [anchor]);
-    removeChildrenAndAdd(display.measure, pre);
-    var width = anchor.offsetWidth;
-    if (width > 2) display.cachedCharWidth = width;
-    return width || 10;
-  }
-
-  // OPERATIONS
-
-  // Operations are used to wrap changes in such a way that each
-  // change won't have to update the cursor and display (which would
-  // be awkward, slow, and error-prone), but instead updates are
-  // batched and then all combined and executed at once.
-
-  var nextOpId = 0;
-  function startOperation(cm) {
-    cm.curOp = {
-      // An array of ranges of lines that have to be updated. See
-      // updateDisplay.
-      changes: [],
-      forceUpdate: false,
-      updateInput: null,
-      userSelChange: null,
-      textChanged: null,
-      selectionChanged: false,
-      cursorActivity: false,
-      updateMaxLine: false,
-      updateScrollPos: false,
-      id: ++nextOpId
-    };
-    if (!delayedCallbackDepth++) delayedCallbacks = [];
-  }
-
-  function endOperation(cm) {
-    var op = cm.curOp, doc = cm.doc, display = cm.display;
-    cm.curOp = null;
-
-    if (op.updateMaxLine) computeMaxLength(cm);
-    if (display.maxLineChanged && !cm.options.lineWrapping && display.maxLine) {
-      var width = measureLineWidth(cm, display.maxLine);
-      display.sizer.style.minWidth = Math.max(0, width + 3 + scrollerCutOff) + "px";
-      display.maxLineChanged = false;
-      var maxScrollLeft = Math.max(0, display.sizer.offsetLeft + display.sizer.offsetWidth - display.scroller.clientWidth);
-      if (maxScrollLeft < doc.scrollLeft && !op.updateScrollPos)
-        setScrollLeft(cm, Math.min(display.scroller.scrollLeft, maxScrollLeft), true);
-    }
-    var newScrollPos, updated;
-    if (op.updateScrollPos) {
-      newScrollPos = op.updateScrollPos;
-    } else if (op.selectionChanged && display.scroller.clientHeight) { // don't rescroll if not visible
-      var coords = cursorCoords(cm, doc.sel.head);
-      newScrollPos = calculateScrollPos(cm, coords.left, coords.top, coords.left, coords.bottom);
-    }
-    if (op.changes.length || op.forceUpdate || newScrollPos && newScrollPos.scrollTop != null) {
-      updated = updateDisplay(cm, op.changes, newScrollPos && newScrollPos.scrollTop, op.forceUpdate);
-      if (cm.display.scroller.offsetHeight) cm.doc.scrollTop = cm.display.scroller.scrollTop;
-    }
-    if (!updated && op.selectionChanged) updateSelection(cm);
-    if (op.updateScrollPos) {
-      display.scroller.scrollTop = display.scrollbarV.scrollTop = doc.scrollTop = newScrollPos.scrollTop;
-      display.scroller.scrollLeft = display.scrollbarH.scrollLeft = doc.scrollLeft = newScrollPos.scrollLeft;
-      alignHorizontally(cm);
-      if (op.scrollToPos)
-        scrollPosIntoView(cm, clipPos(cm.doc, op.scrollToPos), op.scrollToPosMargin);
-    } else if (newScrollPos) {
-      scrollCursorIntoView(cm);
-    }
-    if (op.selectionChanged) restartBlink(cm);
-
-    if (cm.state.focused && op.updateInput)
-      resetInput(cm, op.userSelChange);
-
-    var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;
-    if (hidden) for (var i = 0; i < hidden.length; ++i)
-      if (!hidden[i].lines.length) signal(hidden[i], "hide");
-    if (unhidden) for (var i = 0; i < unhidden.length; ++i)
-      if (unhidden[i].lines.length) signal(unhidden[i], "unhide");
-
-    var delayed;
-    if (!--delayedCallbackDepth) {
-      delayed = delayedCallbacks;
-      delayedCallbacks = null;
-    }
-    if (op.textChanged)
-      signal(cm, "change", cm, op.textChanged);
-    if (op.cursorActivity) signal(cm, "cursorActivity", cm);
-    if (delayed) for (var i = 0; i < delayed.length; ++i) delayed[i]();
-  }
-
-  // Wraps a function in an operation. Returns the wrapped function.
-  function operation(cm1, f) {
-    return function() {
-      var cm = cm1 || this, withOp = !cm.curOp;
-      if (withOp) startOperation(cm);
-      try { var result = f.apply(cm, arguments); }
-      finally { if (withOp) endOperation(cm); }
-      return result;
-    };
-  }
-  function docOperation(f) {
-    return function() {
-      var withOp = this.cm && !this.cm.curOp, result;
-      if (withOp) startOperation(this.cm);
-      try { result = f.apply(this, arguments); }
-      finally { if (withOp) endOperation(this.cm); }
-      return result;
-    };
-  }
-  function runInOp(cm, f) {
-    var withOp = !cm.curOp, result;
-    if (withOp) startOperation(cm);
-    try { result = f(); }
-    finally { if (withOp) endOperation(cm); }
-    return result;
-  }
-
-  function regChange(cm, from, to, lendiff) {
-    if (from == null) from = cm.doc.first;
-    if (to == null) to = cm.doc.first + cm.doc.size;
-    cm.curOp.changes.push({from: from, to: to, diff: lendiff});
-  }
-
-  // INPUT HANDLING
-
-  function slowPoll(cm) {
-    if (cm.display.pollingFast) return;
-    cm.display.poll.set(cm.options.pollInterval, function() {
-      readInput(cm);
-      if (cm.state.focused) slowPoll(cm);
-    });
-  }
-
-  function fastPoll(cm) {
-    var missed = false;
-    cm.display.pollingFast = true;
-    function p() {
-      var changed = readInput(cm);
-      if (!changed && !missed) {missed = true; cm.display.poll.set(60, p);}
-      else {cm.display.pollingFast = false; slowPoll(cm);}
-    }
-    cm.display.poll.set(20, p);
-  }
-
-  // prevInput is a hack to work with IME. If we reset the textarea
-  // on every change, that breaks IME. So we look for changes
-  // compared to the previous content instead. (Modern browsers have
-  // events that indicate IME taking place, but these are not widely
-  // supported or compatible enough yet to rely on.)
-  function readInput(cm) {
-    //console.log("Reading input ", cm.display.prevInput);
-    var input = cm.display.input, prevInput = cm.display.prevInput, doc = cm.doc, sel = doc.sel;
-    if (!cm.state.focused || hasSelection(input) || isReadOnly(cm) || cm.state.disableInput) return false;
-    var text = input.value;
-    if (text == prevInput && posEq(sel.from, sel.to)) return false;
-    if (ie && !ie_lt9 && cm.display.inputHasSelection === text) {
-      resetInput(cm, true);
-      return false;
-    }
-
-    var withOp = !cm.curOp;
-    if (withOp) startOperation(cm);
-    sel.shift = false;
-    var same = 0, l = Math.min(prevInput.length, text.length);
-    while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same;
-    var from = sel.from, to = sel.to;
-    if (same < prevInput.length)
-      from = Pos(from.line, from.ch - (prevInput.length - same));
-    else if (cm.state.overwrite && posEq(from, to) && !cm.state.pasteIncoming)
-      to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + (text.length - same)));
-
-    console.log(text, same);
-    var updateInput = cm.curOp.updateInput;
-    var changeEvent = {from: from, to: to, text: splitLines(text.slice(same)),
-                       origin: cm.state.pasteIncoming ? "paste" : "+input"};
-    makeChange(cm.doc, changeEvent, "end");
-    cm.curOp.updateInput = updateInput;
-    signalLater(cm, "inputRead", cm, changeEvent);
-
-    if (text.length > 1000 || text.indexOf("\n") > -1) input.value = cm.display.prevInput = "";
-    else cm.display.prevInput = text;
-    if (withOp) endOperation(cm);
-    cm.state.pasteIncoming = false;
-
-    console.log("Set from read");
-
-    return true;
-  }
-
-  function resetInput(cm, user) {
-   // return;
-    console.log("Reset input", user);
-    var minimal, selected, doc = cm.doc;
-    if (!posEq(doc.sel.from, doc.sel.to)) {
-      cm.display.prevInput = "";
-      minimal = hasCopyEvent &&
-        (doc.sel.to.line - doc.sel.from.line > 100 || (selected = cm.getSelection()).length > 1000);
-      var content = minimal ? "-" : selected || cm.getSelection();
-      cm.display.input.value = content;
-      if (cm.state.focused) selectInput(cm.display.input);
-      if (ie && !ie_lt9) cm.display.inputHasSelection = content;
-    } else if (user) {
-      cm.display.prevInput = cm.display.input.value;
-      if (ie && !ie_lt9) cm.display.inputHasSelection = null;
-    }
-    cm.display.inaccurateSelection = minimal;
-  }
-
-  function focusInput(cm) {
-    if (cm.options.readOnly != "nocursor" && (!mobile || document.activeElement != cm.display.input))
-      cm.display.input.focus();
-  }
-
-  function isReadOnly(cm) {
-    return cm.options.readOnly || cm.doc.cantEdit;
-  }
-
-  // EVENT HANDLERS
-
-  function registerEventHandlers(cm) {
-    var d = cm.display;
-    on(d.scroller, "mousedown", operation(cm, onMouseDown));
-    if (ie)
-      on(d.scroller, "dblclick", operation(cm, function(e) {
-        if (signalDOMEvent(cm, e)) return;
-        var pos = posFromMouse(cm, e);
-        if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) return;
-        e_preventDefault(e);
-        var word = findWordAt(getLine(cm.doc, pos.line).text, pos);
-        extendSelection(cm.doc, word.from, word.to);
-      }));
-    else
-      on(d.scroller, "dblclick", function(e) { signalDOMEvent(cm, e) || e_preventDefault(e); });
-    on(d.lineSpace, "selectstart", function(e) {
-      if (!eventInWidget(d, e)) e_preventDefault(e);
-    });
-    // Gecko browsers fire contextmenu *after* opening the menu, at
-    // which point we can't mess with it anymore. Context menu is
-    // handled in onMouseDown for Gecko.
-    if (!captureMiddleClick) on(d.scroller, "contextmenu", function(e) {onContextMenu(cm, e);});
-
-    on(d.scroller, "scroll", function() {
-      if (d.scroller.clientHeight) {
-        setScrollTop(cm, d.scroller.scrollTop);
-        setScrollLeft(cm, d.scroller.scrollLeft, true);
-        signal(cm, "scroll", cm);
-      }
-    });
-    on(d.scrollbarV, "scroll", function() {
-      if (d.scroller.clientHeight) setScrollTop(cm, d.scrollbarV.scrollTop);
-    });
-    on(d.scrollbarH, "scroll", function() {
-      if (d.scroller.clientHeight) setScrollLeft(cm, d.scrollbarH.scrollLeft);
-    });
-
-    on(d.scroller, "mousewheel", function(e){onScrollWheel(cm, e);});
-    on(d.scroller, "DOMMouseScroll", function(e){onScrollWheel(cm, e);});
-
-    function reFocus() { if (cm.state.focused) setTimeout(bind(focusInput, cm), 0); }
-    on(d.scrollbarH, "mousedown", reFocus);
-    on(d.scrollbarV, "mousedown", reFocus);
-    // Prevent wrapper from ever scrolling
-    on(d.wrapper, "scroll", function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });
-
-    var resizeTimer;
-    function onResize() {
-      if (resizeTimer == null) resizeTimer = setTimeout(function() {
-        resizeTimer = null;
-        // Might be a text scaling operation, clear size caches.
-        d.cachedCharWidth = d.cachedTextHeight = knownScrollbarWidth = null;
-        clearCaches(cm);
-        runInOp(cm, bind(regChange, cm));
-      }, 100);
-    }
-    on(window, "resize", onResize);
-    // Above handler holds on to the editor and its data structures.
-    // Here we poll to unregister it when the editor is no longer in
-    // the document, so that it can be garbage-collected.
-    function unregister() {
-      for (var p = d.wrapper.parentNode; p && p != document.body; p = p.parentNode) {}
-      if (p) setTimeout(unregister, 5000);
-      else off(window, "resize", onResize);
-    }
-    setTimeout(unregister, 5000);
-
-    on(d.input, "keyup", operation(cm, function(e) {
-      if (signalDOMEvent(cm, e) || cm.options.onKeyEvent && cm.options.onKeyEvent(cm, addStop(e))) return;
-      if (e.keyCode == 16) cm.doc.sel.shift = false;
-    }));
-    on(d.input, "input", bind(fastPoll, cm));
-    on(d.input, "keydown", operation(cm, onKeyDown));
-    on(d.input, "keypress", operation(cm, onKeyPress));
-    on(d.input, "focus", bind(onFocus, cm));
-    on(d.input, "blur", bind(onBlur, cm));
-
-    function drag_(e) {
-      if (signalDOMEvent(cm, e) || cm.options.onDragEvent && cm.options.onDragEvent(cm, addStop(e))) return;
-      e_stop(e);
-    }
-    if (cm.options.dragDrop) {
-      on(d.scroller, "dragstart", function(e){onDragStart(cm, e);});
-      on(d.scroller, "dragenter", drag_);
-      on(d.scroller, "dragover", drag_);
-      on(d.scroller, "drop", operation(cm, onDrop));
-    }
-    on(d.scroller, "paste", function(e){
-      if (eventInWidget(d, e)) return;
-      focusInput(cm);
-      fastPoll(cm);
-    });
-    on(d.input, "paste", function() {
-      cm.state.pasteIncoming = true;
-      fastPoll(cm);
-    });
-
-    function prepareCopy() {
-      if (d.inaccurateSelection) {
-        d.prevInput = "";
-        d.inaccurateSelection = false;
-        d.input.value = cm.getSelection();
-        selectInput(d.input);
-      }
-    }
-    on(d.input, "cut", prepareCopy);
-    on(d.input, "copy", prepareCopy);
-
-    // Needed to handle Tab key in KHTML
-    if (khtml) on(d.sizer, "mouseup", function() {
-        if (document.activeElement == d.input) d.input.blur();
-        focusInput(cm);
-    });
-  }
-
-  function eventInWidget(display, e) {
-    for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {
-      if (!n || n.ignoreEvents || n.parentNode == display.sizer && n != display.mover) return true;
-    }
-  }
-
-  function posFromMouse(cm, e, liberal) {
-    var display = cm.display;
-    if (!liberal) {
-      var target = e_target(e);
-      if (target == display.scrollbarH || target == display.scrollbarH.firstChild ||
-          target == display.scrollbarV || target == display.scrollbarV.firstChild ||
-          target == display.scrollbarFiller || target == display.gutterFiller) return null;
-    }
-    var x, y, space = getRect(display.lineSpace);
-    // Fails unpredictably on IE[67] when mouse is dragged around quickly.
-    try { x = e.clientX; y = e.clientY; } catch (e) { return null; }
-    return coordsChar(cm, x - space.left, y - space.top);
-  }
-
-  var lastClick, lastDoubleClick;
-  function onMouseDown(e) {
-    if (signalDOMEvent(this, e)) return;
-    var cm = this, display = cm.display, doc = cm.doc, sel = doc.sel;
-    sel.shift = e.shiftKey;
-
-    if (eventInWidget(display, e)) {
-      if (!webkit) {
-        display.scroller.draggable = false;
-        setTimeout(function(){display.scroller.draggable = true;}, 100);
-      }
-      return;
-    }
-    if (clickInGutter(cm, e)) return;
-    var start = posFromMouse(cm, e);
-
-    switch (e_button(e)) {
-    case 3:
-      if (captureMiddleClick) onContextMenu.call(cm, cm, e);
-      return;
-    case 2:
-      if (start) extendSelection(cm.doc, start);
-      setTimeout(bind(focusInput, cm), 20);
-      e_preventDefault(e);
-      return;
-    }
-    // For button 1, if it was clicked inside the editor
-    // (posFromMouse returning non-null), we have to adjust the
-    // selection.
-    if (!start) {if (e_target(e) == display.scroller) e_preventDefault(e); return;}
-
-    if (!cm.state.focused) onFocus(cm);
-
-    var now = +new Date, type = "single";
-    if (lastDoubleClick && lastDoubleClick.time > now - 400 && posEq(lastDoubleClick.pos, start)) {
-      type = "triple";
-      e_preventDefault(e);
-      setTimeout(bind(focusInput, cm), 20);
-      selectLine(cm, start.line);
-    } else if (lastClick && lastClick.time > now - 400 && posEq(lastClick.pos, start)) {
-      type = "double";
-      lastDoubleClick = {time: now, pos: start};
-      e_preventDefault(e);
-      var word = findWordAt(getLine(doc, start.line).text, start);
-      extendSelection(cm.doc, word.from, word.to);
-    } else { lastClick = {time: now, pos: start}; }
-
-    var last = start;
-    if (cm.options.dragDrop && dragAndDrop && !isReadOnly(cm) && !posEq(sel.from, sel.to) &&
-        !posLess(start, sel.from) && !posLess(sel.to, start) && type == "single") {
-      var dragEnd = operation(cm, function(e2) {
-        if (webkit) display.scroller.draggable = false;
-        cm.state.draggingText = false;
-        off(document, "mouseup", dragEnd);
-        off(display.scroller, "drop", dragEnd);
-        if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) {
-          e_preventDefault(e2);
-          extendSelection(cm.doc, start);
-          focusInput(cm);
-        }
-      });
-      // Let the drag handler handle this.
-      if (webkit) display.scroller.draggable = true;
-      cm.state.draggingText = dragEnd;
-      // IE's approach to draggable
-      if (display.scroller.dragDrop) display.scroller.dragDrop();
-      on(document, "mouseup", dragEnd);
-      on(display.scroller, "drop", dragEnd);
-      return;
-    }
-    e_preventDefault(e);
-    if (type == "single") extendSelection(cm.doc, clipPos(doc, start));
-
-    var startstart = sel.from, startend = sel.to, lastPos = start;
-
-    function doSelect(cur) {
-      if (posEq(lastPos, cur)) return;
-      lastPos = cur;
-
-      if (type == "single") {
-        extendSelection(cm.doc, clipPos(doc, start), cur);
-        return;
-      }
-
-      startstart = clipPos(doc, startstart);
-      startend = clipPos(doc, startend);
-      if (type == "double") {
-        var word = findWordAt(getLine(doc, cur.line).text, cur);
-        if (posLess(cur, startstart)) extendSelection(cm.doc, word.from, startend);
-        else extendSelection(cm.doc, startstart, word.to);
-      } else if (type == "triple") {
-        if (posLess(cur, startstart)) extendSelection(cm.doc, startend, clipPos(doc, Pos(cur.line, 0)));
-        else extendSelection(cm.doc, startstart, clipPos(doc, Pos(cur.line + 1, 0)));
-      }
-    }
-
-    var editorSize = getRect(display.wrapper);
-    // Used to ensure timeout re-tries don't fire when another extend
-    // happened in the meantime (clearTimeout isn't reliable -- at
-    // least on Chrome, the timeouts still happen even when cleared,
-    // if the clear happens after their scheduled firing time).
-    var counter = 0;
-
-    function extend(e) {
-      var curCount = ++counter;
-      var cur = posFromMouse(cm, e, true);
-      if (!cur) return;
-      if (!posEq(cur, last)) {
-        if (!cm.state.focused) onFocus(cm);
-        last = cur;
-        doSelect(cur);
-        var visible = visibleLines(display, doc);
-        if (cur.line >= visible.to || cur.line < visible.from)
-          setTimeout(operation(cm, function(){if (counter == curCount) extend(e);}), 150);
-      } else {
-        var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;
-        if (outside) setTimeout(operation(cm, function() {
-          if (counter != curCount) return;
-          display.scroller.scrollTop += outside;
-          extend(e);
-        }), 50);
-      }
-    }
-
-    function done(e) {
-      counter = Infinity;
-      e_preventDefault(e);
-      focusInput(cm);
-      off(document, "mousemove", move);
-      off(document, "mouseup", up);
-    }
-
-    var move = operation(cm, function(e) {
-      if (!ie && !e_button(e)) done(e);
-      else extend(e);
-    });
-    var up = operation(cm, done);
-    on(document, "mousemove", move);
-    on(document, "mouseup", up);
-  }
-
-  function clickInGutter(cm, e) {
-    var display = cm.display;
-    try { var mX = e.clientX, mY = e.clientY; }
-    catch(e) { return false; }
-
-    if (mX >= Math.floor(getRect(display.gutters).right)) return false;
-    e_preventDefault(e);
-    if (!hasHandler(cm, "gutterClick")) return true;
-
-    var lineBox = getRect(display.lineDiv);
-    if (mY > lineBox.bottom) return true;
-    mY -= lineBox.top - display.viewOffset;
-
-    for (var i = 0; i < cm.options.gutters.length; ++i) {
-      var g = display.gutters.childNodes[i];
-      if (g && getRect(g).right >= mX) {
-        var line = lineAtHeight(cm.doc, mY);
-        var gutter = cm.options.gutters[i];
-        signalLater(cm, "gutterClick", cm, line, gutter, e);
-        break;
-      }
-    }
-    return true;
-  }
-
-  // Kludge to work around strange IE behavior where it'll sometimes
-  // re-fire a series of drag-related events right after the drop (#1551)
-  var lastDrop = 0;
-
-  function onDrop(e) {
-    var cm = this;
-    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e) || (cm.options.onDragEvent && cm.options.onDragEvent(cm, addStop(e))))
-      return;
-    e_preventDefault(e);
-    if (ie) lastDrop = +new Date;
-    var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;
-    if (!pos || isReadOnly(cm)) return;
-    if (files && files.length && window.FileReader && window.File) {
-      var n = files.length, text = Array(n), read = 0;
-      var loadFile = function(file, i) {
-        var reader = new FileReader;
-        reader.onload = function() {
-          text[i] = reader.result;
-          if (++read == n) {
-            pos = clipPos(cm.doc, pos);
-            makeChange(cm.doc, {from: pos, to: pos, text: splitLines(text.join("\n")), origin: "paste"}, "around");
-          }
-        };
-        reader.readAsText(file);
-      };
-      for (var i = 0; i < n; ++i) loadFile(files[i], i);
-    } else {
-      // Don't do a replace if the drop happened inside of the selected text.
-      if (cm.state.draggingText && !(posLess(pos, cm.doc.sel.from) || posLess(cm.doc.sel.to, pos))) {
-        cm.state.draggingText(e);
-        // Ensure the editor is re-focused
-        setTimeout(bind(focusInput, cm), 20);
-        return;
-      }
-      try {
-        var text = e.dataTransfer.getData("Text");
-        if (text) {
-          var curFrom = cm.doc.sel.from, curTo = cm.doc.sel.to;
-          setSelection(cm.doc, pos, pos);
-          if (cm.state.draggingText) replaceRange(cm.doc, "", curFrom, curTo, "paste");
-          cm.replaceSelection(text, null, "paste");
-          focusInput(cm);
-          onFocus(cm);
-        }
-      }
-      catch(e){}
-    }
-  }
-
-  function onDragStart(cm, e) {
-    if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return; }
-    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) return;
-
-    var txt = cm.getSelection();
-    e.dataTransfer.setData("Text", txt);
-
-    // Use dummy image instead of default browsers image.
-    // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.
-    if (e.dataTransfer.setDragImage && !safari) {
-      var img = elt("img", null, null, "position: fixed; left: 0; top: 0;");
-      if (opera) {
-        img.width = img.height = 1;
-        cm.display.wrapper.appendChild(img);
-        // Force a relayout, or Opera won't use our image for some obscure reason
-        img._top = img.offsetTop;
-      }
-      e.dataTransfer.setDragImage(img, 0, 0);
-      if (opera) img.parentNode.removeChild(img);
-    }
-  }
-
-  function setScrollTop(cm, val) {
-    if (Math.abs(cm.doc.scrollTop - val) < 2) return;
-    cm.doc.scrollTop = val;
-    if (!gecko) updateDisplay(cm, [], val);
-    if (cm.display.scroller.scrollTop != val) cm.display.scroller.scrollTop = val;
-    if (cm.display.scrollbarV.scrollTop != val) cm.display.scrollbarV.scrollTop = val;
-    if (gecko) updateDisplay(cm, []);
-    startWorker(cm, 100);
-  }
-  function setScrollLeft(cm, val, isScroller) {
-    if (isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) return;
-    val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth);
-    cm.doc.scrollLeft = val;
-    alignHorizontally(cm);
-    if (cm.display.scroller.scrollLeft != val) cm.display.scroller.scrollLeft = val;
-    if (cm.display.scrollbarH.scrollLeft != val) cm.display.scrollbarH.scrollLeft = val;
-  }
-
-  // Since the delta values reported on mouse wheel events are
-  // unstandardized between browsers and even browser versions, and
-  // generally horribly unpredictable, this code starts by measuring
-  // the scroll effect that the first few mouse wheel events have,
-  // and, from that, detects the way it can convert deltas to pixel
-  // offsets afterwards.
-  //
-  // The reason we want to know the amount a wheel event will scroll
-  // is that it gives us a chance to update the display before the
-  // actual scrolling happens, reducing flickering.
-
-  var wheelSamples = 0, wheelPixelsPerUnit = null;
-  // Fill in a browser-detected starting value on browsers where we
-  // know one. These don't have to be accurate -- the result of them
-  // being wrong would just be a slight flicker on the first wheel
-  // scroll (if it is large enough).
-  if (ie) wheelPixelsPerUnit = -.53;
-  else if (gecko) wheelPixelsPerUnit = 15;
-  else if (chrome) wheelPixelsPerUnit = -.7;
-  else if (safari) wheelPixelsPerUnit = -1/3;
-
-  function onScrollWheel(cm, e) {
-    var dx = e.wheelDeltaX, dy = e.wheelDeltaY;
-    if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) dx = e.detail;
-    if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) dy = e.detail;
-    else if (dy == null) dy = e.wheelDelta;
-
-    var display = cm.display, scroll = display.scroller;
-    // Quit if there's nothing to scroll here
-    if (!(dx && scroll.scrollWidth > scroll.clientWidth ||
-          dy && scroll.scrollHeight > scroll.clientHeight)) return;
-
-    // Webkit browsers on OS X abort momentum scrolls when the target
-    // of the scroll event is removed from the scrollable element.
-    // This hack (see related code in patchDisplay) makes sure the
-    // element is kept around.
-    if (dy && mac && webkit) {
-      for (var cur = e.target; cur != scroll; cur = cur.parentNode) {
-        if (cur.lineObj) {
-          cm.display.currentWheelTarget = cur;
-          break;
-        }
-      }
-    }
-
-    // On some browsers, horizontal scrolling will cause redraws to
-    // happen before the gutter has been realigned, causing it to
-    // wriggle around in a most unseemly way. When we have an
-    // estimated pixels/delta value, we just handle horizontal
-    // scrolling entirely here. It'll be slightly off from native, but
-    // better than glitching out.
-    if (dx && !gecko && !opera && wheelPixelsPerUnit != null) {
-      if (dy)
-        setScrollTop(cm, Math.max(0, Math.min(scroll.scrollTop + dy * wheelPixelsPerUnit, scroll.scrollHeight - scroll.clientHeight)));
-      setScrollLeft(cm, Math.max(0, Math.min(scroll.scrollLeft + dx * wheelPixelsPerUnit, scroll.scrollWidth - scroll.clientWidth)));
-      e_preventDefault(e);
-      display.wheelStartX = null; // Abort measurement, if in progress
-      return;
-    }
-
-    if (dy && wheelPixelsPerUnit != null) {
-      var pixels = dy * wheelPixelsPerUnit;
-      var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;
-      if (pixels < 0) top = Math.max(0, top + pixels - 50);
-      else bot = Math.min(cm.doc.height, bot + pixels + 50);
-      updateDisplay(cm, [], {top: top, bottom: bot});
-    }
-
-    if (wheelSamples < 20) {
-      if (display.wheelStartX == null) {
-        display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;
-        display.wheelDX = dx; display.wheelDY = dy;
-        setTimeout(function() {
-          if (display.wheelStartX == null) return;
-          var movedX = scroll.scrollLeft - display.wheelStartX;
-          var movedY = scroll.scrollTop - display.wheelStartY;
-          var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||
-            (movedX && display.wheelDX && movedX / display.wheelDX);
-          display.wheelStartX = display.wheelStartY = null;
-          if (!sample) return;
-          wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);
-          ++wheelSamples;
-        }, 200);
-      } else {
-        display.wheelDX += dx; display.wheelDY += dy;
-      }
-    }
-  }
-
-  function doHandleBinding(cm, bound, dropShift) {
-    if (typeof bound == "string") {
-      bound = commands[bound];
-      if (!bound) return false;
-    }
-    // Ensure previous input has been read, so that the handler sees a
-    // consistent view of the document
-    if (cm.display.pollingFast && readInput(cm)) cm.display.pollingFast = false;
-    var doc = cm.doc, prevShift = doc.sel.shift, done = false;
-    try {
-      if (isReadOnly(cm)) cm.state.suppressEdits = true;
-      if (dropShift) doc.sel.shift = false;
-      done = bound(cm) != Pass;
-    } finally {
-      doc.sel.shift = prevShift;
-      cm.state.suppressEdits = false;
-    }
-    return done;
-  }
-
-  function allKeyMaps(cm) {
-    var maps = cm.state.keyMaps.slice(0);
-    if (cm.options.extraKeys) maps.push(cm.options.extraKeys);
-    maps.push(cm.options.keyMap);
-    return maps;
-  }
-
-  var maybeTransition;
-  function handleKeyBinding(cm, e) {
-    // Handle auto keymap transitions
-    var startMap = getKeyMap(cm.options.keyMap), next = startMap.auto;
-    clearTimeout(maybeTransition);
-    if (next && !isModifierKey(e)) maybeTransition = setTimeout(function() {
-      if (getKeyMap(cm.options.keyMap) == startMap) {
-        cm.options.keyMap = (next.call ? next.call(null, cm) : next);
-        keyMapChanged(cm);
-      }
-    }, 50);
-
-    var name = keyName(e, true), handled = false;
-    if (!name) return false;
-    var keymaps = allKeyMaps(cm);
-
-    if (e.shiftKey) {
-      // First try to resolve full name (including 'Shift-'). Failing
-      // that, see if there is a cursor-motion command (starting with
-      // 'go') bound to the keyname without 'Shift-'.
-      handled = lookupKey("Shift-" + name, keymaps, function(b) {return doHandleBinding(cm, b, true);})
-             || lookupKey(name, keymaps, function(b) {
-                  if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion)
-                    return doHandleBinding(cm, b);
-                });
-    } else {
-      handled = lookupKey(name, keymaps, function(b) { return doHandleBinding(cm, b); });
-    }
-
-    if (handled) {
-      e_preventDefault(e);
-      restartBlink(cm);
-      if (ie_lt9) { e.oldKeyCode = e.keyCode; e.keyCode = 0; }
-      signalLater(cm, "keyHandled", cm, name, e);
-    }
-    return handled;
-  }
-
-  function handleCharBinding(cm, e, ch) {
-    var handled = lookupKey("'" + ch + "'", allKeyMaps(cm),
-                            function(b) { return doHandleBinding(cm, b, true); });
-    if (handled) {
-      e_preventDefault(e);
-      restartBlink(cm);
-      signalLater(cm, "keyHandled", cm, "'" + ch + "'", e);
-    }
-    return handled;
-  }
-
-  var lastStoppedKey = null;
-  function onKeyDown(e) {
-    var cm = this;
-    if (!cm.state.focused) onFocus(cm);
-    if (ie && e.keyCode == 27) { e.returnValue = false; }
-    if (signalDOMEvent(cm, e) || cm.options.onKeyEvent && cm.options.onKeyEvent(cm, addStop(e))) return;
-    var code = e.keyCode;
-    // IE does strange things with escape.
-    cm.doc.sel.shift = code == 16 || e.shiftKey;
-    // First give onKeyEvent option a chance to handle this.
-    var handled = handleKeyBinding(cm, e);
-
-    if (handled) {
-      console.log("Clearing value");
-      cm.display.value = "";
-    }
-    if (opera) {
-      lastStoppedKey = handled ? code : null;
-      // Opera has no cut event... we try to at least catch the key combo
-      if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))
-        cm.replaceSelection("");
-    }
-  }
-
-  function onKeyPress(e) {
-    var cm = this;
-    if (signalDOMEvent(cm, e) || cm.options.onKeyEvent && cm.options.onKeyEvent(cm, addStop(e))) return;
-    var keyCode = e.keyCode, charCode = e.charCode;
-    if (opera && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;}
-    if (((opera && (!e.which || e.which < 10)) || khtml) && handleKeyBinding(cm, e)) return;
-    var ch = String.fromCharCode(charCode == null ? keyCode : charCode);
-    if (this.options.electricChars && this.doc.mode.electricChars &&
-        this.options.smartIndent && !isReadOnly(this) &&
-        this.doc.mode.electricChars.indexOf(ch) > -1)
-      setTimeout(operation(cm, function() {indentLine(cm, cm.doc.sel.to.line, "smart");}), 75);
-    if (handleCharBinding(cm, e, ch)) return;
-    if (ie && !ie_lt9) cm.display.inputHasSelection = null;
-    fastPoll(cm);
-  }
-
-  function onFocus(cm) {
-    if (cm.options.readOnly == "nocursor") return;
-    if (!cm.state.focused) {
-      signal(cm, "focus", cm);
-      cm.state.focused = true;
-      if (cm.display.wrapper.className.search(/\bCodeMirror-focused\b/) == -1)
-        cm.display.wrapper.className += " CodeMirror-focused";
-      resetInput(cm, true);
-    }
-    slowPoll(cm);
-    restartBlink(cm);
-  }
-  function onBlur(cm) {
-    if (cm.state.focused) {
-      signal(cm, "blur", cm);
-      cm.state.focused = false;
-      cm.display.wrapper.className = cm.display.wrapper.className.replace(" CodeMirror-focused", "");
-    }
-    clearInterval(cm.display.blinker);
-    setTimeout(function() {if (!cm.state.focused) cm.doc.sel.shift = false;}, 150);
-  }
-
-  var detectingSelectAll;
-  function onContextMenu(cm, e) {
-    if (signalDOMEvent(cm, e, "contextmenu")) return;
-    var display = cm.display, sel = cm.doc.sel;
-    if (eventInWidget(display, e)) return;
-
-    var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;
-    if (!pos || opera) return; // Opera is difficult.
-    if (posEq(sel.from, sel.to) || posLess(pos, sel.from) || !posLess(pos, sel.to))
-      operation(cm, setSelection)(cm.doc, pos, pos);
-
-    var oldCSS = display.input.style.cssText;
-    display.inputDiv.style.position = "absolute";
-    display.input.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e.clientY - 5) +
-      "px; left: " + (e.clientX - 5) + "px; z-index: 1000; background: white; outline: none;" +
-      "border-width: 0; outline: none; overflow: hidden; opacity: .05; -ms-opacity: .05; filter: alpha(opacity=5);";
-    focusInput(cm);
-    resetInput(cm, true);
-    // Adds "Select all" to context menu in FF
-    if (posEq(sel.from, sel.to)) display.input.value = display.prevInput = " ";
-
-    function prepareSelectAllHack() {
-      if (display.input.selectionStart != null) {
-        var extval = display.input.value = " " + (posEq(sel.from, sel.to) ? "" : display.input.value);
-        display.prevInput = " ";
-        display.input.selectionStart = 1; display.input.selectionEnd = extval.length;
-      }
-    }
-    function rehide() {
-      display.inputDiv.style.position = "relative";
-      display.input.style.cssText = oldCSS;
-      if (ie_lt9) display.scrollbarV.scrollTop = display.scroller.scrollTop = scrollPos;
-      slowPoll(cm);
-
-      // Try to detect the user choosing select-all
-      if (display.input.selectionStart != null) {
-        if (!ie || ie_lt9) prepareSelectAllHack();
-        clearTimeout(detectingSelectAll);
-        var i = 0, poll = function(){
-          if (display.prevInput == " " && display.input.selectionStart == 0)
-            operation(cm, commands.selectAll)(cm);
-          else if (i++ < 10) detectingSelectAll = setTimeout(poll, 500);
-          else resetInput(cm);
-        };
-        detectingSelectAll = setTimeout(poll, 200);
-      }
-    }
-
-    if (ie && !ie_lt9) prepareSelectAllHack();
-    if (captureMiddleClick) {
-      e_stop(e);
-      var mouseup = function() {
-        off(window, "mouseup", mouseup);
-        setTimeout(rehide, 20);
-      };
-      on(window, "mouseup", mouseup);
-    } else {
-      setTimeout(rehide, 50);
-    }
-  }
-
-  // UPDATING
-
-  var changeEnd = CodeMirror.changeEnd = function(change) {
-    if (!change.text) return change.to;
-    return Pos(change.from.line + change.text.length - 1,
-               lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0));
-  };
-
-  // Make sure a position will be valid after the given change.
-  function clipPostChange(doc, change, pos) {
-    if (!posLess(change.from, pos)) return clipPos(doc, pos);
-    var diff = (change.text.length - 1) - (change.to.line - change.from.line);
-    if (pos.line > change.to.line + diff) {
-      var preLine = pos.line - diff, lastLine = doc.first + doc.size - 1;
-      if (preLine > lastLine) return Pos(lastLine, getLine(doc, lastLine).text.length);
-      return clipToLen(pos, getLine(doc, preLine).text.length);
-    }
-    if (pos.line == change.to.line + diff)
-      return clipToLen(pos, lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0) +
-                       getLine(doc, change.to.line).text.length - change.to.ch);
-    var inside = pos.line - change.from.line;
-    return clipToLen(pos, change.text[inside].length + (inside ? 0 : change.from.ch));
-  }
-
-  // Hint can be null|"end"|"start"|"around"|{anchor,head}
-  function computeSelAfterChange(doc, change, hint) {
-    if (hint && typeof hint == "object") // Assumed to be {anchor, head} object
-      return {anchor: clipPostChange(doc, change, hint.anchor),
-              head: clipPostChange(doc, change, hint.head)};
-
-    if (hint == "start") return {anchor: change.from, head: change.from};
-
-    var end = changeEnd(change);
-    if (hint == "around") return {anchor: change.from, head: end};
-    if (hint == "end") return {anchor: end, head: end};
-
-    // hint is null, leave the selection alone as much as possible
-    var adjustPos = function(pos) {
-      if (posLess(pos, change.from)) return pos;
-      if (!posLess(change.to, pos)) return end;
-
-      var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;
-      if (pos.line == change.to.line) ch += end.ch - change.to.ch;
-      return Pos(line, ch);
-    };
-    return {anchor: adjustPos(doc.sel.anchor), head: adjustPos(doc.sel.head)};
-  }
-
-  function filterChange(doc, change, update) {
-    var obj = {
-      canceled: false,
-      from: change.from,
-      to: change.to,
-      text: change.text,
-      origin: change.origin,
-      cancel: function() { this.canceled = true; }
-    };
-    if (update) obj.update = function(from, to, text, origin) {
-      if (from) this.from = clipPos(doc, from);
-      if (to) this.to = clipPos(doc, to);
-      if (text) this.text = text;
-      if (origin !== undefined) this.origin = origin;
-    };
-    signal(doc, "beforeChange", doc, obj);
-    if (doc.cm) signal(doc.cm, "beforeChange", doc.cm, obj);
-
-    if (obj.canceled) return null;
-    return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin};
-  }
-
-  // Replace the range from from to to by the strings in replacement.
-  // change is a {from, to, text [, origin]} object
-  function makeChange(doc, change, selUpdate, ignoreReadOnly) {
-    if (doc.cm) {
-      if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, selUpdate, ignoreReadOnly);
-      if (doc.cm.state.suppressEdits) return;
-    }
-
-    if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) {
-      change = filterChange(doc, change, true);
-      if (!change) return;
-    }
-
-    // Possibly split or suppress the update based on the presence
-    // of read-only spans in its range.
-    var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);
-    if (split) {
-      for (var i = split.length - 1; i >= 1; --i)
-        makeChangeNoReadonly(doc, {from: split[i].from, to: split[i].to, text: [""]});
-      if (split.length)
-        makeChangeNoReadonly(doc, {from: split[0].from, to: split[0].to, text: change.text}, selUpdate);
-    } else {
-      makeChangeNoReadonly(doc, change, selUpdate);
-    }
-  }
-
-  function makeChangeNoReadonly(doc, change, selUpdate) {
-    var selAfter = computeSelAfterChange(doc, change, selUpdate);
-    addToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);
-
-    makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));
-    var rebased = [];
-
-    linkedDocs(doc, function(doc, sharedHist) {
-      if (!sharedHist && indexOf(rebased, doc.history) == -1) {
-        rebaseHist(doc.history, change);
-        rebased.push(doc.history);
-      }
-      makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));
-    });
-  }
-
-  function makeChangeFromHistory(doc, type) {
-    if (doc.cm && doc.cm.state.suppressEdits) return;
-
-    var hist = doc.history;
-    var event = (type == "undo" ? hist.done : hist.undone).pop();
-    if (!event) return;
-
-    var anti = {changes: [], anchorBefore: event.anchorAfter, headBefore: event.headAfter,
-                anchorAfter: event.anchorBefore, headAfter: event.headBefore,
-                generation: hist.generation};
-    (type == "undo" ? hist.undone : hist.done).push(anti);
-    hist.generation = event.generation || ++hist.maxGeneration;
-
-    var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange");
-
-    for (var i = event.changes.length - 1; i >= 0; --i) {
-      var change = event.changes[i];
-      change.origin = type;
-      if (filter && !filterChange(doc, change, false)) {
-        (type == "undo" ? hist.done : hist.undone).length = 0;
-        return;
-      }
-
-      anti.changes.push(historyChangeFromChange(doc, change));
-
-      var after = i ? computeSelAfterChange(doc, change, null)
-                    : {anchor: event.anchorBefore, head: event.headBefore};
-      makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));
-      var rebased = [];
-
-      linkedDocs(doc, function(doc, sharedHist) {
-        if (!sharedHist && indexOf(rebased, doc.history) == -1) {
-          rebaseHist(doc.history, change);
-          rebased.push(doc.history);
-        }
-        makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));
-      });
-    }
-  }
-
-  function shiftDoc(doc, distance) {
-    function shiftPos(pos) {return Pos(pos.line + distance, pos.ch);}
-    doc.first += distance;
-    if (doc.cm) regChange(doc.cm, doc.first, doc.first, distance);
-    doc.sel.head = shiftPos(doc.sel.head); doc.sel.anchor = shiftPos(doc.sel.anchor);
-    doc.sel.from = shiftPos(doc.sel.from); doc.sel.to = shiftPos(doc.sel.to);
-  }
-
-  function makeChangeSingleDoc(doc, change, selAfter, spans) {
-    if (doc.cm && !doc.cm.curOp)
-      return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans);
-
-    if (change.to.line < doc.first) {
-      shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));
-      return;
-    }
-    if (change.from.line > doc.lastLine()) return;
-
-    // Clip the change to the size of this doc
-    if (change.from.line < doc.first) {
-      var shift = change.text.length - 1 - (doc.first - change.from.line);
-      shiftDoc(doc, shift);
-      change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),
-                text: [lst(change.text)], origin: change.origin};
-    }
-    var last = doc.lastLine();
-    if (change.to.line > last) {
-      change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),
-                text: [change.text[0]], origin: change.origin};
-    }
-
-    change.removed = getBetween(doc, change.from, change.to);
-
-    if (!selAfter) selAfter = computeSelAfterChange(doc, change, null);
-    if (doc.cm) makeChangeSingleDocInEditor(doc.cm, change, spans, selAfter);
-    else updateDoc(doc, change, spans, selAfter);
-  }
-
-  function makeChangeSingleDocInEditor(cm, change, spans, selAfter) {
-    var doc = cm.doc, display = cm.display, from = change.from, to = change.to;
-
-    var recomputeMaxLength = false, checkWidthStart = from.line;
-    if (!cm.options.lineWrapping) {
-      checkWidthStart = lineNo(visualLine(doc, getLine(doc, from.line)));
-      doc.iter(checkWidthStart, to.line + 1, function(line) {
-        if (line == display.maxLine) {
-          recomputeMaxLength = true;
-          return true;
-        }
-      });
-    }
-
-    if (!posLess(doc.sel.head, change.from) && !posLess(change.to, doc.sel.head))
-      cm.curOp.cursorActivity = true;
-
-    updateDoc(doc, change, spans, selAfter, estimateHeight(cm));
-
-    if (!cm.options.lineWrapping) {
-      doc.iter(checkWidthStart, from.line + change.text.length, function(line) {
-        var len = lineLength(doc, line);
-        if (len > display.maxLineLength) {
-          display.maxLine = line;
-          display.maxLineLength = len;
-          display.maxLineChanged = true;
-          recomputeMaxLength = false;
-        }
-      });
-      if (recomputeMaxLength) cm.curOp.updateMaxLine = true;
-    }
-
-    // Adjust frontier, schedule worker
-    doc.frontier = Math.min(doc.frontier, from.line);
-    startWorker(cm, 400);
-
-    var lendiff = change.text.length - (to.line - from.line) - 1;
-    // Remember that these lines changed, for updating the display
-    regChange(cm, from.line, to.line + 1, lendiff);
-
-    if (hasHandler(cm, "change")) {
-      var changeObj = {from: from, to: to,
-                       text: change.text,
-                       removed: change.removed,
-                       origin: change.origin};
-      if (cm.curOp.textChanged) {
-        for (var cur = cm.curOp.textChanged; cur.next; cur = cur.next) {}
-        cur.next = changeObj;
-      } else cm.curOp.textChanged = changeObj;
-    }
-  }
-
-  function replaceRange(doc, code, from, to, origin) {
-    if (!to) to = from;
-    if (posLess(to, from)) { var tmp = to; to = from; from = tmp; }
-    if (typeof code == "string") code = splitLines(code);
-    makeChange(doc, {from: from, to: to, text: code, origin: origin}, null);
-  }
-
-  // POSITION OBJECT
-
-  function Pos(line, ch) {
-    if (!(this instanceof Pos)) return new Pos(line, ch);
-    this.line = line; this.ch = ch;
-  }
-  CodeMirror.Pos = Pos;
-
-  function posEq(a, b) {return a.line == b.line && a.ch == b.ch;}
-  function posLess(a, b) {return a.line < b.line || (a.line == b.line && a.ch < b.ch);}
-  function copyPos(x) {return Pos(x.line, x.ch);}
-
-  // SELECTION
-
-  function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1));}
-  function clipPos(doc, pos) {
-    if (pos.line < doc.first) return Pos(doc.first, 0);
-    var last = doc.first + doc.size - 1;
-    if (pos.line > last) return Pos(last, getLine(doc, last).text.length);
-    return clipToLen(pos, getLine(doc, pos.line).text.length);
-  }
-  function clipToLen(pos, linelen) {
-    var ch = pos.ch;
-    if (ch == null || ch > linelen) return Pos(pos.line, linelen);
-    else if (ch < 0) return Pos(pos.line, 0);
-    else return pos;
-  }
-  function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size;}
-
-  // If shift is held, this will move the selection anchor. Otherwise,
-  // it'll set the whole selection.
-  function extendSelection(doc, pos, other, bias) {
-    if (doc.sel.shift || doc.sel.extend) {
-      var anchor = doc.sel.anchor;
-      if (other) {
-        var posBefore = posLess(pos, anchor);
-        if (posBefore != posLess(other, anchor)) {
-          anchor = pos;
-          pos = other;
-        } else if (posBefore != posLess(pos, other)) {
-          pos = other;
-        }
-      }
-      setSelection(doc, anchor, pos, bias);
-    } else {
-      setSelection(doc, pos, other || pos, bias);
-    }
-    if (doc.cm) doc.cm.curOp.userSelChange = true;
-
-    if (doc.cm) {
-
-      var from = doc.sel.from;
-      var to = doc.sel.to;
-      if (posEq(from, to) && doc.cm.display.input.setSelectionRange) {
-
-
-       var rangeMinLine = Math.max(from.line - 10, 0);
-       var rangeMaxLine = Math.min(to.line + 10, doc.cm.lineCount() );
-       var fromOffset = from.ch;
-       var lastLineLength = doc.cm.getLine(rangeMaxLine).length + 1;
-
-       doc.eachLine(rangeMinLine, from.line, function(l) {
-         fromOffset += l.text.length + 1;
-       });
-
-
-       var selectedRange = doc.cm.getRange(
-         {line: rangeMinLine, ch: 0 },
-         {line: rangeMaxLine, ch: lastLineLength }
-       );
-
-        doc.cm.display.input.value = "";
-        doc.cm.display.input.setSelectionRange(0, 0);
-
-        doc.cm.display.input.blur();
-        doc.cm.display.input.focus();
-
-        doc.cm.display.input.value = selectedRange;
-        doc.cm.display.input.setSelectionRange(fromOffset, fromOffset);
-
-        clearTimeout(doc.cm.display.setFromRead);
-
-      }
-
-    }
-  }
-
-  function filterSelectionChange(doc, anchor, head) {
-    var obj = {anchor: anchor, head: head};
-    signal(doc, "beforeSelectionChange", doc, obj);
-    if (doc.cm) signal(doc.cm, "beforeSelectionChange", doc.cm, obj);
-    obj.anchor = clipPos(doc, obj.anchor); obj.head = clipPos(doc, obj.head);
-    return obj;
-  }
-
-  // Update the selection. Last two args are only used by
-  // updateDoc, since they have to be expressed in the line
-  // numbers before the update.
-  function setSelection(doc, anchor, head, bias, checkAtomic) {
-    if (!checkAtomic && hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange")) {
-      var filtered = filterSelectionChange(doc, anchor, head);
-      head = filtered.head;
-      anchor = filtered.anchor;
-    }
-
-    var sel = doc.sel;
-    sel.goalColumn = null;
-    // Skip over atomic spans.
-    if (checkAtomic || !posEq(anchor, sel.anchor))
-      anchor = skipAtomic(doc, anchor, bias, checkAtomic != "push");
-    if (checkAtomic || !posEq(head, sel.head))
-      head = skipAtomic(doc, head, bias, checkAtomic != "push");
-
-    if (posEq(sel.anchor, anchor) && posEq(sel.head, head)) return;
-
-    sel.anchor = anchor; sel.head = head;
-    var inv = posLess(head, anchor);
-    sel.from = inv ? head : anchor;
-    sel.to = inv ? anchor : head;
-
-    if (doc.cm)
-      doc.cm.curOp.updateInput = doc.cm.curOp.selectionChanged =
-        doc.cm.curOp.cursorActivity = true;
-
-    signalLater(doc, "cursorActivity", doc);
-  }
-
-  function reCheckSelection(cm) {
-    setSelection(cm.doc, cm.doc.sel.from, cm.doc.sel.to, null, "push");
-  }
-
-  function skipAtomic(doc, pos, bias, mayClear) {
-    var flipped = false, curPos = pos;
-    var dir = bias || 1;
-    doc.cantEdit = false;
-    search: for (;;) {
-      var line = getLine(doc, curPos.line);
-      if (line.markedSpans) {
-        for (var i = 0; i < line.markedSpans.length; ++i) {
-          var sp = line.markedSpans[i], m = sp.marker;
-          if ((sp.from == null || (m.inclusiveLeft ? sp.from <= curPos.ch : sp.from < curPos.ch)) &&
-              (sp.to == null || (m.inclusiveRight ? sp.to >= curPos.ch : sp.to > curPos.ch))) {
-            if (mayClear) {
-              signal(m, "beforeCursorEnter");
-              if (m.explicitlyCleared) {
-                if (!line.markedSpans) break;
-                else {--i; continue;}
-              }
-            }
-            if (!m.atomic) continue;
-            var newPos = m.find()[dir < 0 ? "from" : "to"];
-            if (posEq(newPos, curPos)) {
-              newPos.ch += dir;
-              if (newPos.ch < 0) {
-                if (newPos.line > doc.first) newPos = clipPos(doc, Pos(newPos.line - 1));
-                else newPos = null;
-              } else if (newPos.ch > line.text.length) {
-                if (newPos.line < doc.first + doc.size - 1) newPos = Pos(newPos.line + 1, 0);
-                else newPos = null;
-              }
-              if (!newPos) {
-                if (flipped) {
-                  // Driven in a corner -- no valid cursor position found at all
-                  // -- try again *with* clearing, if we didn't already
-                  if (!mayClear) return skipAtomic(doc, pos, bias, true);
-                  // Otherwise, turn off editing until further notice, and return the start of the doc
-                  doc.cantEdit = true;
-                  return Pos(doc.first, 0);
-                }
-                flipped = true; newPos = pos; dir = -dir;
-              }
-            }
-            curPos = newPos;
-            continue search;
-          }
-        }
-      }
-      return curPos;
-    }
-  }
-
-  // SCROLLING
-
-  function scrollCursorIntoView(cm) {
-    var coords = scrollPosIntoView(cm, cm.doc.sel.head, cm.options.cursorScrollMargin);
-    if (!cm.state.focused) return;
-    var display = cm.display, box = getRect(display.sizer), doScroll = null;
-    if (coords.top + box.top < 0) doScroll = true;
-    else if (coords.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) doScroll = false;
-    if (doScroll != null && !phantom) {
-      var hidden = display.cursor.style.display == "none";
-      if (hidden) {
-        display.cursor.style.display = "";
-        display.cursor.style.left = coords.left + "px";
-        display.cursor.style.top = (coords.top - display.viewOffset) + "px";
-      }
-      display.cursor.scrollIntoView(doScroll);
-      if (hidden) display.cursor.style.display = "none";
-    }
-  }
-
-  function scrollPosIntoView(cm, pos, margin) {
-    if (margin == null) margin = 0;
-    for (;;) {
-      var changed = false, coords = cursorCoords(cm, pos);
-      var scrollPos = calculateScrollPos(cm, coords.left, coords.top - margin, coords.left, coords.bottom + margin);
-      var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;
-      if (scrollPos.scrollTop != null) {
-        setScrollTop(cm, scrollPos.scrollTop);
-        if (Math.abs(cm.doc.scrollTop - startTop) > 1) changed = true;
-      }
-      if (scrollPos.scrollLeft != null) {
-        setScrollLeft(cm, scrollPos.scrollLeft);
-        if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) changed = true;
-      }
-      if (!changed) return coords;
-    }
-  }
-
-  function scrollIntoView(cm, x1, y1, x2, y2) {
-    var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);
-    if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);
-    if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);
-  }
-
-  function calculateScrollPos(cm, x1, y1, x2, y2) {
-    var display = cm.display, snapMargin = textHeight(cm.display);
-    if (y1 < 0) y1 = 0;
-    var screen = display.scroller.clientHeight - scrollerCutOff, screentop = display.scroller.scrollTop, result = {};
-    var docBottom = cm.doc.height + paddingVert(display);
-    var atTop = y1 < snapMargin, atBottom = y2 > docBottom - snapMargin;
-    if (y1 < screentop) {
-      result.scrollTop = atTop ? 0 : y1;
-    } else if (y2 > screentop + screen) {
-      var newTop = Math.min(y1, (atBottom ? docBottom : y2) - screen);
-      if (newTop != screentop) result.scrollTop = newTop;
-    }
-
-    var screenw = display.scroller.clientWidth - scrollerCutOff, screenleft = display.scroller.scrollLeft;
-    x1 += display.gutters.offsetWidth; x2 += display.gutters.offsetWidth;
-    var gutterw = display.gutters.offsetWidth;
-    var atLeft = x1 < gutterw + 10;
-    if (x1 < screenleft + gutterw || atLeft) {
-      if (atLeft) x1 = 0;
-      result.scrollLeft = Math.max(0, x1 - 10 - gutterw);
-    } else if (x2 > screenw + screenleft - 3) {
-      result.scrollLeft = x2 + 10 - screenw;
-    }
-    return result;
-  }
-
-  function updateScrollPos(cm, left, top) {
-    cm.curOp.updateScrollPos = {scrollLeft: left == null ? cm.doc.scrollLeft : left,
-                                scrollTop: top == null ? cm.doc.scrollTop : top};
-  }
-
-  function addToScrollPos(cm, left, top) {
-    var pos = cm.curOp.updateScrollPos || (cm.curOp.updateScrollPos = {scrollLeft: cm.doc.scrollLeft, scrollTop: cm.doc.scrollTop});
-    var scroll = cm.display.scroller;
-    pos.scrollTop = Math.max(0, Math.min(scroll.scrollHeight - scroll.clientHeight, pos.scrollTop + top));
-    pos.scrollLeft = Math.max(0, Math.min(scroll.scrollWidth - scroll.clientWidth, pos.scrollLeft + left));
-  }
-
-  // API UTILITIES
-
-  function indentLine(cm, n, how, aggressive) {
-    var doc = cm.doc;
-    if (how == null) how = "add";
-    if (how == "smart") {
-      if (!cm.doc.mode.indent) how = "prev";
-      else var state = getStateBefore(cm, n);
-    }
-
-    var tabSize = cm.options.tabSize;
-    var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);
-    var curSpaceString = line.text.match(/^\s*/)[0], indentation;
-    if (how == "smart") {
-      indentation = cm.doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);
-      if (indentation == Pass) {
-        if (!aggressive) return;
-        how = "prev";
-      }
-    }
-    if (how == "prev") {
-      if (n > doc.first) indentation = countColumn(getLine(doc, n-1).text, null, tabSize);
-      else indentation = 0;
-    } else if (how == "add") {
-      indentation = curSpace + cm.options.indentUnit;
-    } else if (how == "subtract") {
-      indentation = curSpace - cm.options.indentUnit;
-    } else if (typeof how == "number") {
-      indentation = curSpace + how;
-    }
-    indentation = Math.max(0, indentation);
-
-    var indentString = "", pos = 0;
-    if (cm.options.indentWithTabs)
-      for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";}
-    if (pos < indentation) indentString += spaceStr(indentation - pos);
-
-    if (indentString != curSpaceString)
-      replaceRange(cm.doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input");
-    line.stateAfter = null;
-  }
-
-  function changeLine(cm, handle, op) {
-    var no = handle, line = handle, doc = cm.doc;
-    if (typeof handle == "number") line = getLine(doc, clipLine(doc, handle));
-    else no = lineNo(handle);
-    if (no == null) return null;
-    if (op(line, no)) regChange(cm, no, no + 1);
-    else return null;
-    return line;
-  }
-
-  function findPosH(doc, pos, dir, unit, visually) {
-    var line = pos.line, ch = pos.ch, origDir = dir;
-    var lineObj = getLine(doc, line);
-    var possible = true;
-    function findNextLine() {
-      var l = line + dir;
-      if (l < doc.first || l >= doc.first + doc.size) return (possible = false);
-      line = l;
-      return lineObj = getLine(doc, l);
-    }
-    function moveOnce(boundToLine) {
-      var next = (visually ? moveVisually : moveLogically)(lineObj, ch, dir, true);
-      if (next == null) {
-        if (!boundToLine && findNextLine()) {
-          if (visually) ch = (dir < 0 ? lineRight : lineLeft)(lineObj);
-          else ch = dir < 0 ? lineObj.text.length : 0;
-        } else return (possible = false);
-      } else ch = next;
-      return true;
-    }
-
-    if (unit == "char") moveOnce();
-    else if (unit == "column") moveOnce(true);
-    else if (unit == "word" || unit == "group") {
-      var sawType = null, group = unit == "group";
-      for (var first = true;; first = false) {
-        if (dir < 0 && !moveOnce(!first)) break;
-        var cur = lineObj.text.charAt(ch) || "\n";
-        var type = isWordChar(cur) ? "w"
-          : !group ? null
-          : /\s/.test(cur) ? null
-          : "p";
-        if (sawType && sawType != type) {
-          if (dir < 0) {dir = 1; moveOnce();}
-          break;
-        }
-        if (type) sawType = type;
-        if (dir > 0 && !moveOnce(!first)) break;
-      }
-    }
-    var result = skipAtomic(doc, Pos(line, ch), origDir, true);
-    if (!possible) result.hitSide = true;
-    return result;
-  }
-
-  function findPosV(cm, pos, dir, unit) {
-    var doc = cm.doc, x = pos.left, y;
-    if (unit == "page") {
-      var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);
-      y = pos.top + dir * (pageSize - (dir < 0 ? 1.5 : .5) * textHeight(cm.display));
-    } else if (unit == "line") {
-      y = dir > 0 ? pos.bottom + 3 : pos.top - 3;
-    }
-    for (;;) {
-      var target = coordsChar(cm, x, y);
-      if (!target.outside) break;
-      if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break; }
-      y += dir * 5;
-    }
-    return target;
-  }
-
-  function findWordAt(line, pos) {
-    var start = pos.ch, end = pos.ch;
-    if (line) {
-      if ((pos.xRel < 0 || end == line.length) && start) --start; else ++end;
-      var startChar = line.charAt(start);
-      var check = isWordChar(startChar) ? isWordChar
-        : /\s/.test(startChar) ? function(ch) {return /\s/.test(ch);}
-        : function(ch) {return !/\s/.test(ch) && !isWordChar(ch);};
-      while (start > 0 && check(line.charAt(start - 1))) --start;
-      while (end < line.length && check(line.charAt(end))) ++end;
-    }
-    return {from: Pos(pos.line, start), to: Pos(pos.line, end)};
-  }
-
-  function selectLine(cm, line) {
-    extendSelection(cm.doc, Pos(line, 0), clipPos(cm.doc, Pos(line + 1, 0)));
-  }
-
-  // PROTOTYPE
-
-  // The publicly visible API. Note that operation(null, f) means
-  // 'wrap f in an operation, performed on its `this` parameter'
-
-  CodeMirror.prototype = {
-    constructor: CodeMirror,
-    focus: function(){window.focus(); focusInput(this); onFocus(this); fastPoll(this);},
-
-    setOption: function(option, value) {
-      var options = this.options, old = options[option];
-      if (options[option] == value && option != "mode") return;
-      options[option] = value;
-      if (optionHandlers.hasOwnProperty(option))
-        operation(this, optionHandlers[option])(this, value, old);
-    },
-
-    getOption: function(option) {return this.options[option];},
-    getDoc: function() {return this.doc;},
-
-    addKeyMap: function(map, bottom) {
-      this.state.keyMaps[bottom ? "push" : "unshift"](map);
-    },
-    removeKeyMap: function(map) {
-      var maps = this.state.keyMaps;
-      for (var i = 0; i < maps.length; ++i)
-        if (maps[i] == map || (typeof maps[i] != "string" && maps[i].name == map)) {
-          maps.splice(i, 1);
-          return true;
-        }
-    },
-
-    addOverlay: operation(null, function(spec, options) {
-      var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);
-      if (mode.startState) throw new Error("Overlays may not be stateful.");
-      this.state.overlays.push({mode: mode, modeSpec: spec, opaque: options && options.opaque});
-      this.state.modeGen++;
-      regChange(this);
-    }),
-    removeOverlay: operation(null, function(spec) {
-      var overlays = this.state.overlays;
-      for (var i = 0; i < overlays.length; ++i) {
-        var cur = overlays[i].modeSpec;
-        if (cur == spec || typeof spec == "string" && cur.name == spec) {
-          overlays.splice(i, 1);
-          this.state.modeGen++;
-          regChange(this);
-          return;
-        }
-      }
-    }),
-
-    indentLine: operation(null, function(n, dir, aggressive) {
-      if (typeof dir != "string" && typeof dir != "number") {
-        if (dir == null) dir = this.options.smartIndent ? "smart" : "prev";
-        else dir = dir ? "add" : "subtract";
-      }
-      if (isLine(this.doc, n)) indentLine(this, n, dir, aggressive);
-    }),
-    indentSelection: operation(null, function(how) {
-      var sel = this.doc.sel;
-      if (posEq(sel.from, sel.to)) return indentLine(this, sel.from.line, how);
-      var e = sel.to.line - (sel.to.ch ? 0 : 1);
-      for (var i = sel.from.line; i <= e; ++i) indentLine(this, i, how);
-    }),
-
-    // Fetch the parser token for a given character. Useful for hacks
-    // that want to inspect the mode state (say, for completion).
-    getTokenAt: function(pos, precise) {
-      var doc = this.doc;
-      pos = clipPos(doc, pos);
-      var state = getStateBefore(this, pos.line, precise), mode = this.doc.mode;
-      var line = getLine(doc, pos.line);
-      var stream = new StringStream(line.text, this.options.tabSize);
-      while (stream.pos < pos.ch && !stream.eol()) {
-        stream.start = stream.pos;
-        var style = mode.token(stream, state);
-      }
-      return {start: stream.start,
-              end: stream.pos,
-              string: stream.current(),
-              className: style || null, // Deprecated, use 'type' instead
-              type: style || null,
-              state: state};
-    },
-
-    getTokenTypeAt: function(pos) {
-      pos = clipPos(this.doc, pos);
-      var styles = getLineStyles(this, getLine(this.doc, pos.line));
-      var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;
-      if (ch == 0) return styles[2];
-      for (;;) {
-        var mid = (before + after) >> 1;
-        if ((mid ? styles[mid * 2 - 1] : 0) >= ch) after = mid;
-        else if (styles[mid * 2 + 1] < ch) before = mid + 1;
-        else return styles[mid * 2 + 2];
-      }
-    },
-
-    getModeAt: function(pos) {
-      var mode = this.doc.mode;
-      if (!mode.innerMode) return mode;
-      return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode;
-    },
-
-    getHelper: function(pos, type) {
-      if (!helpers.hasOwnProperty(type)) return;
-      var help = helpers[type], mode = this.getModeAt(pos);
-      return mode[type] && help[mode[type]] ||
-        mode.helperType && help[mode.helperType] ||
-        help[mode.name];
-    },
-
-    getStateAfter: function(line, precise) {
-      var doc = this.doc;
-      line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);
-      return getStateBefore(this, line + 1, precise);
-    },
-
-    cursorCoords: function(start, mode) {
-      var pos, sel = this.doc.sel;
-      if (start == null) pos = sel.head;
-      else if (typeof start == "object") pos = clipPos(this.doc, start);
-      else pos = start ? sel.from : sel.to;
-      return cursorCoords(this, pos, mode || "page");
-    },
-
-    charCoords: function(pos, mode) {
-      return charCoords(this, clipPos(this.doc, pos), mode || "page");
-    },
-
-    coordsChar: function(coords, mode) {
-      coords = fromCoordSystem(this, coords, mode || "page");
-      return coordsChar(this, coords.left, coords.top);
-    },
-
-    lineAtHeight: function(height, mode) {
-      height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top;
-      return lineAtHeight(this.doc, height + this.display.viewOffset);
-    },
-    heightAtLine: function(line, mode) {
-      var end = false, last = this.doc.first + this.doc.size - 1;
-      if (line < this.doc.first) line = this.doc.first;
-      else if (line > last) { line = last; end = true; }
-      var lineObj = getLine(this.doc, line);
-      return intoCoordSystem(this, getLine(this.doc, line), {top: 0, left: 0}, mode || "page").top +
-        (end ? lineObj.height : 0);
-    },
-
-    defaultTextHeight: function() { return textHeight(this.display); },
-    defaultCharWidth: function() { return charWidth(this.display); },
-
-    setGutterMarker: operation(null, function(line, gutterID, value) {
-      return changeLine(this, line, function(line) {
-        var markers = line.gutterMarkers || (line.gutterMarkers = {});
-        markers[gutterID] = value;
-        if (!value && isEmpty(markers)) line.gutterMarkers = null;
-        return true;
-      });
-    }),
-
-    clearGutter: operation(null, function(gutterID) {
-      var cm = this, doc = cm.doc, i = doc.first;
-      doc.iter(function(line) {
-        if (line.gutterMarkers && line.gutterMarkers[gutterID]) {
-          line.gutterMarkers[gutterID] = null;
-          regChange(cm, i, i + 1);
-          if (isEmpty(line.gutterMarkers)) line.gutterMarkers = null;
-        }
-        ++i;
-      });
-    }),
-
-    addLineClass: operation(null, function(handle, where, cls) {
-      return changeLine(this, handle, function(line) {
-        var prop = where == "text" ? "textClass" : where == "background" ? "bgClass" : "wrapClass";
-        if (!line[prop]) line[prop] = cls;
-        else if (new RegExp("(?:^|\\s)" + cls + "(?:$|\\s)").test(line[prop])) return false;
-        else line[prop] += " " + cls;
-        return true;
-      });
-    }),
-
-    removeLineClass: operation(null, function(handle, where, cls) {
-      return changeLine(this, handle, function(line) {
-        var prop = where == "text" ? "textClass" : where == "background" ? "bgClass" : "wrapClass";
-        var cur = line[prop];
-        if (!cur) return false;
-        else if (cls == null) line[prop] = null;
-        else {
-          var found = cur.match(new RegExp("(?:^|\\s+)" + cls + "(?:$|\\s+)"));
-          if (!found) return false;
-          var end = found.index + found[0].length;
-          line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null;
-        }
-        return true;
-      });
-    }),
-
-    addLineWidget: operation(null, function(handle, node, options) {
-      return addLineWidget(this, handle, node, options);
-    }),
-
-    removeLineWidget: function(widget) { widget.clear(); },
-
-    lineInfo: function(line) {
-      if (typeof line == "number") {
-        if (!isLine(this.doc, line)) return null;
-        var n = line;
-        line = getLine(this.doc, line);
-        if (!line) return null;
-      } else {
-        var n = lineNo(line);
-        if (n == null) return null;
-      }
-      return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,
-              textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass,
-              widgets: line.widgets};
-    },
-
-    getViewport: function() { return {from: this.display.showingFrom, to: this.display.showingTo};},
-
-    addWidget: function(pos, node, scroll, vert, horiz) {
-      var display = this.display;
-      pos = cursorCoords(this, clipPos(this.doc, pos));
-      var top = pos.bottom, left = pos.left;
-      node.style.position = "absolute";
-      display.sizer.appendChild(node);
-      if (vert == "over") {
-        top = pos.top;
-      } else if (vert == "above" || vert == "near") {
-        var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),
-        hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);
-        // Default to positioning above (if specified and possible); otherwise default to positioning below
-        if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)
-          top = pos.top - node.offsetHeight;
-        else if (pos.bottom + node.offsetHeight <= vspace)
-          top = pos.bottom;
-        if (left + node.offsetWidth > hspace)
-          left = hspace - node.offsetWidth;
-      }
-      node.style.top = top + "px";
-      node.style.left = node.style.right = "";
-      if (horiz == "right") {
-        left = display.sizer.clientWidth - node.offsetWidth;
-        node.style.right = "0px";
-      } else {
-        if (horiz == "left") left = 0;
-        else if (horiz == "middle") left = (display.sizer.clientWidth - node.offsetWidth) / 2;
-        node.style.left = left + "px";
-      }
-      if (scroll)
-        scrollIntoView(this, left, top, left + node.offsetWidth, top + node.offsetHeight);
-    },
-
-    triggerOnKeyDown: operation(null, onKeyDown),
-
-    execCommand: function(cmd) {return commands[cmd](this);},
-
-    findPosH: function(from, amount, unit, visually) {
-      var dir = 1;
-      if (amount < 0) { dir = -1; amount = -amount; }
-      for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) {
-        cur = findPosH(this.doc, cur, dir, unit, visually);
-        if (cur.hitSide) break;
-      }
-      return cur;
-    },
-
-    moveH: operation(null, function(dir, unit) {
-      var sel = this.doc.sel, pos;
-      if (sel.shift || sel.extend || posEq(sel.from, sel.to))
-        pos = findPosH(this.doc, sel.head, dir, unit, this.options.rtlMoveVisually);
-      else
-        pos = dir < 0 ? sel.from : sel.to;
-      extendSelection(this.doc, pos, pos, dir);
-    }),
-
-    deleteH: operation(null, function(dir, unit) {
-      var sel = this.doc.sel;
-      if (!posEq(sel.from, sel.to)) replaceRange(this.doc, "", sel.from, sel.to, "+delete");
-      else replaceRange(this.doc, "", sel.from, findPosH(this.doc, sel.head, dir, unit, false), "+delete");
-      this.curOp.userSelChange = true;
-    }),
-
-    findPosV: function(from, amount, unit, goalColumn) {
-      var dir = 1, x = goalColumn;
-      if (amount < 0) { dir = -1; amount = -amount; }
-      for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) {
-        var coords = cursorCoords(this, cur, "div");
-        if (x == null) x = coords.left;
-        else coords.left = x;
-        cur = findPosV(this, coords, dir, unit);
-        if (cur.hitSide) break;
-      }
-      return cur;
-    },
-
-    moveV: operation(null, function(dir, unit) {
-      var sel = this.doc.sel;
-      var pos = cursorCoords(this, sel.head, "div");
-      if (sel.goalColumn != null) pos.left = sel.goalColumn;
-      var target = findPosV(this, pos, dir, unit);
-
-      if (unit == "page") addToScrollPos(this, 0, charCoords(this, target, "div").top - pos.top);
-      extendSelection(this.doc, target, target, dir);
-      sel.goalColumn = pos.left;
-    }),
-
-    toggleOverwrite: function(value) {
-      if (value != null && value == this.state.overwrite) return;
-      if (this.state.overwrite = !this.state.overwrite)
-        this.display.cursor.className += " CodeMirror-overwrite";
-      else
-        this.display.cursor.className = this.display.cursor.className.replace(" CodeMirror-overwrite", "");
-    },
-    hasFocus: function() { return this.state.focused; },
-
-    scrollTo: operation(null, function(x, y) {
-      updateScrollPos(this, x, y);
-    }),
-    getScrollInfo: function() {
-      var scroller = this.display.scroller, co = scrollerCutOff;
-      return {left: scroller.scrollLeft, top: scroller.scrollTop,
-              height: scroller.scrollHeight - co, width: scroller.scrollWidth - co,
-              clientHeight: scroller.clientHeight - co, clientWidth: scroller.clientWidth - co};
-    },
-
-    scrollIntoView: operation(null, function(pos, margin) {
-      if (typeof pos == "number") pos = Pos(pos, 0);
-      if (!margin) margin = 0;
-      var coords = pos;
-
-      if (!pos || pos.line != null) {
-        this.curOp.scrollToPos = pos ? clipPos(this.doc, pos) : this.doc.sel.head;
-        this.curOp.scrollToPosMargin = margin;
-        coords = cursorCoords(this, this.curOp.scrollToPos);
-      }
-      var sPos = calculateScrollPos(this, coords.left, coords.top - margin, coords.right, coords.bottom + margin);
-      updateScrollPos(this, sPos.scrollLeft, sPos.scrollTop);
-    }),
-
-    setSize: operation(null, function(width, height) {
-      function interpret(val) {
-        return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val;
-      }
-      if (width != null) this.display.wrapper.style.width = interpret(width);
-      if (height != null) this.display.wrapper.style.height = interpret(height);
-      if (this.options.lineWrapping)
-        this.display.measureLineCache.length = this.display.measureLineCachePos = 0;
-      this.curOp.forceUpdate = true;
-    }),
-
-    operation: function(f){return runInOp(this, f);},
-
-    refresh: operation(null, function() {
-      clearCaches(this);
-      updateScrollPos(this, this.doc.scrollLeft, this.doc.scrollTop);
-      regChange(this);
-    }),
-
-    swapDoc: operation(null, function(doc) {
-      var old = this.doc;
-      old.cm = null;
-      attachDoc(this, doc);
-      clearCaches(this);
-      resetInput(this, true);
-      updateScrollPos(this, doc.scrollLeft, doc.scrollTop);
-      return old;
-    }),
-
-    getInputField: function(){return this.display.input;},
-    getWrapperElement: function(){return this.display.wrapper;},
-    getScrollerElement: function(){return this.display.scroller;},
-    getGutterElement: function(){return this.display.gutters;}
-  };
-  eventMixin(CodeMirror);
-
-  // OPTION DEFAULTS
-
-  var optionHandlers = CodeMirror.optionHandlers = {};
-
-  // The default configuration options.
-  var defaults = CodeMirror.defaults = {};
-
-  function option(name, deflt, handle, notOnInit) {
-    CodeMirror.defaults[name] = deflt;
-    if (handle) optionHandlers[name] =
-      notOnInit ? function(cm, val, old) {if (old != Init) handle(cm, val, old);} : handle;
-  }
-
-  var Init = CodeMirror.Init = {toString: function(){return "CodeMirror.Init";}};
-
-  // These two are, on init, called from the constructor because they
-  // have to be initialized before the editor can start at all.
-  option("value", "", function(cm, val) {
-    cm.setValue(val);
-  }, true);
-  option("mode", null, function(cm, val) {
-    cm.doc.modeOption = val;
-    loadMode(cm);
-  }, true);
-
-  option("indentUnit", 2, loadMode, true);
-  option("indentWithTabs", false);
-  option("smartIndent", true);
-  option("tabSize", 4, function(cm) {
-    loadMode(cm);
-    clearCaches(cm);
-    regChange(cm);
-  }, true);
-  option("electricChars", true);
-  option("rtlMoveVisually", !windows);
-
-  option("theme", "default", function(cm) {
-    themeChanged(cm);
-    guttersChanged(cm);
-  }, true);
-  option("keyMap", "default", keyMapChanged);
-  option("extraKeys", null);
-
-  option("onKeyEvent", null);
-  option("onDragEvent", null);
-
-  option("lineWrapping", false, wrappingChanged, true);
-  option("gutters", [], function(cm) {
-    setGuttersForLineNumbers(cm.options);
-    guttersChanged(cm);
-  }, true);
-  option("fixedGutter", true, function(cm, val) {
-    cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0";
-    cm.refresh();
-  }, true);
-  option("coverGutterNextToScrollbar", false, updateScrollbars, true);
-  option("lineNumbers", false, function(cm) {
-    setGuttersForLineNumbers(cm.options);
-    guttersChanged(cm);
-  }, true);
-  option("firstLineNumber", 1, guttersChanged, true);
-  option("lineNumberFormatter", function(integer) {return integer;}, guttersChanged, true);
-  option("showCursorWhenSelecting", false, updateSelection, true);
-
-  option("readOnly", false, function(cm, val) {
-    if (val == "nocursor") {onBlur(cm); cm.display.input.blur();}
-    else if (!val) resetInput(cm, true);
-  });
-  option("dragDrop", true);
-
-  option("cursorBlinkRate", 530);
-  option("cursorScrollMargin", 0);
-  option("cursorHeight", 1);
-  option("workTime", 100);
-  option("workDelay", 100);
-  option("flattenSpans", true);
-  option("pollInterval", 100);
-  option("undoDepth", 40, function(cm, val){cm.doc.history.undoDepth = val;});
-  option("historyEventDelay", 500);
-  option("viewportMargin", 10, function(cm){cm.refresh();}, true);
-  option("maxHighlightLength", 10000, function(cm){loadMode(cm); cm.refresh();}, true);
-  option("moveInputWithCursor", true, function(cm, val) {
-    if (!val) cm.display.inputDiv.style.top = cm.display.inputDiv.style.left = 0;
-  });
-
-  option("tabindex", null, function(cm, val) {
-    cm.display.input.tabIndex = val || "";
-  });
-  option("autofocus", null);
-
-  // MODE DEFINITION AND QUERYING
-
-  // Known modes, by name and by MIME
-  var modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {};
-
-  CodeMirror.defineMode = function(name, mode) {
-    if (!CodeMirror.defaults.mode && name != "null") CodeMirror.defaults.mode = name;
-    if (arguments.length > 2) {
-      mode.dependencies = [];
-      for (var i = 2; i < arguments.length; ++i) mode.dependencies.push(arguments[i]);
-    }
-    modes[name] = mode;
-  };
-
-  CodeMirror.defineMIME = function(mime, spec) {
-    mimeModes[mime] = spec;
-  };
-
-  CodeMirror.resolveMode = function(spec) {
-    if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) {
-      spec = mimeModes[spec];
-    } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) {
-      var found = mimeModes[spec.name];
-      spec = createObj(found, spec);
-      spec.name = found.name;
-    } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) {
-      return CodeMirror.resolveMode("application/xml");
-    }
-    if (typeof spec == "string") return {name: spec};
-    else return spec || {name: "null"};
-  };
-
-  CodeMirror.getMode = function(options, spec) {
-    var spec = CodeMirror.resolveMode(spec);
-    var mfactory = modes[spec.name];
-    if (!mfactory) return CodeMirror.getMode(options, "text/plain");
-    var modeObj = mfactory(options, spec);
-    if (modeExtensions.hasOwnProperty(spec.name)) {
-      var exts = modeExtensions[spec.name];
-      for (var prop in exts) {
-        if (!exts.hasOwnProperty(prop)) continue;
-        if (modeObj.hasOwnProperty(prop)) modeObj["_" + prop] = modeObj[prop];
-        modeObj[prop] = exts[prop];
-      }
-    }
-    modeObj.name = spec.name;
-
-    return modeObj;
-  };
-
-  CodeMirror.defineMode("null", function() {
-    return {token: function(stream) {stream.skipToEnd();}};
-  });
-  CodeMirror.defineMIME("text/plain", "null");
-
-  var modeExtensions = CodeMirror.modeExtensions = {};
-  CodeMirror.extendMode = function(mode, properties) {
-    var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});
-    copyObj(properties, exts);
-  };
-
-  // EXTENSIONS
-
-  CodeMirror.defineExtension = function(name, func) {
-    CodeMirror.prototype[name] = func;
-  };
-  CodeMirror.defineDocExtension = function(name, func) {
-    Doc.prototype[name] = func;
-  };
-  CodeMirror.defineOption = option;
-
-  var initHooks = [];
-  CodeMirror.defineInitHook = function(f) {initHooks.push(f);};
-
-  var helpers = CodeMirror.helpers = {};
-  CodeMirror.registerHelper = function(type, name, value) {
-    if (!helpers.hasOwnProperty(type)) helpers[type] = CodeMirror[type] = {};
-    helpers[type][name] = value;
-  };
-
-  // UTILITIES
-
-  CodeMirror.isWordChar = isWordChar;
-
-  // MODE STATE HANDLING
-
-  // Utility functions for working with state. Exported because modes
-  // sometimes need to do this.
-  function copyState(mode, state) {
-    if (state === true) return state;
-    if (mode.copyState) return mode.copyState(state);
-    var nstate = {};
-    for (var n in state) {
-      var val = state[n];
-      if (val instanceof Array) val = val.concat([]);
-      nstate[n] = val;
-    }
-    return nstate;
-  }
-  CodeMirror.copyState = copyState;
-
-  function startState(mode, a1, a2) {
-    return mode.startState ? mode.startState(a1, a2) : true;
-  }
-  CodeMirror.startState = startState;
-
-  CodeMirror.innerMode = function(mode, state) {
-    while (mode.innerMode) {
-      var info = mode.innerMode(state);
-      if (!info || info.mode == mode) break;
-      state = info.state;
-      mode = info.mode;
-    }
-    return info || {mode: mode, state: state};
-  };
-
-  // STANDARD COMMANDS
-
-  var commands = CodeMirror.commands = {
-    selectAll: function(cm) {cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()));},
-    killLine: function(cm) {
-      var from = cm.getCursor(true), to = cm.getCursor(false), sel = !posEq(from, to);
-      if (!sel && cm.getLine(from.line).length == from.ch)
-        cm.replaceRange("", from, Pos(from.line + 1, 0), "+delete");
-      else cm.replaceRange("", from, sel ? to : Pos(from.line), "+delete");
-    },
-    deleteLine: function(cm) {
-      var l = cm.getCursor().line;
-      cm.replaceRange("", Pos(l, 0), Pos(l), "+delete");
-    },
-    delLineLeft: function(cm) {
-      var cur = cm.getCursor();
-      cm.replaceRange("", Pos(cur.line, 0), cur, "+delete");
-    },
-    undo: function(cm) {cm.undo();},
-    redo: function(cm) {cm.redo();},
-    goDocStart: function(cm) {cm.extendSelection(Pos(cm.firstLine(), 0));},
-    goDocEnd: function(cm) {cm.extendSelection(Pos(cm.lastLine()));},
-    goLineStart: function(cm) {
-      cm.extendSelection(lineStart(cm, cm.getCursor().line));
-    },
-    goLineStartSmart: function(cm) {
-      var cur = cm.getCursor(), start = lineStart(cm, cur.line);
-      var line = cm.getLineHandle(start.line);
-      var order = getOrder(line);
-      if (!order || order[0].level == 0) {
-        var firstNonWS = Math.max(0, line.text.search(/\S/));
-        var inWS = cur.line == start.line && cur.ch <= firstNonWS && cur.ch;
-        cm.extendSelection(Pos(start.line, inWS ? 0 : firstNonWS));
-      } else cm.extendSelection(start);
-    },
-    goLineEnd: function(cm) {
-      cm.extendSelection(lineEnd(cm, cm.getCursor().line));
-    },
-    goLineRight: function(cm) {
-      var top = cm.charCoords(cm.getCursor(), "div").top + 5;
-      cm.extendSelection(cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div"));
-    },
-    goLineLeft: function(cm) {
-      var top = cm.charCoords(cm.getCursor(), "div").top + 5;
-      cm.extendSelection(cm.coordsChar({left: 0, top: top}, "div"));
-    },
-    goLineUp: function(cm) {cm.moveV(-1, "line");},
-    goLineDown: function(cm) {cm.moveV(1, "line");},
-    goPageUp: function(cm) {cm.moveV(-1, "page");},
-    goPageDown: function(cm) {cm.moveV(1, "page");},
-    goCharLeft: function(cm) {cm.moveH(-1, "char");},
-    goCharRight: function(cm) {cm.moveH(1, "char");},
-    goColumnLeft: function(cm) {cm.moveH(-1, "column");},
-    goColumnRight: function(cm) {cm.moveH(1, "column");},
-    goWordLeft: function(cm) {cm.moveH(-1, "word");},
-    goGroupRight: function(cm) {cm.moveH(1, "group");},
-    goGroupLeft: function(cm) {cm.moveH(-1, "group");},
-    goWordRight: function(cm) {cm.moveH(1, "word");},
-    delCharBefore: function(cm) {cm.deleteH(-1, "char");},
-    delCharAfter: function(cm) {cm.deleteH(1, "char");},
-    delWordBefore: function(cm) {cm.deleteH(-1, "word");},
-    delWordAfter: function(cm) {cm.deleteH(1, "word");},
-    delGroupBefore: function(cm) {cm.deleteH(-1, "group");},
-    delGroupAfter: function(cm) {cm.deleteH(1, "group");},
-    indentAuto: function(cm) {cm.indentSelection("smart");},
-    indentMore: function(cm) {cm.indentSelection("add");},
-    indentLess: function(cm) {cm.indentSelection("subtract");},
-    insertTab: function(cm) {cm.replaceSelection("\t", "end", "+input");},
-    defaultTab: function(cm) {
-      if (cm.somethingSelected()) cm.indentSelection("add");
-      else cm.replaceSelection("\t", "end", "+input");
-    },
-    transposeChars: function(cm) {
-      var cur = cm.getCursor(), line = cm.getLine(cur.line);
-      if (cur.ch > 0 && cur.ch < line.length - 1)
-        cm.replaceRange(line.charAt(cur.ch) + line.charAt(cur.ch - 1),
-                        Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1));
-    },
-    newlineAndIndent: function(cm) {
-      operation(cm, function() {
-        cm.replaceSelection("\n", "end", "+input");
-        cm.indentLine(cm.getCursor().line, null, true);
-      })();
-    },
-    toggleOverwrite: function(cm) {cm.toggleOverwrite();}
-  };
-
-  // STANDARD KEYMAPS
-
-  var keyMap = CodeMirror.keyMap = {};
-  keyMap.basic = {
-    "Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown",
-    "End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown",
-    "Delete": "delCharAfter", "Backspace": "delCharBefore", "Tab": "defaultTab", "Shift-Tab": "indentAuto",
-    "Enter": "newlineAndIndent", "Insert": "toggleOverwrite"
-  };
-  // Note that the save and find-related commands aren't defined by
-  // default. Unknown commands are simply ignored.
-  keyMap.pcDefault = {
-    "Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo",
-    "Ctrl-Home": "goDocStart", "Alt-Up": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Down": "goDocEnd",
-    "Ctrl-Left": "goGroupLeft", "Ctrl-Right": "goGroupRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd",
-    "Ctrl-Backspace": "delGroupBefore", "Ctrl-Delete": "delGroupAfter", "Ctrl-S": "save", "Ctrl-F": "find",
-    "Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll",
-    "Ctrl-[": "indentLess", "Ctrl-]": "indentMore",
-    fallthrough: "basic"
-  };
-  keyMap.macDefault = {
-    "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo",
-    "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft",
-    "Alt-Right": "goGroupRight", "Cmd-Left": "goLineStart", "Cmd-Right": "goLineEnd", "Alt-Backspace": "delGroupBefore",
-    "Ctrl-Alt-Backspace": "delGroupAfter", "Alt-Delete": "delGroupAfter", "Cmd-S": "save", "Cmd-F": "find",
-    "Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll",
-    "Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delLineLeft",
-    fallthrough: ["basic", "emacsy"]
-  };
-  keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault;
-  keyMap.emacsy = {
-    "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown",
-    "Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd",
-    "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore",
-    "Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars"
-  };
-
-  // KEYMAP DISPATCH
-
-  function getKeyMap(val) {
-    if (typeof val == "string") return keyMap[val];
-    else return val;
-  }
-
-  function lookupKey(name, maps, handle) {
-    function lookup(map) {
-      map = getKeyMap(map);
-      var found = map[name];
-      if (found === false) return "stop";
-      if (found != null && handle(found)) return true;
-      if (map.nofallthrough) return "stop";
-
-      var fallthrough = map.fallthrough;
-      if (fallthrough == null) return false;
-      if (Object.prototype.toString.call(fallthrough) != "[object Array]")
-        return lookup(fallthrough);
-      for (var i = 0, e = fallthrough.length; i < e; ++i) {
-        var done = lookup(fallthrough[i]);
-        if (done) return done;
-      }
-      return false;
-    }
-
-    for (var i = 0; i < maps.length; ++i) {
-      var done = lookup(maps[i]);
-      if (done) return done != "stop";
-    }
-  }
-  function isModifierKey(event) {
-    var name = keyNames[event.keyCode];
-    return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod";
-  }
-  function keyName(event, noShift) {
-    if (opera && event.keyCode == 34 && event["char"]) return false;
-    var name = keyNames[event.keyCode];
-    if (name == null || event.altGraphKey) return false;
-    if (event.altKey) name = "Alt-" + name;
-    if (flipCtrlCmd ? event.metaKey : event.ctrlKey) name = "Ctrl-" + name;
-    if (flipCtrlCmd ? event.ctrlKey : event.metaKey) name = "Cmd-" + name;
-    if (!noShift && event.shiftKey) name = "Shift-" + name;
-    return name;
-  }
-  CodeMirror.lookupKey = lookupKey;
-  CodeMirror.isModifierKey = isModifierKey;
-  CodeMirror.keyName = keyName;
-
-  // FROMTEXTAREA
-
-  CodeMirror.fromTextArea = function(textarea, options) {
-    if (!options) options = {};
-    options.value = textarea.value;
-    if (!options.tabindex && textarea.tabindex)
-      options.tabindex = textarea.tabindex;
-    if (!options.placeholder && textarea.placeholder)
-      options.placeholder = textarea.placeholder;
-    // Set autofocus to true if this textarea is focused, or if it has
-    // autofocus and no other element is focused.
-    if (options.autofocus == null) {
-      var hasFocus = document.body;
-      // doc.activeElement occasionally throws on IE
-      try { hasFocus = document.activeElement; } catch(e) {}
-      options.autofocus = hasFocus == textarea ||
-        textarea.getAttribute("autofocus") != null && hasFocus == document.body;
-    }
-
-    function save() {textarea.value = cm.getValue();}
-    if (textarea.form) {
-      on(textarea.form, "submit", save);
-      // Deplorable hack to make the submit method do the right thing.
-      if (!options.leaveSubmitMethodAlone) {
-        var form = textarea.form, realSubmit = form.submit;
-        try {
-          var wrappedSubmit = form.submit = function() {
-            save();
-            form.submit = realSubmit;
-            form.submit();
-            form.submit = wrappedSubmit;
-          };
-        } catch(e) {}
-      }
-    }
-
-    textarea.style.display = "none";
-    var cm = CodeMirror(function(node) {
-      textarea.parentNode.insertBefore(node, textarea.nextSibling);
-    }, options);
-    cm.save = save;
-    cm.getTextArea = function() { return textarea; };
-    cm.toTextArea = function() {
-      save();
-      textarea.parentNode.removeChild(cm.getWrapperElement());
-      textarea.style.display = "";
-      if (textarea.form) {
-        off(textarea.form, "submit", save);
-        if (typeof textarea.form.submit == "function")
-          textarea.form.submit = realSubmit;
-      }
-    };
-    return cm;
-  };
-
-  // STRING STREAM
-
-  // Fed to the mode parsers, provides helper functions to make
-  // parsers more succinct.
-
-  // The character stream used by a mode's parser.
-  function StringStream(string, tabSize) {
-    this.pos = this.start = 0;
-    this.string = string;
-    this.tabSize = tabSize || 8;
-    this.lastColumnPos = this.lastColumnValue = 0;
-  }
-
-  StringStream.prototype = {
-    eol: function() {return this.pos >= this.string.length;},
-    sol: function() {return this.pos == 0;},
-    peek: function() {return this.string.charAt(this.pos) || undefined;},
-    next: function() {
-      if (this.pos < this.string.length)
-        return this.string.charAt(this.pos++);
-    },
-    eat: function(match) {
-      var ch = this.string.charAt(this.pos);
-      if (typeof match == "string") var ok = ch == match;
-      else var ok = ch && (match.test ? match.test(ch) : match(ch));
-      if (ok) {++this.pos; return ch;}
-    },
-    eatWhile: function(match) {
-      var start = this.pos;
-      while (this.eat(match)){}
-      return this.pos > start;
-    },
-    eatSpace: function() {
-      var start = this.pos;
-      while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos;
-      return this.pos > start;
-    },
-    skipToEnd: function() {this.pos = this.string.length;},
-    skipTo: function(ch) {
-      var found = this.string.indexOf(ch, this.pos);
-      if (found > -1) {this.pos = found; return true;}
-    },
-    backUp: function(n) {this.pos -= n;},
-    column: function() {
-      if (this.lastColumnPos < this.start) {
-        this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);
-        this.lastColumnPos = this.start;
-      }
-      return this.lastColumnValue;
-    },
-    indentation: function() {return countColumn(this.string, null, this.tabSize);},
-    match: function(pattern, consume, caseInsensitive) {
-      if (typeof pattern == "string") {
-        var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;};
-        var substr = this.string.substr(this.pos, pattern.length);
-        if (cased(substr) == cased(pattern)) {
-          if (consume !== false) this.pos += pattern.length;
-          return true;
-        }
-      } else {
-        var match = this.string.slice(this.pos).match(pattern);
-        if (match && match.index > 0) return null;
-        if (match && consume !== false) this.pos += match[0].length;
-        return match;
-      }
-    },
-    current: function(){return this.string.slice(this.start, this.pos);}
-  };
-  CodeMirror.StringStream = StringStream;
-
-  // TEXTMARKERS
-
-  function TextMarker(doc, type) {
-    this.lines = [];
-    this.type = type;
-    this.doc = doc;
-  }
-  CodeMirror.TextMarker = TextMarker;
-  eventMixin(TextMarker);
-
-  TextMarker.prototype.clear = function() {
-    if (this.explicitlyCleared) return;
-    var cm = this.doc.cm, withOp = cm && !cm.curOp;
-    if (withOp) startOperation(cm);
-    if (hasHandler(this, "clear")) {
-      var found = this.find();
-      if (found) signalLater(this, "clear", found.from, found.to);
-    }
-    var min = null, max = null;
-    for (var i = 0; i < this.lines.length; ++i) {
-      var line = this.lines[i];
-      var span = getMarkedSpanFor(line.markedSpans, this);
-      if (span.to != null) max = lineNo(line);
-      line.markedSpans = removeMarkedSpan(line.markedSpans, span);
-      if (span.from != null)
-        min = lineNo(line);
-      else if (this.collapsed && !lineIsHidden(this.doc, line) && cm)
-        updateLineHeight(line, textHeight(cm.display));
-    }
-    if (cm && this.collapsed && !cm.options.lineWrapping) for (var i = 0; i < this.lines.length; ++i) {
-      var visual = visualLine(cm.doc, this.lines[i]), len = lineLength(cm.doc, visual);
-      if (len > cm.display.maxLineLength) {
-        cm.display.maxLine = visual;
-        cm.display.maxLineLength = len;
-        cm.display.maxLineChanged = true;
-      }
-    }
-
-    if (min != null && cm) regChange(cm, min, max + 1);
-    this.lines.length = 0;
-    this.explicitlyCleared = true;
-    if (this.atomic && this.doc.cantEdit) {
-      this.doc.cantEdit = false;
-      if (cm) reCheckSelection(cm);
-    }
-    if (withOp) endOperation(cm);
-  };
-
-  TextMarker.prototype.find = function() {
-    var from, to;
-    for (var i = 0; i < this.lines.length; ++i) {
-      var line = this.lines[i];
-      var span = getMarkedSpanFor(line.markedSpans, this);
-      if (span.from != null || span.to != null) {
-        var found = lineNo(line);
-        if (span.from != null) from = Pos(found, span.from);
-        if (span.to != null) to = Pos(found, span.to);
-      }
-    }
-    if (this.type == "bookmark") return from;
-    return from && {from: from, to: to};
-  };
-
-  TextMarker.prototype.changed = function() {
-    var pos = this.find(), cm = this.doc.cm;
-    if (!pos || !cm) return;
-    var line = getLine(this.doc, pos.from.line);
-    clearCachedMeasurement(cm, line);
-    if (pos.from.line >= cm.display.showingFrom && pos.from.line < cm.display.showingTo) {
-      for (var node = cm.display.lineDiv.firstChild; node; node = node.nextSibling) if (node.lineObj == line) {
-        if (node.offsetHeight != line.height) updateLineHeight(line, node.offsetHeight);
-        break;
-      }
-      runInOp(cm, function() {
-        cm.curOp.selectionChanged = cm.curOp.forceUpdate = cm.curOp.updateMaxLine = true;
-      });
-    }
-  };
-
-  TextMarker.prototype.attachLine = function(line) {
-    if (!this.lines.length && this.doc.cm) {
-      var op = this.doc.cm.curOp;
-      if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)
-        (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this);
-    }
-    this.lines.push(line);
-  };
-  TextMarker.prototype.detachLine = function(line) {
-    this.lines.splice(indexOf(this.lines, line), 1);
-    if (!this.lines.length && this.doc.cm) {
-      var op = this.doc.cm.curOp;
-      (op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);
-    }
-  };
-
-  function markText(doc, from, to, options, type) {
-    if (options && options.shared) return markTextShared(doc, from, to, options, type);
-    if (doc.cm && !doc.cm.curOp) return operation(doc.cm, markText)(doc, from, to, options, type);
-
-    var marker = new TextMarker(doc, type);
-    if (type == "range" && !posLess(from, to)) return marker;
-    if (options) copyObj(options, marker);
-    if (marker.replacedWith) {
-      marker.collapsed = true;
-      marker.replacedWith = elt("span", [marker.replacedWith], "CodeMirror-widget");
-      if (!options.handleMouseEvents) marker.replacedWith.ignoreEvents = true;
-    }
-    if (marker.collapsed) sawCollapsedSpans = true;
-
-    if (marker.addToHistory)
-      addToHistory(doc, {from: from, to: to, origin: "markText"},
-                   {head: doc.sel.head, anchor: doc.sel.anchor}, NaN);
-
-    var curLine = from.line, size = 0, collapsedAtStart, collapsedAtEnd, cm = doc.cm, updateMaxLine;
-    doc.iter(curLine, to.line + 1, function(line) {
-      if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(doc, line) == cm.display.maxLine)
-        updateMaxLine = true;
-      var span = {from: null, to: null, marker: marker};
-      size += line.text.length;
-      if (curLine == from.line) {span.from = from.ch; size -= from.ch;}
-      if (curLine == to.line) {span.to = to.ch; size -= line.text.length - to.ch;}
-      if (marker.collapsed) {
-        if (curLine == to.line) collapsedAtEnd = collapsedSpanAt(line, to.ch);
-        if (curLine == from.line) collapsedAtStart = collapsedSpanAt(line, from.ch);
-        else updateLineHeight(line, 0);
-      }
-      addMarkedSpan(line, span);
-      ++curLine;
-    });
-    if (marker.collapsed) doc.iter(from.line, to.line + 1, function(line) {
-      if (lineIsHidden(doc, line)) updateLineHeight(line, 0);
-    });
-
-    if (marker.clearOnEnter) on(marker, "beforeCursorEnter", function() { marker.clear(); });
-
-    if (marker.readOnly) {
-      sawReadOnlySpans = true;
-      if (doc.history.done.length || doc.history.undone.length)
-        doc.clearHistory();
-    }
-    if (marker.collapsed) {
-      if (collapsedAtStart != collapsedAtEnd)
-        throw new Error("Inserting collapsed marker overlapping an existing one");
-      marker.size = size;
-      marker.atomic = true;
-    }
-    if (cm) {
-      if (updateMaxLine) cm.curOp.updateMaxLine = true;
-      if (marker.className || marker.title || marker.startStyle || marker.endStyle || marker.collapsed)
-        regChange(cm, from.line, to.line + 1);
-      if (marker.atomic) reCheckSelection(cm);
-    }
-    return marker;
-  }
-
-  // SHARED TEXTMARKERS
-
-  function SharedTextMarker(markers, primary) {
-    this.markers = markers;
-    this.primary = primary;
-    for (var i = 0, me = this; i < markers.length; ++i) {
-      markers[i].parent = this;
-      on(markers[i], "clear", function(){me.clear();});
-    }
-  }
-  CodeMirror.SharedTextMarker = SharedTextMarker;
-  eventMixin(SharedTextMarker);
-
-  SharedTextMarker.prototype.clear = function() {
-    if (this.explicitlyCleared) return;
-    this.explicitlyCleared = true;
-    for (var i = 0; i < this.markers.length; ++i)
-      this.markers[i].clear();
-    signalLater(this, "clear");
-  };
-  SharedTextMarker.prototype.find = function() {
-    return this.primary.find();
-  };
-
-  function markTextShared(doc, from, to, options, type) {
-    options = copyObj(options);
-    options.shared = false;
-    var markers = [markText(doc, from, to, options, type)], primary = markers[0];
-    var widget = options.replacedWith;
-    linkedDocs(doc, function(doc) {
-      if (widget) options.replacedWith = widget.cloneNode(true);
-      markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));
-      for (var i = 0; i < doc.linked.length; ++i)
-        if (doc.linked[i].isParent) return;
-      primary = lst(markers);
-    });
-    return new SharedTextMarker(markers, primary);
-  }
-
-  // TEXTMARKER SPANS
-
-  function getMarkedSpanFor(spans, marker) {
-    if (spans) for (var i = 0; i < spans.length; ++i) {
-      var span = spans[i];
-      if (span.marker == marker) return span;
-    }
-  }
-  function removeMarkedSpan(spans, span) {
-    for (var r, i = 0; i < spans.length; ++i)
-      if (spans[i] != span) (r || (r = [])).push(spans[i]);
-    return r;
-  }
-  function addMarkedSpan(line, span) {
-    line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];
-    span.marker.attachLine(line);
-  }
-
-  function markedSpansBefore(old, startCh, isInsert) {
-    if (old) for (var i = 0, nw; i < old.length; ++i) {
-      var span = old[i], marker = span.marker;
-      var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);
-      if (startsBefore || marker.type == "bookmark" && span.from == startCh && (!isInsert || !span.marker.insertLeft)) {
-        var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh);
-        (nw || (nw = [])).push({from: span.from,
-                                to: endsAfter ? null : span.to,
-                                marker: marker});
-      }
-    }
-    return nw;
-  }
-
-  function markedSpansAfter(old, endCh, isInsert) {
-    if (old) for (var i = 0, nw; i < old.length; ++i) {
-      var span = old[i], marker = span.marker;
-      var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);
-      if (endsAfter || marker.type == "bookmark" && span.from == endCh && (!isInsert || span.marker.insertLeft)) {
-        var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh);
-        (nw || (nw = [])).push({from: startsBefore ? null : span.from - endCh,
-                                to: span.to == null ? null : span.to - endCh,
-                                marker: marker});
-      }
-    }
-    return nw;
-  }
-
-  function stretchSpansOverChange(doc, change) {
-    var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;
-    var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;
-    if (!oldFirst && !oldLast) return null;
-
-    var startCh = change.from.ch, endCh = change.to.ch, isInsert = posEq(change.from, change.to);
-    // Get the spans that 'stick out' on both sides
-    var first = markedSpansBefore(oldFirst, startCh, isInsert);
-    var last = markedSpansAfter(oldLast, endCh, isInsert);
-
-    // Next, merge those two ends
-    var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);
-    if (first) {
-      // Fix up .to properties of first
-      for (var i = 0; i < first.length; ++i) {
-        var span = first[i];
-        if (span.to == null) {
-          var found = getMarkedSpanFor(last, span.marker);
-          if (!found) span.to = startCh;
-          else if (sameLine) span.to = found.to == null ? null : found.to + offset;
-        }
-      }
-    }
-    if (last) {
-      // Fix up .from in last (or move them into first in case of sameLine)
-      for (var i = 0; i < last.length; ++i) {
-        var span = last[i];
-        if (span.to != null) span.to += offset;
-        if (span.from == null) {
-          var found = getMarkedSpanFor(first, span.marker);
-          if (!found) {
-            span.from = offset;
-            if (sameLine) (first || (first = [])).push(span);
-          }
-        } else {
-          span.from += offset;
-          if (sameLine) (first || (first = [])).push(span);
-        }
-      }
-    }
-    if (sameLine && first) {
-      // Make sure we didn't create any zero-length spans
-      for (var i = 0; i < first.length; ++i)
-        if (first[i].from != null && first[i].from == first[i].to && first[i].marker.type != "bookmark")
-          first.splice(i--, 1);
-      if (!first.length) first = null;
-    }
-
-    var newMarkers = [first];
-    if (!sameLine) {
-      // Fill gap with whole-line-spans
-      var gap = change.text.length - 2, gapMarkers;
-      if (gap > 0 && first)
-        for (var i = 0; i < first.length; ++i)
-          if (first[i].to == null)
-            (gapMarkers || (gapMarkers = [])).push({from: null, to: null, marker: first[i].marker});
-      for (var i = 0; i < gap; ++i)
-        newMarkers.push(gapMarkers);
-      newMarkers.push(last);
-    }
-    return newMarkers;
-  }
-
-  function mergeOldSpans(doc, change) {
-    var old = getOldSpans(doc, change);
-    var stretched = stretchSpansOverChange(doc, change);
-    if (!old) return stretched;
-    if (!stretched) return old;
-
-    for (var i = 0; i < old.length; ++i) {
-      var oldCur = old[i], stretchCur = stretched[i];
-      if (oldCur && stretchCur) {
-        spans: for (var j = 0; j < stretchCur.length; ++j) {
-          var span = stretchCur[j];
-          for (var k = 0; k < oldCur.length; ++k)
-            if (oldCur[k].marker == span.marker) continue spans;
-          oldCur.push(span);
-        }
-      } else if (stretchCur) {
-        old[i] = stretchCur;
-      }
-    }
-    return old;
-  }
-
-  function removeReadOnlyRanges(doc, from, to) {
-    var markers = null;
-    doc.iter(from.line, to.line + 1, function(line) {
-      if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {
-        var mark = line.markedSpans[i].marker;
-        if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))
-          (markers || (markers = [])).push(mark);
-      }
-    });
-    if (!markers) return null;
-    var parts = [{from: from, to: to}];
-    for (var i = 0; i < markers.length; ++i) {
-      var mk = markers[i], m = mk.find();
-      for (var j = 0; j < parts.length; ++j) {
-        var p = parts[j];
-        if (posLess(p.to, m.from) || posLess(m.to, p.from)) continue;
-        var newParts = [j, 1];
-        if (posLess(p.from, m.from) || !mk.inclusiveLeft && posEq(p.from, m.from))
-          newParts.push({from: p.from, to: m.from});
-        if (posLess(m.to, p.to) || !mk.inclusiveRight && posEq(p.to, m.to))
-          newParts.push({from: m.to, to: p.to});
-        parts.splice.apply(parts, newParts);
-        j += newParts.length - 1;
-      }
-    }
-    return parts;
-  }
-
-  function collapsedSpanAt(line, ch) {
-    var sps = sawCollapsedSpans && line.markedSpans, found;
-    if (sps) for (var sp, i = 0; i < sps.length; ++i) {
-      sp = sps[i];
-      if (!sp.marker.collapsed) continue;
-      if ((sp.from == null || sp.from < ch) &&
-          (sp.to == null || sp.to > ch) &&
-          (!found || found.width < sp.marker.width))
-        found = sp.marker;
-    }
-    return found;
-  }
-  function collapsedSpanAtStart(line) { return collapsedSpanAt(line, -1); }
-  function collapsedSpanAtEnd(line) { return collapsedSpanAt(line, line.text.length + 1); }
-
-  function visualLine(doc, line) {
-    var merged;
-    while (merged = collapsedSpanAtStart(line))
-      line = getLine(doc, merged.find().from.line);
-    return line;
-  }
-
-  function lineIsHidden(doc, line) {
-    var sps = sawCollapsedSpans && line.markedSpans;
-    if (sps) for (var sp, i = 0; i < sps.length; ++i) {
-      sp = sps[i];
-      if (!sp.marker.collapsed) continue;
-      if (sp.from == null) return true;
-      if (sp.marker.replacedWith) continue;
-      if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))
-        return true;
-    }
-  }
-  function lineIsHiddenInner(doc, line, span) {
-    if (span.to == null) {
-      var end = span.marker.find().to, endLine = getLine(doc, end.line);
-      return lineIsHiddenInner(doc, endLine, getMarkedSpanFor(endLine.markedSpans, span.marker));
-    }
-    if (span.marker.inclusiveRight && span.to == line.text.length)
-      return true;
-    for (var sp, i = 0; i < line.markedSpans.length; ++i) {
-      sp = line.markedSpans[i];
-      if (sp.marker.collapsed && !sp.marker.replacedWith && sp.from == span.to &&
-          (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&
-          lineIsHiddenInner(doc, line, sp)) return true;
-    }
-  }
-
-  function detachMarkedSpans(line) {
-    var spans = line.markedSpans;
-    if (!spans) return;
-    for (var i = 0; i < spans.length; ++i)
-      spans[i].marker.detachLine(line);
-    line.markedSpans = null;
-  }
-
-  function attachMarkedSpans(line, spans) {
-    if (!spans) return;
-    for (var i = 0; i < spans.length; ++i)
-      spans[i].marker.attachLine(line);
-    line.markedSpans = spans;
-  }
-
-  // LINE WIDGETS
-
-  var LineWidget = CodeMirror.LineWidget = function(cm, node, options) {
-    if (options) for (var opt in options) if (options.hasOwnProperty(opt))
-      this[opt] = options[opt];
-    this.cm = cm;
-    this.node = node;
-  };
-  eventMixin(LineWidget);
-  function widgetOperation(f) {
-    return function() {
-      var withOp = !this.cm.curOp;
-      if (withOp) startOperation(this.cm);
-      try {var result = f.apply(this, arguments);}
-      finally {if (withOp) endOperation(this.cm);}
-      return result;
-    };
-  }
-  LineWidget.prototype.clear = widgetOperation(function() {
-    var ws = this.line.widgets, no = lineNo(this.line);
-    if (no == null || !ws) return;
-    for (var i = 0; i < ws.length; ++i) if (ws[i] == this) ws.splice(i--, 1);
-    if (!ws.length) this.line.widgets = null;
-    var aboveVisible = heightAtLine(this.cm, this.line) < this.cm.doc.scrollTop;
-    updateLineHeight(this.line, Math.max(0, this.line.height - widgetHeight(this)));
-    if (aboveVisible) addToScrollPos(this.cm, 0, -this.height);
-    regChange(this.cm, no, no + 1);
-  });
-  LineWidget.prototype.changed = widgetOperation(function() {
-    var oldH = this.height;
-    this.height = null;
-    var diff = widgetHeight(this) - oldH;
-    if (!diff) return;
-    updateLineHeight(this.line, this.line.height + diff);
-    var no = lineNo(this.line);
-    regChange(this.cm, no, no + 1);
-  });
-
-  function widgetHeight(widget) {
-    if (widget.height != null) return widget.height;
-    if (!widget.node.parentNode || widget.node.parentNode.nodeType != 1)
-      removeChildrenAndAdd(widget.cm.display.measure, elt("div", [widget.node], null, "position: relative"));
-    return widget.height = widget.node.offsetHeight;
-  }
-
-  function addLineWidget(cm, handle, node, options) {
-    var widget = new LineWidget(cm, node, options);
-    if (widget.noHScroll) cm.display.alignWidgets = true;
-    changeLine(cm, handle, function(line) {
-      var widgets = line.widgets || (line.widgets = []);
-      if (widget.insertAt == null) widgets.push(widget);
-      else widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget);
-      widget.line = line;
-      if (!lineIsHidden(cm.doc, line) || widget.showIfHidden) {
-        var aboveVisible = heightAtLine(cm, line) < cm.doc.scrollTop;
-        updateLineHeight(line, line.height + widgetHeight(widget));
-        if (aboveVisible) addToScrollPos(cm, 0, widget.height);
-      }
-      return true;
-    });
-    return widget;
-  }
-
-  // LINE DATA STRUCTURE
-
-  // Line objects. These hold state related to a line, including
-  // highlighting info (the styles array).
-  var Line = CodeMirror.Line = function(text, markedSpans, estimateHeight) {
-    this.text = text;
-    attachMarkedSpans(this, markedSpans);
-    this.height = estimateHeight ? estimateHeight(this) : 1;
-  };
-  eventMixin(Line);
-
-  function updateLine(line, text, markedSpans, estimateHeight) {
-    line.text = text;
-    if (line.stateAfter) line.stateAfter = null;
-    if (line.styles) line.styles = null;
-    if (line.order != null) line.order = null;
-    detachMarkedSpans(line);
-    attachMarkedSpans(line, markedSpans);
-    var estHeight = estimateHeight ? estimateHeight(line) : 1;
-    if (estHeight != line.height) updateLineHeight(line, estHeight);
-  }
-
-  function cleanUpLine(line) {
-    line.parent = null;
-    detachMarkedSpans(line);
-  }
-
-  // Run the given mode's parser over a line, update the styles
-  // array, which contains alternating fragments of text and CSS
-  // classes.
-  function runMode(cm, text, mode, state, f) {
-    var flattenSpans = mode.flattenSpans;
-    if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;
-    var curStart = 0, curStyle = null;
-    var stream = new StringStream(text, cm.options.tabSize), style;
-    if (text == "" && mode.blankLine) mode.blankLine(state);
-    while (!stream.eol()) {
-      if (stream.pos > cm.options.maxHighlightLength) {
-        flattenSpans = false;
-        // Webkit seems to refuse to render text nodes longer than 57444 characters
-        stream.pos = Math.min(text.length, stream.start + 50000);
-        style = null;
-      } else {
-        style = mode.token(stream, state);
-      }
-      if (!flattenSpans || curStyle != style) {
-        if (curStart < stream.start) f(stream.start, curStyle);
-        curStart = stream.start; curStyle = style;
-      }
-      stream.start = stream.pos;
-    }
-    if (curStart < stream.pos) f(stream.pos, curStyle);
-  }
-
-  function highlightLine(cm, line, state) {
-    // A styles array always starts with a number identifying the
-    // mode/overlays that it is based on (for easy invalidation).
-    var st = [cm.state.modeGen];
-    // Compute the base array of styles
-    runMode(cm, line.text, cm.doc.mode, state, function(end, style) {st.push(end, style);});
-
-    // Run overlays, adjust style array.
-    for (var o = 0; o < cm.state.overlays.length; ++o) {
-      var overlay = cm.state.overlays[o], i = 1, at = 0;
-      runMode(cm, line.text, overlay.mode, true, function(end, style) {
-        var start = i;
-        // Ensure there's a token end at the current position, and that i points at it
-        while (at < end) {
-          var i_end = st[i];
-          if (i_end > end)
-            st.splice(i, 1, end, st[i+1], i_end);
-          i += 2;
-          at = Math.min(end, i_end);
-        }
-        if (!style) return;
-        if (overlay.opaque) {
-          st.splice(start, i - start, end, style);
-          i = start + 2;
-        } else {
-          for (; start < i; start += 2) {
-            var cur = st[start+1];
-            st[start+1] = cur ? cur + " " + style : style;
-          }
-        }
-      });
-    }
-
-    return st;
-  }
-
-  function getLineStyles(cm, line) {
-    if (!line.styles || line.styles[0] != cm.state.modeGen)
-      line.styles = highlightLine(cm, line, line.stateAfter = getStateBefore(cm, lineNo(line)));
-    return line.styles;
-  }
-
-  // Lightweight form of highlight -- proceed over this line and
-  // update state, but don't save a style array.
-  function processLine(cm, line, state) {
-    var mode = cm.doc.mode;
-    var stream = new StringStream(line.text, cm.options.tabSize);
-    if (line.text == "" && mode.blankLine) mode.blankLine(state);
-    while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) {
-      mode.token(stream, state);
-      stream.start = stream.pos;
-    }
-  }
-
-  var styleToClassCache = {};
-  function styleToClass(style) {
-    if (!style) return null;
-    return styleToClassCache[style] ||
-      (styleToClassCache[style] = "cm-" + style.replace(/ +/g, " cm-"));
-  }
-
-  function lineContent(cm, realLine, measure, copyWidgets) {
-    var merged, line = realLine, empty = true;
-    while (merged = collapsedSpanAtStart(line))
-      line = getLine(cm.doc, merged.find().from.line);
-
-    var builder = {pre: elt("pre"), col: 0, pos: 0,
-                   measure: null, measuredSomething: false, cm: cm,
-                   copyWidgets: copyWidgets};
-    if (line.textClass) builder.pre.className = line.textClass;
-
-    do {
-      if (line.text) empty = false;
-      builder.measure = line == realLine && measure;
-      builder.pos = 0;
-      builder.addToken = builder.measure ? buildTokenMeasure : buildToken;
-      if ((ie || webkit) && cm.getOption("lineWrapping"))
-        builder.addToken = buildTokenSplitSpaces(builder.addToken);
-      var next = insertLineContent(line, builder, getLineStyles(cm, line));
-      if (measure && line == realLine && !builder.measuredSomething) {
-        measure[0] = builder.pre.appendChild(zeroWidthElement(cm.display.measure));
-        builder.measuredSomething = true;
-      }
-      if (next) line = getLine(cm.doc, next.to.line);
-    } while (next);
-
-    if (measure && !builder.measuredSomething && !measure[0])
-      measure[0] = builder.pre.appendChild(empty ? elt("span", "\u00a0") : zeroWidthElement(cm.display.measure));
-    if (!builder.pre.firstChild && !lineIsHidden(cm.doc, realLine))
-      builder.pre.appendChild(document.createTextNode("\u00a0"));
-
-    var order;
-    // Work around problem with the reported dimensions of single-char
-    // direction spans on IE (issue #1129). See also the comment in
-    // cursorCoords.
-    if (measure && ie && (order = getOrder(line))) {
-      var l = order.length - 1;
-      if (order[l].from == order[l].to) --l;
-      var last = order[l], prev = order[l - 1];
-      if (last.from + 1 == last.to && prev && last.level < prev.level) {
-        var span = measure[builder.pos - 1];
-        if (span) span.parentNode.insertBefore(span.measureRight = zeroWidthElement(cm.display.measure),
-                                               span.nextSibling);
-      }
-    }
-
-    signal(cm, "renderLine", cm, realLine, builder.pre);
-    return builder.pre;
-  }
-
-  var tokenSpecialChars = /[\t\u0000-\u0019\u00ad\u200b\u2028\u2029\uFEFF]/g;
-  function buildToken(builder, text, style, startStyle, endStyle, title) {
-    if (!text) return;
-    if (!tokenSpecialChars.test(text)) {
-      builder.col += text.length;
-      var content = document.createTextNode(text);
-    } else {
-      var content = document.createDocumentFragment(), pos = 0;
-      while (true) {
-        tokenSpecialChars.lastIndex = pos;
-        var m = tokenSpecialChars.exec(text);
-        var skipped = m ? m.index - pos : text.length - pos;
-        if (skipped) {
-          content.appendChild(document.createTextNode(text.slice(pos, pos + skipped)));
-          builder.col += skipped;
-        }
-        if (!m) break;
-        pos += skipped + 1;
-        if (m[0] == "\t") {
-          var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;
-          content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab"));
-          builder.col += tabWidth;
-        } else {
-          var token = elt("span", "\u2022", "cm-invalidchar");
-          token.title = "\\u" + m[0].charCodeAt(0).toString(16);
-          content.appendChild(token);
-          builder.col += 1;
-        }
-      }
-    }
-    if (style || startStyle || endStyle || builder.measure) {
-      var fullStyle = style || "";
-      if (startStyle) fullStyle += startStyle;
-      if (endStyle) fullStyle += endStyle;
-      var token = elt("span", [content], fullStyle);
-      if (title) token.title = title;
-      return builder.pre.appendChild(token);
-    }
-    builder.pre.appendChild(content);
-  }
-
-  function buildTokenMeasure(builder, text, style, startStyle, endStyle) {
-    var wrapping = builder.cm.options.lineWrapping;
-    for (var i = 0; i < text.length; ++i) {
-      var ch = text.charAt(i), start = i == 0;
-      if (ch >= "\ud800" && ch < "\udbff" && i < text.length - 1) {
-        ch = text.slice(i, i + 2);
-        ++i;
-      } else if (i && wrapping && spanAffectsWrapping(text, i)) {
-        builder.pre.appendChild(elt("wbr"));
-      }
-      var old = builder.measure[builder.pos];
-      var span = builder.measure[builder.pos] =
-        buildToken(builder, ch, style,
-                   start && startStyle, i == text.length - 1 && endStyle);
-      if (old) span.leftSide = old.leftSide || old;
-      // In IE single-space nodes wrap differently than spaces
-      // embedded in larger text nodes, except when set to
-      // white-space: normal (issue #1268).
-      if (ie && wrapping && ch == " " && i && !/\s/.test(text.charAt(i - 1)) &&
-          i < text.length - 1 && !/\s/.test(text.charAt(i + 1)))
-        span.style.whiteSpace = "normal";
-      builder.pos += ch.length;
-    }
-    if (text.length) builder.measuredSomething = true;
-  }
-
-  function buildTokenSplitSpaces(inner) {
-    function split(old) {
-      var out = " ";
-      for (var i = 0; i < old.length - 2; ++i) out += i % 2 ? " " : "\u00a0";
-      out += " ";
-      return out;
-    }
-    return function(builder, text, style, startStyle, endStyle, title) {
-      return inner(builder, text.replace(/ {3,}/, split), style, startStyle, endStyle, title);
-    };
-  }
-
-  function buildCollapsedSpan(builder, size, marker, ignoreWidget) {
-    var widget = !ignoreWidget && marker.replacedWith;
-    if (widget) {
-      if (builder.copyWidgets) widget = widget.cloneNode(true);
-      builder.pre.appendChild(widget);
-      if (builder.measure) {
-        if (size) {
-          builder.measure[builder.pos] = widget;
-        } else {
-          var elt = builder.measure[builder.pos] = zeroWidthElement(builder.cm.display.measure);
-          if (marker.type != "bookmark" || marker.insertLeft)
-            builder.pre.insertBefore(elt, widget);
-          else
-            builder.pre.appendChild(elt);
-        }
-        builder.measuredSomething = true;
-      }
-    }
-    builder.pos += size;
-  }
-
-  // Outputs a number of spans to make up a line, taking highlighting
-  // and marked text into account.
-  function insertLineContent(line, builder, styles) {
-    var spans = line.markedSpans, allText = line.text, at = 0;
-    if (!spans) {
-      for (var i = 1; i < styles.length; i+=2)
-        builder.addToken(builder, allText.slice(at, at = styles[i]), styleToClass(styles[i+1]));
-      return;
-    }
-
-    var len = allText.length, pos = 0, i = 1, text = "", style;
-    var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;
-    for (;;) {
-      if (nextChange == pos) { // Update current marker set
-        spanStyle = spanEndStyle = spanStartStyle = title = "";
-        collapsed = null; nextChange = Infinity;
-        var foundBookmark = null;
-        for (var j = 0; j < spans.length; ++j) {
-          var sp = spans[j], m = sp.marker;
-          if (sp.from <= pos && (sp.to == null || sp.to > pos)) {
-            if (sp.to != null && nextChange > sp.to) { nextChange = sp.to; spanEndStyle = ""; }
-            if (m.className) spanStyle += " " + m.className;
-            if (m.startStyle && sp.from == pos) spanStartStyle += " " + m.startStyle;
-            if (m.endStyle && sp.to == nextChange) spanEndStyle += " " + m.endStyle;
-            if (m.title && !title) title = m.title;
-            if (m.collapsed && (!collapsed || collapsed.marker.size < m.size))
-              collapsed = sp;
-          } else if (sp.from > pos && nextChange > sp.from) {
-            nextChange = sp.from;
-          }
-          if (m.type == "bookmark" && sp.from == pos && m.replacedWith) foundBookmark = m;
-        }
-        if (collapsed && (collapsed.from || 0) == pos) {
-          buildCollapsedSpan(builder, (collapsed.to == null ? len : collapsed.to) - pos,
-                             collapsed.marker, collapsed.from == null);
-          if (collapsed.to == null) return collapsed.marker.find();
-        }
-        if (foundBookmark && !collapsed) buildCollapsedSpan(builder, 0, foundBookmark);
-      }
-      if (pos >= len) break;
-
-      var upto = Math.min(len, nextChange);
-      while (true) {
-        if (text) {
-          var end = pos + text.length;
-          if (!collapsed) {
-            var tokenText = end > upto ? text.slice(0, upto - pos) : text;
-            builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,
-                             spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", title);
-          }
-          if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}
-          pos = end;
-          spanStartStyle = "";
-        }
-        text = allText.slice(at, at = styles[i++]);
-        style = styleToClass(styles[i++]);
-      }
-    }
-  }
-
-  // DOCUMENT DATA STRUCTURE
-
-  function updateDoc(doc, change, markedSpans, selAfter, estimateHeight) {
-    function spansFor(n) {return markedSpans ? markedSpans[n] : null;}
-    function update(line, text, spans) {
-      updateLine(line, text, spans, estimateHeight);
-      signalLater(line, "change", line, change);
-    }
-
-    var from = change.from, to = change.to, text = change.text;
-    var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);
-    var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;
-
-    // First adjust the line structure
-    if (from.ch == 0 && to.ch == 0 && lastText == "") {
-      // This is a whole-line replace. Treated specially to make
-      // sure line objects move the way they are supposed to.
-      for (var i = 0, e = text.length - 1, added = []; i < e; ++i)
-        added.push(new Line(text[i], spansFor(i), estimateHeight));
-      update(lastLine, lastLine.text, lastSpans);
-      if (nlines) doc.remove(from.line, nlines);
-      if (added.length) doc.insert(from.line, added);
-    } else if (firstLine == lastLine) {
-      if (text.length == 1) {
-        update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);
-      } else {
-        for (var added = [], i = 1, e = text.length - 1; i < e; ++i)
-          added.push(new Line(text[i], spansFor(i), estimateHeight));
-        added.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight));
-        update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
-        doc.insert(from.line + 1, added);
-      }
-    } else if (text.length == 1) {
-      update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));
-      doc.remove(from.line + 1, nlines);
-    } else {
-      update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
-      update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);
-      for (var i = 1, e = text.length - 1, added = []; i < e; ++i)
-        added.push(new Line(text[i], spansFor(i), estimateHeight));
-      if (nlines > 1) doc.remove(from.line + 1, nlines - 1);
-      doc.insert(from.line + 1, added);
-    }
-
-    signalLater(doc, "change", doc, change);
-    setSelection(doc, selAfter.anchor, selAfter.head, null, true);
-  }
-
-  function LeafChunk(lines) {
-    this.lines = lines;
-    this.parent = null;
-    for (var i = 0, e = lines.length, height = 0; i < e; ++i) {
-      lines[i].parent = this;
-      height += lines[i].height;
-    }
-    this.height = height;
-  }
-
-  LeafChunk.prototype = {
-    chunkSize: function() { return this.lines.length; },
-    removeInner: function(at, n) {
-      for (var i = at, e = at + n; i < e; ++i) {
-        var line = this.lines[i];
-        this.height -= line.height;
-        cleanUpLine(line);
-        signalLater(line, "delete");
-      }
-      this.lines.splice(at, n);
-    },
-    collapse: function(lines) {
-      lines.splice.apply(lines, [lines.length, 0].concat(this.lines));
-    },
-    insertInner: function(at, lines, height) {
-      this.height += height;
-      this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));
-      for (var i = 0, e = lines.length; i < e; ++i) lines[i].parent = this;
-    },
-    iterN: function(at, n, op) {
-      for (var e = at + n; at < e; ++at)
-        if (op(this.lines[at])) return true;
-    }
-  };
-
-  function BranchChunk(children) {
-    this.children = children;
-    var size = 0, height = 0;
-    for (var i = 0, e = children.length; i < e; ++i) {
-      var ch = children[i];
-      size += ch.chunkSize(); height += ch.height;
-      ch.parent = this;
-    }
-    this.size = size;
-    this.height = height;
-    this.parent = null;
-  }
-
-  BranchChunk.prototype = {
-    chunkSize: function() { return this.size; },
-    removeInner: function(at, n) {
-      this.size -= n;
-      for (var i = 0; i < this.children.length; ++i) {
-        var child = this.children[i], sz = child.chunkSize();
-        if (at < sz) {
-          var rm = Math.min(n, sz - at), oldHeight = child.height;
-          child.removeInner(at, rm);
-          this.height -= oldHeight - child.height;
-          if (sz == rm) { this.children.splice(i--, 1); child.parent = null; }
-          if ((n -= rm) == 0) break;
-          at = 0;
-        } else at -= sz;
-      }
-      if (this.size - n < 25) {
-        var lines = [];
-        this.collapse(lines);
-        this.children = [new LeafChunk(lines)];
-        this.children[0].parent = this;
-      }
-    },
-    collapse: function(lines) {
-      for (var i = 0, e = this.children.length; i < e; ++i) this.children[i].collapse(lines);
-    },
-    insertInner: function(at, lines, height) {
-      this.size += lines.length;
-      this.height += height;
-      for (var i = 0, e = this.children.length; i < e; ++i) {
-        var child = this.children[i], sz = child.chunkSize();
-        if (at <= sz) {
-          child.insertInner(at, lines, height);
-          if (child.lines && child.lines.length > 50) {
-            while (child.lines.length > 50) {
-              var spilled = child.lines.splice(child.lines.length - 25, 25);
-              var newleaf = new LeafChunk(spilled);
-              child.height -= newleaf.height;
-              this.children.splice(i + 1, 0, newleaf);
-              newleaf.parent = this;
-            }
-            this.maybeSpill();
-          }
-          break;
-        }
-        at -= sz;
-      }
-    },
-    maybeSpill: function() {
-      if (this.children.length <= 10) return;
-      var me = this;
-      do {
-        var spilled = me.children.splice(me.children.length - 5, 5);
-        var sibling = new BranchChunk(spilled);
-        if (!me.parent) { // Become the parent node
-          var copy = new BranchChunk(me.children);
-          copy.parent = me;
-          me.children = [copy, sibling];
-          me = copy;
-        } else {
-          me.size -= sibling.size;
-          me.height -= sibling.height;
-          var myIndex = indexOf(me.parent.children, me);
-          me.parent.children.splice(myIndex + 1, 0, sibling);
-        }
-        sibling.parent = me.parent;
-      } while (me.children.length > 10);
-      me.parent.maybeSpill();
-    },
-    iterN: function(at, n, op) {
-      for (var i = 0, e = this.children.length; i < e; ++i) {
-        var child = this.children[i], sz = child.chunkSize();
-        if (at < sz) {
-          var used = Math.min(n, sz - at);
-          if (child.iterN(at, used, op)) return true;
-          if ((n -= used) == 0) break;
-          at = 0;
-        } else at -= sz;
-      }
-    }
-  };
-
-  var nextDocId = 0;
-  var Doc = CodeMirror.Doc = function(text, mode, firstLine) {
-    if (!(this instanceof Doc)) return new Doc(text, mode, firstLine);
-    if (firstLine == null) firstLine = 0;
-
-    BranchChunk.call(this, [new LeafChunk([new Line("", null)])]);
-    this.first = firstLine;
-    this.scrollTop = this.scrollLeft = 0;
-    this.cantEdit = false;
-    this.history = makeHistory();
-    this.cleanGeneration = 1;
-    this.frontier = firstLine;
-    var start = Pos(firstLine, 0);
-    this.sel = {from: start, to: start, head: start, anchor: start, shift: false, extend: false, goalColumn: null};
-    this.id = ++nextDocId;
-    this.modeOption = mode;
-
-    if (typeof text == "string") text = splitLines(text);
-    updateDoc(this, {from: start, to: start, text: text}, null, {head: start, anchor: start});
-  };
-
-  Doc.prototype = createObj(BranchChunk.prototype, {
-    constructor: Doc,
-    iter: function(from, to, op) {
-      if (op) this.iterN(from - this.first, to - from, op);
-      else this.iterN(this.first, this.first + this.size, from);
-    },
-
-    insert: function(at, lines) {
-      var height = 0;
-      for (var i = 0, e = lines.length; i < e; ++i) height += lines[i].height;
-      this.insertInner(at - this.first, lines, height);
-    },
-    remove: function(at, n) { this.removeInner(at - this.first, n); },
-
-    getValue: function(lineSep) {
-      var lines = getLines(this, this.first, this.first + this.size);
-      if (lineSep === false) return lines;
-      return lines.join(lineSep || "\n");
-    },
-    setValue: function(code) {
-      var top = Pos(this.first, 0), last = this.first + this.size - 1;
-      makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),
-                        text: splitLines(code), origin: "setValue"},
-                 {head: top, anchor: top}, true);
-    },
-    replaceRange: function(code, from, to, origin) {
-      from = clipPos(this, from);
-      to = to ? clipPos(this, to) : from;
-      replaceRange(this, code, from, to, origin);
-    },
-    getRange: function(from, to, lineSep) {
-      var lines = getBetween(this, clipPos(this, from), clipPos(this, to));
-      if (lineSep === false) return lines;
-      return lines.join(lineSep || "\n");
-    },
-
-    getLine: function(line) {var l = this.getLineHandle(line); return l && l.text;},
-    setLine: function(line, text) {
-      if (isLine(this, line))
-        replaceRange(this, text, Pos(line, 0), clipPos(this, Pos(line)));
-    },
-    removeLine: function(line) {
-      if (line) replaceRange(this, "", clipPos(this, Pos(line - 1)), clipPos(this, Pos(line)));
-      else replaceRange(this, "", Pos(0, 0), clipPos(this, Pos(1, 0)));
-    },
-
-    getLineHandle: function(line) {if (isLine(this, line)) return getLine(this, line);},
-    getLineNumber: function(line) {return lineNo(line);},
-
-    getLineHandleVisualStart: function(line) {
-      if (typeof line == "number") line = getLine(this, line);
-      return visualLine(this, line);
-    },
-
-    lineCount: function() {return this.size;},
-    firstLine: function() {return this.first;},
-    lastLine: function() {return this.first + this.size - 1;},
-
-    clipPos: function(pos) {return clipPos(this, pos);},
-
-    getCursor: function(start) {
-      var sel = this.sel, pos;
-      if (start == null || start == "head") pos = sel.head;
-      else if (start == "anchor") pos = sel.anchor;
-      else if (start == "end" || start === false) pos = sel.to;
-      else pos = sel.from;
-      return copyPos(pos);
-    },
-    somethingSelected: function() {return !posEq(this.sel.head, this.sel.anchor);},
-
-    setCursor: docOperation(function(line, ch, extend) {
-      var pos = clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line);
-      if (extend) extendSelection(this, pos);
-      else setSelection(this, pos, pos);
-    }),
-    setSelection: docOperation(function(anchor, head) {
-      setSelection(this, clipPos(this, anchor), clipPos(this, head || anchor));
-    }),
-    extendSelection: docOperation(function(from, to) {
-      extendSelection(this, clipPos(this, from), to && clipPos(this, to));
-    }),
-
-    getSelection: function(lineSep) {return this.getRange(this.sel.from, this.sel.to, lineSep);},
-    replaceSelection: function(code, collapse, origin) {
-      makeChange(this, {from: this.sel.from, to: this.sel.to, text: splitLines(code), origin: origin}, collapse || "around");
-    },
-    undo: docOperation(function() {makeChangeFromHistory(this, "undo");}),
-    redo: docOperation(function() {makeChangeFromHistory(this, "redo");}),
-
-    setExtending: function(val) {this.sel.extend = val;},
-
-    historySize: function() {
-      var hist = this.history;
-      return {undo: hist.done.length, redo: hist.undone.length};
-    },
-    clearHistory: function() {this.history = makeHistory(this.history.maxGeneration);},
-
-    markClean: function() {
-      this.cleanGeneration = this.changeGeneration();
-    },
-    changeGeneration: function() {
-      this.history.lastOp = this.history.lastOrigin = null;
-      return this.history.generation;
-    },
-    isClean: function (gen) {
-      return this.history.generation == (gen || this.cleanGeneration);
-    },
-
-    getHistory: function() {
-      return {done: copyHistoryArray(this.history.done),
-              undone: copyHistoryArray(this.history.undone)};
-    },
-    setHistory: function(histData) {
-      var hist = this.history = makeHistory(this.history.maxGeneration);
-      hist.done = histData.done.slice(0);
-      hist.undone = histData.undone.slice(0);
-    },
-
-    markText: function(from, to, options) {
-      return markText(this, clipPos(this, from), clipPos(this, to), options, "range");
-    },
-    setBookmark: function(pos, options) {
-      var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),
-                      insertLeft: options && options.insertLeft};
-      pos = clipPos(this, pos);
-      return markText(this, pos, pos, realOpts, "bookmark");
-    },
-    findMarksAt: function(pos) {
-      pos = clipPos(this, pos);
-      var markers = [], spans = getLine(this, pos.line).markedSpans;
-      if (spans) for (var i = 0; i < spans.length; ++i) {
-        var span = spans[i];
-        if ((span.from == null || span.from <= pos.ch) &&
-            (span.to == null || span.to >= pos.ch))
-          markers.push(span.marker.parent || span.marker);
-      }
-      return markers;
-    },
-    getAllMarks: function() {
-      var markers = [];
-      this.iter(function(line) {
-        var sps = line.markedSpans;
-        if (sps) for (var i = 0; i < sps.length; ++i)
-          if (sps[i].from != null) markers.push(sps[i].marker);
-      });
-      return markers;
-    },
-
-    posFromIndex: function(off) {
-      var ch, lineNo = this.first;
-      this.iter(function(line) {
-        var sz = line.text.length + 1;
-        if (sz > off) { ch = off; return true; }
-        off -= sz;
-        ++lineNo;
-      });
-      return clipPos(this, Pos(lineNo, ch));
-    },
-    indexFromPos: function (coords) {
-      coords = clipPos(this, coords);
-      var index = coords.ch;
-      if (coords.line < this.first || coords.ch < 0) return 0;
-      this.iter(this.first, coords.line, function (line) {
-        index += line.text.length + 1;
-      });
-      return index;
-    },
-
-    copy: function(copyHistory) {
-      var doc = new Doc(getLines(this, this.first, this.first + this.size), this.modeOption, this.first);
-      doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;
-      doc.sel = {from: this.sel.from, to: this.sel.to, head: this.sel.head, anchor: this.sel.anchor,
-                 shift: this.sel.shift, extend: false, goalColumn: this.sel.goalColumn};
-      if (copyHistory) {
-        doc.history.undoDepth = this.history.undoDepth;
-        doc.setHistory(this.getHistory());
-      }
-      return doc;
-    },
-
-    linkedDoc: function(options) {
-      if (!options) options = {};
-      var from = this.first, to = this.first + this.size;
-      if (options.from != null && options.from > from) from = options.from;
-      if (options.to != null && options.to < to) to = options.to;
-      var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from);
-      if (options.sharedHist) copy.history = this.history;
-      (this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});
-      copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];
-      return copy;
-    },
-    unlinkDoc: function(other) {
-      if (other instanceof CodeMirror) other = other.doc;
-      if (this.linked) for (var i = 0; i < this.linked.length; ++i) {
-        var link = this.linked[i];
-        if (link.doc != other) continue;
-        this.linked.splice(i, 1);
-        other.unlinkDoc(this);
-        break;
-      }
-      // If the histories were shared, split them again
-      if (other.history == this.history) {
-        var splitIds = [other.id];
-        linkedDocs(other, function(doc) {splitIds.push(doc.id);}, true);
-        other.history = makeHistory();
-        other.history.done = copyHistoryArray(this.history.done, splitIds);
-        other.history.undone = copyHistoryArray(this.history.undone, splitIds);
-      }
-    },
-    iterLinkedDocs: function(f) {linkedDocs(this, f);},
-
-    getMode: function() {return this.mode;},
-    getEditor: function() {return this.cm;}
-  });
-
-  Doc.prototype.eachLine = Doc.prototype.iter;
-
-  // The Doc methods that should be available on CodeMirror instances
-  var dontDelegate = "iter insert remove copy getEditor".split(" ");
-  for (var prop in Doc.prototype) if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)
-    CodeMirror.prototype[prop] = (function(method) {
-      return function() {return method.apply(this.doc, arguments);};
-    })(Doc.prototype[prop]);
-
-  eventMixin(Doc);
-
-  function linkedDocs(doc, f, sharedHistOnly) {
-    function propagate(doc, skip, sharedHist) {
-      if (doc.linked) for (var i = 0; i < doc.linked.length; ++i) {
-        var rel = doc.linked[i];
-        if (rel.doc == skip) continue;
-        var shared = sharedHist && rel.sharedHist;
-        if (sharedHistOnly && !shared) continue;
-        f(rel.doc, shared);
-        propagate(rel.doc, doc, shared);
-      }
-    }
-    propagate(doc, null, true);
-  }
-
-  function attachDoc(cm, doc) {
-    if (doc.cm) throw new Error("This document is already in use.");
-    cm.doc = doc;
-    doc.cm = cm;
-    estimateLineHeights(cm);
-    loadMode(cm);
-    if (!cm.options.lineWrapping) computeMaxLength(cm);
-    cm.options.mode = doc.modeOption;
-    regChange(cm);
-  }
-
-  // LINE UTILITIES
-
-  function getLine(chunk, n) {
-    n -= chunk.first;
-    while (!chunk.lines) {
-      for (var i = 0;; ++i) {
-        var child = chunk.children[i], sz = child.chunkSize();
-        if (n < sz) { chunk = child; break; }
-        n -= sz;
-      }
-    }
-    return chunk.lines[n];
-  }
-
-  function getBetween(doc, start, end) {
-    var out = [], n = start.line;
-    doc.iter(start.line, end.line + 1, function(line) {
-      var text = line.text;
-      if (n == end.line) text = text.slice(0, end.ch);
-      if (n == start.line) text = text.slice(start.ch);
-      out.push(text);
-      ++n;
-    });
-    return out;
-  }
-  function getLines(doc, from, to) {
-    var out = [];
-    doc.iter(from, to, function(line) { out.push(line.text); });
-    return out;
-  }
-
-  function updateLineHeight(line, height) {
-    var diff = height - line.height;
-    for (var n = line; n; n = n.parent) n.height += diff;
-  }
-
-  function lineNo(line) {
-    if (line.parent == null) return null;
-    var cur = line.parent, no = indexOf(cur.lines, line);
-    for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {
-      for (var i = 0;; ++i) {
-        if (chunk.children[i] == cur) break;
-        no += chunk.children[i].chunkSize();
-      }
-    }
-    return no + cur.first;
-  }
-
-  function lineAtHeight(chunk, h) {
-    var n = chunk.first;
-    outer: do {
-      for (var i = 0, e = chunk.children.length; i < e; ++i) {
-        var child = chunk.children[i], ch = child.height;
-        if (h < ch) { chunk = child; continue outer; }
-        h -= ch;
-        n += child.chunkSize();
-      }
-      return n;
-    } while (!chunk.lines);
-    for (var i = 0, e = chunk.lines.length; i < e; ++i) {
-      var line = chunk.lines[i], lh = line.height;
-      if (h < lh) break;
-      h -= lh;
-    }
-    return n + i;
-  }
-
-  function heightAtLine(cm, lineObj) {
-    lineObj = visualLine(cm.doc, lineObj);
-
-    var h = 0, chunk = lineObj.parent;
-    for (var i = 0; i < chunk.lines.length; ++i) {
-      var line = chunk.lines[i];
-      if (line == lineObj) break;
-      else h += line.height;
-    }
-    for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {
-      for (var i = 0; i < p.children.length; ++i) {
-        var cur = p.children[i];
-        if (cur == chunk) break;
-        else h += cur.height;
-      }
-    }
-    return h;
-  }
-
-  function getOrder(line) {
-    var order = line.order;
-    if (order == null) order = line.order = bidiOrdering(line.text);
-    return order;
-  }
-
-  // HISTORY
-
-  function makeHistory(startGen) {
-    return {
-      // Arrays of history events. Doing something adds an event to
-      // done and clears undo. Undoing moves events from done to
-      // undone, redoing moves them in the other direction.
-      done: [], undone: [], undoDepth: Infinity,
-      // Used to track when changes can be merged into a single undo
-      // event
-      lastTime: 0, lastOp: null, lastOrigin: null,
-      // Used by the isClean() method
-      generation: startGen || 1, maxGeneration: startGen || 1
-    };
-  }
-
-  function attachLocalSpans(doc, change, from, to) {
-    var existing = change["spans_" + doc.id], n = 0;
-    doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function(line) {
-      if (line.markedSpans)
-        (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans;
-      ++n;
-    });
-  }
-
-  function historyChangeFromChange(doc, change) {
-    var from = { line: change.from.line, ch: change.from.ch };
-    var histChange = {from: from, to: changeEnd(change), text: getBetween(doc, change.from, change.to)};
-    attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);
-    linkedDocs(doc, function(doc) {attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);}, true);
-    return histChange;
-  }
-
-  function addToHistory(doc, change, selAfter, opId) {
-    var hist = doc.history;
-    hist.undone.length = 0;
-    var time = +new Date, cur = lst(hist.done);
-
-    if (cur &&
-        (hist.lastOp == opId ||
-         hist.lastOrigin == change.origin && change.origin &&
-         ((change.origin.charAt(0) == "+" && doc.cm && hist.lastTime > time - doc.cm.options.historyEventDelay) ||
-          change.origin.charAt(0) == "*"))) {
-      // Merge this change into the last event
-      var last = lst(cur.changes);
-      if (posEq(change.from, change.to) && posEq(change.from, last.to)) {
-        // Optimized case for simple insertion -- don't want to add
-        // new changesets for every character typed
-        last.to = changeEnd(change);
-      } else {
-        // Add new sub-event
-        cur.changes.push(historyChangeFromChange(doc, change));
-      }
-      cur.anchorAfter = selAfter.anchor; cur.headAfter = selAfter.head;
-    } else {
-      // Can not be merged, start a new event.
-      cur = {changes: [historyChangeFromChange(doc, change)],
-             generation: hist.generation,
-             anchorBefore: doc.sel.anchor, headBefore: doc.sel.head,
-             anchorAfter: selAfter.anchor, headAfter: selAfter.head};
-      hist.done.push(cur);
-      hist.generation = ++hist.maxGeneration;
-      while (hist.done.length > hist.undoDepth)
-        hist.done.shift();
-    }
-    hist.lastTime = time;
-    hist.lastOp = opId;
-    hist.lastOrigin = change.origin;
-  }
-
-  function removeClearedSpans(spans) {
-    if (!spans) return null;
-    for (var i = 0, out; i < spans.length; ++i) {
-      if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }
-      else if (out) out.push(spans[i]);
-    }
-    return !out ? spans : out.length ? out : null;
-  }
-
-  function getOldSpans(doc, change) {
-    var found = change["spans_" + doc.id];
-    if (!found) return null;
-    for (var i = 0, nw = []; i < change.text.length; ++i)
-      nw.push(removeClearedSpans(found[i]));
-    return nw;
-  }
-
-  // Used both to provide a JSON-safe object in .getHistory, and, when
-  // detaching a document, to split the history in two
-  function copyHistoryArray(events, newGroup) {
-    for (var i = 0, copy = []; i < events.length; ++i) {
-      var event = events[i], changes = event.changes, newChanges = [];
-      copy.push({changes: newChanges, anchorBefore: event.anchorBefore, headBefore: event.headBefore,
-                 anchorAfter: event.anchorAfter, headAfter: event.headAfter});
-      for (var j = 0; j < changes.length; ++j) {
-        var change = changes[j], m;
-        newChanges.push({from: change.from, to: change.to, text: change.text});
-        if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\d+)$/)) {
-          if (indexOf(newGroup, Number(m[1])) > -1) {
-            lst(newChanges)[prop] = change[prop];
-            delete change[prop];
-          }
-        }
-      }
-    }
-    return copy;
-  }
-
-  // Rebasing/resetting history to deal with externally-sourced changes
-
-  function rebaseHistSel(pos, from, to, diff) {
-    if (to < pos.line) {
-      pos.line += diff;
-    } else if (from < pos.line) {
-      pos.line = from;
-      pos.ch = 0;
-    }
-  }
-
-  // Tries to rebase an array of history events given a change in the
-  // document. If the change touches the same lines as the event, the
-  // event, and everything 'behind' it, is discarded. If the change is
-  // before the event, the event's positions are updated. Uses a
-  // copy-on-write scheme for the positions, to avoid having to
-  // reallocate them all on every rebase, but also avoid problems with
-  // shared position objects being unsafely updated.
-  function rebaseHistArray(array, from, to, diff) {
-    for (var i = 0; i < array.length; ++i) {
-      var sub = array[i], ok = true;
-      for (var j = 0; j < sub.changes.length; ++j) {
-        var cur = sub.changes[j];
-        if (!sub.copied) { cur.from = copyPos(cur.from); cur.to = copyPos(cur.to); }
-        if (to < cur.from.line) {
-          cur.from.line += diff;
-          cur.to.line += diff;
-        } else if (from <= cur.to.line) {
-          ok = false;
-          break;
-        }
-      }
-      if (!sub.copied) {
-        sub.anchorBefore = copyPos(sub.anchorBefore); sub.headBefore = copyPos(sub.headBefore);
-        sub.anchorAfter = copyPos(sub.anchorAfter); sub.readAfter = copyPos(sub.headAfter);
-        sub.copied = true;
-      }
-      if (!ok) {
-        array.splice(0, i + 1);
-        i = 0;
-      } else {
-        rebaseHistSel(sub.anchorBefore); rebaseHistSel(sub.headBefore);
-        rebaseHistSel(sub.anchorAfter); rebaseHistSel(sub.headAfter);
-      }
-    }
-  }
-
-  function rebaseHist(hist, change) {
-    var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;
-    rebaseHistArray(hist.done, from, to, diff);
-    rebaseHistArray(hist.undone, from, to, diff);
-  }
-
-  // EVENT OPERATORS
-
-  function stopMethod() {e_stop(this);}
-  // Ensure an event has a stop method.
-  function addStop(event) {
-    if (!event.stop) event.stop = stopMethod;
-    return event;
-  }
-
-  function e_preventDefault(e) {
-    if (e.preventDefault) e.preventDefault();
-    else e.returnValue = false;
-  }
-  function e_stopPropagation(e) {
-    if (e.stopPropagation) e.stopPropagation();
-    else e.cancelBubble = true;
-  }
-  function e_defaultPrevented(e) {
-    return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false;
-  }
-  function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}
-  CodeMirror.e_stop = e_stop;
-  CodeMirror.e_preventDefault = e_preventDefault;
-  CodeMirror.e_stopPropagation = e_stopPropagation;
-
-  function e_target(e) {return e.target || e.srcElement;}
-  function e_button(e) {
-    var b = e.which;
-    if (b == null) {
-      if (e.button & 1) b = 1;
-      else if (e.button & 2) b = 3;
-      else if (e.button & 4) b = 2;
-    }
-    if (mac && e.ctrlKey && b == 1) b = 3;
-    return b;
-  }
-
-  // EVENT HANDLING
-
-  function on(emitter, type, f) {
-    if (emitter.addEventListener)
-      emitter.addEventListener(type, f, false);
-    else if (emitter.attachEvent)
-      emitter.attachEvent("on" + type, f);
-    else {
-      var map = emitter._handlers || (emitter._handlers = {});
-      var arr = map[type] || (map[type] = []);
-      arr.push(f);
-    }
-  }
-
-  function off(emitter, type, f) {
-    if (emitter.removeEventListener)
-      emitter.removeEventListener(type, f, false);
-    else if (emitter.detachEvent)
-      emitter.detachEvent("on" + type, f);
-    else {
-      var arr = emitter._handlers && emitter._handlers[type];
-      if (!arr) return;
-      for (var i = 0; i < arr.length; ++i)
-        if (arr[i] == f) { arr.splice(i, 1); break; }
-    }
-  }
-
-  function signal(emitter, type /*, values...*/) {
-    var arr = emitter._handlers && emitter._handlers[type];
-    if (!arr) return;
-    var args = Array.prototype.slice.call(arguments, 2);
-    for (var i = 0; i < arr.length; ++i) arr[i].apply(null, args);
-  }
-
-  var delayedCallbacks, delayedCallbackDepth = 0;
-  function signalLater(emitter, type /*, values...*/) {
-    var arr = emitter._handlers && emitter._handlers[type];
-    if (!arr) return;
-    var args = Array.prototype.slice.call(arguments, 2);
-    if (!delayedCallbacks) {
-      ++delayedCallbackDepth;
-      delayedCallbacks = [];
-      setTimeout(fireDelayed, 0);
-    }
-    function bnd(f) {return function(){f.apply(null, args);};};
-    for (var i = 0; i < arr.length; ++i)
-      delayedCallbacks.push(bnd(arr[i]));
-  }
-
-  function signalDOMEvent(cm, e, override) {
-    signal(cm, override || e.type, cm, e);
-    return e_defaultPrevented(e) || e.codemirrorIgnore;
-  }
-
-  function fireDelayed() {
-    --delayedCallbackDepth;
-    var delayed = delayedCallbacks;
-    delayedCallbacks = null;
-    for (var i = 0; i < delayed.length; ++i) delayed[i]();
-  }
-
-  function hasHandler(emitter, type) {
-    var arr = emitter._handlers && emitter._handlers[type];
-    return arr && arr.length > 0;
-  }
-
-  CodeMirror.on = on; CodeMirror.off = off; CodeMirror.signal = signal;
-
-  function eventMixin(ctor) {
-    ctor.prototype.on = function(type, f) {on(this, type, f);};
-    ctor.prototype.off = function(type, f) {off(this, type, f);};
-  }
-
-  // MISC UTILITIES
-
-  // Number of pixels added to scroller and sizer to hide scrollbar
-  var scrollerCutOff = 30;
-
-  // Returned or thrown by various protocols to signal 'I'm not
-  // handling this'.
-  var Pass = CodeMirror.Pass = {toString: function(){return "CodeMirror.Pass";}};
-
-  function Delayed() {this.id = null;}
-  Delayed.prototype = {set: function(ms, f) {clearTimeout(this.id); this.id = setTimeout(f, ms);}};
-
-  // Counts the column offset in a string, taking tabs into account.
-  // Used mostly to find indentation.
-  function countColumn(string, end, tabSize, startIndex, startValue) {
-    if (end == null) {
-      end = string.search(/[^\s\u00a0]/);
-      if (end == -1) end = string.length;
-    }
-    for (var i = startIndex || 0, n = startValue || 0; i < end; ++i) {
-      if (string.charAt(i) == "\t") n += tabSize - (n % tabSize);
-      else ++n;
-    }
-    return n;
-  }
-  CodeMirror.countColumn = countColumn;
-
-  var spaceStrs = [""];
-  function spaceStr(n) {
-    while (spaceStrs.length <= n)
-      spaceStrs.push(lst(spaceStrs) + " ");
-    return spaceStrs[n];
-  }
-
-  function lst(arr) { return arr[arr.length-1]; }
-
-  function selectInput(node) {
-    if (ios) { // Mobile Safari apparently has a bug where select() is broken.
-      node.selectionStart = 0;
-      node.selectionEnd = node.value.length;
-    } else {
-      // Suppress mysterious IE10 errors
-      try { node.select(); }
-      catch(_e) {}
-    }
-  }
-
-  function indexOf(collection, elt) {
-    if (collection.indexOf) return collection.indexOf(elt);
-    for (var i = 0, e = collection.length; i < e; ++i)
-      if (collection[i] == elt) return i;
-    return -1;
-  }
-
-  function createObj(base, props) {
-    function Obj() {}
-    Obj.prototype = base;
-    var inst = new Obj();
-    if (props) copyObj(props, inst);
-    return inst;
-  }
-
-  function copyObj(obj, target) {
-    if (!target) target = {};
-    for (var prop in obj) if (obj.hasOwnProperty(prop)) target[prop] = obj[prop];
-    return target;
-  }
-
-  function emptyArray(size) {
-    for (var a = [], i = 0; i < size; ++i) a.push(undefined);
-    return a;
-  }
-
-  function bind(f) {
-    var args = Array.prototype.slice.call(arguments, 1);
-    return function(){return f.apply(null, args);};
-  }
-
-  var nonASCIISingleCaseWordChar = /[\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
-  function isWordChar(ch) {
-    return /\w/.test(ch) || ch > "\x80" &&
-      (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch));
-  }
-
-  function isEmpty(obj) {
-    for (var n in obj) if (obj.hasOwnProperty(n) && obj[n]) return false;
-    return true;
-  }
-
-  var isExtendingChar = /[\u0300-\u036F\u0483-\u0487\u0488-\u0489\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\uA66F\uA670-\uA672\uA674-\uA67D\uA69F\udc00-\udfff]/;
-
-  // DOM UTILITIES
-
-  function elt(tag, content, className, style) {
-    var e = document.createElement(tag);
-    if (className) e.className = className;
-    if (style) e.style.cssText = style;
-    if (typeof content == "string") setTextContent(e, content);
-    else if (content) for (var i = 0; i < content.length; ++i) e.appendChild(content[i]);
-    return e;
-  }
-
-  function removeChildren(e) {
-    for (var count = e.childNodes.length; count > 0; --count)
-      e.removeChild(e.firstChild);
-    return e;
-  }
-
-  function removeChildrenAndAdd(parent, e) {
-    return removeChildren(parent).appendChild(e);
-  }
-
-  function setTextContent(e, str) {
-    if (ie_lt9) {
-      e.innerHTML = "";
-      e.appendChild(document.createTextNode(str));
-    } else e.textContent = str;
-  }
-
-  function getRect(node) {
-    return node.getBoundingClientRect();
-  }
-  CodeMirror.replaceGetRect = function(f) { getRect = f; };
-
-  // FEATURE DETECTION
-
-  // Detect drag-and-drop
-  var dragAndDrop = function() {
-    // There is *some* kind of drag-and-drop support in IE6-8, but I
-    // couldn't get it to work yet.
-    if (ie_lt9) return false;
-    var div = elt('div');
-    return "draggable" in div || "dragDrop" in div;
-  }();
-
-  // For a reason I have yet to figure out, some browsers disallow
-  // word wrapping between certain characters *only* if a new inline
-  // element is started between them. This makes it hard to reliably
-  // measure the position of things, since that requires inserting an
-  // extra span. This terribly fragile set of tests matches the
-  // character combinations that suffer from this phenomenon on the
-  // various browsers.
-  function spanAffectsWrapping() { return false; }
-  if (gecko) // Only for "$'"
-    spanAffectsWrapping = function(str, i) {
-      return str.charCodeAt(i - 1) == 36 && str.charCodeAt(i) == 39;
-    };
-  else if (safari && !/Version\/([6-9]|\d\d)\b/.test(navigator.userAgent))
-    spanAffectsWrapping = function(str, i) {
-      return /\-[^ \-?]|\?[^ !\'\"\),.\-\/:;\?\]\}]/.test(str.slice(i - 1, i + 1));
-    };
-  else if (webkit && !/Chrome\/(?:29|[3-9]\d|\d\d\d)\./.test(navigator.userAgent))
-    spanAffectsWrapping = function(str, i) {
-      if (i > 1 && str.charCodeAt(i - 1) == 45) {
-        if (/\w/.test(str.charAt(i - 2)) && /[^\-?\.]/.test(str.charAt(i))) return true;
-        if (i > 2 && /[\d\.,]/.test(str.charAt(i - 2)) && /[\d\.,]/.test(str.charAt(i))) return false;
-      }
-      return /[~!#%&*)=+}\]|\"\.>,:;][({[<]|-[^\-?\.\u2010-\u201f\u2026]|\?[\w~`@#$%\^&*(_=+{[|><]|…[\w~`@#$%\^&*(_=+{[><]/.test(str.slice(i - 1, i + 1));
-    };
-
-  var knownScrollbarWidth;
-  function scrollbarWidth(measure) {
-    if (knownScrollbarWidth != null) return knownScrollbarWidth;
-    var test = elt("div", null, null, "width: 50px; height: 50px; overflow-x: scroll");
-    removeChildrenAndAdd(measure, test);
-    if (test.offsetWidth)
-      knownScrollbarWidth = test.offsetHeight - test.clientHeight;
-    return knownScrollbarWidth || 0;
-  }
-
-  var zwspSupported;
-  function zeroWidthElement(measure) {
-    if (zwspSupported == null) {
-      var test = elt("span", "\u200b");
-      removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")]));
-      if (measure.firstChild.offsetHeight != 0)
-        zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !ie_lt8;
-    }
-    if (zwspSupported) return elt("span", "\u200b");
-    else return elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px");
-  }
-
-  // See if "".split is the broken IE version, if so, provide an
-  // alternative way to split lines.
-  var splitLines = "\n\nb".split(/\n/).length != 3 ? function(string) {
-    var pos = 0, result = [], l = string.length;
-    while (pos <= l) {
-      var nl = string.indexOf("\n", pos);
-      if (nl == -1) nl = string.length;
-      var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl);
-      var rt = line.indexOf("\r");
-      if (rt != -1) {
-        result.push(line.slice(0, rt));
-        pos += rt + 1;
-      } else {
-        result.push(line);
-        pos = nl + 1;
-      }
-    }
-    return result;
-  } : function(string){return string.split(/\r\n?|\n/);};
-  CodeMirror.splitLines = splitLines;
-
-  var hasSelection = window.getSelection ? function(te) {
-    try { return te.selectionStart != te.selectionEnd; }
-    catch(e) { return false; }
-  } : function(te) {
-    try {var range = te.ownerDocument.selection.createRange();}
-    catch(e) {}
-    if (!range || range.parentElement() != te) return false;
-    return range.compareEndPoints("StartToEnd", range) != 0;
-  };
-
-  var hasCopyEvent = (function() {
-    var e = elt("div");
-    if ("oncopy" in e) return true;
-    e.setAttribute("oncopy", "return;");
-    return typeof e.oncopy == 'function';
-  })();
-
-  // KEY NAMING
-
-  var keyNames = {3: "Enter", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt",
-                  19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End",
-                  36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert",
-                  46: "Delete", 59: ";", 91: "Mod", 92: "Mod", 93: "Mod", 109: "-", 107: "=", 127: "Delete",
-                  186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\",
-                  221: "]", 222: "'", 63276: "PageUp", 63277: "PageDown", 63275: "End", 63273: "Home",
-                  63234: "Left", 63232: "Up", 63235: "Right", 63233: "Down", 63302: "Insert", 63272: "Delete"};
-  CodeMirror.keyNames = keyNames;
-  (function() {
-    // Number keys
-    for (var i = 0; i < 10; i++) keyNames[i + 48] = String(i);
-    // Alphabetic keys
-    for (var i = 65; i <= 90; i++) keyNames[i] = String.fromCharCode(i);
-    // Function keys
-    for (var i = 1; i <= 12; i++) keyNames[i + 111] = keyNames[i + 63235] = "F" + i;
-  })();
-
-  // BIDI HELPERS
-
-  function iterateBidiSections(order, from, to, f) {
-    if (!order) return f(from, to, "ltr");
-    var found = false;
-    for (var i = 0; i < order.length; ++i) {
-      var part = order[i];
-      if (part.from < to && part.to > from || from == to && part.to == from) {
-        f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr");
-        found = true;
-      }
-    }
-    if (!found) f(from, to, "ltr");
-  }
-
-  function bidiLeft(part) { return part.level % 2 ? part.to : part.from; }
-  function bidiRight(part) { return part.level % 2 ? part.from : part.to; }
-
-  function lineLeft(line) { var order = getOrder(line); return order ? bidiLeft(order[0]) : 0; }
-  function lineRight(line) {
-    var order = getOrder(line);
-    if (!order) return line.text.length;
-    return bidiRight(lst(order));
-  }
-
-  function lineStart(cm, lineN) {
-    var line = getLine(cm.doc, lineN);
-    var visual = visualLine(cm.doc, line);
-    if (visual != line) lineN = lineNo(visual);
-    var order = getOrder(visual);
-    var ch = !order ? 0 : order[0].level % 2 ? lineRight(visual) : lineLeft(visual);
-    return Pos(lineN, ch);
-  }
-  function lineEnd(cm, lineN) {
-    var merged, line;
-    while (merged = collapsedSpanAtEnd(line = getLine(cm.doc, lineN)))
-      lineN = merged.find().to.line;
-    var order = getOrder(line);
-    var ch = !order ? line.text.length : order[0].level % 2 ? lineLeft(line) : lineRight(line);
-    return Pos(lineN, ch);
-  }
-
-  function compareBidiLevel(order, a, b) {
-    var linedir = order[0].level;
-    if (a == linedir) return true;
-    if (b == linedir) return false;
-    return a < b;
-  }
-  var bidiOther;
-  function getBidiPartAt(order, pos) {
-    for (var i = 0, found; i < order.length; ++i) {
-      var cur = order[i];
-      if (cur.from < pos && cur.to > pos) { bidiOther = null; return i; }
-      if (cur.from == pos || cur.to == pos) {
-        if (found == null) {
-          found = i;
-        } else if (compareBidiLevel(order, cur.level, order[found].level)) {
-          bidiOther = found;
-          return i;
-        } else {
-          bidiOther = i;
-          return found;
-        }
-      }
-    }
-    bidiOther = null;
-    return found;
-  }
-
-  function moveInLine(line, pos, dir, byUnit) {
-    if (!byUnit) return pos + dir;
-    do pos += dir;
-    while (pos > 0 && isExtendingChar.test(line.text.charAt(pos)));
-    return pos;
-  }
-
-  // This is somewhat involved. It is needed in order to move
-  // 'visually' through bi-directional text -- i.e., pressing left
-  // should make the cursor go left, even when in RTL text. The
-  // tricky part is the 'jumps', where RTL and LTR text touch each
-  // other. This often requires the cursor offset to move more than
-  // one unit, in order to visually move one unit.
-  function moveVisually(line, start, dir, byUnit) {
-    var bidi = getOrder(line);
-    if (!bidi) return moveLogically(line, start, dir, byUnit);
-    var pos = getBidiPartAt(bidi, start), part = bidi[pos];
-    var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);
-
-    for (;;) {
-      if (target > part.from && target < part.to) return target;
-      if (target == part.from || target == part.to) {
-        if (getBidiPartAt(bidi, target) == pos) return target;
-        part = bidi[pos += dir];
-        return (dir > 0) == part.level % 2 ? part.to : part.from;
-      } else {
-        part = bidi[pos += dir];
-        if (!part) return null;
-        if ((dir > 0) == part.level % 2)
-          target = moveInLine(line, part.to, -1, byUnit);
-        else
-          target = moveInLine(line, part.from, 1, byUnit);
-      }
-    }
-  }
-
-  function moveLogically(line, start, dir, byUnit) {
-    var target = start + dir;
-    if (byUnit) while (target > 0 && isExtendingChar.test(line.text.charAt(target))) target += dir;
-    return target < 0 || target > line.text.length ? null : target;
-  }
-
-  // Bidirectional ordering algorithm
-  // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm
-  // that this (partially) implements.
-
-  // One-char codes used for character types:
-  // L (L):   Left-to-Right
-  // R (R):   Right-to-Left
-  // r (AL):  Right-to-Left Arabic
-  // 1 (EN):  European Number
-  // + (ES):  European Number Separator
-  // % (ET):  European Number Terminator
-  // n (AN):  Arabic Number
-  // , (CS):  Common Number Separator
-  // m (NSM): Non-Spacing Mark
-  // b (BN):  Boundary Neutral
-  // s (B):   Paragraph Separator
-  // t (S):   Segment Separator
-  // w (WS):  Whitespace
-  // N (ON):  Other Neutrals
-
-  // Returns null if characters are ordered as they appear
-  // (left-to-right), or an array of sections ({from, to, level}
-  // objects) in the order in which they occur visually.
-  var bidiOrdering = (function() {
-    // Character types for codepoints 0 to 0xff
-    var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL";
-    // Character types for codepoints 0x600 to 0x6ff
-    var arabicTypes = "rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmmrrrrrrrrrrrrrrrrrr";
-    function charType(code) {
-      if (code <= 0xff) return lowTypes.charAt(code);
-      else if (0x590 <= code && code <= 0x5f4) return "R";
-      else if (0x600 <= code && code <= 0x6ff) return arabicTypes.charAt(code - 0x600);
-      else if (0x700 <= code && code <= 0x8ac) return "r";
-      else return "L";
-    }
-
-    var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
-    var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;
-    // Browsers seem to always treat the boundaries of block elements as being L.
-    var outerType = "L";
-
-    return function(str) {
-      if (!bidiRE.test(str)) return false;
-      var len = str.length, types = [];
-      for (var i = 0, type; i < len; ++i)
-        types.push(type = charType(str.charCodeAt(i)));
-
-      // W1. Examine each non-spacing mark (NSM) in the level run, and
-      // change the type of the NSM to the type of the previous
-      // character. If the NSM is at the start of the level run, it will
-      // get the type of sor.
-      for (var i = 0, prev = outerType; i < len; ++i) {
-        var type = types[i];
-        if (type == "m") types[i] = prev;
-        else prev = type;
-      }
-
-      // W2. Search backwards from each instance of a European number
-      // until the first strong type (R, L, AL, or sor) is found. If an
-      // AL is found, change the type of the European number to Arabic
-      // number.
-      // W3. Change all ALs to R.
-      for (var i = 0, cur = outerType; i < len; ++i) {
-        var type = types[i];
-        if (type == "1" && cur == "r") types[i] = "n";
-        else if (isStrong.test(type)) { cur = type; if (type == "r") types[i] = "R"; }
-      }
-
-      // W4. A single European separator between two European numbers
-      // changes to a European number. A single common separator between
-      // two numbers of the same type changes to that type.
-      for (var i = 1, prev = types[0]; i < len - 1; ++i) {
-        var type = types[i];
-        if (type == "+" && prev == "1" && types[i+1] == "1") types[i] = "1";
-        else if (type == "," && prev == types[i+1] &&
-                 (prev == "1" || prev == "n")) types[i] = prev;
-        prev = type;
-      }
-
-      // W5. A sequence of European terminators adjacent to European
-      // numbers changes to all European numbers.
-      // W6. Otherwise, separators and terminators change to Other
-      // Neutral.
-      for (var i = 0; i < len; ++i) {
-        var type = types[i];
-        if (type == ",") types[i] = "N";
-        else if (type == "%") {
-          for (var end = i + 1; end < len && types[end] == "%"; ++end) {}
-          var replace = (i && types[i-1] == "!") || (end < len - 1 && types[end] == "1") ? "1" : "N";
-          for (var j = i; j < end; ++j) types[j] = replace;
-          i = end - 1;
-        }
-      }
-
-      // W7. Search backwards from each instance of a European number
-      // until the first strong type (R, L, or sor) is found. If an L is
-      // found, then change the type of the European number to L.
-      for (var i = 0, cur = outerType; i < len; ++i) {
-        var type = types[i];
-        if (cur == "L" && type == "1") types[i] = "L";
-        else if (isStrong.test(type)) cur = type;
-      }
-
-      // N1. A sequence of neutrals takes the direction of the
-      // surrounding strong text if the text on both sides has the same
-      // direction. European and Arabic numbers act as if they were R in
-      // terms of their influence on neutrals. Start-of-level-run (sor)
-      // and end-of-level-run (eor) are used at level run boundaries.
-      // N2. Any remaining neutrals take the embedding direction.
-      for (var i = 0; i < len; ++i) {
-        if (isNeutral.test(types[i])) {
-          for (var end = i + 1; end < len && isNeutral.test(types[end]); ++end) {}
-          var before = (i ? types[i-1] : outerType) == "L";
-          var after = (end < len - 1 ? types[end] : outerType) == "L";
-          var replace = before || after ? "L" : "R";
-          for (var j = i; j < end; ++j) types[j] = replace;
-          i = end - 1;
-        }
-      }
-
-      // Here we depart from the documented algorithm, in order to avoid
-      // building up an actual levels array. Since there are only three
-      // levels (0, 1, 2) in an implementation that doesn't take
-      // explicit embedding into account, we can build up the order on
-      // the fly, without following the level-based algorithm.
-      var order = [], m;
-      for (var i = 0; i < len;) {
-        if (countsAsLeft.test(types[i])) {
-          var start = i;
-          for (++i; i < len && countsAsLeft.test(types[i]); ++i) {}
-          order.push({from: start, to: i, level: 0});
-        } else {
-          var pos = i, at = order.length;
-          for (++i; i < len && types[i] != "L"; ++i) {}
-          for (var j = pos; j < i;) {
-            if (countsAsNum.test(types[j])) {
-              if (pos < j) order.splice(at, 0, {from: pos, to: j, level: 1});
-              var nstart = j;
-              for (++j; j < i && countsAsNum.test(types[j]); ++j) {}
-              order.splice(at, 0, {from: nstart, to: j, level: 2});
-              pos = j;
-            } else ++j;
-          }
-          if (pos < i) order.splice(at, 0, {from: pos, to: i, level: 1});
-        }
-      }
-      if (order[0].level == 1 && (m = str.match(/^\s+/))) {
-        order[0].from = m[0].length;
-        order.unshift({from: 0, to: m[0].length, level: 0});
-      }
-      if (lst(order).level == 1 && (m = str.match(/\s+$/))) {
-        lst(order).to -= m[0].length;
-        order.push({from: len - m[0].length, to: len, level: 0});
-      }
-      if (order[0].level != lst(order).level)
-        order.push({from: len, to: len, level: order[0].level});
-
-      return order;
-    };
-  })();
-
-  // THE END
-
-  CodeMirror.version = "3.15.0";
-
-  return CodeMirror;
-})();
diff --git a/public/js/lib/codemirror-accessible/codemirror-original.js b/public/js/lib/codemirror-accessible/codemirror-original.js
deleted file mode 100755
index 4d7ec07..0000000
--- a/public/js/lib/codemirror-accessible/codemirror-original.js
+++ /dev/null
@@ -1,5799 +0,0 @@
-// CodeMirror version 3.15
-//
-// CodeMirror is the only global var we claim
-window.CodeMirrorOriginal = (function() {
-  "use strict";
-
-  // BROWSER SNIFFING
-
-  // Crude, but necessary to handle a number of hard-to-feature-detect
-  // bugs and behavior differences.
-  var gecko = /gecko\/\d/i.test(navigator.userAgent);
-  var ie = /MSIE \d/.test(navigator.userAgent);
-  var ie_lt8 = ie && (document.documentMode == null || document.documentMode < 8);
-  var ie_lt9 = ie && (document.documentMode == null || document.documentMode < 9);
-  var webkit = /WebKit\//.test(navigator.userAgent);
-  var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(navigator.userAgent);
-  var chrome = /Chrome\//.test(navigator.userAgent);
-  var opera = /Opera\//.test(navigator.userAgent);
-  var safari = /Apple Computer/.test(navigator.vendor);
-  var khtml = /KHTML\//.test(navigator.userAgent);
-  var mac_geLion = /Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent);
-  var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent);
-  var phantom = /PhantomJS/.test(navigator.userAgent);
-
-  var ios = /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent);
-  // This is woefully incomplete. Suggestions for alternative methods welcome.
-  var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent);
-  var mac = ios || /Mac/.test(navigator.platform);
-  var windows = /windows/i.test(navigator.platform);
-
-  var opera_version = opera && navigator.userAgent.match(/Version\/(\d*\.\d*)/);
-  if (opera_version) opera_version = Number(opera_version[1]);
-  if (opera_version && opera_version >= 15) { opera = false; webkit = true; }
-  // Some browsers use the wrong event properties to signal cmd/ctrl on OS X
-  var flipCtrlCmd = mac && (qtwebkit || opera && (opera_version == null || opera_version < 12.11));
-  var captureMiddleClick = gecko || (ie && !ie_lt9);
-
-  // Optimize some code when these features are not used
-  var sawReadOnlySpans = false, sawCollapsedSpans = false;
-
-  // CONSTRUCTOR
-
-  function CodeMirror(place, options) {
-    if (!(this instanceof CodeMirror)) return new CodeMirror(place, options);
-
-    this.options = options = options || {};
-    // Determine effective options based on given values and defaults.
-    for (var opt in defaults) if (!options.hasOwnProperty(opt) && defaults.hasOwnProperty(opt))
-      options[opt] = defaults[opt];
-    setGuttersForLineNumbers(options);
-
-    var docStart = typeof options.value == "string" ? 0 : options.value.first;
-    var display = this.display = makeDisplay(place, docStart);
-    display.wrapper.CodeMirror = this;
-    updateGutters(this);
-    if (options.autofocus && !mobile) focusInput(this);
-
-    this.state = {keyMaps: [],
-                  overlays: [],
-                  modeGen: 0,
-                  overwrite: false, focused: false,
-                  suppressEdits: false, pasteIncoming: false,
-                  draggingText: false,
-                  highlight: new Delayed()};
-
-    themeChanged(this);
-    if (options.lineWrapping)
-      this.display.wrapper.className += " CodeMirror-wrap";
-
-    var doc = options.value;
-    if (typeof doc == "string") doc = new Doc(options.value, options.mode);
-    operation(this, attachDoc)(this, doc);
-
-    // Override magic textarea content restore that IE sometimes does
-    // on our hidden textarea on reload
-    if (ie) setTimeout(bind(resetInput, this, true), 20);
-
-    registerEventHandlers(this);
-    // IE throws unspecified error in certain cases, when
-    // trying to access activeElement before onload
-    var hasFocus; try { hasFocus = (document.activeElement == display.input); } catch(e) { }
-    if (hasFocus || (options.autofocus && !mobile)) setTimeout(bind(onFocus, this), 20);
-    else onBlur(this);
-
-    operation(this, function() {
-      for (var opt in optionHandlers)
-        if (optionHandlers.propertyIsEnumerable(opt))
-          optionHandlers[opt](this, options[opt], Init);
-      for (var i = 0; i < initHooks.length; ++i) initHooks[i](this);
-    })();
-  }
-
-  // DISPLAY CONSTRUCTOR
-
-  function makeDisplay(place, docStart) {
-    var d = {};
-
-    var input = d.input = elt("textarea", null, null, "position: absolute; padding: 0; width: 1px; height: 1em; outline: none; font-size: 4px;");
-    if (webkit) input.style.width = "1000px";
-    else input.setAttribute("wrap", "off");
-    // if border: 0; -- iOS fails to open keyboard (issue #1287)
-    if (ios) input.style.border = "1px solid black";
-    input.setAttribute("autocorrect", "off"); input.setAttribute("autocapitalize", "off"); input.setAttribute("spellcheck", "false");
-
-    // Wraps and hides input textarea
-    d.inputDiv = elt("div", [input], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
-    // The actual fake scrollbars.
-    d.scrollbarH = elt("div", [elt("div", null, null, "height: 1px")], "CodeMirror-hscrollbar");
-    d.scrollbarV = elt("div", [elt("div", null, null, "width: 1px")], "CodeMirror-vscrollbar");
-    d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler");
-    d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler");
-    // DIVs containing the selection and the actual code
-    d.lineDiv = elt("div", null, "CodeMirror-code");
-    d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1");
-    // Blinky cursor, and element used to ensure cursor fits at the end of a line
-    d.cursor = elt("div", "\u00a0", "CodeMirror-cursor");
-    // Secondary cursor, shown when on a 'jump' in bi-directional text
-    d.otherCursor = elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor");
-    // Used to measure text size
-    d.measure = elt("div", null, "CodeMirror-measure");
-    // Wraps everything that needs to exist inside the vertically-padded coordinate system
-    d.lineSpace = elt("div", [d.measure, d.selectionDiv, d.lineDiv, d.cursor, d.otherCursor],
-                         null, "position: relative; outline: none");
-    // Moved around its parent to cover visible view
-    d.mover = elt("div", [elt("div", [d.lineSpace], "CodeMirror-lines")], null, "position: relative");
-    // Set to the height of the text, causes scrolling
-    d.sizer = elt("div", [d.mover], "CodeMirror-sizer");
-    // D is needed because behavior of elts with overflow: auto and padding is inconsistent across browsers
-    d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerCutOff + "px; width: 1px;");
-    // Will contain the gutters, if any
-    d.gutters = elt("div", null, "CodeMirror-gutters");
-    d.lineGutter = null;
-    // Provides scrolling
-    d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll");
-    d.scroller.setAttribute("tabIndex", "-1");
-    // The element in which the editor lives.
-    d.wrapper = elt("div", [d.inputDiv, d.scrollbarH, d.scrollbarV,
-                            d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror");
-    // Work around IE7 z-index bug
-    if (ie_lt8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }
-    if (place.appendChild) place.appendChild(d.wrapper); else place(d.wrapper);
-
-    // Needed to hide big blue blinking cursor on Mobile Safari
-    if (ios) input.style.width = "0px";
-    if (!webkit) d.scroller.draggable = true;
-    // Needed to handle Tab key in KHTML
-    if (khtml) { d.inputDiv.style.height = "1px"; d.inputDiv.style.position = "absolute"; }
-    // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).
-    else if (ie_lt8) d.scrollbarH.style.minWidth = d.scrollbarV.style.minWidth = "18px";
-
-    // Current visible range (may be bigger than the view window).
-    d.viewOffset = d.lastSizeC = 0;
-    d.showingFrom = d.showingTo = docStart;
-
-    // Used to only resize the line number gutter when necessary (when
-    // the amount of lines crosses a boundary that makes its width change)
-    d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;
-    // See readInput and resetInput
-    d.prevInput = "";
-    // Set to true when a non-horizontal-scrolling widget is added. As
-    // an optimization, widget aligning is skipped when d is false.
-    d.alignWidgets = false;
-    // Flag that indicates whether we currently expect input to appear
-    // (after some event like 'keypress' or 'input') and are polling
-    // intensively.
-    d.pollingFast = false;
-    // Self-resetting timeout for the poller
-    d.poll = new Delayed();
-
-    d.cachedCharWidth = d.cachedTextHeight = null;
-    d.measureLineCache = [];
-    d.measureLineCachePos = 0;
-
-    // Tracks when resetInput has punted to just putting a short
-    // string instead of the (large) selection.
-    d.inaccurateSelection = false;
-
-    // Tracks the maximum line length so that the horizontal scrollbar
-    // can be kept static when scrolling.
-    d.maxLine = null;
-    d.maxLineLength = 0;
-    d.maxLineChanged = false;
-
-    // Used for measuring wheel scrolling granularity
-    d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;
-
-    return d;
-  }
-
-  // STATE UPDATES
-
-  // Used to get the editor into a consistent state again when options change.
-
-  function loadMode(cm) {
-    cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption);
-    cm.doc.iter(function(line) {
-      if (line.stateAfter) line.stateAfter = null;
-      if (line.styles) line.styles = null;
-    });
-    cm.doc.frontier = cm.doc.first;
-    startWorker(cm, 100);
-    cm.state.modeGen++;
-    if (cm.curOp) regChange(cm);
-  }
-
-  function wrappingChanged(cm) {
-    if (cm.options.lineWrapping) {
-      cm.display.wrapper.className += " CodeMirror-wrap";
-      cm.display.sizer.style.minWidth = "";
-    } else {
-      cm.display.wrapper.className = cm.display.wrapper.className.replace(" CodeMirror-wrap", "");
-      computeMaxLength(cm);
-    }
-    estimateLineHeights(cm);
-    regChange(cm);
-    clearCaches(cm);
-    setTimeout(function(){updateScrollbars(cm);}, 100);
-  }
-
-  function estimateHeight(cm) {
-    var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;
-    var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);
-    return function(line) {
-      if (lineIsHidden(cm.doc, line))
-        return 0;
-      else if (wrapping)
-        return (Math.ceil(line.text.length / perLine) || 1) * th;
-      else
-        return th;
-    };
-  }
-
-  function estimateLineHeights(cm) {
-    var doc = cm.doc, est = estimateHeight(cm);
-    doc.iter(function(line) {
-      var estHeight = est(line);
-      if (estHeight != line.height) updateLineHeight(line, estHeight);
-    });
-  }
-
-  function keyMapChanged(cm) {
-    var map = keyMap[cm.options.keyMap], style = map.style;
-    cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-keymap-\S+/g, "") +
-      (style ? " cm-keymap-" + style : "");
-    cm.state.disableInput = map.disableInput;
-  }
-
-  function themeChanged(cm) {
-    cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") +
-      cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-");
-    clearCaches(cm);
-  }
-
-  function guttersChanged(cm) {
-    updateGutters(cm);
-    regChange(cm);
-    setTimeout(function(){alignHorizontally(cm);}, 20);
-  }
-
-  function updateGutters(cm) {
-    var gutters = cm.display.gutters, specs = cm.options.gutters;
-    removeChildren(gutters);
-    for (var i = 0; i < specs.length; ++i) {
-      var gutterClass = specs[i];
-      var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + gutterClass));
-      if (gutterClass == "CodeMirror-linenumbers") {
-        cm.display.lineGutter = gElt;
-        gElt.style.width = (cm.display.lineNumWidth || 1) + "px";
-      }
-    }
-    gutters.style.display = i ? "" : "none";
-  }
-
-  function lineLength(doc, line) {
-    if (line.height == 0) return 0;
-    var len = line.text.length, merged, cur = line;
-    while (merged = collapsedSpanAtStart(cur)) {
-      var found = merged.find();
-      cur = getLine(doc, found.from.line);
-      len += found.from.ch - found.to.ch;
-    }
-    cur = line;
-    while (merged = collapsedSpanAtEnd(cur)) {
-      var found = merged.find();
-      len -= cur.text.length - found.from.ch;
-      cur = getLine(doc, found.to.line);
-      len += cur.text.length - found.to.ch;
-    }
-    return len;
-  }
-
-  function computeMaxLength(cm) {
-    var d = cm.display, doc = cm.doc;
-    d.maxLine = getLine(doc, doc.first);
-    d.maxLineLength = lineLength(doc, d.maxLine);
-    d.maxLineChanged = true;
-    doc.iter(function(line) {
-      var len = lineLength(doc, line);
-      if (len > d.maxLineLength) {
-        d.maxLineLength = len;
-        d.maxLine = line;
-      }
-    });
-  }
-
-  // Make sure the gutters options contains the element
-  // "CodeMirror-linenumbers" when the lineNumbers option is true.
-  function setGuttersForLineNumbers(options) {
-    var found = false;
-    for (var i = 0; i < options.gutters.length; ++i) {
-      if (options.gutters[i] == "CodeMirror-linenumbers") {
-        if (options.lineNumbers) found = true;
-        else options.gutters.splice(i--, 1);
-      }
-    }
-    if (!found && options.lineNumbers)
-      options.gutters.push("CodeMirror-linenumbers");
-  }
-
-  // SCROLLBARS
-
-  // Re-synchronize the fake scrollbars with the actual size of the
-  // content. Optionally force a scrollTop.
-  function updateScrollbars(cm) {
-    var d = cm.display, docHeight = cm.doc.height;
-    var totalHeight = docHeight + paddingVert(d);
-    d.sizer.style.minHeight = d.heightForcer.style.top = totalHeight + "px";
-    d.gutters.style.height = Math.max(totalHeight, d.scroller.clientHeight - scrollerCutOff) + "px";
-    var scrollHeight = Math.max(totalHeight, d.scroller.scrollHeight);
-    var needsH = d.scroller.scrollWidth > (d.scroller.clientWidth + 1);
-    var needsV = scrollHeight > (d.scroller.clientHeight + 1);
-    if (needsV) {
-      d.scrollbarV.style.display = "block";
-      d.scrollbarV.style.bottom = needsH ? scrollbarWidth(d.measure) + "px" : "0";
-      d.scrollbarV.firstChild.style.height =
-        (scrollHeight - d.scroller.clientHeight + d.scrollbarV.clientHeight) + "px";
-    } else d.scrollbarV.style.display = "";
-    if (needsH) {
-      d.scrollbarH.style.display = "block";
-      d.scrollbarH.style.right = needsV ? scrollbarWidth(d.measure) + "px" : "0";
-      d.scrollbarH.firstChild.style.width =
-        (d.scroller.scrollWidth - d.scroller.clientWidth + d.scrollbarH.clientWidth) + "px";
-    } else d.scrollbarH.style.display = "";
-    if (needsH && needsV) {
-      d.scrollbarFiller.style.display = "block";
-      d.scrollbarFiller.style.height = d.scrollbarFiller.style.width = scrollbarWidth(d.measure) + "px";
-    } else d.scrollbarFiller.style.display = "";
-    if (needsH && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {
-      d.gutterFiller.style.display = "block";
-      d.gutterFiller.style.height = scrollbarWidth(d.measure) + "px";
-      d.gutterFiller.style.width = d.gutters.offsetWidth + "px";
-    } else d.gutterFiller.style.display = "";
-
-    if (mac_geLion && scrollbarWidth(d.measure) === 0)
-      d.scrollbarV.style.minWidth = d.scrollbarH.style.minHeight = mac_geMountainLion ? "18px" : "12px";
-  }
-
-  function visibleLines(display, doc, viewPort) {
-    var top = display.scroller.scrollTop, height = display.wrapper.clientHeight;
-    if (typeof viewPort == "number") top = viewPort;
-    else if (viewPort) {top = viewPort.top; height = viewPort.bottom - viewPort.top;}
-    top = Math.floor(top - paddingTop(display));
-    var bottom = Math.ceil(top + height);
-    return {from: lineAtHeight(doc, top), to: lineAtHeight(doc, bottom)};
-  }
-
-  // LINE NUMBERS
-
-  function alignHorizontally(cm) {
-    var display = cm.display;
-    if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) return;
-    var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;
-    var gutterW = display.gutters.offsetWidth, l = comp + "px";
-    for (var n = display.lineDiv.firstChild; n; n = n.nextSibling) if (n.alignable) {
-      for (var i = 0, a = n.alignable; i < a.length; ++i) a[i].style.left = l;
-    }
-    if (cm.options.fixedGutter)
-      display.gutters.style.left = (comp + gutterW) + "px";
-  }
-
-  function maybeUpdateLineNumberWidth(cm) {
-    if (!cm.options.lineNumbers) return false;
-    var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;
-    if (last.length != display.lineNumChars) {
-      var test = display.measure.appendChild(elt("div", [elt("div", last)],
-                                                 "CodeMirror-linenumber CodeMirror-gutter-elt"));
-      var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;
-      display.lineGutter.style.width = "";
-      display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding);
-      display.lineNumWidth = display.lineNumInnerWidth + padding;
-      display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;
-      display.lineGutter.style.width = display.lineNumWidth + "px";
-      return true;
-    }
-    return false;
-  }
-
-  function lineNumberFor(options, i) {
-    return String(options.lineNumberFormatter(i + options.firstLineNumber));
-  }
-  function compensateForHScroll(display) {
-    return getRect(display.scroller).left - getRect(display.sizer).left;
-  }
-
-  // DISPLAY DRAWING
-
-  function updateDisplay(cm, changes, viewPort, forced) {
-    var oldFrom = cm.display.showingFrom, oldTo = cm.display.showingTo, updated;
-    var visible = visibleLines(cm.display, cm.doc, viewPort);
-    for (;;) {
-      if (!updateDisplayInner(cm, changes, visible, forced)) break;
-      forced = false;
-      updated = true;
-      updateSelection(cm);
-      updateScrollbars(cm);
-
-      // Clip forced viewport to actual scrollable area
-      if (viewPort)
-        viewPort = Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight,
-                            typeof viewPort == "number" ? viewPort : viewPort.top);
-      visible = visibleLines(cm.display, cm.doc, viewPort);
-      if (visible.from >= cm.display.showingFrom && visible.to <= cm.display.showingTo)
-        break;
-      changes = [];
-    }
-
-    if (updated) {
-      signalLater(cm, "update", cm);
-      if (cm.display.showingFrom != oldFrom || cm.display.showingTo != oldTo)
-        signalLater(cm, "viewportChange", cm, cm.display.showingFrom, cm.display.showingTo);
-    }
-    return updated;
-  }
-
-  // Uses a set of changes plus the current scroll position to
-  // determine which DOM updates have to be made, and makes the
-  // updates.
-  function updateDisplayInner(cm, changes, visible, forced) {
-    var display = cm.display, doc = cm.doc;
-    if (!display.wrapper.clientWidth) {
-      display.showingFrom = display.showingTo = doc.first;
-      display.viewOffset = 0;
-      return;
-    }
-
-    // Bail out if the visible area is already rendered and nothing changed.
-    if (!forced && changes.length == 0 &&
-        visible.from > display.showingFrom && visible.to < display.showingTo)
-      return;
-
-    if (maybeUpdateLineNumberWidth(cm))
-      changes = [{from: doc.first, to: doc.first + doc.size}];
-    var gutterW = display.sizer.style.marginLeft = display.gutters.offsetWidth + "px";
-    display.scrollbarH.style.left = cm.options.fixedGutter ? gutterW : "0";
-
-    // Used to determine which lines need their line numbers updated
-    var positionsChangedFrom = Infinity;
-    if (cm.options.lineNumbers)
-      for (var i = 0; i < changes.length; ++i)
-        if (changes[i].diff) { positionsChangedFrom = changes[i].from; break; }
-
-    var end = doc.first + doc.size;
-    var from = Math.max(visible.from - cm.options.viewportMargin, doc.first);
-    var to = Math.min(end, visible.to + cm.options.viewportMargin);
-    if (display.showingFrom < from && from - display.showingFrom < 20) from = Math.max(doc.first, display.showingFrom);
-    if (display.showingTo > to && display.showingTo - to < 20) to = Math.min(end, display.showingTo);
-    if (sawCollapsedSpans) {
-      from = lineNo(visualLine(doc, getLine(doc, from)));
-      while (to < end && lineIsHidden(doc, getLine(doc, to))) ++to;
-    }
-
-    // Create a range of theoretically intact lines, and punch holes
-    // in that using the change info.
-    var intact = [{from: Math.max(display.showingFrom, doc.first),
-                   to: Math.min(display.showingTo, end)}];
-    if (intact[0].from >= intact[0].to) intact = [];
-    else intact = computeIntact(intact, changes);
-    // When merged lines are present, we might have to reduce the
-    // intact ranges because changes in continued fragments of the
-    // intact lines do require the lines to be redrawn.
-    if (sawCollapsedSpans)
-      for (var i = 0; i < intact.length; ++i) {
-        var range = intact[i], merged;
-        while (merged = collapsedSpanAtEnd(getLine(doc, range.to - 1))) {
-          var newTo = merged.find().from.line;
-          if (newTo > range.from) range.to = newTo;
-          else { intact.splice(i--, 1); break; }
-        }
-      }
-
-    // Clip off the parts that won't be visible
-    var intactLines = 0;
-    for (var i = 0; i < intact.length; ++i) {
-      var range = intact[i];
-      if (range.from < from) range.from = from;
-      if (range.to > to) range.to = to;
-      if (range.from >= range.to) intact.splice(i--, 1);
-      else intactLines += range.to - range.from;
-    }
-    if (!forced && intactLines == to - from && from == display.showingFrom && to == display.showingTo) {
-      updateViewOffset(cm);
-      return;
-    }
-    intact.sort(function(a, b) {return a.from - b.from;});
-
-    // Avoid crashing on IE's "unspecified error" when in iframes
-    try {
-      var focused = document.activeElement;
-    } catch(e) {}
-    if (intactLines < (to - from) * .7) display.lineDiv.style.display = "none";
-    patchDisplay(cm, from, to, intact, positionsChangedFrom);
-    display.lineDiv.style.display = "";
-    if (focused && document.activeElement != focused && focused.offsetHeight) focused.focus();
-
-    var different = from != display.showingFrom || to != display.showingTo ||
-      display.lastSizeC != display.wrapper.clientHeight;
-    // This is just a bogus formula that detects when the editor is
-    // resized or the font size changes.
-    if (different) {
-      display.lastSizeC = display.wrapper.clientHeight;
-      startWorker(cm, 400);
-    }
-    display.showingFrom = from; display.showingTo = to;
-
-    updateHeightsInViewport(cm);
-    updateViewOffset(cm);
-
-    return true;
-  }
-
-  function updateHeightsInViewport(cm) {
-    var display = cm.display;
-    var prevBottom = display.lineDiv.offsetTop;
-    for (var node = display.lineDiv.firstChild, height; node; node = node.nextSibling) if (node.lineObj) {
-      if (ie_lt8) {
-        var bot = node.offsetTop + node.offsetHeight;
-        height = bot - prevBottom;
-        prevBottom = bot;
-      } else {
-        var box = getRect(node);
-        height = box.bottom - box.top;
-      }
-      var diff = node.lineObj.height - height;
-      if (height < 2) height = textHeight(display);
-      if (diff > .001 || diff < -.001) {
-        updateLineHeight(node.lineObj, height);
-        var widgets = node.lineObj.widgets;
-        if (widgets) for (var i = 0; i < widgets.length; ++i)
-          widgets[i].height = widgets[i].node.offsetHeight;
-      }
-    }
-  }
-
-  function updateViewOffset(cm) {
-    var off = cm.display.viewOffset = heightAtLine(cm, getLine(cm.doc, cm.display.showingFrom));
-    // Position the mover div to align with the current virtual scroll position
-    cm.display.mover.style.top = off + "px";
-  }
-
-  function computeIntact(intact, changes) {
-    for (var i = 0, l = changes.length || 0; i < l; ++i) {
-      var change = changes[i], intact2 = [], diff = change.diff || 0;
-      for (var j = 0, l2 = intact.length; j < l2; ++j) {
-        var range = intact[j];
-        if (change.to <= range.from && change.diff) {
-          intact2.push({from: range.from + diff, to: range.to + diff});
-        } else if (change.to <= range.from || change.from >= range.to) {
-          intact2.push(range);
-        } else {
-          if (change.from > range.from)
-            intact2.push({from: range.from, to: change.from});
-          if (change.to < range.to)
-            intact2.push({from: change.to + diff, to: range.to + diff});
-        }
-      }
-      intact = intact2;
-    }
-    return intact;
-  }
-
-  function getDimensions(cm) {
-    var d = cm.display, left = {}, width = {};
-    for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {
-      left[cm.options.gutters[i]] = n.offsetLeft;
-      width[cm.options.gutters[i]] = n.offsetWidth;
-    }
-    return {fixedPos: compensateForHScroll(d),
-            gutterTotalWidth: d.gutters.offsetWidth,
-            gutterLeft: left,
-            gutterWidth: width,
-            wrapperWidth: d.wrapper.clientWidth};
-  }
-
-  function patchDisplay(cm, from, to, intact, updateNumbersFrom) {
-    var dims = getDimensions(cm);
-    var display = cm.display, lineNumbers = cm.options.lineNumbers;
-    if (!intact.length && (!webkit || !cm.display.currentWheelTarget))
-      removeChildren(display.lineDiv);
-    var container = display.lineDiv, cur = container.firstChild;
-
-    function rm(node) {
-      var next = node.nextSibling;
-      if (webkit && mac && cm.display.currentWheelTarget == node) {
-        node.style.display = "none";
-        node.lineObj = null;
-      } else {
-        node.parentNode.removeChild(node);
-      }
-      return next;
-    }
-
-    var nextIntact = intact.shift(), lineN = from;
-    cm.doc.iter(from, to, function(line) {
-      if (nextIntact && nextIntact.to == lineN) nextIntact = intact.shift();
-      if (lineIsHidden(cm.doc, line)) {
-        if (line.height != 0) updateLineHeight(line, 0);
-        if (line.widgets && cur.previousSibling) for (var i = 0; i < line.widgets.length; ++i) {
-          var w = line.widgets[i];
-          if (w.showIfHidden) {
-            var prev = cur.previousSibling;
-            if (/pre/i.test(prev.nodeName)) {
-              var wrap = elt("div", null, null, "position: relative");
-              prev.parentNode.replaceChild(wrap, prev);
-              wrap.appendChild(prev);
-              prev = wrap;
-            }
-            var wnode = prev.appendChild(elt("div", [w.node], "CodeMirror-linewidget"));
-            if (!w.handleMouseEvents) wnode.ignoreEvents = true;
-            positionLineWidget(w, wnode, prev, dims);
-          }
-        }
-      } else if (nextIntact && nextIntact.from <= lineN && nextIntact.to > lineN) {
-        // This line is intact. Skip to the actual node. Update its
-        // line number if needed.
-        while (cur.lineObj != line) cur = rm(cur);
-        if (lineNumbers && updateNumbersFrom <= lineN && cur.lineNumber)
-          setTextContent(cur.lineNumber, lineNumberFor(cm.options, lineN));
-        cur = cur.nextSibling;
-      } else {
-        // For lines with widgets, make an attempt to find and reuse
-        // the existing element, so that widgets aren't needlessly
-        // removed and re-inserted into the dom
-        if (line.widgets) for (var j = 0, search = cur, reuse; search && j < 20; ++j, search = search.nextSibling)
-          if (search.lineObj == line && /div/i.test(search.nodeName)) { reuse = search; break; }
-        // This line needs to be generated.
-        var lineNode = buildLineElement(cm, line, lineN, dims, reuse);
-        if (lineNode != reuse) {
-          container.insertBefore(lineNode, cur);
-        } else {
-          while (cur != reuse) cur = rm(cur);
-          cur = cur.nextSibling;
-        }
-
-        lineNode.lineObj = line;
-      }
-      ++lineN;
-    });
-    while (cur) cur = rm(cur);
-  }
-
-  function buildLineElement(cm, line, lineNo, dims, reuse) {
-    var lineElement = lineContent(cm, line);
-    var markers = line.gutterMarkers, display = cm.display, wrap;
-
-    if (!cm.options.lineNumbers && !markers && !line.bgClass && !line.wrapClass && !line.widgets)
-      return lineElement;
-
-    // Lines with gutter elements, widgets or a background class need
-    // to be wrapped again, and have the extra elements added to the
-    // wrapper div
-
-    if (reuse) {
-      reuse.alignable = null;
-      var isOk = true, widgetsSeen = 0, insertBefore = null;
-      for (var n = reuse.firstChild, next; n; n = next) {
-        next = n.nextSibling;
-        if (!/\bCodeMirror-linewidget\b/.test(n.className)) {
-          reuse.removeChild(n);
-        } else {
-          for (var i = 0; i < line.widgets.length; ++i) {
-            var widget = line.widgets[i];
-            if (widget.node == n.firstChild) {
-              if (!widget.above && !insertBefore) insertBefore = n;
-              positionLineWidget(widget, n, reuse, dims);
-              ++widgetsSeen;
-              break;
-            }
-          }
-          if (i == line.widgets.length) { isOk = false; break; }
-        }
-      }
-      reuse.insertBefore(lineElement, insertBefore);
-      if (isOk && widgetsSeen == line.widgets.length) {
-        wrap = reuse;
-        reuse.className = line.wrapClass || "";
-      }
-    }
-    if (!wrap) {
-      wrap = elt("div", null, line.wrapClass, "position: relative");
-      wrap.appendChild(lineElement);
-    }
-    // Kludge to make sure the styled element lies behind the selection (by z-index)
-    if (line.bgClass)
-      wrap.insertBefore(elt("div", null, line.bgClass + " CodeMirror-linebackground"), wrap.firstChild);
-    if (cm.options.lineNumbers || markers) {
-      var gutterWrap = wrap.insertBefore(elt("div", null, null, "position: absolute; left: " +
-                                             (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px"),
-                                         wrap.firstChild);
-      if (cm.options.fixedGutter) (wrap.alignable || (wrap.alignable = [])).push(gutterWrap);
-      if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"]))
-        wrap.lineNumber = gutterWrap.appendChild(
-          elt("div", lineNumberFor(cm.options, lineNo),
-              "CodeMirror-linenumber CodeMirror-gutter-elt",
-              "left: " + dims.gutterLeft["CodeMirror-linenumbers"] + "px; width: "
-              + display.lineNumInnerWidth + "px"));
-      if (markers)
-        for (var k = 0; k < cm.options.gutters.length; ++k) {
-          var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id];
-          if (found)
-            gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt", "left: " +
-                                       dims.gutterLeft[id] + "px; width: " + dims.gutterWidth[id] + "px"));
-        }
-    }
-    if (ie_lt8) wrap.style.zIndex = 2;
-    if (line.widgets && wrap != reuse) for (var i = 0, ws = line.widgets; i < ws.length; ++i) {
-      var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget");
-      if (!widget.handleMouseEvents) node.ignoreEvents = true;
-      positionLineWidget(widget, node, wrap, dims);
-      if (widget.above)
-        wrap.insertBefore(node, cm.options.lineNumbers && line.height != 0 ? gutterWrap : lineElement);
-      else
-        wrap.appendChild(node);
-      signalLater(widget, "redraw");
-    }
-    return wrap;
-  }
-
-  function positionLineWidget(widget, node, wrap, dims) {
-    if (widget.noHScroll) {
-      (wrap.alignable || (wrap.alignable = [])).push(node);
-      var width = dims.wrapperWidth;
-      node.style.left = dims.fixedPos + "px";
-      if (!widget.coverGutter) {
-        width -= dims.gutterTotalWidth;
-        node.style.paddingLeft = dims.gutterTotalWidth + "px";
-      }
-      node.style.width = width + "px";
-    }
-    if (widget.coverGutter) {
-      node.style.zIndex = 5;
-      node.style.position = "relative";
-      if (!widget.noHScroll) node.style.marginLeft = -dims.gutterTotalWidth + "px";
-    }
-  }
-
-  // SELECTION / CURSOR
-
-  function updateSelection(cm) {
-    var display = cm.display;
-    var collapsed = posEq(cm.doc.sel.from, cm.doc.sel.to);
-    if (collapsed || cm.options.showCursorWhenSelecting)
-      updateSelectionCursor(cm);
-    else
-      display.cursor.style.display = display.otherCursor.style.display = "none";
-    if (!collapsed)
-      updateSelectionRange(cm);
-    else
-      display.selectionDiv.style.display = "none";
-
-    // Move the hidden textarea near the cursor to prevent scrolling artifacts
-    if (cm.options.moveInputWithCursor) {
-      var headPos = cursorCoords(cm, cm.doc.sel.head, "div");
-      var wrapOff = getRect(display.wrapper), lineOff = getRect(display.lineDiv);
-      display.inputDiv.style.top = Math.max(0, Math.min(display.wrapper.clientHeight - 10,
-                                                        headPos.top + lineOff.top - wrapOff.top)) + "px";
-      display.inputDiv.style.left = Math.max(0, Math.min(display.wrapper.clientWidth - 10,
-                                                         headPos.left + lineOff.left - wrapOff.left)) + "px";
-    }
-  }
-
-  // No selection, plain cursor
-  function updateSelectionCursor(cm) {
-    var display = cm.display, pos = cursorCoords(cm, cm.doc.sel.head, "div");
-    display.cursor.style.left = pos.left + "px";
-    display.cursor.style.top = pos.top + "px";
-    display.cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px";
-    display.cursor.style.display = "";
-
-    if (pos.other) {
-      display.otherCursor.style.display = "";
-      display.otherCursor.style.left = pos.other.left + "px";
-      display.otherCursor.style.top = pos.other.top + "px";
-      display.otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px";
-    } else { display.otherCursor.style.display = "none"; }
-  }
-
-  // Highlight selection
-  function updateSelectionRange(cm) {
-    var display = cm.display, doc = cm.doc, sel = cm.doc.sel;
-    var fragment = document.createDocumentFragment();
-    var clientWidth = display.lineSpace.offsetWidth, pl = paddingLeft(cm.display);
-
-    function add(left, top, width, bottom) {
-      if (top < 0) top = 0;
-      fragment.appendChild(elt("div", null, "CodeMirror-selected", "position: absolute; left: " + left +
-                               "px; top: " + top + "px; width: " + (width == null ? clientWidth - left : width) +
-                               "px; height: " + (bottom - top) + "px"));
-    }
-
-    function drawForLine(line, fromArg, toArg) {
-      var lineObj = getLine(doc, line);
-      var lineLen = lineObj.text.length;
-      var start, end;
-      function coords(ch, bias) {
-        return charCoords(cm, Pos(line, ch), "div", lineObj, bias);
-      }
-
-      iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {
-        var leftPos = coords(from, "left"), rightPos, left, right;
-        if (from == to) {
-          rightPos = leftPos;
-          left = right = leftPos.left;
-        } else {
-          rightPos = coords(to - 1, "right");
-          if (dir == "rtl") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }
-          left = leftPos.left;
-          right = rightPos.right;
-        }
-        if (fromArg == null && from == 0) left = pl;
-        if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part
-          add(left, leftPos.top, null, leftPos.bottom);
-          left = pl;
-          if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);
-        }
-        if (toArg == null && to == lineLen) right = clientWidth;
-        if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)
-          start = leftPos;
-        if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)
-          end = rightPos;
-        if (left < pl + 1) left = pl;
-        add(left, rightPos.top, right - left, rightPos.bottom);
-      });
-      return {start: start, end: end};
-    }
-
-    if (sel.from.line == sel.to.line) {
-      drawForLine(sel.from.line, sel.from.ch, sel.to.ch);
-    } else {
-      var fromLine = getLine(doc, sel.from.line), toLine = getLine(doc, sel.to.line);
-      var singleVLine = visualLine(doc, fromLine) == visualLine(doc, toLine);
-      var leftEnd = drawForLine(sel.from.line, sel.from.ch, singleVLine ? fromLine.text.length : null).end;
-      var rightStart = drawForLine(sel.to.line, singleVLine ? 0 : null, sel.to.ch).start;
-      if (singleVLine) {
-        if (leftEnd.top < rightStart.top - 2) {
-          add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);
-          add(pl, rightStart.top, rightStart.left, rightStart.bottom);
-        } else {
-          add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);
-        }
-      }
-      if (leftEnd.bottom < rightStart.top)
-        add(pl, leftEnd.bottom, null, rightStart.top);
-    }
-
-    removeChildrenAndAdd(display.selectionDiv, fragment);
-    display.selectionDiv.style.display = "";
-  }
-
-  // Cursor-blinking
-  function restartBlink(cm) {
-    if (!cm.state.focused) return;
-    var display = cm.display;
-    clearInterval(display.blinker);
-    var on = true;
-    display.cursor.style.visibility = display.otherCursor.style.visibility = "";
-    display.blinker = setInterval(function() {
-      display.cursor.style.visibility = display.otherCursor.style.visibility = (on = !on) ? "" : "hidden";
-    }, cm.options.cursorBlinkRate);
-  }
-
-  // HIGHLIGHT WORKER
-
-  function startWorker(cm, time) {
-    if (cm.doc.mode.startState && cm.doc.frontier < cm.display.showingTo)
-      cm.state.highlight.set(time, bind(highlightWorker, cm));
-  }
-
-  function highlightWorker(cm) {
-    var doc = cm.doc;
-    if (doc.frontier < doc.first) doc.frontier = doc.first;
-    if (doc.frontier >= cm.display.showingTo) return;
-    var end = +new Date + cm.options.workTime;
-    var state = copyState(doc.mode, getStateBefore(cm, doc.frontier));
-    var changed = [], prevChange;
-    doc.iter(doc.frontier, Math.min(doc.first + doc.size, cm.display.showingTo + 500), function(line) {
-      if (doc.frontier >= cm.display.showingFrom) { // Visible
-        var oldStyles = line.styles;
-        line.styles = highlightLine(cm, line, state);
-        var ischange = !oldStyles || oldStyles.length != line.styles.length;
-        for (var i = 0; !ischange && i < oldStyles.length; ++i) ischange = oldStyles[i] != line.styles[i];
-        if (ischange) {
-          if (prevChange && prevChange.end == doc.frontier) prevChange.end++;
-          else changed.push(prevChange = {start: doc.frontier, end: doc.frontier + 1});
-        }
-        line.stateAfter = copyState(doc.mode, state);
-      } else {
-        processLine(cm, line, state);
-        line.stateAfter = doc.frontier % 5 == 0 ? copyState(doc.mode, state) : null;
-      }
-      ++doc.frontier;
-      if (+new Date > end) {
-        startWorker(cm, cm.options.workDelay);
-        return true;
-      }
-    });
-    if (changed.length)
-      operation(cm, function() {
-        for (var i = 0; i < changed.length; ++i)
-          regChange(this, changed[i].start, changed[i].end);
-      })();
-  }
-
-  // Finds the line to start with when starting a parse. Tries to
-  // find a line with a stateAfter, so that it can start with a
-  // valid state. If that fails, it returns the line with the
-  // smallest indentation, which tends to need the least context to
-  // parse correctly.
-  function findStartLine(cm, n, precise) {
-    var minindent, minline, doc = cm.doc;
-    for (var search = n, lim = n - 100; search > lim; --search) {
-      if (search <= doc.first) return doc.first;
-      var line = getLine(doc, search - 1);
-      if (line.stateAfter && (!precise || search <= doc.frontier)) return search;
-      var indented = countColumn(line.text, null, cm.options.tabSize);
-      if (minline == null || minindent > indented) {
-        minline = search - 1;
-        minindent = indented;
-      }
-    }
-    return minline;
-  }
-
-  function getStateBefore(cm, n, precise) {
-    var doc = cm.doc, display = cm.display;
-      if (!doc.mode.startState) return true;
-    var pos = findStartLine(cm, n, precise), state = pos > doc.first && getLine(doc, pos-1).stateAfter;
-    if (!state) state = startState(doc.mode);
-    else state = copyState(doc.mode, state);
-    doc.iter(pos, n, function(line) {
-      processLine(cm, line, state);
-      var save = pos == n - 1 || pos % 5 == 0 || pos >= display.showingFrom && pos < display.showingTo;
-      line.stateAfter = save ? copyState(doc.mode, state) : null;
-      ++pos;
-    });
-    return state;
-  }
-
-  // POSITION MEASUREMENT
-
-  function paddingTop(display) {return display.lineSpace.offsetTop;}
-  function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight;}
-  function paddingLeft(display) {
-    var e = removeChildrenAndAdd(display.measure, elt("pre", null, null, "text-align: left")).appendChild(elt("span", "x"));
-    return e.offsetLeft;
-  }
-
-  function measureChar(cm, line, ch, data, bias) {
-    var dir = -1;
-    data = data || measureLine(cm, line);
-
-    for (var pos = ch;; pos += dir) {
-      var r = data[pos];
-      if (r) break;
-      if (dir < 0 && pos == 0) dir = 1;
-    }
-    bias = pos > ch ? "left" : pos < ch ? "right" : bias;
-    if (bias == "left" && r.leftSide) r = r.leftSide;
-    else if (bias == "right" && r.rightSide) r = r.rightSide;
-    return {left: pos < ch ? r.right : r.left,
-            right: pos > ch ? r.left : r.right,
-            top: r.top,
-            bottom: r.bottom};
-  }
-
-  function findCachedMeasurement(cm, line) {
-    var cache = cm.display.measureLineCache;
-    for (var i = 0; i < cache.length; ++i) {
-      var memo = cache[i];
-      if (memo.text == line.text && memo.markedSpans == line.markedSpans &&
-          cm.display.scroller.clientWidth == memo.width &&
-          memo.classes == line.textClass + "|" + line.bgClass + "|" + line.wrapClass)
-        return memo;
-    }
-  }
-
-  function clearCachedMeasurement(cm, line) {
-    var exists = findCachedMeasurement(cm, line);
-    if (exists) exists.text = exists.measure = exists.markedSpans = null;
-  }
-
-  function measureLine(cm, line) {
-    // First look in the cache
-    var cached = findCachedMeasurement(cm, line);
-    if (cached) return cached.measure;
-
-    // Failing that, recompute and store result in cache
-    var measure = measureLineInner(cm, line);
-    var cache = cm.display.measureLineCache;
-    var memo = {text: line.text, width: cm.display.scroller.clientWidth,
-                markedSpans: line.markedSpans, measure: measure,
-                classes: line.textClass + "|" + line.bgClass + "|" + line.wrapClass};
-    if (cache.length == 16) cache[++cm.display.measureLineCachePos % 16] = memo;
-    else cache.push(memo);
-    return measure;
-  }
-
-  function measureLineInner(cm, line) {
-    var display = cm.display, measure = emptyArray(line.text.length);
-    var pre = lineContent(cm, line, measure, true);
-
-    // IE does not cache element positions of inline elements between
-    // calls to getBoundingClientRect. This makes the loop below,
-    // which gathers the positions of all the characters on the line,
-    // do an amount of layout work quadratic to the number of
-    // characters. When line wrapping is off, we try to improve things
-    // by first subdividing the line into a bunch of inline blocks, so
-    // that IE can reuse most of the layout information from caches
-    // for those blocks. This does interfere with line wrapping, so it
-    // doesn't work when wrapping is on, but in that case the
-    // situation is slightly better, since IE does cache line-wrapping
-    // information and only recomputes per-line.
-    if (ie && !ie_lt8 && !cm.options.lineWrapping && pre.childNodes.length > 100) {
-      var fragment = document.createDocumentFragment();
-      var chunk = 10, n = pre.childNodes.length;
-      for (var i = 0, chunks = Math.ceil(n / chunk); i < chunks; ++i) {
-        var wrap = elt("div", null, null, "display: inline-block");
-        for (var j = 0; j < chunk && n; ++j) {
-          wrap.appendChild(pre.firstChild);
-          --n;
-        }
-        fragment.appendChild(wrap);
-      }
-      pre.appendChild(fragment);
-    }
-
-    removeChildrenAndAdd(display.measure, pre);
-
-    var outer = getRect(display.lineDiv);
-    var vranges = [], data = emptyArray(line.text.length), maxBot = pre.offsetHeight;
-    // Work around an IE7/8 bug where it will sometimes have randomly
-    // replaced our pre with a clone at this point.
-    if (ie_lt9 && display.measure.first != pre)
-      removeChildrenAndAdd(display.measure, pre);
-
-    function measureRect(rect) {
-      var top = rect.top - outer.top, bot = rect.bottom - outer.top;
-      if (bot > maxBot) bot = maxBot;
-      if (top < 0) top = 0;
-      for (var i = vranges.length - 2; i >= 0; i -= 2) {
-        var rtop = vranges[i], rbot = vranges[i+1];
-        if (rtop > bot || rbot < top) continue;
-        if (rtop <= top && rbot >= bot ||
-            top <= rtop && bot >= rbot ||
-            Math.min(bot, rbot) - Math.max(top, rtop) >= (bot - top) >> 1) {
-          vranges[i] = Math.min(top, rtop);
-          vranges[i+1] = Math.max(bot, rbot);
-          break;
-        }
-      }
-      if (i < 0) { i = vranges.length; vranges.push(top, bot); }
-      return {left: rect.left - outer.left,
-              right: rect.right - outer.left,
-              top: i, bottom: null};
-    }
-    function finishRect(rect) {
-      rect.bottom = vranges[rect.top+1];
-      rect.top = vranges[rect.top];
-    }
-
-    for (var i = 0, cur; i < measure.length; ++i) if (cur = measure[i]) {
-      var node = cur, rect = null;
-      // A widget might wrap, needs special care
-      if (/\bCodeMirror-widget\b/.test(cur.className) && cur.getClientRects) {
-        if (cur.firstChild.nodeType == 1) node = cur.firstChild;
-        var rects = node.getClientRects();
-        if (rects.length > 1) {
-          rect = data[i] = measureRect(rects[0]);
-          rect.rightSide = measureRect(rects[rects.length - 1]);
-        }
-      }
-      if (!rect) rect = data[i] = measureRect(getRect(node));
-      if (cur.measureRight) rect.right = getRect(cur.measureRight).left;
-      if (cur.leftSide) rect.leftSide = measureRect(getRect(cur.leftSide));
-    }
-    for (var i = 0, cur; i < data.length; ++i) if (cur = data[i]) {
-      finishRect(cur);
-      if (cur.leftSide) finishRect(cur.leftSide);
-      if (cur.rightSide) finishRect(cur.rightSide);
-    }
-    return data;
-  }
-
-  function measureLineWidth(cm, line) {
-    var hasBadSpan = false;
-    if (line.markedSpans) for (var i = 0; i < line.markedSpans; ++i) {
-      var sp = line.markedSpans[i];
-      if (sp.collapsed && (sp.to == null || sp.to == line.text.length)) hasBadSpan = true;
-    }
-    var cached = !hasBadSpan && findCachedMeasurement(cm, line);
-    if (cached) return measureChar(cm, line, line.text.length, cached.measure, "right").right;
-
-    var pre = lineContent(cm, line, null, true);
-    var end = pre.appendChild(zeroWidthElement(cm.display.measure));
-    removeChildrenAndAdd(cm.display.measure, pre);
-    return getRect(end).right - getRect(cm.display.lineDiv).left;
-  }
-
-  function clearCaches(cm) {
-    cm.display.measureLineCache.length = cm.display.measureLineCachePos = 0;
-    cm.display.cachedCharWidth = cm.display.cachedTextHeight = null;
-    if (!cm.options.lineWrapping) cm.display.maxLineChanged = true;
-    cm.display.lineNumChars = null;
-  }
-
-  function pageScrollX() { return window.pageXOffset || (document.documentElement || document.body).scrollLeft; }
-  function pageScrollY() { return window.pageYOffset || (document.documentElement || document.body).scrollTop; }
-
-  // Context is one of "line", "div" (display.lineDiv), "local"/null (editor), or "page"
-  function intoCoordSystem(cm, lineObj, rect, context) {
-    if (lineObj.widgets) for (var i = 0; i < lineObj.widgets.length; ++i) if (lineObj.widgets[i].above) {
-      var size = widgetHeight(lineObj.widgets[i]);
-      rect.top += size; rect.bottom += size;
-    }
-    if (context == "line") return rect;
-    if (!context) context = "local";
-    var yOff = heightAtLine(cm, lineObj);
-    if (context == "local") yOff += paddingTop(cm.display);
-    else yOff -= cm.display.viewOffset;
-    if (context == "page" || context == "window") {
-      var lOff = getRect(cm.display.lineSpace);
-      yOff += lOff.top + (context == "window" ? 0 : pageScrollY());
-      var xOff = lOff.left + (context == "window" ? 0 : pageScrollX());
-      rect.left += xOff; rect.right += xOff;
-    }
-    rect.top += yOff; rect.bottom += yOff;
-    return rect;
-  }
-
-  // Context may be "window", "page", "div", or "local"/null
-  // Result is in "div" coords
-  function fromCoordSystem(cm, coords, context) {
-    if (context == "div") return coords;
-    var left = coords.left, top = coords.top;
-    // First move into "page" coordinate system
-    if (context == "page") {
-      left -= pageScrollX();
-      top -= pageScrollY();
-    } else if (context == "local" || !context) {
-      var localBox = getRect(cm.display.sizer);
-      left += localBox.left;
-      top += localBox.top;
-    }
-
-    var lineSpaceBox = getRect(cm.display.lineSpace);
-    return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};
-  }
-
-  function charCoords(cm, pos, context, lineObj, bias) {
-    if (!lineObj) lineObj = getLine(cm.doc, pos.line);
-    return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, null, bias), context);
-  }
-
-  function cursorCoords(cm, pos, context, lineObj, measurement) {
-    lineObj = lineObj || getLine(cm.doc, pos.line);
-    if (!measurement) measurement = measureLine(cm, lineObj);
-    function get(ch, right) {
-      var m = measureChar(cm, lineObj, ch, measurement, right ? "right" : "left");
-      if (right) m.left = m.right; else m.right = m.left;
-      return intoCoordSystem(cm, lineObj, m, context);
-    }
-    function getBidi(ch, partPos) {
-      var part = order[partPos], right = part.level % 2;
-      if (ch == bidiLeft(part) && partPos && part.level < order[partPos - 1].level) {
-        part = order[--partPos];
-        ch = bidiRight(part) - (part.level % 2 ? 0 : 1);
-        right = true;
-      } else if (ch == bidiRight(part) && partPos < order.length - 1 && part.level < order[partPos + 1].level) {
-        part = order[++partPos];
-        ch = bidiLeft(part) - part.level % 2;
-        right = false;
-      }
-      if (right && ch == part.to && ch > part.from) return get(ch - 1);
-      return get(ch, right);
-    }
-    var order = getOrder(lineObj), ch = pos.ch;
-    if (!order) return get(ch);
-    var partPos = getBidiPartAt(order, ch);
-    var val = getBidi(ch, partPos);
-    if (bidiOther != null) val.other = getBidi(ch, bidiOther);
-    return val;
-  }
-
-  function PosWithInfo(line, ch, outside, xRel) {
-    var pos = new Pos(line, ch);
-    pos.xRel = xRel;
-    if (outside) pos.outside = true;
-    return pos;
-  }
-
-  // Coords must be lineSpace-local
-  function coordsChar(cm, x, y) {
-    var doc = cm.doc;
-    y += cm.display.viewOffset;
-    if (y < 0) return PosWithInfo(doc.first, 0, true, -1);
-    var lineNo = lineAtHeight(doc, y), last = doc.first + doc.size - 1;
-    if (lineNo > last)
-      return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, true, 1);
-    if (x < 0) x = 0;
-
-    for (;;) {
-      var lineObj = getLine(doc, lineNo);
-      var found = coordsCharInner(cm, lineObj, lineNo, x, y);
-      var merged = collapsedSpanAtEnd(lineObj);
-      var mergedPos = merged && merged.find();
-      if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0))
-        lineNo = mergedPos.to.line;
-      else
-        return found;
-    }
-  }
-
-  function coordsCharInner(cm, lineObj, lineNo, x, y) {
-    var innerOff = y - heightAtLine(cm, lineObj);
-    var wrongLine = false, adjust = 2 * cm.display.wrapper.clientWidth;
-    var measurement = measureLine(cm, lineObj);
-
-    function getX(ch) {
-      var sp = cursorCoords(cm, Pos(lineNo, ch), "line",
-                            lineObj, measurement);
-      wrongLine = true;
-      if (innerOff > sp.bottom) return sp.left - adjust;
-      else if (innerOff < sp.top) return sp.left + adjust;
-      else wrongLine = false;
-      return sp.left;
-    }
-
-    var bidi = getOrder(lineObj), dist = lineObj.text.length;
-    var from = lineLeft(lineObj), to = lineRight(lineObj);
-    var fromX = getX(from), fromOutside = wrongLine, toX = getX(to), toOutside = wrongLine;
-
-    if (x > toX) return PosWithInfo(lineNo, to, toOutside, 1);
-    // Do a binary search between these bounds.
-    for (;;) {
-      if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) {
-        var ch = x < fromX || x - fromX <= toX - x ? from : to;
-        var xDiff = x - (ch == from ? fromX : toX);
-        while (isExtendingChar.test(lineObj.text.charAt(ch))) ++ch;
-        var pos = PosWithInfo(lineNo, ch, ch == from ? fromOutside : toOutside,
-                              xDiff < 0 ? -1 : xDiff ? 1 : 0);
-        return pos;
-      }
-      var step = Math.ceil(dist / 2), middle = from + step;
-      if (bidi) {
-        middle = from;
-        for (var i = 0; i < step; ++i) middle = moveVisually(lineObj, middle, 1);
-      }
-      var middleX = getX(middle);
-      if (middleX > x) {to = middle; toX = middleX; if (toOutside = wrongLine) toX += 1000; dist = step;}
-      else {from = middle; fromX = middleX; fromOutside = wrongLine; dist -= step;}
-    }
-  }
-
-  var measureText;
-  function textHeight(display) {
-    if (display.cachedTextHeight != null) return display.cachedTextHeight;
-    if (measureText == null) {
-      measureText = elt("pre");
-      // Measure a bunch of lines, for browsers that compute
-      // fractional heights.
-      for (var i = 0; i < 49; ++i) {
-        measureText.appendChild(document.createTextNode("x"));
-        measureText.appendChild(elt("br"));
-      }
-      measureText.appendChild(document.createTextNode("x"));
-    }
-    removeChildrenAndAdd(display.measure, measureText);
-    var height = measureText.offsetHeight / 50;
-    if (height > 3) display.cachedTextHeight = height;
-    removeChildren(display.measure);
-    return height || 1;
-  }
-
-  function charWidth(display) {
-    if (display.cachedCharWidth != null) return display.cachedCharWidth;
-    var anchor = elt("span", "x");
-    var pre = elt("pre", [anchor]);
-    removeChildrenAndAdd(display.measure, pre);
-    var width = anchor.offsetWidth;
-    if (width > 2) display.cachedCharWidth = width;
-    return width || 10;
-  }
-
-  // OPERATIONS
-
-  // Operations are used to wrap changes in such a way that each
-  // change won't have to update the cursor and display (which would
-  // be awkward, slow, and error-prone), but instead updates are
-  // batched and then all combined and executed at once.
-
-  var nextOpId = 0;
-  function startOperation(cm) {
-    cm.curOp = {
-      // An array of ranges of lines that have to be updated. See
-      // updateDisplay.
-      changes: [],
-      forceUpdate: false,
-      updateInput: null,
-      userSelChange: null,
-      textChanged: null,
-      selectionChanged: false,
-      cursorActivity: false,
-      updateMaxLine: false,
-      updateScrollPos: false,
-      id: ++nextOpId
-    };
-    if (!delayedCallbackDepth++) delayedCallbacks = [];
-  }
-
-  function endOperation(cm) {
-    var op = cm.curOp, doc = cm.doc, display = cm.display;
-    cm.curOp = null;
-
-    if (op.updateMaxLine) computeMaxLength(cm);
-    if (display.maxLineChanged && !cm.options.lineWrapping && display.maxLine) {
-      var width = measureLineWidth(cm, display.maxLine);
-      display.sizer.style.minWidth = Math.max(0, width + 3 + scrollerCutOff) + "px";
-      display.maxLineChanged = false;
-      var maxScrollLeft = Math.max(0, display.sizer.offsetLeft + display.sizer.offsetWidth - display.scroller.clientWidth);
-      if (maxScrollLeft < doc.scrollLeft && !op.updateScrollPos)
-        setScrollLeft(cm, Math.min(display.scroller.scrollLeft, maxScrollLeft), true);
-    }
-    var newScrollPos, updated;
-    if (op.updateScrollPos) {
-      newScrollPos = op.updateScrollPos;
-    } else if (op.selectionChanged && display.scroller.clientHeight) { // don't rescroll if not visible
-      var coords = cursorCoords(cm, doc.sel.head);
-      newScrollPos = calculateScrollPos(cm, coords.left, coords.top, coords.left, coords.bottom);
-    }
-    if (op.changes.length || op.forceUpdate || newScrollPos && newScrollPos.scrollTop != null) {
-      updated = updateDisplay(cm, op.changes, newScrollPos && newScrollPos.scrollTop, op.forceUpdate);
-      if (cm.display.scroller.offsetHeight) cm.doc.scrollTop = cm.display.scroller.scrollTop;
-    }
-    if (!updated && op.selectionChanged) updateSelection(cm);
-    if (op.updateScrollPos) {
-      display.scroller.scrollTop = display.scrollbarV.scrollTop = doc.scrollTop = newScrollPos.scrollTop;
-      display.scroller.scrollLeft = display.scrollbarH.scrollLeft = doc.scrollLeft = newScrollPos.scrollLeft;
-      alignHorizontally(cm);
-      if (op.scrollToPos)
-        scrollPosIntoView(cm, clipPos(cm.doc, op.scrollToPos), op.scrollToPosMargin);
-    } else if (newScrollPos) {
-      scrollCursorIntoView(cm);
-    }
-    if (op.selectionChanged) restartBlink(cm);
-
-    if (cm.state.focused && op.updateInput)
-      resetInput(cm, op.userSelChange);
-
-    var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;
-    if (hidden) for (var i = 0; i < hidden.length; ++i)
-      if (!hidden[i].lines.length) signal(hidden[i], "hide");
-    if (unhidden) for (var i = 0; i < unhidden.length; ++i)
-      if (unhidden[i].lines.length) signal(unhidden[i], "unhide");
-
-    var delayed;
-    if (!--delayedCallbackDepth) {
-      delayed = delayedCallbacks;
-      delayedCallbacks = null;
-    }
-    if (op.textChanged)
-      signal(cm, "change", cm, op.textChanged);
-    if (op.cursorActivity) signal(cm, "cursorActivity", cm);
-    if (delayed) for (var i = 0; i < delayed.length; ++i) delayed[i]();
-  }
-
-  // Wraps a function in an operation. Returns the wrapped function.
-  function operation(cm1, f) {
-    return function() {
-      var cm = cm1 || this, withOp = !cm.curOp;
-      if (withOp) startOperation(cm);
-      try { var result = f.apply(cm, arguments); }
-      finally { if (withOp) endOperation(cm); }
-      return result;
-    };
-  }
-  function docOperation(f) {
-    return function() {
-      var withOp = this.cm && !this.cm.curOp, result;
-      if (withOp) startOperation(this.cm);
-      try { result = f.apply(this, arguments); }
-      finally { if (withOp) endOperation(this.cm); }
-      return result;
-    };
-  }
-  function runInOp(cm, f) {
-    var withOp = !cm.curOp, result;
-    if (withOp) startOperation(cm);
-    try { result = f(); }
-    finally { if (withOp) endOperation(cm); }
-    return result;
-  }
-
-  function regChange(cm, from, to, lendiff) {
-    if (from == null) from = cm.doc.first;
-    if (to == null) to = cm.doc.first + cm.doc.size;
-    cm.curOp.changes.push({from: from, to: to, diff: lendiff});
-  }
-
-  // INPUT HANDLING
-
-  function slowPoll(cm) {
-    if (cm.display.pollingFast) return;
-    cm.display.poll.set(cm.options.pollInterval, function() {
-      readInput(cm);
-      if (cm.state.focused) slowPoll(cm);
-    });
-  }
-
-  function fastPoll(cm) {
-    var missed = false;
-    cm.display.pollingFast = true;
-    function p() {
-      var changed = readInput(cm);
-      if (!changed && !missed) {missed = true; cm.display.poll.set(60, p);}
-      else {cm.display.pollingFast = false; slowPoll(cm);}
-    }
-    cm.display.poll.set(20, p);
-  }
-
-  // prevInput is a hack to work with IME. If we reset the textarea
-  // on every change, that breaks IME. So we look for changes
-  // compared to the previous content instead. (Modern browsers have
-  // events that indicate IME taking place, but these are not widely
-  // supported or compatible enough yet to rely on.)
-  function readInput(cm) {
-    var input = cm.display.input, prevInput = cm.display.prevInput, doc = cm.doc, sel = doc.sel;
-    if (!cm.state.focused || hasSelection(input) || isReadOnly(cm) || cm.state.disableInput) return false;
-    var text = input.value;
-    if (text == prevInput && posEq(sel.from, sel.to)) return false;
-    if (ie && !ie_lt9 && cm.display.inputHasSelection === text) {
-      resetInput(cm, true);
-      return false;
-    }
-
-    var withOp = !cm.curOp;
-    if (withOp) startOperation(cm);
-    sel.shift = false;
-    var same = 0, l = Math.min(prevInput.length, text.length);
-    while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same;
-    var from = sel.from, to = sel.to;
-    if (same < prevInput.length)
-      from = Pos(from.line, from.ch - (prevInput.length - same));
-    else if (cm.state.overwrite && posEq(from, to) && !cm.state.pasteIncoming)
-      to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + (text.length - same)));
-
-    var updateInput = cm.curOp.updateInput;
-    var changeEvent = {from: from, to: to, text: splitLines(text.slice(same)),
-                       origin: cm.state.pasteIncoming ? "paste" : "+input"};
-    makeChange(cm.doc, changeEvent, "end");
-    cm.curOp.updateInput = updateInput;
-    signalLater(cm, "inputRead", cm, changeEvent);
-
-    if (text.length > 1000 || text.indexOf("\n") > -1) input.value = cm.display.prevInput = "";
-    else cm.display.prevInput = text;
-    if (withOp) endOperation(cm);
-    cm.state.pasteIncoming = false;
-    return true;
-  }
-
-  function resetInput(cm, user) {
-    var minimal, selected, doc = cm.doc;
-    if (!posEq(doc.sel.from, doc.sel.to)) {
-      cm.display.prevInput = "";
-      minimal = hasCopyEvent &&
-        (doc.sel.to.line - doc.sel.from.line > 100 || (selected = cm.getSelection()).length > 1000);
-      var content = minimal ? "-" : selected || cm.getSelection();
-      cm.display.input.value = content;
-      if (cm.state.focused) selectInput(cm.display.input);
-      if (ie && !ie_lt9) cm.display.inputHasSelection = content;
-    } else if (user) {
-      cm.display.prevInput = cm.display.input.value = "";
-      if (ie && !ie_lt9) cm.display.inputHasSelection = null;
-    }
-    cm.display.inaccurateSelection = minimal;
-  }
-
-  function focusInput(cm) {
-    if (cm.options.readOnly != "nocursor" && (!mobile || document.activeElement != cm.display.input))
-      cm.display.input.focus();
-  }
-
-  function isReadOnly(cm) {
-    return cm.options.readOnly || cm.doc.cantEdit;
-  }
-
-  // EVENT HANDLERS
-
-  function registerEventHandlers(cm) {
-    var d = cm.display;
-    on(d.scroller, "mousedown", operation(cm, onMouseDown));
-    if (ie)
-      on(d.scroller, "dblclick", operation(cm, function(e) {
-        if (signalDOMEvent(cm, e)) return;
-        var pos = posFromMouse(cm, e);
-        if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) return;
-        e_preventDefault(e);
-        var word = findWordAt(getLine(cm.doc, pos.line).text, pos);
-        extendSelection(cm.doc, word.from, word.to);
-      }));
-    else
-      on(d.scroller, "dblclick", function(e) { signalDOMEvent(cm, e) || e_preventDefault(e); });
-    on(d.lineSpace, "selectstart", function(e) {
-      if (!eventInWidget(d, e)) e_preventDefault(e);
-    });
-    // Gecko browsers fire contextmenu *after* opening the menu, at
-    // which point we can't mess with it anymore. Context menu is
-    // handled in onMouseDown for Gecko.
-    if (!captureMiddleClick) on(d.scroller, "contextmenu", function(e) {onContextMenu(cm, e);});
-
-    on(d.scroller, "scroll", function() {
-      if (d.scroller.clientHeight) {
-        setScrollTop(cm, d.scroller.scrollTop);
-        setScrollLeft(cm, d.scroller.scrollLeft, true);
-        signal(cm, "scroll", cm);
-      }
-    });
-    on(d.scrollbarV, "scroll", function() {
-      if (d.scroller.clientHeight) setScrollTop(cm, d.scrollbarV.scrollTop);
-    });
-    on(d.scrollbarH, "scroll", function() {
-      if (d.scroller.clientHeight) setScrollLeft(cm, d.scrollbarH.scrollLeft);
-    });
-
-    on(d.scroller, "mousewheel", function(e){onScrollWheel(cm, e);});
-    on(d.scroller, "DOMMouseScroll", function(e){onScrollWheel(cm, e);});
-
-    function reFocus() { if (cm.state.focused) setTimeout(bind(focusInput, cm), 0); }
-    on(d.scrollbarH, "mousedown", reFocus);
-    on(d.scrollbarV, "mousedown", reFocus);
-    // Prevent wrapper from ever scrolling
-    on(d.wrapper, "scroll", function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });
-
-    var resizeTimer;
-    function onResize() {
-      if (resizeTimer == null) resizeTimer = setTimeout(function() {
-        resizeTimer = null;
-        // Might be a text scaling operation, clear size caches.
-        d.cachedCharWidth = d.cachedTextHeight = knownScrollbarWidth = null;
-        clearCaches(cm);
-        runInOp(cm, bind(regChange, cm));
-      }, 100);
-    }
-    on(window, "resize", onResize);
-    // Above handler holds on to the editor and its data structures.
-    // Here we poll to unregister it when the editor is no longer in
-    // the document, so that it can be garbage-collected.
-    function unregister() {
-      for (var p = d.wrapper.parentNode; p && p != document.body; p = p.parentNode) {}
-      if (p) setTimeout(unregister, 5000);
-      else off(window, "resize", onResize);
-    }
-    setTimeout(unregister, 5000);
-
-    on(d.input, "keyup", operation(cm, function(e) {
-      if (signalDOMEvent(cm, e) || cm.options.onKeyEvent && cm.options.onKeyEvent(cm, addStop(e))) return;
-      if (e.keyCode == 16) cm.doc.sel.shift = false;
-    }));
-    on(d.input, "input", bind(fastPoll, cm));
-    on(d.input, "keydown", operation(cm, onKeyDown));
-    on(d.input, "keypress", operation(cm, onKeyPress));
-    on(d.input, "focus", bind(onFocus, cm));
-    on(d.input, "blur", bind(onBlur, cm));
-
-    function drag_(e) {
-      if (signalDOMEvent(cm, e) || cm.options.onDragEvent && cm.options.onDragEvent(cm, addStop(e))) return;
-      e_stop(e);
-    }
-    if (cm.options.dragDrop) {
-      on(d.scroller, "dragstart", function(e){onDragStart(cm, e);});
-      on(d.scroller, "dragenter", drag_);
-      on(d.scroller, "dragover", drag_);
-      on(d.scroller, "drop", operation(cm, onDrop));
-    }
-    on(d.scroller, "paste", function(e){
-      if (eventInWidget(d, e)) return;
-      focusInput(cm);
-      fastPoll(cm);
-    });
-    on(d.input, "paste", function() {
-      cm.state.pasteIncoming = true;
-      fastPoll(cm);
-    });
-
-    function prepareCopy() {
-      if (d.inaccurateSelection) {
-        d.prevInput = "";
-        d.inaccurateSelection = false;
-        d.input.value = cm.getSelection();
-        selectInput(d.input);
-      }
-    }
-    on(d.input, "cut", prepareCopy);
-    on(d.input, "copy", prepareCopy);
-
-    // Needed to handle Tab key in KHTML
-    if (khtml) on(d.sizer, "mouseup", function() {
-        if (document.activeElement == d.input) d.input.blur();
-        focusInput(cm);
-    });
-  }
-
-  function eventInWidget(display, e) {
-    for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {
-      if (!n || n.ignoreEvents || n.parentNode == display.sizer && n != display.mover) return true;
-    }
-  }
-
-  function posFromMouse(cm, e, liberal) {
-    var display = cm.display;
-    if (!liberal) {
-      var target = e_target(e);
-      if (target == display.scrollbarH || target == display.scrollbarH.firstChild ||
-          target == display.scrollbarV || target == display.scrollbarV.firstChild ||
-          target == display.scrollbarFiller || target == display.gutterFiller) return null;
-    }
-    var x, y, space = getRect(display.lineSpace);
-    // Fails unpredictably on IE[67] when mouse is dragged around quickly.
-    try { x = e.clientX; y = e.clientY; } catch (e) { return null; }
-    return coordsChar(cm, x - space.left, y - space.top);
-  }
-
-  var lastClick, lastDoubleClick;
-  function onMouseDown(e) {
-    if (signalDOMEvent(this, e)) return;
-    var cm = this, display = cm.display, doc = cm.doc, sel = doc.sel;
-    sel.shift = e.shiftKey;
-
-    if (eventInWidget(display, e)) {
-      if (!webkit) {
-        display.scroller.draggable = false;
-        setTimeout(function(){display.scroller.draggable = true;}, 100);
-      }
-      return;
-    }
-    if (clickInGutter(cm, e)) return;
-    var start = posFromMouse(cm, e);
-
-    switch (e_button(e)) {
-    case 3:
-      if (captureMiddleClick) onContextMenu.call(cm, cm, e);
-      return;
-    case 2:
-      if (start) extendSelection(cm.doc, start);
-      setTimeout(bind(focusInput, cm), 20);
-      e_preventDefault(e);
-      return;
-    }
-    // For button 1, if it was clicked inside the editor
-    // (posFromMouse returning non-null), we have to adjust the
-    // selection.
-    if (!start) {if (e_target(e) == display.scroller) e_preventDefault(e); return;}
-
-    if (!cm.state.focused) onFocus(cm);
-
-    var now = +new Date, type = "single";
-    if (lastDoubleClick && lastDoubleClick.time > now - 400 && posEq(lastDoubleClick.pos, start)) {
-      type = "triple";
-      e_preventDefault(e);
-      setTimeout(bind(focusInput, cm), 20);
-      selectLine(cm, start.line);
-    } else if (lastClick && lastClick.time > now - 400 && posEq(lastClick.pos, start)) {
-      type = "double";
-      lastDoubleClick = {time: now, pos: start};
-      e_preventDefault(e);
-      var word = findWordAt(getLine(doc, start.line).text, start);
-      extendSelection(cm.doc, word.from, word.to);
-    } else { lastClick = {time: now, pos: start}; }
-
-    var last = start;
-    if (cm.options.dragDrop && dragAndDrop && !isReadOnly(cm) && !posEq(sel.from, sel.to) &&
-        !posLess(start, sel.from) && !posLess(sel.to, start) && type == "single") {
-      var dragEnd = operation(cm, function(e2) {
-        if (webkit) display.scroller.draggable = false;
-        cm.state.draggingText = false;
-        off(document, "mouseup", dragEnd);
-        off(display.scroller, "drop", dragEnd);
-        if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) {
-          e_preventDefault(e2);
-          extendSelection(cm.doc, start);
-          focusInput(cm);
-        }
-      });
-      // Let the drag handler handle this.
-      if (webkit) display.scroller.draggable = true;
-      cm.state.draggingText = dragEnd;
-      // IE's approach to draggable
-      if (display.scroller.dragDrop) display.scroller.dragDrop();
-      on(document, "mouseup", dragEnd);
-      on(display.scroller, "drop", dragEnd);
-      return;
-    }
-    e_preventDefault(e);
-    if (type == "single") extendSelection(cm.doc, clipPos(doc, start));
-
-    var startstart = sel.from, startend = sel.to, lastPos = start;
-
-    function doSelect(cur) {
-      if (posEq(lastPos, cur)) return;
-      lastPos = cur;
-
-      if (type == "single") {
-        extendSelection(cm.doc, clipPos(doc, start), cur);
-        return;
-      }
-
-      startstart = clipPos(doc, startstart);
-      startend = clipPos(doc, startend);
-      if (type == "double") {
-        var word = findWordAt(getLine(doc, cur.line).text, cur);
-        if (posLess(cur, startstart)) extendSelection(cm.doc, word.from, startend);
-        else extendSelection(cm.doc, startstart, word.to);
-      } else if (type == "triple") {
-        if (posLess(cur, startstart)) extendSelection(cm.doc, startend, clipPos(doc, Pos(cur.line, 0)));
-        else extendSelection(cm.doc, startstart, clipPos(doc, Pos(cur.line + 1, 0)));
-      }
-    }
-
-    var editorSize = getRect(display.wrapper);
-    // Used to ensure timeout re-tries don't fire when another extend
-    // happened in the meantime (clearTimeout isn't reliable -- at
-    // least on Chrome, the timeouts still happen even when cleared,
-    // if the clear happens after their scheduled firing time).
-    var counter = 0;
-
-    function extend(e) {
-      var curCount = ++counter;
-      var cur = posFromMouse(cm, e, true);
-      if (!cur) return;
-      if (!posEq(cur, last)) {
-        if (!cm.state.focused) onFocus(cm);
-        last = cur;
-        doSelect(cur);
-        var visible = visibleLines(display, doc);
-        if (cur.line >= visible.to || cur.line < visible.from)
-          setTimeout(operation(cm, function(){if (counter == curCount) extend(e);}), 150);
-      } else {
-        var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;
-        if (outside) setTimeout(operation(cm, function() {
-          if (counter != curCount) return;
-          display.scroller.scrollTop += outside;
-          extend(e);
-        }), 50);
-      }
-    }
-
-    function done(e) {
-      counter = Infinity;
-      e_preventDefault(e);
-      focusInput(cm);
-      off(document, "mousemove", move);
-      off(document, "mouseup", up);
-    }
-
-    var move = operation(cm, function(e) {
-      if (!ie && !e_button(e)) done(e);
-      else extend(e);
-    });
-    var up = operation(cm, done);
-    on(document, "mousemove", move);
-    on(document, "mouseup", up);
-  }
-
-  function clickInGutter(cm, e) {
-    var display = cm.display;
-    try { var mX = e.clientX, mY = e.clientY; }
-    catch(e) { return false; }
-
-    if (mX >= Math.floor(getRect(display.gutters).right)) return false;
-    e_preventDefault(e);
-    if (!hasHandler(cm, "gutterClick")) return true;
-
-    var lineBox = getRect(display.lineDiv);
-    if (mY > lineBox.bottom) return true;
-    mY -= lineBox.top - display.viewOffset;
-
-    for (var i = 0; i < cm.options.gutters.length; ++i) {
-      var g = display.gutters.childNodes[i];
-      if (g && getRect(g).right >= mX) {
-        var line = lineAtHeight(cm.doc, mY);
-        var gutter = cm.options.gutters[i];
-        signalLater(cm, "gutterClick", cm, line, gutter, e);
-        break;
-      }
-    }
-    return true;
-  }
-
-  // Kludge to work around strange IE behavior where it'll sometimes
-  // re-fire a series of drag-related events right after the drop (#1551)
-  var lastDrop = 0;
-
-  function onDrop(e) {
-    var cm = this;
-    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e) || (cm.options.onDragEvent && cm.options.onDragEvent(cm, addStop(e))))
-      return;
-    e_preventDefault(e);
-    if (ie) lastDrop = +new Date;
-    var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;
-    if (!pos || isReadOnly(cm)) return;
-    if (files && files.length && window.FileReader && window.File) {
-      var n = files.length, text = Array(n), read = 0;
-      var loadFile = function(file, i) {
-        var reader = new FileReader;
-        reader.onload = function() {
-          text[i] = reader.result;
-          if (++read == n) {
-            pos = clipPos(cm.doc, pos);
-            makeChange(cm.doc, {from: pos, to: pos, text: splitLines(text.join("\n")), origin: "paste"}, "around");
-          }
-        };
-        reader.readAsText(file);
-      };
-      for (var i = 0; i < n; ++i) loadFile(files[i], i);
-    } else {
-      // Don't do a replace if the drop happened inside of the selected text.
-      if (cm.state.draggingText && !(posLess(pos, cm.doc.sel.from) || posLess(cm.doc.sel.to, pos))) {
-        cm.state.draggingText(e);
-        // Ensure the editor is re-focused
-        setTimeout(bind(focusInput, cm), 20);
-        return;
-      }
-      try {
-        var text = e.dataTransfer.getData("Text");
-        if (text) {
-          var curFrom = cm.doc.sel.from, curTo = cm.doc.sel.to;
-          setSelection(cm.doc, pos, pos);
-          if (cm.state.draggingText) replaceRange(cm.doc, "", curFrom, curTo, "paste");
-          cm.replaceSelection(text, null, "paste");
-          focusInput(cm);
-          onFocus(cm);
-        }
-      }
-      catch(e){}
-    }
-  }
-
-  function onDragStart(cm, e) {
-    if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return; }
-    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) return;
-
-    var txt = cm.getSelection();
-    e.dataTransfer.setData("Text", txt);
-
-    // Use dummy image instead of default browsers image.
-    // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.
-    if (e.dataTransfer.setDragImage && !safari) {
-      var img = elt("img", null, null, "position: fixed; left: 0; top: 0;");
-      if (opera) {
-        img.width = img.height = 1;
-        cm.display.wrapper.appendChild(img);
-        // Force a relayout, or Opera won't use our image for some obscure reason
-        img._top = img.offsetTop;
-      }
-      e.dataTransfer.setDragImage(img, 0, 0);
-      if (opera) img.parentNode.removeChild(img);
-    }
-  }
-
-  function setScrollTop(cm, val) {
-    if (Math.abs(cm.doc.scrollTop - val) < 2) return;
-    cm.doc.scrollTop = val;
-    if (!gecko) updateDisplay(cm, [], val);
-    if (cm.display.scroller.scrollTop != val) cm.display.scroller.scrollTop = val;
-    if (cm.display.scrollbarV.scrollTop != val) cm.display.scrollbarV.scrollTop = val;
-    if (gecko) updateDisplay(cm, []);
-    startWorker(cm, 100);
-  }
-  function setScrollLeft(cm, val, isScroller) {
-    if (isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) return;
-    val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth);
-    cm.doc.scrollLeft = val;
-    alignHorizontally(cm);
-    if (cm.display.scroller.scrollLeft != val) cm.display.scroller.scrollLeft = val;
-    if (cm.display.scrollbarH.scrollLeft != val) cm.display.scrollbarH.scrollLeft = val;
-  }
-
-  // Since the delta values reported on mouse wheel events are
-  // unstandardized between browsers and even browser versions, and
-  // generally horribly unpredictable, this code starts by measuring
-  // the scroll effect that the first few mouse wheel events have,
-  // and, from that, detects the way it can convert deltas to pixel
-  // offsets afterwards.
-  //
-  // The reason we want to know the amount a wheel event will scroll
-  // is that it gives us a chance to update the display before the
-  // actual scrolling happens, reducing flickering.
-
-  var wheelSamples = 0, wheelPixelsPerUnit = null;
-  // Fill in a browser-detected starting value on browsers where we
-  // know one. These don't have to be accurate -- the result of them
-  // being wrong would just be a slight flicker on the first wheel
-  // scroll (if it is large enough).
-  if (ie) wheelPixelsPerUnit = -.53;
-  else if (gecko) wheelPixelsPerUnit = 15;
-  else if (chrome) wheelPixelsPerUnit = -.7;
-  else if (safari) wheelPixelsPerUnit = -1/3;
-
-  function onScrollWheel(cm, e) {
-    var dx = e.wheelDeltaX, dy = e.wheelDeltaY;
-    if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) dx = e.detail;
-    if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) dy = e.detail;
-    else if (dy == null) dy = e.wheelDelta;
-
-    var display = cm.display, scroll = display.scroller;
-    // Quit if there's nothing to scroll here
-    if (!(dx && scroll.scrollWidth > scroll.clientWidth ||
-          dy && scroll.scrollHeight > scroll.clientHeight)) return;
-
-    // Webkit browsers on OS X abort momentum scrolls when the target
-    // of the scroll event is removed from the scrollable element.
-    // This hack (see related code in patchDisplay) makes sure the
-    // element is kept around.
-    if (dy && mac && webkit) {
-      for (var cur = e.target; cur != scroll; cur = cur.parentNode) {
-        if (cur.lineObj) {
-          cm.display.currentWheelTarget = cur;
-          break;
-        }
-      }
-    }
-
-    // On some browsers, horizontal scrolling will cause redraws to
-    // happen before the gutter has been realigned, causing it to
-    // wriggle around in a most unseemly way. When we have an
-    // estimated pixels/delta value, we just handle horizontal
-    // scrolling entirely here. It'll be slightly off from native, but
-    // better than glitching out.
-    if (dx && !gecko && !opera && wheelPixelsPerUnit != null) {
-      if (dy)
-        setScrollTop(cm, Math.max(0, Math.min(scroll.scrollTop + dy * wheelPixelsPerUnit, scroll.scrollHeight - scroll.clientHeight)));
-      setScrollLeft(cm, Math.max(0, Math.min(scroll.scrollLeft + dx * wheelPixelsPerUnit, scroll.scrollWidth - scroll.clientWidth)));
-      e_preventDefault(e);
-      display.wheelStartX = null; // Abort measurement, if in progress
-      return;
-    }
-
-    if (dy && wheelPixelsPerUnit != null) {
-      var pixels = dy * wheelPixelsPerUnit;
-      var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;
-      if (pixels < 0) top = Math.max(0, top + pixels - 50);
-      else bot = Math.min(cm.doc.height, bot + pixels + 50);
-      updateDisplay(cm, [], {top: top, bottom: bot});
-    }
-
-    if (wheelSamples < 20) {
-      if (display.wheelStartX == null) {
-        display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;
-        display.wheelDX = dx; display.wheelDY = dy;
-        setTimeout(function() {
-          if (display.wheelStartX == null) return;
-          var movedX = scroll.scrollLeft - display.wheelStartX;
-          var movedY = scroll.scrollTop - display.wheelStartY;
-          var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||
-            (movedX && display.wheelDX && movedX / display.wheelDX);
-          display.wheelStartX = display.wheelStartY = null;
-          if (!sample) return;
-          wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);
-          ++wheelSamples;
-        }, 200);
-      } else {
-        display.wheelDX += dx; display.wheelDY += dy;
-      }
-    }
-  }
-
-  function doHandleBinding(cm, bound, dropShift) {
-    if (typeof bound == "string") {
-      bound = commands[bound];
-      if (!bound) return false;
-    }
-    // Ensure previous input has been read, so that the handler sees a
-    // consistent view of the document
-    if (cm.display.pollingFast && readInput(cm)) cm.display.pollingFast = false;
-    var doc = cm.doc, prevShift = doc.sel.shift, done = false;
-    try {
-      if (isReadOnly(cm)) cm.state.suppressEdits = true;
-      if (dropShift) doc.sel.shift = false;
-      done = bound(cm) != Pass;
-    } finally {
-      doc.sel.shift = prevShift;
-      cm.state.suppressEdits = false;
-    }
-    return done;
-  }
-
-  function allKeyMaps(cm) {
-    var maps = cm.state.keyMaps.slice(0);
-    if (cm.options.extraKeys) maps.push(cm.options.extraKeys);
-    maps.push(cm.options.keyMap);
-    return maps;
-  }
-
-  var maybeTransition;
-  function handleKeyBinding(cm, e) {
-    // Handle auto keymap transitions
-    var startMap = getKeyMap(cm.options.keyMap), next = startMap.auto;
-    clearTimeout(maybeTransition);
-    if (next && !isModifierKey(e)) maybeTransition = setTimeout(function() {
-      if (getKeyMap(cm.options.keyMap) == startMap) {
-        cm.options.keyMap = (next.call ? next.call(null, cm) : next);
-        keyMapChanged(cm);
-      }
-    }, 50);
-
-    var name = keyName(e, true), handled = false;
-    if (!name) return false;
-    var keymaps = allKeyMaps(cm);
-
-    if (e.shiftKey) {
-      // First try to resolve full name (including 'Shift-'). Failing
-      // that, see if there is a cursor-motion command (starting with
-      // 'go') bound to the keyname without 'Shift-'.
-      handled = lookupKey("Shift-" + name, keymaps, function(b) {return doHandleBinding(cm, b, true);})
-             || lookupKey(name, keymaps, function(b) {
-                  if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion)
-                    return doHandleBinding(cm, b);
-                });
-    } else {
-      handled = lookupKey(name, keymaps, function(b) { return doHandleBinding(cm, b); });
-    }
-
-    if (handled) {
-      e_preventDefault(e);
-      restartBlink(cm);
-      if (ie_lt9) { e.oldKeyCode = e.keyCode; e.keyCode = 0; }
-      signalLater(cm, "keyHandled", cm, name, e);
-    }
-    return handled;
-  }
-
-  function handleCharBinding(cm, e, ch) {
-    var handled = lookupKey("'" + ch + "'", allKeyMaps(cm),
-                            function(b) { return doHandleBinding(cm, b, true); });
-    if (handled) {
-      e_preventDefault(e);
-      restartBlink(cm);
-      signalLater(cm, "keyHandled", cm, "'" + ch + "'", e);
-    }
-    return handled;
-  }
-
-  var lastStoppedKey = null;
-  function onKeyDown(e) {
-    var cm = this;
-    if (!cm.state.focused) onFocus(cm);
-    if (ie && e.keyCode == 27) { e.returnValue = false; }
-    if (signalDOMEvent(cm, e) || cm.options.onKeyEvent && cm.options.onKeyEvent(cm, addStop(e))) return;
-    var code = e.keyCode;
-    // IE does strange things with escape.
-    cm.doc.sel.shift = code == 16 || e.shiftKey;
-    // First give onKeyEvent option a chance to handle this.
-    var handled = handleKeyBinding(cm, e);
-    if (opera) {
-      lastStoppedKey = handled ? code : null;
-      // Opera has no cut event... we try to at least catch the key combo
-      if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))
-        cm.replaceSelection("");
-    }
-  }
-
-  function onKeyPress(e) {
-    var cm = this;
-    if (signalDOMEvent(cm, e) || cm.options.onKeyEvent && cm.options.onKeyEvent(cm, addStop(e))) return;
-    var keyCode = e.keyCode, charCode = e.charCode;
-    if (opera && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;}
-    if (((opera && (!e.which || e.which < 10)) || khtml) && handleKeyBinding(cm, e)) return;
-    var ch = String.fromCharCode(charCode == null ? keyCode : charCode);
-    if (this.options.electricChars && this.doc.mode.electricChars &&
-        this.options.smartIndent && !isReadOnly(this) &&
-        this.doc.mode.electricChars.indexOf(ch) > -1)
-      setTimeout(operation(cm, function() {indentLine(cm, cm.doc.sel.to.line, "smart");}), 75);
-    if (handleCharBinding(cm, e, ch)) return;
-    if (ie && !ie_lt9) cm.display.inputHasSelection = null;
-    fastPoll(cm);
-  }
-
-  function onFocus(cm) {
-    if (cm.options.readOnly == "nocursor") return;
-    if (!cm.state.focused) {
-      signal(cm, "focus", cm);
-      cm.state.focused = true;
-      if (cm.display.wrapper.className.search(/\bCodeMirror-focused\b/) == -1)
-        cm.display.wrapper.className += " CodeMirror-focused";
-      resetInput(cm, true);
-    }
-    slowPoll(cm);
-    restartBlink(cm);
-  }
-  function onBlur(cm) {
-    if (cm.state.focused) {
-      signal(cm, "blur", cm);
-      cm.state.focused = false;
-      cm.display.wrapper.className = cm.display.wrapper.className.replace(" CodeMirror-focused", "");
-    }
-    clearInterval(cm.display.blinker);
-    setTimeout(function() {if (!cm.state.focused) cm.doc.sel.shift = false;}, 150);
-  }
-
-  var detectingSelectAll;
-  function onContextMenu(cm, e) {
-    if (signalDOMEvent(cm, e, "contextmenu")) return;
-    var display = cm.display, sel = cm.doc.sel;
-    if (eventInWidget(display, e)) return;
-
-    var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;
-    if (!pos || opera) return; // Opera is difficult.
-    if (posEq(sel.from, sel.to) || posLess(pos, sel.from) || !posLess(pos, sel.to))
-      operation(cm, setSelection)(cm.doc, pos, pos);
-
-    var oldCSS = display.input.style.cssText;
-    display.inputDiv.style.position = "absolute";
-    display.input.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e.clientY - 5) +
-      "px; left: " + (e.clientX - 5) + "px; z-index: 1000; background: white; outline: none;" +
-      "border-width: 0; outline: none; overflow: hidden; opacity: .05; -ms-opacity: .05; filter: alpha(opacity=5);";
-    focusInput(cm);
-    resetInput(cm, true);
-    // Adds "Select all" to context menu in FF
-    if (posEq(sel.from, sel.to)) display.input.value = display.prevInput = " ";
-
-    function prepareSelectAllHack() {
-      if (display.input.selectionStart != null) {
-        var extval = display.input.value = " " + (posEq(sel.from, sel.to) ? "" : display.input.value);
-        display.prevInput = " ";
-        display.input.selectionStart = 1; display.input.selectionEnd = extval.length;
-      }
-    }
-    function rehide() {
-      display.inputDiv.style.position = "relative";
-      display.input.style.cssText = oldCSS;
-      if (ie_lt9) display.scrollbarV.scrollTop = display.scroller.scrollTop = scrollPos;
-      slowPoll(cm);
-
-      // Try to detect the user choosing select-all
-      if (display.input.selectionStart != null) {
-        if (!ie || ie_lt9) prepareSelectAllHack();
-        clearTimeout(detectingSelectAll);
-        var i = 0, poll = function(){
-          if (display.prevInput == " " && display.input.selectionStart == 0)
-            operation(cm, commands.selectAll)(cm);
-          else if (i++ < 10) detectingSelectAll = setTimeout(poll, 500);
-          else resetInput(cm);
-        };
-        detectingSelectAll = setTimeout(poll, 200);
-      }
-    }
-
-    if (ie && !ie_lt9) prepareSelectAllHack();
-    if (captureMiddleClick) {
-      e_stop(e);
-      var mouseup = function() {
-        off(window, "mouseup", mouseup);
-        setTimeout(rehide, 20);
-      };
-      on(window, "mouseup", mouseup);
-    } else {
-      setTimeout(rehide, 50);
-    }
-  }
-
-  // UPDATING
-
-  var changeEnd = CodeMirror.changeEnd = function(change) {
-    if (!change.text) return change.to;
-    return Pos(change.from.line + change.text.length - 1,
-               lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0));
-  };
-
-  // Make sure a position will be valid after the given change.
-  function clipPostChange(doc, change, pos) {
-    if (!posLess(change.from, pos)) return clipPos(doc, pos);
-    var diff = (change.text.length - 1) - (change.to.line - change.from.line);
-    if (pos.line > change.to.line + diff) {
-      var preLine = pos.line - diff, lastLine = doc.first + doc.size - 1;
-      if (preLine > lastLine) return Pos(lastLine, getLine(doc, lastLine).text.length);
-      return clipToLen(pos, getLine(doc, preLine).text.length);
-    }
-    if (pos.line == change.to.line + diff)
-      return clipToLen(pos, lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0) +
-                       getLine(doc, change.to.line).text.length - change.to.ch);
-    var inside = pos.line - change.from.line;
-    return clipToLen(pos, change.text[inside].length + (inside ? 0 : change.from.ch));
-  }
-
-  // Hint can be null|"end"|"start"|"around"|{anchor,head}
-  function computeSelAfterChange(doc, change, hint) {
-    if (hint && typeof hint == "object") // Assumed to be {anchor, head} object
-      return {anchor: clipPostChange(doc, change, hint.anchor),
-              head: clipPostChange(doc, change, hint.head)};
-
-    if (hint == "start") return {anchor: change.from, head: change.from};
-
-    var end = changeEnd(change);
-    if (hint == "around") return {anchor: change.from, head: end};
-    if (hint == "end") return {anchor: end, head: end};
-
-    // hint is null, leave the selection alone as much as possible
-    var adjustPos = function(pos) {
-      if (posLess(pos, change.from)) return pos;
-      if (!posLess(change.to, pos)) return end;
-
-      var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;
-      if (pos.line == change.to.line) ch += end.ch - change.to.ch;
-      return Pos(line, ch);
-    };
-    return {anchor: adjustPos(doc.sel.anchor), head: adjustPos(doc.sel.head)};
-  }
-
-  function filterChange(doc, change, update) {
-    var obj = {
-      canceled: false,
-      from: change.from,
-      to: change.to,
-      text: change.text,
-      origin: change.origin,
-      cancel: function() { this.canceled = true; }
-    };
-    if (update) obj.update = function(from, to, text, origin) {
-      if (from) this.from = clipPos(doc, from);
-      if (to) this.to = clipPos(doc, to);
-      if (text) this.text = text;
-      if (origin !== undefined) this.origin = origin;
-    };
-    signal(doc, "beforeChange", doc, obj);
-    if (doc.cm) signal(doc.cm, "beforeChange", doc.cm, obj);
-
-    if (obj.canceled) return null;
-    return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin};
-  }
-
-  // Replace the range from from to to by the strings in replacement.
-  // change is a {from, to, text [, origin]} object
-  function makeChange(doc, change, selUpdate, ignoreReadOnly) {
-    if (doc.cm) {
-      if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, selUpdate, ignoreReadOnly);
-      if (doc.cm.state.suppressEdits) return;
-    }
-
-    if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) {
-      change = filterChange(doc, change, true);
-      if (!change) return;
-    }
-
-    // Possibly split or suppress the update based on the presence
-    // of read-only spans in its range.
-    var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);
-    if (split) {
-      for (var i = split.length - 1; i >= 1; --i)
-        makeChangeNoReadonly(doc, {from: split[i].from, to: split[i].to, text: [""]});
-      if (split.length)
-        makeChangeNoReadonly(doc, {from: split[0].from, to: split[0].to, text: change.text}, selUpdate);
-    } else {
-      makeChangeNoReadonly(doc, change, selUpdate);
-    }
-  }
-
-  function makeChangeNoReadonly(doc, change, selUpdate) {
-    var selAfter = computeSelAfterChange(doc, change, selUpdate);
-    addToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);
-
-    makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));
-    var rebased = [];
-
-    linkedDocs(doc, function(doc, sharedHist) {
-      if (!sharedHist && indexOf(rebased, doc.history) == -1) {
-        rebaseHist(doc.history, change);
-        rebased.push(doc.history);
-      }
-      makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));
-    });
-  }
-
-  function makeChangeFromHistory(doc, type) {
-    if (doc.cm && doc.cm.state.suppressEdits) return;
-
-    var hist = doc.history;
-    var event = (type == "undo" ? hist.done : hist.undone).pop();
-    if (!event) return;
-
-    var anti = {changes: [], anchorBefore: event.anchorAfter, headBefore: event.headAfter,
-                anchorAfter: event.anchorBefore, headAfter: event.headBefore,
-                generation: hist.generation};
-    (type == "undo" ? hist.undone : hist.done).push(anti);
-    hist.generation = event.generation || ++hist.maxGeneration;
-
-    var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange");
-
-    for (var i = event.changes.length - 1; i >= 0; --i) {
-      var change = event.changes[i];
-      change.origin = type;
-      if (filter && !filterChange(doc, change, false)) {
-        (type == "undo" ? hist.done : hist.undone).length = 0;
-        return;
-      }
-
-      anti.changes.push(historyChangeFromChange(doc, change));
-
-      var after = i ? computeSelAfterChange(doc, change, null)
-                    : {anchor: event.anchorBefore, head: event.headBefore};
-      makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));
-      var rebased = [];
-
-      linkedDocs(doc, function(doc, sharedHist) {
-        if (!sharedHist && indexOf(rebased, doc.history) == -1) {
-          rebaseHist(doc.history, change);
-          rebased.push(doc.history);
-        }
-        makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));
-      });
-    }
-  }
-
-  function shiftDoc(doc, distance) {
-    function shiftPos(pos) {return Pos(pos.line + distance, pos.ch);}
-    doc.first += distance;
-    if (doc.cm) regChange(doc.cm, doc.first, doc.first, distance);
-    doc.sel.head = shiftPos(doc.sel.head); doc.sel.anchor = shiftPos(doc.sel.anchor);
-    doc.sel.from = shiftPos(doc.sel.from); doc.sel.to = shiftPos(doc.sel.to);
-  }
-
-  function makeChangeSingleDoc(doc, change, selAfter, spans) {
-    if (doc.cm && !doc.cm.curOp)
-      return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans);
-
-    if (change.to.line < doc.first) {
-      shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));
-      return;
-    }
-    if (change.from.line > doc.lastLine()) return;
-
-    // Clip the change to the size of this doc
-    if (change.from.line < doc.first) {
-      var shift = change.text.length - 1 - (doc.first - change.from.line);
-      shiftDoc(doc, shift);
-      change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),
-                text: [lst(change.text)], origin: change.origin};
-    }
-    var last = doc.lastLine();
-    if (change.to.line > last) {
-      change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),
-                text: [change.text[0]], origin: change.origin};
-    }
-
-    change.removed = getBetween(doc, change.from, change.to);
-
-    if (!selAfter) selAfter = computeSelAfterChange(doc, change, null);
-    if (doc.cm) makeChangeSingleDocInEditor(doc.cm, change, spans, selAfter);
-    else updateDoc(doc, change, spans, selAfter);
-  }
-
-  function makeChangeSingleDocInEditor(cm, change, spans, selAfter) {
-    var doc = cm.doc, display = cm.display, from = change.from, to = change.to;
-
-    var recomputeMaxLength = false, checkWidthStart = from.line;
-    if (!cm.options.lineWrapping) {
-      checkWidthStart = lineNo(visualLine(doc, getLine(doc, from.line)));
-      doc.iter(checkWidthStart, to.line + 1, function(line) {
-        if (line == display.maxLine) {
-          recomputeMaxLength = true;
-          return true;
-        }
-      });
-    }
-
-    if (!posLess(doc.sel.head, change.from) && !posLess(change.to, doc.sel.head))
-      cm.curOp.cursorActivity = true;
-
-    updateDoc(doc, change, spans, selAfter, estimateHeight(cm));
-
-    if (!cm.options.lineWrapping) {
-      doc.iter(checkWidthStart, from.line + change.text.length, function(line) {
-        var len = lineLength(doc, line);
-        if (len > display.maxLineLength) {
-          display.maxLine = line;
-          display.maxLineLength = len;
-          display.maxLineChanged = true;
-          recomputeMaxLength = false;
-        }
-      });
-      if (recomputeMaxLength) cm.curOp.updateMaxLine = true;
-    }
-
-    // Adjust frontier, schedule worker
-    doc.frontier = Math.min(doc.frontier, from.line);
-    startWorker(cm, 400);
-
-    var lendiff = change.text.length - (to.line - from.line) - 1;
-    // Remember that these lines changed, for updating the display
-    regChange(cm, from.line, to.line + 1, lendiff);
-
-    if (hasHandler(cm, "change")) {
-      var changeObj = {from: from, to: to,
-                       text: change.text,
-                       removed: change.removed,
-                       origin: change.origin};
-      if (cm.curOp.textChanged) {
-        for (var cur = cm.curOp.textChanged; cur.next; cur = cur.next) {}
-        cur.next = changeObj;
-      } else cm.curOp.textChanged = changeObj;
-    }
-  }
-
-  function replaceRange(doc, code, from, to, origin) {
-    if (!to) to = from;
-    if (posLess(to, from)) { var tmp = to; to = from; from = tmp; }
-    if (typeof code == "string") code = splitLines(code);
-    makeChange(doc, {from: from, to: to, text: code, origin: origin}, null);
-  }
-
-  // POSITION OBJECT
-
-  function Pos(line, ch) {
-    if (!(this instanceof Pos)) return new Pos(line, ch);
-    this.line = line; this.ch = ch;
-  }
-  CodeMirror.Pos = Pos;
-
-  function posEq(a, b) {return a.line == b.line && a.ch == b.ch;}
-  function posLess(a, b) {return a.line < b.line || (a.line == b.line && a.ch < b.ch);}
-  function copyPos(x) {return Pos(x.line, x.ch);}
-
-  // SELECTION
-
-  function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1));}
-  function clipPos(doc, pos) {
-    if (pos.line < doc.first) return Pos(doc.first, 0);
-    var last = doc.first + doc.size - 1;
-    if (pos.line > last) return Pos(last, getLine(doc, last).text.length);
-    return clipToLen(pos, getLine(doc, pos.line).text.length);
-  }
-  function clipToLen(pos, linelen) {
-    var ch = pos.ch;
-    if (ch == null || ch > linelen) return Pos(pos.line, linelen);
-    else if (ch < 0) return Pos(pos.line, 0);
-    else return pos;
-  }
-  function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size;}
-
-  // If shift is held, this will move the selection anchor. Otherwise,
-  // it'll set the whole selection.
-  function extendSelection(doc, pos, other, bias) {
-    if (doc.sel.shift || doc.sel.extend) {
-      var anchor = doc.sel.anchor;
-      if (other) {
-        var posBefore = posLess(pos, anchor);
-        if (posBefore != posLess(other, anchor)) {
-          anchor = pos;
-          pos = other;
-        } else if (posBefore != posLess(pos, other)) {
-          pos = other;
-        }
-      }
-      setSelection(doc, anchor, pos, bias);
-    } else {
-      setSelection(doc, pos, other || pos, bias);
-    }
-    if (doc.cm) doc.cm.curOp.userSelChange = true;
-  }
-
-  function filterSelectionChange(doc, anchor, head) {
-    var obj = {anchor: anchor, head: head};
-    signal(doc, "beforeSelectionChange", doc, obj);
-    if (doc.cm) signal(doc.cm, "beforeSelectionChange", doc.cm, obj);
-    obj.anchor = clipPos(doc, obj.anchor); obj.head = clipPos(doc, obj.head);
-    return obj;
-  }
-
-  // Update the selection. Last two args are only used by
-  // updateDoc, since they have to be expressed in the line
-  // numbers before the update.
-  function setSelection(doc, anchor, head, bias, checkAtomic) {
-    if (!checkAtomic && hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange")) {
-      var filtered = filterSelectionChange(doc, anchor, head);
-      head = filtered.head;
-      anchor = filtered.anchor;
-    }
-
-    var sel = doc.sel;
-    sel.goalColumn = null;
-    // Skip over atomic spans.
-    if (checkAtomic || !posEq(anchor, sel.anchor))
-      anchor = skipAtomic(doc, anchor, bias, checkAtomic != "push");
-    if (checkAtomic || !posEq(head, sel.head))
-      head = skipAtomic(doc, head, bias, checkAtomic != "push");
-
-    if (posEq(sel.anchor, anchor) && posEq(sel.head, head)) return;
-
-    sel.anchor = anchor; sel.head = head;
-    var inv = posLess(head, anchor);
-    sel.from = inv ? head : anchor;
-    sel.to = inv ? anchor : head;
-
-    if (doc.cm)
-      doc.cm.curOp.updateInput = doc.cm.curOp.selectionChanged =
-        doc.cm.curOp.cursorActivity = true;
-
-    signalLater(doc, "cursorActivity", doc);
-  }
-
-  function reCheckSelection(cm) {
-    setSelection(cm.doc, cm.doc.sel.from, cm.doc.sel.to, null, "push");
-  }
-
-  function skipAtomic(doc, pos, bias, mayClear) {
-    var flipped = false, curPos = pos;
-    var dir = bias || 1;
-    doc.cantEdit = false;
-    search: for (;;) {
-      var line = getLine(doc, curPos.line);
-      if (line.markedSpans) {
-        for (var i = 0; i < line.markedSpans.length; ++i) {
-          var sp = line.markedSpans[i], m = sp.marker;
-          if ((sp.from == null || (m.inclusiveLeft ? sp.from <= curPos.ch : sp.from < curPos.ch)) &&
-              (sp.to == null || (m.inclusiveRight ? sp.to >= curPos.ch : sp.to > curPos.ch))) {
-            if (mayClear) {
-              signal(m, "beforeCursorEnter");
-              if (m.explicitlyCleared) {
-                if (!line.markedSpans) break;
-                else {--i; continue;}
-              }
-            }
-            if (!m.atomic) continue;
-            var newPos = m.find()[dir < 0 ? "from" : "to"];
-            if (posEq(newPos, curPos)) {
-              newPos.ch += dir;
-              if (newPos.ch < 0) {
-                if (newPos.line > doc.first) newPos = clipPos(doc, Pos(newPos.line - 1));
-                else newPos = null;
-              } else if (newPos.ch > line.text.length) {
-                if (newPos.line < doc.first + doc.size - 1) newPos = Pos(newPos.line + 1, 0);
-                else newPos = null;
-              }
-              if (!newPos) {
-                if (flipped) {
-                  // Driven in a corner -- no valid cursor position found at all
-                  // -- try again *with* clearing, if we didn't already
-                  if (!mayClear) return skipAtomic(doc, pos, bias, true);
-                  // Otherwise, turn off editing until further notice, and return the start of the doc
-                  doc.cantEdit = true;
-                  return Pos(doc.first, 0);
-                }
-                flipped = true; newPos = pos; dir = -dir;
-              }
-            }
-            curPos = newPos;
-            continue search;
-          }
-        }
-      }
-      return curPos;
-    }
-  }
-
-  // SCROLLING
-
-  function scrollCursorIntoView(cm) {
-    var coords = scrollPosIntoView(cm, cm.doc.sel.head, cm.options.cursorScrollMargin);
-    if (!cm.state.focused) return;
-    var display = cm.display, box = getRect(display.sizer), doScroll = null;
-    if (coords.top + box.top < 0) doScroll = true;
-    else if (coords.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) doScroll = false;
-    if (doScroll != null && !phantom) {
-      var hidden = display.cursor.style.display == "none";
-      if (hidden) {
-        display.cursor.style.display = "";
-        display.cursor.style.left = coords.left + "px";
-        display.cursor.style.top = (coords.top - display.viewOffset) + "px";
-      }
-      display.cursor.scrollIntoView(doScroll);
-      if (hidden) display.cursor.style.display = "none";
-    }
-  }
-
-  function scrollPosIntoView(cm, pos, margin) {
-    if (margin == null) margin = 0;
-    for (;;) {
-      var changed = false, coords = cursorCoords(cm, pos);
-      var scrollPos = calculateScrollPos(cm, coords.left, coords.top - margin, coords.left, coords.bottom + margin);
-      var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;
-      if (scrollPos.scrollTop != null) {
-        setScrollTop(cm, scrollPos.scrollTop);
-        if (Math.abs(cm.doc.scrollTop - startTop) > 1) changed = true;
-      }
-      if (scrollPos.scrollLeft != null) {
-        setScrollLeft(cm, scrollPos.scrollLeft);
-        if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) changed = true;
-      }
-      if (!changed) return coords;
-    }
-  }
-
-  function scrollIntoView(cm, x1, y1, x2, y2) {
-    var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);
-    if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);
-    if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);
-  }
-
-  function calculateScrollPos(cm, x1, y1, x2, y2) {
-    var display = cm.display, snapMargin = textHeight(cm.display);
-    if (y1 < 0) y1 = 0;
-    var screen = display.scroller.clientHeight - scrollerCutOff, screentop = display.scroller.scrollTop, result = {};
-    var docBottom = cm.doc.height + paddingVert(display);
-    var atTop = y1 < snapMargin, atBottom = y2 > docBottom - snapMargin;
-    if (y1 < screentop) {
-      result.scrollTop = atTop ? 0 : y1;
-    } else if (y2 > screentop + screen) {
-      var newTop = Math.min(y1, (atBottom ? docBottom : y2) - screen);
-      if (newTop != screentop) result.scrollTop = newTop;
-    }
-
-    var screenw = display.scroller.clientWidth - scrollerCutOff, screenleft = display.scroller.scrollLeft;
-    x1 += display.gutters.offsetWidth; x2 += display.gutters.offsetWidth;
-    var gutterw = display.gutters.offsetWidth;
-    var atLeft = x1 < gutterw + 10;
-    if (x1 < screenleft + gutterw || atLeft) {
-      if (atLeft) x1 = 0;
-      result.scrollLeft = Math.max(0, x1 - 10 - gutterw);
-    } else if (x2 > screenw + screenleft - 3) {
-      result.scrollLeft = x2 + 10 - screenw;
-    }
-    return result;
-  }
-
-  function updateScrollPos(cm, left, top) {
-    cm.curOp.updateScrollPos = {scrollLeft: left == null ? cm.doc.scrollLeft : left,
-                                scrollTop: top == null ? cm.doc.scrollTop : top};
-  }
-
-  function addToScrollPos(cm, left, top) {
-    var pos = cm.curOp.updateScrollPos || (cm.curOp.updateScrollPos = {scrollLeft: cm.doc.scrollLeft, scrollTop: cm.doc.scrollTop});
-    var scroll = cm.display.scroller;
-    pos.scrollTop = Math.max(0, Math.min(scroll.scrollHeight - scroll.clientHeight, pos.scrollTop + top));
-    pos.scrollLeft = Math.max(0, Math.min(scroll.scrollWidth - scroll.clientWidth, pos.scrollLeft + left));
-  }
-
-  // API UTILITIES
-
-  function indentLine(cm, n, how, aggressive) {
-    var doc = cm.doc;
-    if (how == null) how = "add";
-    if (how == "smart") {
-      if (!cm.doc.mode.indent) how = "prev";
-      else var state = getStateBefore(cm, n);
-    }
-
-    var tabSize = cm.options.tabSize;
-    var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);
-    var curSpaceString = line.text.match(/^\s*/)[0], indentation;
-    if (how == "smart") {
-      indentation = cm.doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);
-      if (indentation == Pass) {
-        if (!aggressive) return;
-        how = "prev";
-      }
-    }
-    if (how == "prev") {
-      if (n > doc.first) indentation = countColumn(getLine(doc, n-1).text, null, tabSize);
-      else indentation = 0;
-    } else if (how == "add") {
-      indentation = curSpace + cm.options.indentUnit;
-    } else if (how == "subtract") {
-      indentation = curSpace - cm.options.indentUnit;
-    } else if (typeof how == "number") {
-      indentation = curSpace + how;
-    }
-    indentation = Math.max(0, indentation);
-
-    var indentString = "", pos = 0;
-    if (cm.options.indentWithTabs)
-      for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";}
-    if (pos < indentation) indentString += spaceStr(indentation - pos);
-
-    if (indentString != curSpaceString)
-      replaceRange(cm.doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input");
-    line.stateAfter = null;
-  }
-
-  function changeLine(cm, handle, op) {
-    var no = handle, line = handle, doc = cm.doc;
-    if (typeof handle == "number") line = getLine(doc, clipLine(doc, handle));
-    else no = lineNo(handle);
-    if (no == null) return null;
-    if (op(line, no)) regChange(cm, no, no + 1);
-    else return null;
-    return line;
-  }
-
-  function findPosH(doc, pos, dir, unit, visually) {
-    var line = pos.line, ch = pos.ch, origDir = dir;
-    var lineObj = getLine(doc, line);
-    var possible = true;
-    function findNextLine() {
-      var l = line + dir;
-      if (l < doc.first || l >= doc.first + doc.size) return (possible = false);
-      line = l;
-      return lineObj = getLine(doc, l);
-    }
-    function moveOnce(boundToLine) {
-      var next = (visually ? moveVisually : moveLogically)(lineObj, ch, dir, true);
-      if (next == null) {
-        if (!boundToLine && findNextLine()) {
-          if (visually) ch = (dir < 0 ? lineRight : lineLeft)(lineObj);
-          else ch = dir < 0 ? lineObj.text.length : 0;
-        } else return (possible = false);
-      } else ch = next;
-      return true;
-    }
-
-    if (unit == "char") moveOnce();
-    else if (unit == "column") moveOnce(true);
-    else if (unit == "word" || unit == "group") {
-      var sawType = null, group = unit == "group";
-      for (var first = true;; first = false) {
-        if (dir < 0 && !moveOnce(!first)) break;
-        var cur = lineObj.text.charAt(ch) || "\n";
-        var type = isWordChar(cur) ? "w"
-          : !group ? null
-          : /\s/.test(cur) ? null
-          : "p";
-        if (sawType && sawType != type) {
-          if (dir < 0) {dir = 1; moveOnce();}
-          break;
-        }
-        if (type) sawType = type;
-        if (dir > 0 && !moveOnce(!first)) break;
-      }
-    }
-    var result = skipAtomic(doc, Pos(line, ch), origDir, true);
-    if (!possible) result.hitSide = true;
-    return result;
-  }
-
-  function findPosV(cm, pos, dir, unit) {
-    var doc = cm.doc, x = pos.left, y;
-    if (unit == "page") {
-      var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);
-      y = pos.top + dir * (pageSize - (dir < 0 ? 1.5 : .5) * textHeight(cm.display));
-    } else if (unit == "line") {
-      y = dir > 0 ? pos.bottom + 3 : pos.top - 3;
-    }
-    for (;;) {
-      var target = coordsChar(cm, x, y);
-      if (!target.outside) break;
-      if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break; }
-      y += dir * 5;
-    }
-    return target;
-  }
-
-  function findWordAt(line, pos) {
-    var start = pos.ch, end = pos.ch;
-    if (line) {
-      if ((pos.xRel < 0 || end == line.length) && start) --start; else ++end;
-      var startChar = line.charAt(start);
-      var check = isWordChar(startChar) ? isWordChar
-        : /\s/.test(startChar) ? function(ch) {return /\s/.test(ch);}
-        : function(ch) {return !/\s/.test(ch) && !isWordChar(ch);};
-      while (start > 0 && check(line.charAt(start - 1))) --start;
-      while (end < line.length && check(line.charAt(end))) ++end;
-    }
-    return {from: Pos(pos.line, start), to: Pos(pos.line, end)};
-  }
-
-  function selectLine(cm, line) {
-    extendSelection(cm.doc, Pos(line, 0), clipPos(cm.doc, Pos(line + 1, 0)));
-  }
-
-  // PROTOTYPE
-
-  // The publicly visible API. Note that operation(null, f) means
-  // 'wrap f in an operation, performed on its `this` parameter'
-
-  CodeMirror.prototype = {
-    constructor: CodeMirror,
-    focus: function(){window.focus(); focusInput(this); onFocus(this); fastPoll(this);},
-
-    setOption: function(option, value) {
-      var options = this.options, old = options[option];
-      if (options[option] == value && option != "mode") return;
-      options[option] = value;
-      if (optionHandlers.hasOwnProperty(option))
-        operation(this, optionHandlers[option])(this, value, old);
-    },
-
-    getOption: function(option) {return this.options[option];},
-    getDoc: function() {return this.doc;},
-
-    addKeyMap: function(map, bottom) {
-      this.state.keyMaps[bottom ? "push" : "unshift"](map);
-    },
-    removeKeyMap: function(map) {
-      var maps = this.state.keyMaps;
-      for (var i = 0; i < maps.length; ++i)
-        if (maps[i] == map || (typeof maps[i] != "string" && maps[i].name == map)) {
-          maps.splice(i, 1);
-          return true;
-        }
-    },
-
-    addOverlay: operation(null, function(spec, options) {
-      var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);
-      if (mode.startState) throw new Error("Overlays may not be stateful.");
-      this.state.overlays.push({mode: mode, modeSpec: spec, opaque: options && options.opaque});
-      this.state.modeGen++;
-      regChange(this);
-    }),
-    removeOverlay: operation(null, function(spec) {
-      var overlays = this.state.overlays;
-      for (var i = 0; i < overlays.length; ++i) {
-        var cur = overlays[i].modeSpec;
-        if (cur == spec || typeof spec == "string" && cur.name == spec) {
-          overlays.splice(i, 1);
-          this.state.modeGen++;
-          regChange(this);
-          return;
-        }
-      }
-    }),
-
-    indentLine: operation(null, function(n, dir, aggressive) {
-      if (typeof dir != "string" && typeof dir != "number") {
-        if (dir == null) dir = this.options.smartIndent ? "smart" : "prev";
-        else dir = dir ? "add" : "subtract";
-      }
-      if (isLine(this.doc, n)) indentLine(this, n, dir, aggressive);
-    }),
-    indentSelection: operation(null, function(how) {
-      var sel = this.doc.sel;
-      if (posEq(sel.from, sel.to)) return indentLine(this, sel.from.line, how);
-      var e = sel.to.line - (sel.to.ch ? 0 : 1);
-      for (var i = sel.from.line; i <= e; ++i) indentLine(this, i, how);
-    }),
-
-    // Fetch the parser token for a given character. Useful for hacks
-    // that want to inspect the mode state (say, for completion).
-    getTokenAt: function(pos, precise) {
-      var doc = this.doc;
-      pos = clipPos(doc, pos);
-      var state = getStateBefore(this, pos.line, precise), mode = this.doc.mode;
-      var line = getLine(doc, pos.line);
-      var stream = new StringStream(line.text, this.options.tabSize);
-      while (stream.pos < pos.ch && !stream.eol()) {
-        stream.start = stream.pos;
-        var style = mode.token(stream, state);
-      }
-      return {start: stream.start,
-              end: stream.pos,
-              string: stream.current(),
-              className: style || null, // Deprecated, use 'type' instead
-              type: style || null,
-              state: state};
-    },
-
-    getTokenTypeAt: function(pos) {
-      pos = clipPos(this.doc, pos);
-      var styles = getLineStyles(this, getLine(this.doc, pos.line));
-      var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;
-      if (ch == 0) return styles[2];
-      for (;;) {
-        var mid = (before + after) >> 1;
-        if ((mid ? styles[mid * 2 - 1] : 0) >= ch) after = mid;
-        else if (styles[mid * 2 + 1] < ch) before = mid + 1;
-        else return styles[mid * 2 + 2];
-      }
-    },
-
-    getModeAt: function(pos) {
-      var mode = this.doc.mode;
-      if (!mode.innerMode) return mode;
-      return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode;
-    },
-
-    getHelper: function(pos, type) {
-      if (!helpers.hasOwnProperty(type)) return;
-      var help = helpers[type], mode = this.getModeAt(pos);
-      return mode[type] && help[mode[type]] ||
-        mode.helperType && help[mode.helperType] ||
-        help[mode.name];
-    },
-
-    getStateAfter: function(line, precise) {
-      var doc = this.doc;
-      line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);
-      return getStateBefore(this, line + 1, precise);
-    },
-
-    cursorCoords: function(start, mode) {
-      var pos, sel = this.doc.sel;
-      if (start == null) pos = sel.head;
-      else if (typeof start == "object") pos = clipPos(this.doc, start);
-      else pos = start ? sel.from : sel.to;
-      return cursorCoords(this, pos, mode || "page");
-    },
-
-    charCoords: function(pos, mode) {
-      return charCoords(this, clipPos(this.doc, pos), mode || "page");
-    },
-
-    coordsChar: function(coords, mode) {
-      coords = fromCoordSystem(this, coords, mode || "page");
-      return coordsChar(this, coords.left, coords.top);
-    },
-
-    lineAtHeight: function(height, mode) {
-      height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top;
-      return lineAtHeight(this.doc, height + this.display.viewOffset);
-    },
-    heightAtLine: function(line, mode) {
-      var end = false, last = this.doc.first + this.doc.size - 1;
-      if (line < this.doc.first) line = this.doc.first;
-      else if (line > last) { line = last; end = true; }
-      var lineObj = getLine(this.doc, line);
-      return intoCoordSystem(this, getLine(this.doc, line), {top: 0, left: 0}, mode || "page").top +
-        (end ? lineObj.height : 0);
-    },
-
-    defaultTextHeight: function() { return textHeight(this.display); },
-    defaultCharWidth: function() { return charWidth(this.display); },
-
-    setGutterMarker: operation(null, function(line, gutterID, value) {
-      return changeLine(this, line, function(line) {
-        var markers = line.gutterMarkers || (line.gutterMarkers = {});
-        markers[gutterID] = value;
-        if (!value && isEmpty(markers)) line.gutterMarkers = null;
-        return true;
-      });
-    }),
-
-    clearGutter: operation(null, function(gutterID) {
-      var cm = this, doc = cm.doc, i = doc.first;
-      doc.iter(function(line) {
-        if (line.gutterMarkers && line.gutterMarkers[gutterID]) {
-          line.gutterMarkers[gutterID] = null;
-          regChange(cm, i, i + 1);
-          if (isEmpty(line.gutterMarkers)) line.gutterMarkers = null;
-        }
-        ++i;
-      });
-    }),
-
-    addLineClass: operation(null, function(handle, where, cls) {
-      return changeLine(this, handle, function(line) {
-        var prop = where == "text" ? "textClass" : where == "background" ? "bgClass" : "wrapClass";
-        if (!line[prop]) line[prop] = cls;
-        else if (new RegExp("(?:^|\\s)" + cls + "(?:$|\\s)").test(line[prop])) return false;
-        else line[prop] += " " + cls;
-        return true;
-      });
-    }),
-
-    removeLineClass: operation(null, function(handle, where, cls) {
-      return changeLine(this, handle, function(line) {
-        var prop = where == "text" ? "textClass" : where == "background" ? "bgClass" : "wrapClass";
-        var cur = line[prop];
-        if (!cur) return false;
-        else if (cls == null) line[prop] = null;
-        else {
-          var found = cur.match(new RegExp("(?:^|\\s+)" + cls + "(?:$|\\s+)"));
-          if (!found) return false;
-          var end = found.index + found[0].length;
-          line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null;
-        }
-        return true;
-      });
-    }),
-
-    addLineWidget: operation(null, function(handle, node, options) {
-      return addLineWidget(this, handle, node, options);
-    }),
-
-    removeLineWidget: function(widget) { widget.clear(); },
-
-    lineInfo: function(line) {
-      if (typeof line == "number") {
-        if (!isLine(this.doc, line)) return null;
-        var n = line;
-        line = getLine(this.doc, line);
-        if (!line) return null;
-      } else {
-        var n = lineNo(line);
-        if (n == null) return null;
-      }
-      return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,
-              textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass,
-              widgets: line.widgets};
-    },
-
-    getViewport: function() { return {from: this.display.showingFrom, to: this.display.showingTo};},
-
-    addWidget: function(pos, node, scroll, vert, horiz) {
-      var display = this.display;
-      pos = cursorCoords(this, clipPos(this.doc, pos));
-      var top = pos.bottom, left = pos.left;
-      node.style.position = "absolute";
-      display.sizer.appendChild(node);
-      if (vert == "over") {
-        top = pos.top;
-      } else if (vert == "above" || vert == "near") {
-        var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),
-        hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);
-        // Default to positioning above (if specified and possible); otherwise default to positioning below
-        if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)
-          top = pos.top - node.offsetHeight;
-        else if (pos.bottom + node.offsetHeight <= vspace)
-          top = pos.bottom;
-        if (left + node.offsetWidth > hspace)
-          left = hspace - node.offsetWidth;
-      }
-      node.style.top = top + "px";
-      node.style.left = node.style.right = "";
-      if (horiz == "right") {
-        left = display.sizer.clientWidth - node.offsetWidth;
-        node.style.right = "0px";
-      } else {
-        if (horiz == "left") left = 0;
-        else if (horiz == "middle") left = (display.sizer.clientWidth - node.offsetWidth) / 2;
-        node.style.left = left + "px";
-      }
-      if (scroll)
-        scrollIntoView(this, left, top, left + node.offsetWidth, top + node.offsetHeight);
-    },
-
-    triggerOnKeyDown: operation(null, onKeyDown),
-
-    execCommand: function(cmd) {return commands[cmd](this);},
-
-    findPosH: function(from, amount, unit, visually) {
-      var dir = 1;
-      if (amount < 0) { dir = -1; amount = -amount; }
-      for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) {
-        cur = findPosH(this.doc, cur, dir, unit, visually);
-        if (cur.hitSide) break;
-      }
-      return cur;
-    },
-
-    moveH: operation(null, function(dir, unit) {
-      var sel = this.doc.sel, pos;
-      if (sel.shift || sel.extend || posEq(sel.from, sel.to))
-        pos = findPosH(this.doc, sel.head, dir, unit, this.options.rtlMoveVisually);
-      else
-        pos = dir < 0 ? sel.from : sel.to;
-      extendSelection(this.doc, pos, pos, dir);
-    }),
-
-    deleteH: operation(null, function(dir, unit) {
-      var sel = this.doc.sel;
-      if (!posEq(sel.from, sel.to)) replaceRange(this.doc, "", sel.from, sel.to, "+delete");
-      else replaceRange(this.doc, "", sel.from, findPosH(this.doc, sel.head, dir, unit, false), "+delete");
-      this.curOp.userSelChange = true;
-    }),
-
-    findPosV: function(from, amount, unit, goalColumn) {
-      var dir = 1, x = goalColumn;
-      if (amount < 0) { dir = -1; amount = -amount; }
-      for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) {
-        var coords = cursorCoords(this, cur, "div");
-        if (x == null) x = coords.left;
-        else coords.left = x;
-        cur = findPosV(this, coords, dir, unit);
-        if (cur.hitSide) break;
-      }
-      return cur;
-    },
-
-    moveV: operation(null, function(dir, unit) {
-      var sel = this.doc.sel;
-      var pos = cursorCoords(this, sel.head, "div");
-      if (sel.goalColumn != null) pos.left = sel.goalColumn;
-      var target = findPosV(this, pos, dir, unit);
-
-      if (unit == "page") addToScrollPos(this, 0, charCoords(this, target, "div").top - pos.top);
-      extendSelection(this.doc, target, target, dir);
-      sel.goalColumn = pos.left;
-    }),
-
-    toggleOverwrite: function(value) {
-      if (value != null && value == this.state.overwrite) return;
-      if (this.state.overwrite = !this.state.overwrite)
-        this.display.cursor.className += " CodeMirror-overwrite";
-      else
-        this.display.cursor.className = this.display.cursor.className.replace(" CodeMirror-overwrite", "");
-    },
-    hasFocus: function() { return this.state.focused; },
-
-    scrollTo: operation(null, function(x, y) {
-      updateScrollPos(this, x, y);
-    }),
-    getScrollInfo: function() {
-      var scroller = this.display.scroller, co = scrollerCutOff;
-      return {left: scroller.scrollLeft, top: scroller.scrollTop,
-              height: scroller.scrollHeight - co, width: scroller.scrollWidth - co,
-              clientHeight: scroller.clientHeight - co, clientWidth: scroller.clientWidth - co};
-    },
-
-    scrollIntoView: operation(null, function(pos, margin) {
-      if (typeof pos == "number") pos = Pos(pos, 0);
-      if (!margin) margin = 0;
-      var coords = pos;
-
-      if (!pos || pos.line != null) {
-        this.curOp.scrollToPos = pos ? clipPos(this.doc, pos) : this.doc.sel.head;
-        this.curOp.scrollToPosMargin = margin;
-        coords = cursorCoords(this, this.curOp.scrollToPos);
-      }
-      var sPos = calculateScrollPos(this, coords.left, coords.top - margin, coords.right, coords.bottom + margin);
-      updateScrollPos(this, sPos.scrollLeft, sPos.scrollTop);
-    }),
-
-    setSize: operation(null, function(width, height) {
-      function interpret(val) {
-        return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val;
-      }
-      if (width != null) this.display.wrapper.style.width = interpret(width);
-      if (height != null) this.display.wrapper.style.height = interpret(height);
-      if (this.options.lineWrapping)
-        this.display.measureLineCache.length = this.display.measureLineCachePos = 0;
-      this.curOp.forceUpdate = true;
-    }),
-
-    operation: function(f){return runInOp(this, f);},
-
-    refresh: operation(null, function() {
-      clearCaches(this);
-      updateScrollPos(this, this.doc.scrollLeft, this.doc.scrollTop);
-      regChange(this);
-    }),
-
-    swapDoc: operation(null, function(doc) {
-      var old = this.doc;
-      old.cm = null;
-      attachDoc(this, doc);
-      clearCaches(this);
-      resetInput(this, true);
-      updateScrollPos(this, doc.scrollLeft, doc.scrollTop);
-      return old;
-    }),
-
-    getInputField: function(){return this.display.input;},
-    getWrapperElement: function(){return this.display.wrapper;},
-    getScrollerElement: function(){return this.display.scroller;},
-    getGutterElement: function(){return this.display.gutters;}
-  };
-  eventMixin(CodeMirror);
-
-  // OPTION DEFAULTS
-
-  var optionHandlers = CodeMirror.optionHandlers = {};
-
-  // The default configuration options.
-  var defaults = CodeMirror.defaults = {};
-
-  function option(name, deflt, handle, notOnInit) {
-    CodeMirror.defaults[name] = deflt;
-    if (handle) optionHandlers[name] =
-      notOnInit ? function(cm, val, old) {if (old != Init) handle(cm, val, old);} : handle;
-  }
-
-  var Init = CodeMirror.Init = {toString: function(){return "CodeMirror.Init";}};
-
-  // These two are, on init, called from the constructor because they
-  // have to be initialized before the editor can start at all.
-  option("value", "", function(cm, val) {
-    cm.setValue(val);
-  }, true);
-  option("mode", null, function(cm, val) {
-    cm.doc.modeOption = val;
-    loadMode(cm);
-  }, true);
-
-  option("indentUnit", 2, loadMode, true);
-  option("indentWithTabs", false);
-  option("smartIndent", true);
-  option("tabSize", 4, function(cm) {
-    loadMode(cm);
-    clearCaches(cm);
-    regChange(cm);
-  }, true);
-  option("electricChars", true);
-  option("rtlMoveVisually", !windows);
-
-  option("theme", "default", function(cm) {
-    themeChanged(cm);
-    guttersChanged(cm);
-  }, true);
-  option("keyMap", "default", keyMapChanged);
-  option("extraKeys", null);
-
-  option("onKeyEvent", null);
-  option("onDragEvent", null);
-
-  option("lineWrapping", false, wrappingChanged, true);
-  option("gutters", [], function(cm) {
-    setGuttersForLineNumbers(cm.options);
-    guttersChanged(cm);
-  }, true);
-  option("fixedGutter", true, function(cm, val) {
-    cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0";
-    cm.refresh();
-  }, true);
-  option("coverGutterNextToScrollbar", false, updateScrollbars, true);
-  option("lineNumbers", false, function(cm) {
-    setGuttersForLineNumbers(cm.options);
-    guttersChanged(cm);
-  }, true);
-  option("firstLineNumber", 1, guttersChanged, true);
-  option("lineNumberFormatter", function(integer) {return integer;}, guttersChanged, true);
-  option("showCursorWhenSelecting", false, updateSelection, true);
-
-  option("readOnly", false, function(cm, val) {
-    if (val == "nocursor") {onBlur(cm); cm.display.input.blur();}
-    else if (!val) resetInput(cm, true);
-  });
-  option("dragDrop", true);
-
-  option("cursorBlinkRate", 530);
-  option("cursorScrollMargin", 0);
-  option("cursorHeight", 1);
-  option("workTime", 100);
-  option("workDelay", 100);
-  option("flattenSpans", true);
-  option("pollInterval", 100);
-  option("undoDepth", 40, function(cm, val){cm.doc.history.undoDepth = val;});
-  option("historyEventDelay", 500);
-  option("viewportMargin", 10, function(cm){cm.refresh();}, true);
-  option("maxHighlightLength", 10000, function(cm){loadMode(cm); cm.refresh();}, true);
-  option("moveInputWithCursor", true, function(cm, val) {
-    if (!val) cm.display.inputDiv.style.top = cm.display.inputDiv.style.left = 0;
-  });
-
-  option("tabindex", null, function(cm, val) {
-    cm.display.input.tabIndex = val || "";
-  });
-  option("autofocus", null);
-
-  // MODE DEFINITION AND QUERYING
-
-  // Known modes, by name and by MIME
-  var modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {};
-
-  CodeMirror.defineMode = function(name, mode) {
-    if (!CodeMirror.defaults.mode && name != "null") CodeMirror.defaults.mode = name;
-    if (arguments.length > 2) {
-      mode.dependencies = [];
-      for (var i = 2; i < arguments.length; ++i) mode.dependencies.push(arguments[i]);
-    }
-    modes[name] = mode;
-  };
-
-  CodeMirror.defineMIME = function(mime, spec) {
-    mimeModes[mime] = spec;
-  };
-
-  CodeMirror.resolveMode = function(spec) {
-    if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) {
-      spec = mimeModes[spec];
-    } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) {
-      var found = mimeModes[spec.name];
-      spec = createObj(found, spec);
-      spec.name = found.name;
-    } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) {
-      return CodeMirror.resolveMode("application/xml");
-    }
-    if (typeof spec == "string") return {name: spec};
-    else return spec || {name: "null"};
-  };
-
-  CodeMirror.getMode = function(options, spec) {
-    var spec = CodeMirror.resolveMode(spec);
-    var mfactory = modes[spec.name];
-    if (!mfactory) return CodeMirror.getMode(options, "text/plain");
-    var modeObj = mfactory(options, spec);
-    if (modeExtensions.hasOwnProperty(spec.name)) {
-      var exts = modeExtensions[spec.name];
-      for (var prop in exts) {
-        if (!exts.hasOwnProperty(prop)) continue;
-        if (modeObj.hasOwnProperty(prop)) modeObj["_" + prop] = modeObj[prop];
-        modeObj[prop] = exts[prop];
-      }
-    }
-    modeObj.name = spec.name;
-
-    return modeObj;
-  };
-
-  CodeMirror.defineMode("null", function() {
-    return {token: function(stream) {stream.skipToEnd();}};
-  });
-  CodeMirror.defineMIME("text/plain", "null");
-
-  var modeExtensions = CodeMirror.modeExtensions = {};
-  CodeMirror.extendMode = function(mode, properties) {
-    var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});
-    copyObj(properties, exts);
-  };
-
-  // EXTENSIONS
-
-  CodeMirror.defineExtension = function(name, func) {
-    CodeMirror.prototype[name] = func;
-  };
-  CodeMirror.defineDocExtension = function(name, func) {
-    Doc.prototype[name] = func;
-  };
-  CodeMirror.defineOption = option;
-
-  var initHooks = [];
-  CodeMirror.defineInitHook = function(f) {initHooks.push(f);};
-
-  var helpers = CodeMirror.helpers = {};
-  CodeMirror.registerHelper = function(type, name, value) {
-    if (!helpers.hasOwnProperty(type)) helpers[type] = CodeMirror[type] = {};
-    helpers[type][name] = value;
-  };
-
-  // UTILITIES
-
-  CodeMirror.isWordChar = isWordChar;
-
-  // MODE STATE HANDLING
-
-  // Utility functions for working with state. Exported because modes
-  // sometimes need to do this.
-  function copyState(mode, state) {
-    if (state === true) return state;
-    if (mode.copyState) return mode.copyState(state);
-    var nstate = {};
-    for (var n in state) {
-      var val = state[n];
-      if (val instanceof Array) val = val.concat([]);
-      nstate[n] = val;
-    }
-    return nstate;
-  }
-  CodeMirror.copyState = copyState;
-
-  function startState(mode, a1, a2) {
-    return mode.startState ? mode.startState(a1, a2) : true;
-  }
-  CodeMirror.startState = startState;
-
-  CodeMirror.innerMode = function(mode, state) {
-    while (mode.innerMode) {
-      var info = mode.innerMode(state);
-      if (!info || info.mode == mode) break;
-      state = info.state;
-      mode = info.mode;
-    }
-    return info || {mode: mode, state: state};
-  };
-
-  // STANDARD COMMANDS
-
-  var commands = CodeMirror.commands = {
-    selectAll: function(cm) {cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()));},
-    killLine: function(cm) {
-      var from = cm.getCursor(true), to = cm.getCursor(false), sel = !posEq(from, to);
-      if (!sel && cm.getLine(from.line).length == from.ch)
-        cm.replaceRange("", from, Pos(from.line + 1, 0), "+delete");
-      else cm.replaceRange("", from, sel ? to : Pos(from.line), "+delete");
-    },
-    deleteLine: function(cm) {
-      var l = cm.getCursor().line;
-      cm.replaceRange("", Pos(l, 0), Pos(l), "+delete");
-    },
-    delLineLeft: function(cm) {
-      var cur = cm.getCursor();
-      cm.replaceRange("", Pos(cur.line, 0), cur, "+delete");
-    },
-    undo: function(cm) {cm.undo();},
-    redo: function(cm) {cm.redo();},
-    goDocStart: function(cm) {cm.extendSelection(Pos(cm.firstLine(), 0));},
-    goDocEnd: function(cm) {cm.extendSelection(Pos(cm.lastLine()));},
-    goLineStart: function(cm) {
-      cm.extendSelection(lineStart(cm, cm.getCursor().line));
-    },
-    goLineStartSmart: function(cm) {
-      var cur = cm.getCursor(), start = lineStart(cm, cur.line);
-      var line = cm.getLineHandle(start.line);
-      var order = getOrder(line);
-      if (!order || order[0].level == 0) {
-        var firstNonWS = Math.max(0, line.text.search(/\S/));
-        var inWS = cur.line == start.line && cur.ch <= firstNonWS && cur.ch;
-        cm.extendSelection(Pos(start.line, inWS ? 0 : firstNonWS));
-      } else cm.extendSelection(start);
-    },
-    goLineEnd: function(cm) {
-      cm.extendSelection(lineEnd(cm, cm.getCursor().line));
-    },
-    goLineRight: function(cm) {
-      var top = cm.charCoords(cm.getCursor(), "div").top + 5;
-      cm.extendSelection(cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div"));
-    },
-    goLineLeft: function(cm) {
-      var top = cm.charCoords(cm.getCursor(), "div").top + 5;
-      cm.extendSelection(cm.coordsChar({left: 0, top: top}, "div"));
-    },
-    goLineUp: function(cm) {cm.moveV(-1, "line");},
-    goLineDown: function(cm) {cm.moveV(1, "line");},
-    goPageUp: function(cm) {cm.moveV(-1, "page");},
-    goPageDown: function(cm) {cm.moveV(1, "page");},
-    goCharLeft: function(cm) {cm.moveH(-1, "char");},
-    goCharRight: function(cm) {cm.moveH(1, "char");},
-    goColumnLeft: function(cm) {cm.moveH(-1, "column");},
-    goColumnRight: function(cm) {cm.moveH(1, "column");},
-    goWordLeft: function(cm) {cm.moveH(-1, "word");},
-    goGroupRight: function(cm) {cm.moveH(1, "group");},
-    goGroupLeft: function(cm) {cm.moveH(-1, "group");},
-    goWordRight: function(cm) {cm.moveH(1, "word");},
-    delCharBefore: function(cm) {cm.deleteH(-1, "char");},
-    delCharAfter: function(cm) {cm.deleteH(1, "char");},
-    delWordBefore: function(cm) {cm.deleteH(-1, "word");},
-    delWordAfter: function(cm) {cm.deleteH(1, "word");},
-    delGroupBefore: function(cm) {cm.deleteH(-1, "group");},
-    delGroupAfter: function(cm) {cm.deleteH(1, "group");},
-    indentAuto: function(cm) {cm.indentSelection("smart");},
-    indentMore: function(cm) {cm.indentSelection("add");},
-    indentLess: function(cm) {cm.indentSelection("subtract");},
-    insertTab: function(cm) {cm.replaceSelection("\t", "end", "+input");},
-    defaultTab: function(cm) {
-      if (cm.somethingSelected()) cm.indentSelection("add");
-      else cm.replaceSelection("\t", "end", "+input");
-    },
-    transposeChars: function(cm) {
-      var cur = cm.getCursor(), line = cm.getLine(cur.line);
-      if (cur.ch > 0 && cur.ch < line.length - 1)
-        cm.replaceRange(line.charAt(cur.ch) + line.charAt(cur.ch - 1),
-                        Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1));
-    },
-    newlineAndIndent: function(cm) {
-      operation(cm, function() {
-        cm.replaceSelection("\n", "end", "+input");
-        cm.indentLine(cm.getCursor().line, null, true);
-      })();
-    },
-    toggleOverwrite: function(cm) {cm.toggleOverwrite();}
-  };
-
-  // STANDARD KEYMAPS
-
-  var keyMap = CodeMirror.keyMap = {};
-  keyMap.basic = {
-    "Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown",
-    "End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown",
-    "Delete": "delCharAfter", "Backspace": "delCharBefore", "Tab": "defaultTab", "Shift-Tab": "indentAuto",
-    "Enter": "newlineAndIndent", "Insert": "toggleOverwrite"
-  };
-  // Note that the save and find-related commands aren't defined by
-  // default. Unknown commands are simply ignored.
-  keyMap.pcDefault = {
-    "Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo",
-    "Ctrl-Home": "goDocStart", "Alt-Up": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Down": "goDocEnd",
-    "Ctrl-Left": "goGroupLeft", "Ctrl-Right": "goGroupRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd",
-    "Ctrl-Backspace": "delGroupBefore", "Ctrl-Delete": "delGroupAfter", "Ctrl-S": "save", "Ctrl-F": "find",
-    "Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll",
-    "Ctrl-[": "indentLess", "Ctrl-]": "indentMore",
-    fallthrough: "basic"
-  };
-  keyMap.macDefault = {
-    "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo",
-    "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft",
-    "Alt-Right": "goGroupRight", "Cmd-Left": "goLineStart", "Cmd-Right": "goLineEnd", "Alt-Backspace": "delGroupBefore",
-    "Ctrl-Alt-Backspace": "delGroupAfter", "Alt-Delete": "delGroupAfter", "Cmd-S": "save", "Cmd-F": "find",
-    "Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll",
-    "Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delLineLeft",
-    fallthrough: ["basic", "emacsy"]
-  };
-  keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault;
-  keyMap.emacsy = {
-    "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown",
-    "Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd",
-    "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore",
-    "Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars"
-  };
-
-  // KEYMAP DISPATCH
-
-  function getKeyMap(val) {
-    if (typeof val == "string") return keyMap[val];
-    else return val;
-  }
-
-  function lookupKey(name, maps, handle) {
-    function lookup(map) {
-      map = getKeyMap(map);
-      var found = map[name];
-      if (found === false) return "stop";
-      if (found != null && handle(found)) return true;
-      if (map.nofallthrough) return "stop";
-
-      var fallthrough = map.fallthrough;
-      if (fallthrough == null) return false;
-      if (Object.prototype.toString.call(fallthrough) != "[object Array]")
-        return lookup(fallthrough);
-      for (var i = 0, e = fallthrough.length; i < e; ++i) {
-        var done = lookup(fallthrough[i]);
-        if (done) return done;
-      }
-      return false;
-    }
-
-    for (var i = 0; i < maps.length; ++i) {
-      var done = lookup(maps[i]);
-      if (done) return done != "stop";
-    }
-  }
-  function isModifierKey(event) {
-    var name = keyNames[event.keyCode];
-    return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod";
-  }
-  function keyName(event, noShift) {
-    if (opera && event.keyCode == 34 && event["char"]) return false;
-    var name = keyNames[event.keyCode];
-    if (name == null || event.altGraphKey) return false;
-    if (event.altKey) name = "Alt-" + name;
-    if (flipCtrlCmd ? event.metaKey : event.ctrlKey) name = "Ctrl-" + name;
-    if (flipCtrlCmd ? event.ctrlKey : event.metaKey) name = "Cmd-" + name;
-    if (!noShift && event.shiftKey) name = "Shift-" + name;
-    return name;
-  }
-  CodeMirror.lookupKey = lookupKey;
-  CodeMirror.isModifierKey = isModifierKey;
-  CodeMirror.keyName = keyName;
-
-  // FROMTEXTAREA
-
-  CodeMirror.fromTextArea = function(textarea, options) {
-    if (!options) options = {};
-    options.value = textarea.value;
-    if (!options.tabindex && textarea.tabindex)
-      options.tabindex = textarea.tabindex;
-    if (!options.placeholder && textarea.placeholder)
-      options.placeholder = textarea.placeholder;
-    // Set autofocus to true if this textarea is focused, or if it has
-    // autofocus and no other element is focused.
-    if (options.autofocus == null) {
-      var hasFocus = document.body;
-      // doc.activeElement occasionally throws on IE
-      try { hasFocus = document.activeElement; } catch(e) {}
-      options.autofocus = hasFocus == textarea ||
-        textarea.getAttribute("autofocus") != null && hasFocus == document.body;
-    }
-
-    function save() {textarea.value = cm.getValue();}
-    if (textarea.form) {
-      on(textarea.form, "submit", save);
-      // Deplorable hack to make the submit method do the right thing.
-      if (!options.leaveSubmitMethodAlone) {
-        var form = textarea.form, realSubmit = form.submit;
-        try {
-          var wrappedSubmit = form.submit = function() {
-            save();
-            form.submit = realSubmit;
-            form.submit();
-            form.submit = wrappedSubmit;
-          };
-        } catch(e) {}
-      }
-    }
-
-    textarea.style.display = "none";
-    var cm = CodeMirror(function(node) {
-      textarea.parentNode.insertBefore(node, textarea.nextSibling);
-    }, options);
-    cm.save = save;
-    cm.getTextArea = function() { return textarea; };
-    cm.toTextArea = function() {
-      save();
-      textarea.parentNode.removeChild(cm.getWrapperElement());
-      textarea.style.display = "";
-      if (textarea.form) {
-        off(textarea.form, "submit", save);
-        if (typeof textarea.form.submit == "function")
-          textarea.form.submit = realSubmit;
-      }
-    };
-    return cm;
-  };
-
-  // STRING STREAM
-
-  // Fed to the mode parsers, provides helper functions to make
-  // parsers more succinct.
-
-  // The character stream used by a mode's parser.
-  function StringStream(string, tabSize) {
-    this.pos = this.start = 0;
-    this.string = string;
-    this.tabSize = tabSize || 8;
-    this.lastColumnPos = this.lastColumnValue = 0;
-  }
-
-  StringStream.prototype = {
-    eol: function() {return this.pos >= this.string.length;},
-    sol: function() {return this.pos == 0;},
-    peek: function() {return this.string.charAt(this.pos) || undefined;},
-    next: function() {
-      if (this.pos < this.string.length)
-        return this.string.charAt(this.pos++);
-    },
-    eat: function(match) {
-      var ch = this.string.charAt(this.pos);
-      if (typeof match == "string") var ok = ch == match;
-      else var ok = ch && (match.test ? match.test(ch) : match(ch));
-      if (ok) {++this.pos; return ch;}
-    },
-    eatWhile: function(match) {
-      var start = this.pos;
-      while (this.eat(match)){}
-      return this.pos > start;
-    },
-    eatSpace: function() {
-      var start = this.pos;
-      while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos;
-      return this.pos > start;
-    },
-    skipToEnd: function() {this.pos = this.string.length;},
-    skipTo: function(ch) {
-      var found = this.string.indexOf(ch, this.pos);
-      if (found > -1) {this.pos = found; return true;}
-    },
-    backUp: function(n) {this.pos -= n;},
-    column: function() {
-      if (this.lastColumnPos < this.start) {
-        this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);
-        this.lastColumnPos = this.start;
-      }
-      return this.lastColumnValue;
-    },
-    indentation: function() {return countColumn(this.string, null, this.tabSize);},
-    match: function(pattern, consume, caseInsensitive) {
-      if (typeof pattern == "string") {
-        var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;};
-        var substr = this.string.substr(this.pos, pattern.length);
-        if (cased(substr) == cased(pattern)) {
-          if (consume !== false) this.pos += pattern.length;
-          return true;
-        }
-      } else {
-        var match = this.string.slice(this.pos).match(pattern);
-        if (match && match.index > 0) return null;
-        if (match && consume !== false) this.pos += match[0].length;
-        return match;
-      }
-    },
-    current: function(){return this.string.slice(this.start, this.pos);}
-  };
-  CodeMirror.StringStream = StringStream;
-
-  // TEXTMARKERS
-
-  function TextMarker(doc, type) {
-    this.lines = [];
-    this.type = type;
-    this.doc = doc;
-  }
-  CodeMirror.TextMarker = TextMarker;
-  eventMixin(TextMarker);
-
-  TextMarker.prototype.clear = function() {
-    if (this.explicitlyCleared) return;
-    var cm = this.doc.cm, withOp = cm && !cm.curOp;
-    if (withOp) startOperation(cm);
-    if (hasHandler(this, "clear")) {
-      var found = this.find();
-      if (found) signalLater(this, "clear", found.from, found.to);
-    }
-    var min = null, max = null;
-    for (var i = 0; i < this.lines.length; ++i) {
-      var line = this.lines[i];
-      var span = getMarkedSpanFor(line.markedSpans, this);
-      if (span.to != null) max = lineNo(line);
-      line.markedSpans = removeMarkedSpan(line.markedSpans, span);
-      if (span.from != null)
-        min = lineNo(line);
-      else if (this.collapsed && !lineIsHidden(this.doc, line) && cm)
-        updateLineHeight(line, textHeight(cm.display));
-    }
-    if (cm && this.collapsed && !cm.options.lineWrapping) for (var i = 0; i < this.lines.length; ++i) {
-      var visual = visualLine(cm.doc, this.lines[i]), len = lineLength(cm.doc, visual);
-      if (len > cm.display.maxLineLength) {
-        cm.display.maxLine = visual;
-        cm.display.maxLineLength = len;
-        cm.display.maxLineChanged = true;
-      }
-    }
-
-    if (min != null && cm) regChange(cm, min, max + 1);
-    this.lines.length = 0;
-    this.explicitlyCleared = true;
-    if (this.atomic && this.doc.cantEdit) {
-      this.doc.cantEdit = false;
-      if (cm) reCheckSelection(cm);
-    }
-    if (withOp) endOperation(cm);
-  };
-
-  TextMarker.prototype.find = function() {
-    var from, to;
-    for (var i = 0; i < this.lines.length; ++i) {
-      var line = this.lines[i];
-      var span = getMarkedSpanFor(line.markedSpans, this);
-      if (span.from != null || span.to != null) {
-        var found = lineNo(line);
-        if (span.from != null) from = Pos(found, span.from);
-        if (span.to != null) to = Pos(found, span.to);
-      }
-    }
-    if (this.type == "bookmark") return from;
-    return from && {from: from, to: to};
-  };
-
-  TextMarker.prototype.changed = function() {
-    var pos = this.find(), cm = this.doc.cm;
-    if (!pos || !cm) return;
-    var line = getLine(this.doc, pos.from.line);
-    clearCachedMeasurement(cm, line);
-    if (pos.from.line >= cm.display.showingFrom && pos.from.line < cm.display.showingTo) {
-      for (var node = cm.display.lineDiv.firstChild; node; node = node.nextSibling) if (node.lineObj == line) {
-        if (node.offsetHeight != line.height) updateLineHeight(line, node.offsetHeight);
-        break;
-      }
-      runInOp(cm, function() {
-        cm.curOp.selectionChanged = cm.curOp.forceUpdate = cm.curOp.updateMaxLine = true;
-      });
-    }
-  };
-
-  TextMarker.prototype.attachLine = function(line) {
-    if (!this.lines.length && this.doc.cm) {
-      var op = this.doc.cm.curOp;
-      if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)
-        (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this);
-    }
-    this.lines.push(line);
-  };
-  TextMarker.prototype.detachLine = function(line) {
-    this.lines.splice(indexOf(this.lines, line), 1);
-    if (!this.lines.length && this.doc.cm) {
-      var op = this.doc.cm.curOp;
-      (op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);
-    }
-  };
-
-  function markText(doc, from, to, options, type) {
-    if (options && options.shared) return markTextShared(doc, from, to, options, type);
-    if (doc.cm && !doc.cm.curOp) return operation(doc.cm, markText)(doc, from, to, options, type);
-
-    var marker = new TextMarker(doc, type);
-    if (type == "range" && !posLess(from, to)) return marker;
-    if (options) copyObj(options, marker);
-    if (marker.replacedWith) {
-      marker.collapsed = true;
-      marker.replacedWith = elt("span", [marker.replacedWith], "CodeMirror-widget");
-      if (!options.handleMouseEvents) marker.replacedWith.ignoreEvents = true;
-    }
-    if (marker.collapsed) sawCollapsedSpans = true;
-
-    if (marker.addToHistory)
-      addToHistory(doc, {from: from, to: to, origin: "markText"},
-                   {head: doc.sel.head, anchor: doc.sel.anchor}, NaN);
-
-    var curLine = from.line, size = 0, collapsedAtStart, collapsedAtEnd, cm = doc.cm, updateMaxLine;
-    doc.iter(curLine, to.line + 1, function(line) {
-      if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(doc, line) == cm.display.maxLine)
-        updateMaxLine = true;
-      var span = {from: null, to: null, marker: marker};
-      size += line.text.length;
-      if (curLine == from.line) {span.from = from.ch; size -= from.ch;}
-      if (curLine == to.line) {span.to = to.ch; size -= line.text.length - to.ch;}
-      if (marker.collapsed) {
-        if (curLine == to.line) collapsedAtEnd = collapsedSpanAt(line, to.ch);
-        if (curLine == from.line) collapsedAtStart = collapsedSpanAt(line, from.ch);
-        else updateLineHeight(line, 0);
-      }
-      addMarkedSpan(line, span);
-      ++curLine;
-    });
-    if (marker.collapsed) doc.iter(from.line, to.line + 1, function(line) {
-      if (lineIsHidden(doc, line)) updateLineHeight(line, 0);
-    });
-
-    if (marker.clearOnEnter) on(marker, "beforeCursorEnter", function() { marker.clear(); });
-
-    if (marker.readOnly) {
-      sawReadOnlySpans = true;
-      if (doc.history.done.length || doc.history.undone.length)
-        doc.clearHistory();
-    }
-    if (marker.collapsed) {
-      if (collapsedAtStart != collapsedAtEnd)
-        throw new Error("Inserting collapsed marker overlapping an existing one");
-      marker.size = size;
-      marker.atomic = true;
-    }
-    if (cm) {
-      if (updateMaxLine) cm.curOp.updateMaxLine = true;
-      if (marker.className || marker.title || marker.startStyle || marker.endStyle || marker.collapsed)
-        regChange(cm, from.line, to.line + 1);
-      if (marker.atomic) reCheckSelection(cm);
-    }
-    return marker;
-  }
-
-  // SHARED TEXTMARKERS
-
-  function SharedTextMarker(markers, primary) {
-    this.markers = markers;
-    this.primary = primary;
-    for (var i = 0, me = this; i < markers.length; ++i) {
-      markers[i].parent = this;
-      on(markers[i], "clear", function(){me.clear();});
-    }
-  }
-  CodeMirror.SharedTextMarker = SharedTextMarker;
-  eventMixin(SharedTextMarker);
-
-  SharedTextMarker.prototype.clear = function() {
-    if (this.explicitlyCleared) return;
-    this.explicitlyCleared = true;
-    for (var i = 0; i < this.markers.length; ++i)
-      this.markers[i].clear();
-    signalLater(this, "clear");
-  };
-  SharedTextMarker.prototype.find = function() {
-    return this.primary.find();
-  };
-
-  function markTextShared(doc, from, to, options, type) {
-    options = copyObj(options);
-    options.shared = false;
-    var markers = [markText(doc, from, to, options, type)], primary = markers[0];
-    var widget = options.replacedWith;
-    linkedDocs(doc, function(doc) {
-      if (widget) options.replacedWith = widget.cloneNode(true);
-      markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));
-      for (var i = 0; i < doc.linked.length; ++i)
-        if (doc.linked[i].isParent) return;
-      primary = lst(markers);
-    });
-    return new SharedTextMarker(markers, primary);
-  }
-
-  // TEXTMARKER SPANS
-
-  function getMarkedSpanFor(spans, marker) {
-    if (spans) for (var i = 0; i < spans.length; ++i) {
-      var span = spans[i];
-      if (span.marker == marker) return span;
-    }
-  }
-  function removeMarkedSpan(spans, span) {
-    for (var r, i = 0; i < spans.length; ++i)
-      if (spans[i] != span) (r || (r = [])).push(spans[i]);
-    return r;
-  }
-  function addMarkedSpan(line, span) {
-    line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];
-    span.marker.attachLine(line);
-  }
-
-  function markedSpansBefore(old, startCh, isInsert) {
-    if (old) for (var i = 0, nw; i < old.length; ++i) {
-      var span = old[i], marker = span.marker;
-      var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);
-      if (startsBefore || marker.type == "bookmark" && span.from == startCh && (!isInsert || !span.marker.insertLeft)) {
-        var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh);
-        (nw || (nw = [])).push({from: span.from,
-                                to: endsAfter ? null : span.to,
-                                marker: marker});
-      }
-    }
-    return nw;
-  }
-
-  function markedSpansAfter(old, endCh, isInsert) {
-    if (old) for (var i = 0, nw; i < old.length; ++i) {
-      var span = old[i], marker = span.marker;
-      var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);
-      if (endsAfter || marker.type == "bookmark" && span.from == endCh && (!isInsert || span.marker.insertLeft)) {
-        var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh);
-        (nw || (nw = [])).push({from: startsBefore ? null : span.from - endCh,
-                                to: span.to == null ? null : span.to - endCh,
-                                marker: marker});
-      }
-    }
-    return nw;
-  }
-
-  function stretchSpansOverChange(doc, change) {
-    var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;
-    var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;
-    if (!oldFirst && !oldLast) return null;
-
-    var startCh = change.from.ch, endCh = change.to.ch, isInsert = posEq(change.from, change.to);
-    // Get the spans that 'stick out' on both sides
-    var first = markedSpansBefore(oldFirst, startCh, isInsert);
-    var last = markedSpansAfter(oldLast, endCh, isInsert);
-
-    // Next, merge those two ends
-    var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);
-    if (first) {
-      // Fix up .to properties of first
-      for (var i = 0; i < first.length; ++i) {
-        var span = first[i];
-        if (span.to == null) {
-          var found = getMarkedSpanFor(last, span.marker);
-          if (!found) span.to = startCh;
-          else if (sameLine) span.to = found.to == null ? null : found.to + offset;
-        }
-      }
-    }
-    if (last) {
-      // Fix up .from in last (or move them into first in case of sameLine)
-      for (var i = 0; i < last.length; ++i) {
-        var span = last[i];
-        if (span.to != null) span.to += offset;
-        if (span.from == null) {
-          var found = getMarkedSpanFor(first, span.marker);
-          if (!found) {
-            span.from = offset;
-            if (sameLine) (first || (first = [])).push(span);
-          }
-        } else {
-          span.from += offset;
-          if (sameLine) (first || (first = [])).push(span);
-        }
-      }
-    }
-    if (sameLine && first) {
-      // Make sure we didn't create any zero-length spans
-      for (var i = 0; i < first.length; ++i)
-        if (first[i].from != null && first[i].from == first[i].to && first[i].marker.type != "bookmark")
-          first.splice(i--, 1);
-      if (!first.length) first = null;
-    }
-
-    var newMarkers = [first];
-    if (!sameLine) {
-      // Fill gap with whole-line-spans
-      var gap = change.text.length - 2, gapMarkers;
-      if (gap > 0 && first)
-        for (var i = 0; i < first.length; ++i)
-          if (first[i].to == null)
-            (gapMarkers || (gapMarkers = [])).push({from: null, to: null, marker: first[i].marker});
-      for (var i = 0; i < gap; ++i)
-        newMarkers.push(gapMarkers);
-      newMarkers.push(last);
-    }
-    return newMarkers;
-  }
-
-  function mergeOldSpans(doc, change) {
-    var old = getOldSpans(doc, change);
-    var stretched = stretchSpansOverChange(doc, change);
-    if (!old) return stretched;
-    if (!stretched) return old;
-
-    for (var i = 0; i < old.length; ++i) {
-      var oldCur = old[i], stretchCur = stretched[i];
-      if (oldCur && stretchCur) {
-        spans: for (var j = 0; j < stretchCur.length; ++j) {
-          var span = stretchCur[j];
-          for (var k = 0; k < oldCur.length; ++k)
-            if (oldCur[k].marker == span.marker) continue spans;
-          oldCur.push(span);
-        }
-      } else if (stretchCur) {
-        old[i] = stretchCur;
-      }
-    }
-    return old;
-  }
-
-  function removeReadOnlyRanges(doc, from, to) {
-    var markers = null;
-    doc.iter(from.line, to.line + 1, function(line) {
-      if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {
-        var mark = line.markedSpans[i].marker;
-        if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))
-          (markers || (markers = [])).push(mark);
-      }
-    });
-    if (!markers) return null;
-    var parts = [{from: from, to: to}];
-    for (var i = 0; i < markers.length; ++i) {
-      var mk = markers[i], m = mk.find();
-      for (var j = 0; j < parts.length; ++j) {
-        var p = parts[j];
-        if (posLess(p.to, m.from) || posLess(m.to, p.from)) continue;
-        var newParts = [j, 1];
-        if (posLess(p.from, m.from) || !mk.inclusiveLeft && posEq(p.from, m.from))
-          newParts.push({from: p.from, to: m.from});
-        if (posLess(m.to, p.to) || !mk.inclusiveRight && posEq(p.to, m.to))
-          newParts.push({from: m.to, to: p.to});
-        parts.splice.apply(parts, newParts);
-        j += newParts.length - 1;
-      }
-    }
-    return parts;
-  }
-
-  function collapsedSpanAt(line, ch) {
-    var sps = sawCollapsedSpans && line.markedSpans, found;
-    if (sps) for (var sp, i = 0; i < sps.length; ++i) {
-      sp = sps[i];
-      if (!sp.marker.collapsed) continue;
-      if ((sp.from == null || sp.from < ch) &&
-          (sp.to == null || sp.to > ch) &&
-          (!found || found.width < sp.marker.width))
-        found = sp.marker;
-    }
-    return found;
-  }
-  function collapsedSpanAtStart(line) { return collapsedSpanAt(line, -1); }
-  function collapsedSpanAtEnd(line) { return collapsedSpanAt(line, line.text.length + 1); }
-
-  function visualLine(doc, line) {
-    var merged;
-    while (merged = collapsedSpanAtStart(line))
-      line = getLine(doc, merged.find().from.line);
-    return line;
-  }
-
-  function lineIsHidden(doc, line) {
-    var sps = sawCollapsedSpans && line.markedSpans;
-    if (sps) for (var sp, i = 0; i < sps.length; ++i) {
-      sp = sps[i];
-      if (!sp.marker.collapsed) continue;
-      if (sp.from == null) return true;
-      if (sp.marker.replacedWith) continue;
-      if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))
-        return true;
-    }
-  }
-  function lineIsHiddenInner(doc, line, span) {
-    if (span.to == null) {
-      var end = span.marker.find().to, endLine = getLine(doc, end.line);
-      return lineIsHiddenInner(doc, endLine, getMarkedSpanFor(endLine.markedSpans, span.marker));
-    }
-    if (span.marker.inclusiveRight && span.to == line.text.length)
-      return true;
-    for (var sp, i = 0; i < line.markedSpans.length; ++i) {
-      sp = line.markedSpans[i];
-      if (sp.marker.collapsed && !sp.marker.replacedWith && sp.from == span.to &&
-          (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&
-          lineIsHiddenInner(doc, line, sp)) return true;
-    }
-  }
-
-  function detachMarkedSpans(line) {
-    var spans = line.markedSpans;
-    if (!spans) return;
-    for (var i = 0; i < spans.length; ++i)
-      spans[i].marker.detachLine(line);
-    line.markedSpans = null;
-  }
-
-  function attachMarkedSpans(line, spans) {
-    if (!spans) return;
-    for (var i = 0; i < spans.length; ++i)
-      spans[i].marker.attachLine(line);
-    line.markedSpans = spans;
-  }
-
-  // LINE WIDGETS
-
-  var LineWidget = CodeMirror.LineWidget = function(cm, node, options) {
-    if (options) for (var opt in options) if (options.hasOwnProperty(opt))
-      this[opt] = options[opt];
-    this.cm = cm;
-    this.node = node;
-  };
-  eventMixin(LineWidget);
-  function widgetOperation(f) {
-    return function() {
-      var withOp = !this.cm.curOp;
-      if (withOp) startOperation(this.cm);
-      try {var result = f.apply(this, arguments);}
-      finally {if (withOp) endOperation(this.cm);}
-      return result;
-    };
-  }
-  LineWidget.prototype.clear = widgetOperation(function() {
-    var ws = this.line.widgets, no = lineNo(this.line);
-    if (no == null || !ws) return;
-    for (var i = 0; i < ws.length; ++i) if (ws[i] == this) ws.splice(i--, 1);
-    if (!ws.length) this.line.widgets = null;
-    var aboveVisible = heightAtLine(this.cm, this.line) < this.cm.doc.scrollTop;
-    updateLineHeight(this.line, Math.max(0, this.line.height - widgetHeight(this)));
-    if (aboveVisible) addToScrollPos(this.cm, 0, -this.height);
-    regChange(this.cm, no, no + 1);
-  });
-  LineWidget.prototype.changed = widgetOperation(function() {
-    var oldH = this.height;
-    this.height = null;
-    var diff = widgetHeight(this) - oldH;
-    if (!diff) return;
-    updateLineHeight(this.line, this.line.height + diff);
-    var no = lineNo(this.line);
-    regChange(this.cm, no, no + 1);
-  });
-
-  function widgetHeight(widget) {
-    if (widget.height != null) return widget.height;
-    if (!widget.node.parentNode || widget.node.parentNode.nodeType != 1)
-      removeChildrenAndAdd(widget.cm.display.measure, elt("div", [widget.node], null, "position: relative"));
-    return widget.height = widget.node.offsetHeight;
-  }
-
-  function addLineWidget(cm, handle, node, options) {
-    var widget = new LineWidget(cm, node, options);
-    if (widget.noHScroll) cm.display.alignWidgets = true;
-    changeLine(cm, handle, function(line) {
-      var widgets = line.widgets || (line.widgets = []);
-      if (widget.insertAt == null) widgets.push(widget);
-      else widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget);
-      widget.line = line;
-      if (!lineIsHidden(cm.doc, line) || widget.showIfHidden) {
-        var aboveVisible = heightAtLine(cm, line) < cm.doc.scrollTop;
-        updateLineHeight(line, line.height + widgetHeight(widget));
-        if (aboveVisible) addToScrollPos(cm, 0, widget.height);
-      }
-      return true;
-    });
-    return widget;
-  }
-
-  // LINE DATA STRUCTURE
-
-  // Line objects. These hold state related to a line, including
-  // highlighting info (the styles array).
-  var Line = CodeMirror.Line = function(text, markedSpans, estimateHeight) {
-    this.text = text;
-    attachMarkedSpans(this, markedSpans);
-    this.height = estimateHeight ? estimateHeight(this) : 1;
-  };
-  eventMixin(Line);
-
-  function updateLine(line, text, markedSpans, estimateHeight) {
-    line.text = text;
-    if (line.stateAfter) line.stateAfter = null;
-    if (line.styles) line.styles = null;
-    if (line.order != null) line.order = null;
-    detachMarkedSpans(line);
-    attachMarkedSpans(line, markedSpans);
-    var estHeight = estimateHeight ? estimateHeight(line) : 1;
-    if (estHeight != line.height) updateLineHeight(line, estHeight);
-  }
-
-  function cleanUpLine(line) {
-    line.parent = null;
-    detachMarkedSpans(line);
-  }
-
-  // Run the given mode's parser over a line, update the styles
-  // array, which contains alternating fragments of text and CSS
-  // classes.
-  function runMode(cm, text, mode, state, f) {
-    var flattenSpans = mode.flattenSpans;
-    if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;
-    var curStart = 0, curStyle = null;
-    var stream = new StringStream(text, cm.options.tabSize), style;
-    if (text == "" && mode.blankLine) mode.blankLine(state);
-    while (!stream.eol()) {
-      if (stream.pos > cm.options.maxHighlightLength) {
-        flattenSpans = false;
-        // Webkit seems to refuse to render text nodes longer than 57444 characters
-        stream.pos = Math.min(text.length, stream.start + 50000);
-        style = null;
-      } else {
-        style = mode.token(stream, state);
-      }
-      if (!flattenSpans || curStyle != style) {
-        if (curStart < stream.start) f(stream.start, curStyle);
-        curStart = stream.start; curStyle = style;
-      }
-      stream.start = stream.pos;
-    }
-    if (curStart < stream.pos) f(stream.pos, curStyle);
-  }
-
-  function highlightLine(cm, line, state) {
-    // A styles array always starts with a number identifying the
-    // mode/overlays that it is based on (for easy invalidation).
-    var st = [cm.state.modeGen];
-    // Compute the base array of styles
-    runMode(cm, line.text, cm.doc.mode, state, function(end, style) {st.push(end, style);});
-
-    // Run overlays, adjust style array.
-    for (var o = 0; o < cm.state.overlays.length; ++o) {
-      var overlay = cm.state.overlays[o], i = 1, at = 0;
-      runMode(cm, line.text, overlay.mode, true, function(end, style) {
-        var start = i;
-        // Ensure there's a token end at the current position, and that i points at it
-        while (at < end) {
-          var i_end = st[i];
-          if (i_end > end)
-            st.splice(i, 1, end, st[i+1], i_end);
-          i += 2;
-          at = Math.min(end, i_end);
-        }
-        if (!style) return;
-        if (overlay.opaque) {
-          st.splice(start, i - start, end, style);
-          i = start + 2;
-        } else {
-          for (; start < i; start += 2) {
-            var cur = st[start+1];
-            st[start+1] = cur ? cur + " " + style : style;
-          }
-        }
-      });
-    }
-
-    return st;
-  }
-
-  function getLineStyles(cm, line) {
-    if (!line.styles || line.styles[0] != cm.state.modeGen)
-      line.styles = highlightLine(cm, line, line.stateAfter = getStateBefore(cm, lineNo(line)));
-    return line.styles;
-  }
-
-  // Lightweight form of highlight -- proceed over this line and
-  // update state, but don't save a style array.
-  function processLine(cm, line, state) {
-    var mode = cm.doc.mode;
-    var stream = new StringStream(line.text, cm.options.tabSize);
-    if (line.text == "" && mode.blankLine) mode.blankLine(state);
-    while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) {
-      mode.token(stream, state);
-      stream.start = stream.pos;
-    }
-  }
-
-  var styleToClassCache = {};
-  function styleToClass(style) {
-    if (!style) return null;
-    return styleToClassCache[style] ||
-      (styleToClassCache[style] = "cm-" + style.replace(/ +/g, " cm-"));
-  }
-
-  function lineContent(cm, realLine, measure, copyWidgets) {
-    var merged, line = realLine, empty = true;
-    while (merged = collapsedSpanAtStart(line))
-      line = getLine(cm.doc, merged.find().from.line);
-
-    var builder = {pre: elt("pre"), col: 0, pos: 0,
-                   measure: null, measuredSomething: false, cm: cm,
-                   copyWidgets: copyWidgets};
-    if (line.textClass) builder.pre.className = line.textClass;
-
-    do {
-      if (line.text) empty = false;
-      builder.measure = line == realLine && measure;
-      builder.pos = 0;
-      builder.addToken = builder.measure ? buildTokenMeasure : buildToken;
-      if ((ie || webkit) && cm.getOption("lineWrapping"))
-        builder.addToken = buildTokenSplitSpaces(builder.addToken);
-      var next = insertLineContent(line, builder, getLineStyles(cm, line));
-      if (measure && line == realLine && !builder.measuredSomething) {
-        measure[0] = builder.pre.appendChild(zeroWidthElement(cm.display.measure));
-        builder.measuredSomething = true;
-      }
-      if (next) line = getLine(cm.doc, next.to.line);
-    } while (next);
-
-    if (measure && !builder.measuredSomething && !measure[0])
-      measure[0] = builder.pre.appendChild(empty ? elt("span", "\u00a0") : zeroWidthElement(cm.display.measure));
-    if (!builder.pre.firstChild && !lineIsHidden(cm.doc, realLine))
-      builder.pre.appendChild(document.createTextNode("\u00a0"));
-
-    var order;
-    // Work around problem with the reported dimensions of single-char
-    // direction spans on IE (issue #1129). See also the comment in
-    // cursorCoords.
-    if (measure && ie && (order = getOrder(line))) {
-      var l = order.length - 1;
-      if (order[l].from == order[l].to) --l;
-      var last = order[l], prev = order[l - 1];
-      if (last.from + 1 == last.to && prev && last.level < prev.level) {
-        var span = measure[builder.pos - 1];
-        if (span) span.parentNode.insertBefore(span.measureRight = zeroWidthElement(cm.display.measure),
-                                               span.nextSibling);
-      }
-    }
-
-    signal(cm, "renderLine", cm, realLine, builder.pre);
-    return builder.pre;
-  }
-
-  var tokenSpecialChars = /[\t\u0000-\u0019\u00ad\u200b\u2028\u2029\uFEFF]/g;
-  function buildToken(builder, text, style, startStyle, endStyle, title) {
-    if (!text) return;
-    if (!tokenSpecialChars.test(text)) {
-      builder.col += text.length;
-      var content = document.createTextNode(text);
-    } else {
-      var content = document.createDocumentFragment(), pos = 0;
-      while (true) {
-        tokenSpecialChars.lastIndex = pos;
-        var m = tokenSpecialChars.exec(text);
-        var skipped = m ? m.index - pos : text.length - pos;
-        if (skipped) {
-          content.appendChild(document.createTextNode(text.slice(pos, pos + skipped)));
-          builder.col += skipped;
-        }
-        if (!m) break;
-        pos += skipped + 1;
-        if (m[0] == "\t") {
-          var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;
-          content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab"));
-          builder.col += tabWidth;
-        } else {
-          var token = elt("span", "\u2022", "cm-invalidchar");
-          token.title = "\\u" + m[0].charCodeAt(0).toString(16);
-          content.appendChild(token);
-          builder.col += 1;
-        }
-      }
-    }
-    if (style || startStyle || endStyle || builder.measure) {
-      var fullStyle = style || "";
-      if (startStyle) fullStyle += startStyle;
-      if (endStyle) fullStyle += endStyle;
-      var token = elt("span", [content], fullStyle);
-      if (title) token.title = title;
-      return builder.pre.appendChild(token);
-    }
-    builder.pre.appendChild(content);
-  }
-
-  function buildTokenMeasure(builder, text, style, startStyle, endStyle) {
-    var wrapping = builder.cm.options.lineWrapping;
-    for (var i = 0; i < text.length; ++i) {
-      var ch = text.charAt(i), start = i == 0;
-      if (ch >= "\ud800" && ch < "\udbff" && i < text.length - 1) {
-        ch = text.slice(i, i + 2);
-        ++i;
-      } else if (i && wrapping && spanAffectsWrapping(text, i)) {
-        builder.pre.appendChild(elt("wbr"));
-      }
-      var old = builder.measure[builder.pos];
-      var span = builder.measure[builder.pos] =
-        buildToken(builder, ch, style,
-                   start && startStyle, i == text.length - 1 && endStyle);
-      if (old) span.leftSide = old.leftSide || old;
-      // In IE single-space nodes wrap differently than spaces
-      // embedded in larger text nodes, except when set to
-      // white-space: normal (issue #1268).
-      if (ie && wrapping && ch == " " && i && !/\s/.test(text.charAt(i - 1)) &&
-          i < text.length - 1 && !/\s/.test(text.charAt(i + 1)))
-        span.style.whiteSpace = "normal";
-      builder.pos += ch.length;
-    }
-    if (text.length) builder.measuredSomething = true;
-  }
-
-  function buildTokenSplitSpaces(inner) {
-    function split(old) {
-      var out = " ";
-      for (var i = 0; i < old.length - 2; ++i) out += i % 2 ? " " : "\u00a0";
-      out += " ";
-      return out;
-    }
-    return function(builder, text, style, startStyle, endStyle, title) {
-      return inner(builder, text.replace(/ {3,}/, split), style, startStyle, endStyle, title);
-    };
-  }
-
-  function buildCollapsedSpan(builder, size, marker, ignoreWidget) {
-    var widget = !ignoreWidget && marker.replacedWith;
-    if (widget) {
-      if (builder.copyWidgets) widget = widget.cloneNode(true);
-      builder.pre.appendChild(widget);
-      if (builder.measure) {
-        if (size) {
-          builder.measure[builder.pos] = widget;
-        } else {
-          var elt = builder.measure[builder.pos] = zeroWidthElement(builder.cm.display.measure);
-          if (marker.type != "bookmark" || marker.insertLeft)
-            builder.pre.insertBefore(elt, widget);
-          else
-            builder.pre.appendChild(elt);
-        }
-        builder.measuredSomething = true;
-      }
-    }
-    builder.pos += size;
-  }
-
-  // Outputs a number of spans to make up a line, taking highlighting
-  // and marked text into account.
-  function insertLineContent(line, builder, styles) {
-    var spans = line.markedSpans, allText = line.text, at = 0;
-    if (!spans) {
-      for (var i = 1; i < styles.length; i+=2)
-        builder.addToken(builder, allText.slice(at, at = styles[i]), styleToClass(styles[i+1]));
-      return;
-    }
-
-    var len = allText.length, pos = 0, i = 1, text = "", style;
-    var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;
-    for (;;) {
-      if (nextChange == pos) { // Update current marker set
-        spanStyle = spanEndStyle = spanStartStyle = title = "";
-        collapsed = null; nextChange = Infinity;
-        var foundBookmark = null;
-        for (var j = 0; j < spans.length; ++j) {
-          var sp = spans[j], m = sp.marker;
-          if (sp.from <= pos && (sp.to == null || sp.to > pos)) {
-            if (sp.to != null && nextChange > sp.to) { nextChange = sp.to; spanEndStyle = ""; }
-            if (m.className) spanStyle += " " + m.className;
-            if (m.startStyle && sp.from == pos) spanStartStyle += " " + m.startStyle;
-            if (m.endStyle && sp.to == nextChange) spanEndStyle += " " + m.endStyle;
-            if (m.title && !title) title = m.title;
-            if (m.collapsed && (!collapsed || collapsed.marker.size < m.size))
-              collapsed = sp;
-          } else if (sp.from > pos && nextChange > sp.from) {
-            nextChange = sp.from;
-          }
-          if (m.type == "bookmark" && sp.from == pos && m.replacedWith) foundBookmark = m;
-        }
-        if (collapsed && (collapsed.from || 0) == pos) {
-          buildCollapsedSpan(builder, (collapsed.to == null ? len : collapsed.to) - pos,
-                             collapsed.marker, collapsed.from == null);
-          if (collapsed.to == null) return collapsed.marker.find();
-        }
-        if (foundBookmark && !collapsed) buildCollapsedSpan(builder, 0, foundBookmark);
-      }
-      if (pos >= len) break;
-
-      var upto = Math.min(len, nextChange);
-      while (true) {
-        if (text) {
-          var end = pos + text.length;
-          if (!collapsed) {
-            var tokenText = end > upto ? text.slice(0, upto - pos) : text;
-            builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,
-                             spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", title);
-          }
-          if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}
-          pos = end;
-          spanStartStyle = "";
-        }
-        text = allText.slice(at, at = styles[i++]);
-        style = styleToClass(styles[i++]);
-      }
-    }
-  }
-
-  // DOCUMENT DATA STRUCTURE
-
-  function updateDoc(doc, change, markedSpans, selAfter, estimateHeight) {
-    function spansFor(n) {return markedSpans ? markedSpans[n] : null;}
-    function update(line, text, spans) {
-      updateLine(line, text, spans, estimateHeight);
-      signalLater(line, "change", line, change);
-    }
-
-    var from = change.from, to = change.to, text = change.text;
-    var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);
-    var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;
-
-    // First adjust the line structure
-    if (from.ch == 0 && to.ch == 0 && lastText == "") {
-      // This is a whole-line replace. Treated specially to make
-      // sure line objects move the way they are supposed to.
-      for (var i = 0, e = text.length - 1, added = []; i < e; ++i)
-        added.push(new Line(text[i], spansFor(i), estimateHeight));
-      update(lastLine, lastLine.text, lastSpans);
-      if (nlines) doc.remove(from.line, nlines);
-      if (added.length) doc.insert(from.line, added);
-    } else if (firstLine == lastLine) {
-      if (text.length == 1) {
-        update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);
-      } else {
-        for (var added = [], i = 1, e = text.length - 1; i < e; ++i)
-          added.push(new Line(text[i], spansFor(i), estimateHeight));
-        added.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight));
-        update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
-        doc.insert(from.line + 1, added);
-      }
-    } else if (text.length == 1) {
-      update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));
-      doc.remove(from.line + 1, nlines);
-    } else {
-      update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
-      update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);
-      for (var i = 1, e = text.length - 1, added = []; i < e; ++i)
-        added.push(new Line(text[i], spansFor(i), estimateHeight));
-      if (nlines > 1) doc.remove(from.line + 1, nlines - 1);
-      doc.insert(from.line + 1, added);
-    }
-
-    signalLater(doc, "change", doc, change);
-    setSelection(doc, selAfter.anchor, selAfter.head, null, true);
-  }
-
-  function LeafChunk(lines) {
-    this.lines = lines;
-    this.parent = null;
-    for (var i = 0, e = lines.length, height = 0; i < e; ++i) {
-      lines[i].parent = this;
-      height += lines[i].height;
-    }
-    this.height = height;
-  }
-
-  LeafChunk.prototype = {
-    chunkSize: function() { return this.lines.length; },
-    removeInner: function(at, n) {
-      for (var i = at, e = at + n; i < e; ++i) {
-        var line = this.lines[i];
-        this.height -= line.height;
-        cleanUpLine(line);
-        signalLater(line, "delete");
-      }
-      this.lines.splice(at, n);
-    },
-    collapse: function(lines) {
-      lines.splice.apply(lines, [lines.length, 0].concat(this.lines));
-    },
-    insertInner: function(at, lines, height) {
-      this.height += height;
-      this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));
-      for (var i = 0, e = lines.length; i < e; ++i) lines[i].parent = this;
-    },
-    iterN: function(at, n, op) {
-      for (var e = at + n; at < e; ++at)
-        if (op(this.lines[at])) return true;
-    }
-  };
-
-  function BranchChunk(children) {
-    this.children = children;
-    var size = 0, height = 0;
-    for (var i = 0, e = children.length; i < e; ++i) {
-      var ch = children[i];
-      size += ch.chunkSize(); height += ch.height;
-      ch.parent = this;
-    }
-    this.size = size;
-    this.height = height;
-    this.parent = null;
-  }
-
-  BranchChunk.prototype = {
-    chunkSize: function() { return this.size; },
-    removeInner: function(at, n) {
-      this.size -= n;
-      for (var i = 0; i < this.children.length; ++i) {
-        var child = this.children[i], sz = child.chunkSize();
-        if (at < sz) {
-          var rm = Math.min(n, sz - at), oldHeight = child.height;
-          child.removeInner(at, rm);
-          this.height -= oldHeight - child.height;
-          if (sz == rm) { this.children.splice(i--, 1); child.parent = null; }
-          if ((n -= rm) == 0) break;
-          at = 0;
-        } else at -= sz;
-      }
-      if (this.size - n < 25) {
-        var lines = [];
-        this.collapse(lines);
-        this.children = [new LeafChunk(lines)];
-        this.children[0].parent = this;
-      }
-    },
-    collapse: function(lines) {
-      for (var i = 0, e = this.children.length; i < e; ++i) this.children[i].collapse(lines);
-    },
-    insertInner: function(at, lines, height) {
-      this.size += lines.length;
-      this.height += height;
-      for (var i = 0, e = this.children.length; i < e; ++i) {
-        var child = this.children[i], sz = child.chunkSize();
-        if (at <= sz) {
-          child.insertInner(at, lines, height);
-          if (child.lines && child.lines.length > 50) {
-            while (child.lines.length > 50) {
-              var spilled = child.lines.splice(child.lines.length - 25, 25);
-              var newleaf = new LeafChunk(spilled);
-              child.height -= newleaf.height;
-              this.children.splice(i + 1, 0, newleaf);
-              newleaf.parent = this;
-            }
-            this.maybeSpill();
-          }
-          break;
-        }
-        at -= sz;
-      }
-    },
-    maybeSpill: function() {
-      if (this.children.length <= 10) return;
-      var me = this;
-      do {
-        var spilled = me.children.splice(me.children.length - 5, 5);
-        var sibling = new BranchChunk(spilled);
-        if (!me.parent) { // Become the parent node
-          var copy = new BranchChunk(me.children);
-          copy.parent = me;
-          me.children = [copy, sibling];
-          me = copy;
-        } else {
-          me.size -= sibling.size;
-          me.height -= sibling.height;
-          var myIndex = indexOf(me.parent.children, me);
-          me.parent.children.splice(myIndex + 1, 0, sibling);
-        }
-        sibling.parent = me.parent;
-      } while (me.children.length > 10);
-      me.parent.maybeSpill();
-    },
-    iterN: function(at, n, op) {
-      for (var i = 0, e = this.children.length; i < e; ++i) {
-        var child = this.children[i], sz = child.chunkSize();
-        if (at < sz) {
-          var used = Math.min(n, sz - at);
-          if (child.iterN(at, used, op)) return true;
-          if ((n -= used) == 0) break;
-          at = 0;
-        } else at -= sz;
-      }
-    }
-  };
-
-  var nextDocId = 0;
-  var Doc = CodeMirror.Doc = function(text, mode, firstLine) {
-    if (!(this instanceof Doc)) return new Doc(text, mode, firstLine);
-    if (firstLine == null) firstLine = 0;
-
-    BranchChunk.call(this, [new LeafChunk([new Line("", null)])]);
-    this.first = firstLine;
-    this.scrollTop = this.scrollLeft = 0;
-    this.cantEdit = false;
-    this.history = makeHistory();
-    this.cleanGeneration = 1;
-    this.frontier = firstLine;
-    var start = Pos(firstLine, 0);
-    this.sel = {from: start, to: start, head: start, anchor: start, shift: false, extend: false, goalColumn: null};
-    this.id = ++nextDocId;
-    this.modeOption = mode;
-
-    if (typeof text == "string") text = splitLines(text);
-    updateDoc(this, {from: start, to: start, text: text}, null, {head: start, anchor: start});
-  };
-
-  Doc.prototype = createObj(BranchChunk.prototype, {
-    constructor: Doc,
-    iter: function(from, to, op) {
-      if (op) this.iterN(from - this.first, to - from, op);
-      else this.iterN(this.first, this.first + this.size, from);
-    },
-
-    insert: function(at, lines) {
-      var height = 0;
-      for (var i = 0, e = lines.length; i < e; ++i) height += lines[i].height;
-      this.insertInner(at - this.first, lines, height);
-    },
-    remove: function(at, n) { this.removeInner(at - this.first, n); },
-
-    getValue: function(lineSep) {
-      var lines = getLines(this, this.first, this.first + this.size);
-      if (lineSep === false) return lines;
-      return lines.join(lineSep || "\n");
-    },
-    setValue: function(code) {
-      var top = Pos(this.first, 0), last = this.first + this.size - 1;
-      makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),
-                        text: splitLines(code), origin: "setValue"},
-                 {head: top, anchor: top}, true);
-    },
-    replaceRange: function(code, from, to, origin) {
-      from = clipPos(this, from);
-      to = to ? clipPos(this, to) : from;
-      replaceRange(this, code, from, to, origin);
-    },
-    getRange: function(from, to, lineSep) {
-      var lines = getBetween(this, clipPos(this, from), clipPos(this, to));
-      if (lineSep === false) return lines;
-      return lines.join(lineSep || "\n");
-    },
-
-    getLine: function(line) {var l = this.getLineHandle(line); return l && l.text;},
-    setLine: function(line, text) {
-      if (isLine(this, line))
-        replaceRange(this, text, Pos(line, 0), clipPos(this, Pos(line)));
-    },
-    removeLine: function(line) {
-      if (line) replaceRange(this, "", clipPos(this, Pos(line - 1)), clipPos(this, Pos(line)));
-      else replaceRange(this, "", Pos(0, 0), clipPos(this, Pos(1, 0)));
-    },
-
-    getLineHandle: function(line) {if (isLine(this, line)) return getLine(this, line);},
-    getLineNumber: function(line) {return lineNo(line);},
-
-    getLineHandleVisualStart: function(line) {
-      if (typeof line == "number") line = getLine(this, line);
-      return visualLine(this, line);
-    },
-
-    lineCount: function() {return this.size;},
-    firstLine: function() {return this.first;},
-    lastLine: function() {return this.first + this.size - 1;},
-
-    clipPos: function(pos) {return clipPos(this, pos);},
-
-    getCursor: function(start) {
-      var sel = this.sel, pos;
-      if (start == null || start == "head") pos = sel.head;
-      else if (start == "anchor") pos = sel.anchor;
-      else if (start == "end" || start === false) pos = sel.to;
-      else pos = sel.from;
-      return copyPos(pos);
-    },
-    somethingSelected: function() {return !posEq(this.sel.head, this.sel.anchor);},
-
-    setCursor: docOperation(function(line, ch, extend) {
-      var pos = clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line);
-      if (extend) extendSelection(this, pos);
-      else setSelection(this, pos, pos);
-    }),
-    setSelection: docOperation(function(anchor, head) {
-      setSelection(this, clipPos(this, anchor), clipPos(this, head || anchor));
-    }),
-    extendSelection: docOperation(function(from, to) {
-      extendSelection(this, clipPos(this, from), to && clipPos(this, to));
-    }),
-
-    getSelection: function(lineSep) {return this.getRange(this.sel.from, this.sel.to, lineSep);},
-    replaceSelection: function(code, collapse, origin) {
-      makeChange(this, {from: this.sel.from, to: this.sel.to, text: splitLines(code), origin: origin}, collapse || "around");
-    },
-    undo: docOperation(function() {makeChangeFromHistory(this, "undo");}),
-    redo: docOperation(function() {makeChangeFromHistory(this, "redo");}),
-
-    setExtending: function(val) {this.sel.extend = val;},
-
-    historySize: function() {
-      var hist = this.history;
-      return {undo: hist.done.length, redo: hist.undone.length};
-    },
-    clearHistory: function() {this.history = makeHistory(this.history.maxGeneration);},
-
-    markClean: function() {
-      this.cleanGeneration = this.changeGeneration();
-    },
-    changeGeneration: function() {
-      this.history.lastOp = this.history.lastOrigin = null;
-      return this.history.generation;
-    },
-    isClean: function (gen) {
-      return this.history.generation == (gen || this.cleanGeneration);
-    },
-
-    getHistory: function() {
-      return {done: copyHistoryArray(this.history.done),
-              undone: copyHistoryArray(this.history.undone)};
-    },
-    setHistory: function(histData) {
-      var hist = this.history = makeHistory(this.history.maxGeneration);
-      hist.done = histData.done.slice(0);
-      hist.undone = histData.undone.slice(0);
-    },
-
-    markText: function(from, to, options) {
-      return markText(this, clipPos(this, from), clipPos(this, to), options, "range");
-    },
-    setBookmark: function(pos, options) {
-      var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),
-                      insertLeft: options && options.insertLeft};
-      pos = clipPos(this, pos);
-      return markText(this, pos, pos, realOpts, "bookmark");
-    },
-    findMarksAt: function(pos) {
-      pos = clipPos(this, pos);
-      var markers = [], spans = getLine(this, pos.line).markedSpans;
-      if (spans) for (var i = 0; i < spans.length; ++i) {
-        var span = spans[i];
-        if ((span.from == null || span.from <= pos.ch) &&
-            (span.to == null || span.to >= pos.ch))
-          markers.push(span.marker.parent || span.marker);
-      }
-      return markers;
-    },
-    getAllMarks: function() {
-      var markers = [];
-      this.iter(function(line) {
-        var sps = line.markedSpans;
-        if (sps) for (var i = 0; i < sps.length; ++i)
-          if (sps[i].from != null) markers.push(sps[i].marker);
-      });
-      return markers;
-    },
-
-    posFromIndex: function(off) {
-      var ch, lineNo = this.first;
-      this.iter(function(line) {
-        var sz = line.text.length + 1;
-        if (sz > off) { ch = off; return true; }
-        off -= sz;
-        ++lineNo;
-      });
-      return clipPos(this, Pos(lineNo, ch));
-    },
-    indexFromPos: function (coords) {
-      coords = clipPos(this, coords);
-      var index = coords.ch;
-      if (coords.line < this.first || coords.ch < 0) return 0;
-      this.iter(this.first, coords.line, function (line) {
-        index += line.text.length + 1;
-      });
-      return index;
-    },
-
-    copy: function(copyHistory) {
-      var doc = new Doc(getLines(this, this.first, this.first + this.size), this.modeOption, this.first);
-      doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;
-      doc.sel = {from: this.sel.from, to: this.sel.to, head: this.sel.head, anchor: this.sel.anchor,
-                 shift: this.sel.shift, extend: false, goalColumn: this.sel.goalColumn};
-      if (copyHistory) {
-        doc.history.undoDepth = this.history.undoDepth;
-        doc.setHistory(this.getHistory());
-      }
-      return doc;
-    },
-
-    linkedDoc: function(options) {
-      if (!options) options = {};
-      var from = this.first, to = this.first + this.size;
-      if (options.from != null && options.from > from) from = options.from;
-      if (options.to != null && options.to < to) to = options.to;
-      var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from);
-      if (options.sharedHist) copy.history = this.history;
-      (this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});
-      copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];
-      return copy;
-    },
-    unlinkDoc: function(other) {
-      if (other instanceof CodeMirror) other = other.doc;
-      if (this.linked) for (var i = 0; i < this.linked.length; ++i) {
-        var link = this.linked[i];
-        if (link.doc != other) continue;
-        this.linked.splice(i, 1);
-        other.unlinkDoc(this);
-        break;
-      }
-      // If the histories were shared, split them again
-      if (other.history == this.history) {
-        var splitIds = [other.id];
-        linkedDocs(other, function(doc) {splitIds.push(doc.id);}, true);
-        other.history = makeHistory();
-        other.history.done = copyHistoryArray(this.history.done, splitIds);
-        other.history.undone = copyHistoryArray(this.history.undone, splitIds);
-      }
-    },
-    iterLinkedDocs: function(f) {linkedDocs(this, f);},
-
-    getMode: function() {return this.mode;},
-    getEditor: function() {return this.cm;}
-  });
-
-  Doc.prototype.eachLine = Doc.prototype.iter;
-
-  // The Doc methods that should be available on CodeMirror instances
-  var dontDelegate = "iter insert remove copy getEditor".split(" ");
-  for (var prop in Doc.prototype) if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)
-    CodeMirror.prototype[prop] = (function(method) {
-      return function() {return method.apply(this.doc, arguments);};
-    })(Doc.prototype[prop]);
-
-  eventMixin(Doc);
-
-  function linkedDocs(doc, f, sharedHistOnly) {
-    function propagate(doc, skip, sharedHist) {
-      if (doc.linked) for (var i = 0; i < doc.linked.length; ++i) {
-        var rel = doc.linked[i];
-        if (rel.doc == skip) continue;
-        var shared = sharedHist && rel.sharedHist;
-        if (sharedHistOnly && !shared) continue;
-        f(rel.doc, shared);
-        propagate(rel.doc, doc, shared);
-      }
-    }
-    propagate(doc, null, true);
-  }
-
-  function attachDoc(cm, doc) {
-    if (doc.cm) throw new Error("This document is already in use.");
-    cm.doc = doc;
-    doc.cm = cm;
-    estimateLineHeights(cm);
-    loadMode(cm);
-    if (!cm.options.lineWrapping) computeMaxLength(cm);
-    cm.options.mode = doc.modeOption;
-    regChange(cm);
-  }
-
-  // LINE UTILITIES
-
-  function getLine(chunk, n) {
-    n -= chunk.first;
-    while (!chunk.lines) {
-      for (var i = 0;; ++i) {
-        var child = chunk.children[i], sz = child.chunkSize();
-        if (n < sz) { chunk = child; break; }
-        n -= sz;
-      }
-    }
-    return chunk.lines[n];
-  }
-
-  function getBetween(doc, start, end) {
-    var out = [], n = start.line;
-    doc.iter(start.line, end.line + 1, function(line) {
-      var text = line.text;
-      if (n == end.line) text = text.slice(0, end.ch);
-      if (n == start.line) text = text.slice(start.ch);
-      out.push(text);
-      ++n;
-    });
-    return out;
-  }
-  function getLines(doc, from, to) {
-    var out = [];
-    doc.iter(from, to, function(line) { out.push(line.text); });
-    return out;
-  }
-
-  function updateLineHeight(line, height) {
-    var diff = height - line.height;
-    for (var n = line; n; n = n.parent) n.height += diff;
-  }
-
-  function lineNo(line) {
-    if (line.parent == null) return null;
-    var cur = line.parent, no = indexOf(cur.lines, line);
-    for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {
-      for (var i = 0;; ++i) {
-        if (chunk.children[i] == cur) break;
-        no += chunk.children[i].chunkSize();
-      }
-    }
-    return no + cur.first;
-  }
-
-  function lineAtHeight(chunk, h) {
-    var n = chunk.first;
-    outer: do {
-      for (var i = 0, e = chunk.children.length; i < e; ++i) {
-        var child = chunk.children[i], ch = child.height;
-        if (h < ch) { chunk = child; continue outer; }
-        h -= ch;
-        n += child.chunkSize();
-      }
-      return n;
-    } while (!chunk.lines);
-    for (var i = 0, e = chunk.lines.length; i < e; ++i) {
-      var line = chunk.lines[i], lh = line.height;
-      if (h < lh) break;
-      h -= lh;
-    }
-    return n + i;
-  }
-
-  function heightAtLine(cm, lineObj) {
-    lineObj = visualLine(cm.doc, lineObj);
-
-    var h = 0, chunk = lineObj.parent;
-    for (var i = 0; i < chunk.lines.length; ++i) {
-      var line = chunk.lines[i];
-      if (line == lineObj) break;
-      else h += line.height;
-    }
-    for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {
-      for (var i = 0; i < p.children.length; ++i) {
-        var cur = p.children[i];
-        if (cur == chunk) break;
-        else h += cur.height;
-      }
-    }
-    return h;
-  }
-
-  function getOrder(line) {
-    var order = line.order;
-    if (order == null) order = line.order = bidiOrdering(line.text);
-    return order;
-  }
-
-  // HISTORY
-
-  function makeHistory(startGen) {
-    return {
-      // Arrays of history events. Doing something adds an event to
-      // done and clears undo. Undoing moves events from done to
-      // undone, redoing moves them in the other direction.
-      done: [], undone: [], undoDepth: Infinity,
-      // Used to track when changes can be merged into a single undo
-      // event
-      lastTime: 0, lastOp: null, lastOrigin: null,
-      // Used by the isClean() method
-      generation: startGen || 1, maxGeneration: startGen || 1
-    };
-  }
-
-  function attachLocalSpans(doc, change, from, to) {
-    var existing = change["spans_" + doc.id], n = 0;
-    doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function(line) {
-      if (line.markedSpans)
-        (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans;
-      ++n;
-    });
-  }
-
-  function historyChangeFromChange(doc, change) {
-    var from = { line: change.from.line, ch: change.from.ch };
-    var histChange = {from: from, to: changeEnd(change), text: getBetween(doc, change.from, change.to)};
-    attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);
-    linkedDocs(doc, function(doc) {attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);}, true);
-    return histChange;
-  }
-
-  function addToHistory(doc, change, selAfter, opId) {
-    var hist = doc.history;
-    hist.undone.length = 0;
-    var time = +new Date, cur = lst(hist.done);
-
-    if (cur &&
-        (hist.lastOp == opId ||
-         hist.lastOrigin == change.origin && change.origin &&
-         ((change.origin.charAt(0) == "+" && doc.cm && hist.lastTime > time - doc.cm.options.historyEventDelay) ||
-          change.origin.charAt(0) == "*"))) {
-      // Merge this change into the last event
-      var last = lst(cur.changes);
-      if (posEq(change.from, change.to) && posEq(change.from, last.to)) {
-        // Optimized case for simple insertion -- don't want to add
-        // new changesets for every character typed
-        last.to = changeEnd(change);
-      } else {
-        // Add new sub-event
-        cur.changes.push(historyChangeFromChange(doc, change));
-      }
-      cur.anchorAfter = selAfter.anchor; cur.headAfter = selAfter.head;
-    } else {
-      // Can not be merged, start a new event.
-      cur = {changes: [historyChangeFromChange(doc, change)],
-             generation: hist.generation,
-             anchorBefore: doc.sel.anchor, headBefore: doc.sel.head,
-             anchorAfter: selAfter.anchor, headAfter: selAfter.head};
-      hist.done.push(cur);
-      hist.generation = ++hist.maxGeneration;
-      while (hist.done.length > hist.undoDepth)
-        hist.done.shift();
-    }
-    hist.lastTime = time;
-    hist.lastOp = opId;
-    hist.lastOrigin = change.origin;
-  }
-
-  function removeClearedSpans(spans) {
-    if (!spans) return null;
-    for (var i = 0, out; i < spans.length; ++i) {
-      if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }
-      else if (out) out.push(spans[i]);
-    }
-    return !out ? spans : out.length ? out : null;
-  }
-
-  function getOldSpans(doc, change) {
-    var found = change["spans_" + doc.id];
-    if (!found) return null;
-    for (var i = 0, nw = []; i < change.text.length; ++i)
-      nw.push(removeClearedSpans(found[i]));
-    return nw;
-  }
-
-  // Used both to provide a JSON-safe object in .getHistory, and, when
-  // detaching a document, to split the history in two
-  function copyHistoryArray(events, newGroup) {
-    for (var i = 0, copy = []; i < events.length; ++i) {
-      var event = events[i], changes = event.changes, newChanges = [];
-      copy.push({changes: newChanges, anchorBefore: event.anchorBefore, headBefore: event.headBefore,
-                 anchorAfter: event.anchorAfter, headAfter: event.headAfter});
-      for (var j = 0; j < changes.length; ++j) {
-        var change = changes[j], m;
-        newChanges.push({from: change.from, to: change.to, text: change.text});
-        if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\d+)$/)) {
-          if (indexOf(newGroup, Number(m[1])) > -1) {
-            lst(newChanges)[prop] = change[prop];
-            delete change[prop];
-          }
-        }
-      }
-    }
-    return copy;
-  }
-
-  // Rebasing/resetting history to deal with externally-sourced changes
-
-  function rebaseHistSel(pos, from, to, diff) {
-    if (to < pos.line) {
-      pos.line += diff;
-    } else if (from < pos.line) {
-      pos.line = from;
-      pos.ch = 0;
-    }
-  }
-
-  // Tries to rebase an array of history events given a change in the
-  // document. If the change touches the same lines as the event, the
-  // event, and everything 'behind' it, is discarded. If the change is
-  // before the event, the event's positions are updated. Uses a
-  // copy-on-write scheme for the positions, to avoid having to
-  // reallocate them all on every rebase, but also avoid problems with
-  // shared position objects being unsafely updated.
-  function rebaseHistArray(array, from, to, diff) {
-    for (var i = 0; i < array.length; ++i) {
-      var sub = array[i], ok = true;
-      for (var j = 0; j < sub.changes.length; ++j) {
-        var cur = sub.changes[j];
-        if (!sub.copied) { cur.from = copyPos(cur.from); cur.to = copyPos(cur.to); }
-        if (to < cur.from.line) {
-          cur.from.line += diff;
-          cur.to.line += diff;
-        } else if (from <= cur.to.line) {
-          ok = false;
-          break;
-        }
-      }
-      if (!sub.copied) {
-        sub.anchorBefore = copyPos(sub.anchorBefore); sub.headBefore = copyPos(sub.headBefore);
-        sub.anchorAfter = copyPos(sub.anchorAfter); sub.readAfter = copyPos(sub.headAfter);
-        sub.copied = true;
-      }
-      if (!ok) {
-        array.splice(0, i + 1);
-        i = 0;
-      } else {
-        rebaseHistSel(sub.anchorBefore); rebaseHistSel(sub.headBefore);
-        rebaseHistSel(sub.anchorAfter); rebaseHistSel(sub.headAfter);
-      }
-    }
-  }
-
-  function rebaseHist(hist, change) {
-    var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;
-    rebaseHistArray(hist.done, from, to, diff);
-    rebaseHistArray(hist.undone, from, to, diff);
-  }
-
-  // EVENT OPERATORS
-
-  function stopMethod() {e_stop(this);}
-  // Ensure an event has a stop method.
-  function addStop(event) {
-    if (!event.stop) event.stop = stopMethod;
-    return event;
-  }
-
-  function e_preventDefault(e) {
-    if (e.preventDefault) e.preventDefault();
-    else e.returnValue = false;
-  }
-  function e_stopPropagation(e) {
-    if (e.stopPropagation) e.stopPropagation();
-    else e.cancelBubble = true;
-  }
-  function e_defaultPrevented(e) {
-    return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false;
-  }
-  function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}
-  CodeMirror.e_stop = e_stop;
-  CodeMirror.e_preventDefault = e_preventDefault;
-  CodeMirror.e_stopPropagation = e_stopPropagation;
-
-  function e_target(e) {return e.target || e.srcElement;}
-  function e_button(e) {
-    var b = e.which;
-    if (b == null) {
-      if (e.button & 1) b = 1;
-      else if (e.button & 2) b = 3;
-      else if (e.button & 4) b = 2;
-    }
-    if (mac && e.ctrlKey && b == 1) b = 3;
-    return b;
-  }
-
-  // EVENT HANDLING
-
-  function on(emitter, type, f) {
-    if (emitter.addEventListener)
-      emitter.addEventListener(type, f, false);
-    else if (emitter.attachEvent)
-      emitter.attachEvent("on" + type, f);
-    else {
-      var map = emitter._handlers || (emitter._handlers = {});
-      var arr = map[type] || (map[type] = []);
-      arr.push(f);
-    }
-  }
-
-  function off(emitter, type, f) {
-    if (emitter.removeEventListener)
-      emitter.removeEventListener(type, f, false);
-    else if (emitter.detachEvent)
-      emitter.detachEvent("on" + type, f);
-    else {
-      var arr = emitter._handlers && emitter._handlers[type];
-      if (!arr) return;
-      for (var i = 0; i < arr.length; ++i)
-        if (arr[i] == f) { arr.splice(i, 1); break; }
-    }
-  }
-
-  function signal(emitter, type /*, values...*/) {
-    var arr = emitter._handlers && emitter._handlers[type];
-    if (!arr) return;
-    var args = Array.prototype.slice.call(arguments, 2);
-    for (var i = 0; i < arr.length; ++i) arr[i].apply(null, args);
-  }
-
-  var delayedCallbacks, delayedCallbackDepth = 0;
-  function signalLater(emitter, type /*, values...*/) {
-    var arr = emitter._handlers && emitter._handlers[type];
-    if (!arr) return;
-    var args = Array.prototype.slice.call(arguments, 2);
-    if (!delayedCallbacks) {
-      ++delayedCallbackDepth;
-      delayedCallbacks = [];
-      setTimeout(fireDelayed, 0);
-    }
-    function bnd(f) {return function(){f.apply(null, args);};};
-    for (var i = 0; i < arr.length; ++i)
-      delayedCallbacks.push(bnd(arr[i]));
-  }
-
-  function signalDOMEvent(cm, e, override) {
-    signal(cm, override || e.type, cm, e);
-    return e_defaultPrevented(e) || e.codemirrorIgnore;
-  }
-
-  function fireDelayed() {
-    --delayedCallbackDepth;
-    var delayed = delayedCallbacks;
-    delayedCallbacks = null;
-    for (var i = 0; i < delayed.length; ++i) delayed[i]();
-  }
-
-  function hasHandler(emitter, type) {
-    var arr = emitter._handlers && emitter._handlers[type];
-    return arr && arr.length > 0;
-  }
-
-  CodeMirror.on = on; CodeMirror.off = off; CodeMirror.signal = signal;
-
-  function eventMixin(ctor) {
-    ctor.prototype.on = function(type, f) {on(this, type, f);};
-    ctor.prototype.off = function(type, f) {off(this, type, f);};
-  }
-
-  // MISC UTILITIES
-
-  // Number of pixels added to scroller and sizer to hide scrollbar
-  var scrollerCutOff = 30;
-
-  // Returned or thrown by various protocols to signal 'I'm not
-  // handling this'.
-  var Pass = CodeMirror.Pass = {toString: function(){return "CodeMirror.Pass";}};
-
-  function Delayed() {this.id = null;}
-  Delayed.prototype = {set: function(ms, f) {clearTimeout(this.id); this.id = setTimeout(f, ms);}};
-
-  // Counts the column offset in a string, taking tabs into account.
-  // Used mostly to find indentation.
-  function countColumn(string, end, tabSize, startIndex, startValue) {
-    if (end == null) {
-      end = string.search(/[^\s\u00a0]/);
-      if (end == -1) end = string.length;
-    }
-    for (var i = startIndex || 0, n = startValue || 0; i < end; ++i) {
-      if (string.charAt(i) == "\t") n += tabSize - (n % tabSize);
-      else ++n;
-    }
-    return n;
-  }
-  CodeMirror.countColumn = countColumn;
-
-  var spaceStrs = [""];
-  function spaceStr(n) {
-    while (spaceStrs.length <= n)
-      spaceStrs.push(lst(spaceStrs) + " ");
-    return spaceStrs[n];
-  }
-
-  function lst(arr) { return arr[arr.length-1]; }
-
-  function selectInput(node) {
-    if (ios) { // Mobile Safari apparently has a bug where select() is broken.
-      node.selectionStart = 0;
-      node.selectionEnd = node.value.length;
-    } else {
-      // Suppress mysterious IE10 errors
-      try { node.select(); }
-      catch(_e) {}
-    }
-  }
-
-  function indexOf(collection, elt) {
-    if (collection.indexOf) return collection.indexOf(elt);
-    for (var i = 0, e = collection.length; i < e; ++i)
-      if (collection[i] == elt) return i;
-    return -1;
-  }
-
-  function createObj(base, props) {
-    function Obj() {}
-    Obj.prototype = base;
-    var inst = new Obj();
-    if (props) copyObj(props, inst);
-    return inst;
-  }
-
-  function copyObj(obj, target) {
-    if (!target) target = {};
-    for (var prop in obj) if (obj.hasOwnProperty(prop)) target[prop] = obj[prop];
-    return target;
-  }
-
-  function emptyArray(size) {
-    for (var a = [], i = 0; i < size; ++i) a.push(undefined);
-    return a;
-  }
-
-  function bind(f) {
-    var args = Array.prototype.slice.call(arguments, 1);
-    return function(){return f.apply(null, args);};
-  }
-
-  var nonASCIISingleCaseWordChar = /[\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
-  function isWordChar(ch) {
-    return /\w/.test(ch) || ch > "\x80" &&
-      (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch));
-  }
-
-  function isEmpty(obj) {
-    for (var n in obj) if (obj.hasOwnProperty(n) && obj[n]) return false;
-    return true;
-  }
-
-  var isExtendingChar = /[\u0300-\u036F\u0483-\u0487\u0488-\u0489\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\uA66F\uA670-\uA672\uA674-\uA67D\uA69F\udc00-\udfff]/;
-
-  // DOM UTILITIES
-
-  function elt(tag, content, className, style) {
-    var e = document.createElement(tag);
-    if (className) e.className = className;
-    if (style) e.style.cssText = style;
-    if (typeof content == "string") setTextContent(e, content);
-    else if (content) for (var i = 0; i < content.length; ++i) e.appendChild(content[i]);
-    return e;
-  }
-
-  function removeChildren(e) {
-    for (var count = e.childNodes.length; count > 0; --count)
-      e.removeChild(e.firstChild);
-    return e;
-  }
-
-  function removeChildrenAndAdd(parent, e) {
-    return removeChildren(parent).appendChild(e);
-  }
-
-  function setTextContent(e, str) {
-    if (ie_lt9) {
-      e.innerHTML = "";
-      e.appendChild(document.createTextNode(str));
-    } else e.textContent = str;
-  }
-
-  function getRect(node) {
-    return node.getBoundingClientRect();
-  }
-  CodeMirror.replaceGetRect = function(f) { getRect = f; };
-
-  // FEATURE DETECTION
-
-  // Detect drag-and-drop
-  var dragAndDrop = function() {
-    // There is *some* kind of drag-and-drop support in IE6-8, but I
-    // couldn't get it to work yet.
-    if (ie_lt9) return false;
-    var div = elt('div');
-    return "draggable" in div || "dragDrop" in div;
-  }();
-
-  // For a reason I have yet to figure out, some browsers disallow
-  // word wrapping between certain characters *only* if a new inline
-  // element is started between them. This makes it hard to reliably
-  // measure the position of things, since that requires inserting an
-  // extra span. This terribly fragile set of tests matches the
-  // character combinations that suffer from this phenomenon on the
-  // various browsers.
-  function spanAffectsWrapping() { return false; }
-  if (gecko) // Only for "$'"
-    spanAffectsWrapping = function(str, i) {
-      return str.charCodeAt(i - 1) == 36 && str.charCodeAt(i) == 39;
-    };
-  else if (safari && !/Version\/([6-9]|\d\d)\b/.test(navigator.userAgent))
-    spanAffectsWrapping = function(str, i) {
-      return /\-[^ \-?]|\?[^ !\'\"\),.\-\/:;\?\]\}]/.test(str.slice(i - 1, i + 1));
-    };
-  else if (webkit && !/Chrome\/(?:29|[3-9]\d|\d\d\d)\./.test(navigator.userAgent))
-    spanAffectsWrapping = function(str, i) {
-      if (i > 1 && str.charCodeAt(i - 1) == 45) {
-        if (/\w/.test(str.charAt(i - 2)) && /[^\-?\.]/.test(str.charAt(i))) return true;
-        if (i > 2 && /[\d\.,]/.test(str.charAt(i - 2)) && /[\d\.,]/.test(str.charAt(i))) return false;
-      }
-      return /[~!#%&*)=+}\]|\"\.>,:;][({[<]|-[^\-?\.\u2010-\u201f\u2026]|\?[\w~`@#$%\^&*(_=+{[|><]|…[\w~`@#$%\^&*(_=+{[><]/.test(str.slice(i - 1, i + 1));
-    };
-
-  var knownScrollbarWidth;
-  function scrollbarWidth(measure) {
-    if (knownScrollbarWidth != null) return knownScrollbarWidth;
-    var test = elt("div", null, null, "width: 50px; height: 50px; overflow-x: scroll");
-    removeChildrenAndAdd(measure, test);
-    if (test.offsetWidth)
-      knownScrollbarWidth = test.offsetHeight - test.clientHeight;
-    return knownScrollbarWidth || 0;
-  }
-
-  var zwspSupported;
-  function zeroWidthElement(measure) {
-    if (zwspSupported == null) {
-      var test = elt("span", "\u200b");
-      removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")]));
-      if (measure.firstChild.offsetHeight != 0)
-        zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !ie_lt8;
-    }
-    if (zwspSupported) return elt("span", "\u200b");
-    else return elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px");
-  }
-
-  // See if "".split is the broken IE version, if so, provide an
-  // alternative way to split lines.
-  var splitLines = "\n\nb".split(/\n/).length != 3 ? function(string) {
-    var pos = 0, result = [], l = string.length;
-    while (pos <= l) {
-      var nl = string.indexOf("\n", pos);
-      if (nl == -1) nl = string.length;
-      var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl);
-      var rt = line.indexOf("\r");
-      if (rt != -1) {
-        result.push(line.slice(0, rt));
-        pos += rt + 1;
-      } else {
-        result.push(line);
-        pos = nl + 1;
-      }
-    }
-    return result;
-  } : function(string){return string.split(/\r\n?|\n/);};
-  CodeMirror.splitLines = splitLines;
-
-  var hasSelection = window.getSelection ? function(te) {
-    try { return te.selectionStart != te.selectionEnd; }
-    catch(e) { return false; }
-  } : function(te) {
-    try {var range = te.ownerDocument.selection.createRange();}
-    catch(e) {}
-    if (!range || range.parentElement() != te) return false;
-    return range.compareEndPoints("StartToEnd", range) != 0;
-  };
-
-  var hasCopyEvent = (function() {
-    var e = elt("div");
-    if ("oncopy" in e) return true;
-    e.setAttribute("oncopy", "return;");
-    return typeof e.oncopy == 'function';
-  })();
-
-  // KEY NAMING
-
-  var keyNames = {3: "Enter", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt",
-                  19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End",
-                  36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert",
-                  46: "Delete", 59: ";", 91: "Mod", 92: "Mod", 93: "Mod", 109: "-", 107: "=", 127: "Delete",
-                  186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\",
-                  221: "]", 222: "'", 63276: "PageUp", 63277: "PageDown", 63275: "End", 63273: "Home",
-                  63234: "Left", 63232: "Up", 63235: "Right", 63233: "Down", 63302: "Insert", 63272: "Delete"};
-  CodeMirror.keyNames = keyNames;
-  (function() {
-    // Number keys
-    for (var i = 0; i < 10; i++) keyNames[i + 48] = String(i);
-    // Alphabetic keys
-    for (var i = 65; i <= 90; i++) keyNames[i] = String.fromCharCode(i);
-    // Function keys
-    for (var i = 1; i <= 12; i++) keyNames[i + 111] = keyNames[i + 63235] = "F" + i;
-  })();
-
-  // BIDI HELPERS
-
-  function iterateBidiSections(order, from, to, f) {
-    if (!order) return f(from, to, "ltr");
-    var found = false;
-    for (var i = 0; i < order.length; ++i) {
-      var part = order[i];
-      if (part.from < to && part.to > from || from == to && part.to == from) {
-        f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr");
-        found = true;
-      }
-    }
-    if (!found) f(from, to, "ltr");
-  }
-
-  function bidiLeft(part) { return part.level % 2 ? part.to : part.from; }
-  function bidiRight(part) { return part.level % 2 ? part.from : part.to; }
-
-  function lineLeft(line) { var order = getOrder(line); return order ? bidiLeft(order[0]) : 0; }
-  function lineRight(line) {
-    var order = getOrder(line);
-    if (!order) return line.text.length;
-    return bidiRight(lst(order));
-  }
-
-  function lineStart(cm, lineN) {
-    var line = getLine(cm.doc, lineN);
-    var visual = visualLine(cm.doc, line);
-    if (visual != line) lineN = lineNo(visual);
-    var order = getOrder(visual);
-    var ch = !order ? 0 : order[0].level % 2 ? lineRight(visual) : lineLeft(visual);
-    return Pos(lineN, ch);
-  }
-  function lineEnd(cm, lineN) {
-    var merged, line;
-    while (merged = collapsedSpanAtEnd(line = getLine(cm.doc, lineN)))
-      lineN = merged.find().to.line;
-    var order = getOrder(line);
-    var ch = !order ? line.text.length : order[0].level % 2 ? lineLeft(line) : lineRight(line);
-    return Pos(lineN, ch);
-  }
-
-  function compareBidiLevel(order, a, b) {
-    var linedir = order[0].level;
-    if (a == linedir) return true;
-    if (b == linedir) return false;
-    return a < b;
-  }
-  var bidiOther;
-  function getBidiPartAt(order, pos) {
-    for (var i = 0, found; i < order.length; ++i) {
-      var cur = order[i];
-      if (cur.from < pos && cur.to > pos) { bidiOther = null; return i; }
-      if (cur.from == pos || cur.to == pos) {
-        if (found == null) {
-          found = i;
-        } else if (compareBidiLevel(order, cur.level, order[found].level)) {
-          bidiOther = found;
-          return i;
-        } else {
-          bidiOther = i;
-          return found;
-        }
-      }
-    }
-    bidiOther = null;
-    return found;
-  }
-
-  function moveInLine(line, pos, dir, byUnit) {
-    if (!byUnit) return pos + dir;
-    do pos += dir;
-    while (pos > 0 && isExtendingChar.test(line.text.charAt(pos)));
-    return pos;
-  }
-
-  // This is somewhat involved. It is needed in order to move
-  // 'visually' through bi-directional text -- i.e., pressing left
-  // should make the cursor go left, even when in RTL text. The
-  // tricky part is the 'jumps', where RTL and LTR text touch each
-  // other. This often requires the cursor offset to move more than
-  // one unit, in order to visually move one unit.
-  function moveVisually(line, start, dir, byUnit) {
-    var bidi = getOrder(line);
-    if (!bidi) return moveLogically(line, start, dir, byUnit);
-    var pos = getBidiPartAt(bidi, start), part = bidi[pos];
-    var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);
-
-    for (;;) {
-      if (target > part.from && target < part.to) return target;
-      if (target == part.from || target == part.to) {
-        if (getBidiPartAt(bidi, target) == pos) return target;
-        part = bidi[pos += dir];
-        return (dir > 0) == part.level % 2 ? part.to : part.from;
-      } else {
-        part = bidi[pos += dir];
-        if (!part) return null;
-        if ((dir > 0) == part.level % 2)
-          target = moveInLine(line, part.to, -1, byUnit);
-        else
-          target = moveInLine(line, part.from, 1, byUnit);
-      }
-    }
-  }
-
-  function moveLogically(line, start, dir, byUnit) {
-    var target = start + dir;
-    if (byUnit) while (target > 0 && isExtendingChar.test(line.text.charAt(target))) target += dir;
-    return target < 0 || target > line.text.length ? null : target;
-  }
-
-  // Bidirectional ordering algorithm
-  // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm
-  // that this (partially) implements.
-
-  // One-char codes used for character types:
-  // L (L):   Left-to-Right
-  // R (R):   Right-to-Left
-  // r (AL):  Right-to-Left Arabic
-  // 1 (EN):  European Number
-  // + (ES):  European Number Separator
-  // % (ET):  European Number Terminator
-  // n (AN):  Arabic Number
-  // , (CS):  Common Number Separator
-  // m (NSM): Non-Spacing Mark
-  // b (BN):  Boundary Neutral
-  // s (B):   Paragraph Separator
-  // t (S):   Segment Separator
-  // w (WS):  Whitespace
-  // N (ON):  Other Neutrals
-
-  // Returns null if characters are ordered as they appear
-  // (left-to-right), or an array of sections ({from, to, level}
-  // objects) in the order in which they occur visually.
-  var bidiOrdering = (function() {
-    // Character types for codepoints 0 to 0xff
-    var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL";
-    // Character types for codepoints 0x600 to 0x6ff
-    var arabicTypes = "rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmmrrrrrrrrrrrrrrrrrr";
-    function charType(code) {
-      if (code <= 0xff) return lowTypes.charAt(code);
-      else if (0x590 <= code && code <= 0x5f4) return "R";
-      else if (0x600 <= code && code <= 0x6ff) return arabicTypes.charAt(code - 0x600);
-      else if (0x700 <= code && code <= 0x8ac) return "r";
-      else return "L";
-    }
-
-    var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
-    var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;
-    // Browsers seem to always treat the boundaries of block elements as being L.
-    var outerType = "L";
-
-    return function(str) {
-      if (!bidiRE.test(str)) return false;
-      var len = str.length, types = [];
-      for (var i = 0, type; i < len; ++i)
-        types.push(type = charType(str.charCodeAt(i)));
-
-      // W1. Examine each non-spacing mark (NSM) in the level run, and
-      // change the type of the NSM to the type of the previous
-      // character. If the NSM is at the start of the level run, it will
-      // get the type of sor.
-      for (var i = 0, prev = outerType; i < len; ++i) {
-        var type = types[i];
-        if (type == "m") types[i] = prev;
-        else prev = type;
-      }
-
-      // W2. Search backwards from each instance of a European number
-      // until the first strong type (R, L, AL, or sor) is found. If an
-      // AL is found, change the type of the European number to Arabic
-      // number.
-      // W3. Change all ALs to R.
-      for (var i = 0, cur = outerType; i < len; ++i) {
-        var type = types[i];
-        if (type == "1" && cur == "r") types[i] = "n";
-        else if (isStrong.test(type)) { cur = type; if (type == "r") types[i] = "R"; }
-      }
-
-      // W4. A single European separator between two European numbers
-      // changes to a European number. A single common separator between
-      // two numbers of the same type changes to that type.
-      for (var i = 1, prev = types[0]; i < len - 1; ++i) {
-        var type = types[i];
-        if (type == "+" && prev == "1" && types[i+1] == "1") types[i] = "1";
-        else if (type == "," && prev == types[i+1] &&
-                 (prev == "1" || prev == "n")) types[i] = prev;
-        prev = type;
-      }
-
-      // W5. A sequence of European terminators adjacent to European
-      // numbers changes to all European numbers.
-      // W6. Otherwise, separators and terminators change to Other
-      // Neutral.
-      for (var i = 0; i < len; ++i) {
-        var type = types[i];
-        if (type == ",") types[i] = "N";
-        else if (type == "%") {
-          for (var end = i + 1; end < len && types[end] == "%"; ++end) {}
-          var replace = (i && types[i-1] == "!") || (end < len - 1 && types[end] == "1") ? "1" : "N";
-          for (var j = i; j < end; ++j) types[j] = replace;
-          i = end - 1;
-        }
-      }
-
-      // W7. Search backwards from each instance of a European number
-      // until the first strong type (R, L, or sor) is found. If an L is
-      // found, then change the type of the European number to L.
-      for (var i = 0, cur = outerType; i < len; ++i) {
-        var type = types[i];
-        if (cur == "L" && type == "1") types[i] = "L";
-        else if (isStrong.test(type)) cur = type;
-      }
-
-      // N1. A sequence of neutrals takes the direction of the
-      // surrounding strong text if the text on both sides has the same
-      // direction. European and Arabic numbers act as if they were R in
-      // terms of their influence on neutrals. Start-of-level-run (sor)
-      // and end-of-level-run (eor) are used at level run boundaries.
-      // N2. Any remaining neutrals take the embedding direction.
-      for (var i = 0; i < len; ++i) {
-        if (isNeutral.test(types[i])) {
-          for (var end = i + 1; end < len && isNeutral.test(types[end]); ++end) {}
-          var before = (i ? types[i-1] : outerType) == "L";
-          var after = (end < len - 1 ? types[end] : outerType) == "L";
-          var replace = before || after ? "L" : "R";
-          for (var j = i; j < end; ++j) types[j] = replace;
-          i = end - 1;
-        }
-      }
-
-      // Here we depart from the documented algorithm, in order to avoid
-      // building up an actual levels array. Since there are only three
-      // levels (0, 1, 2) in an implementation that doesn't take
-      // explicit embedding into account, we can build up the order on
-      // the fly, without following the level-based algorithm.
-      var order = [], m;
-      for (var i = 0; i < len;) {
-        if (countsAsLeft.test(types[i])) {
-          var start = i;
-          for (++i; i < len && countsAsLeft.test(types[i]); ++i) {}
-          order.push({from: start, to: i, level: 0});
-        } else {
-          var pos = i, at = order.length;
-          for (++i; i < len && types[i] != "L"; ++i) {}
-          for (var j = pos; j < i;) {
-            if (countsAsNum.test(types[j])) {
-              if (pos < j) order.splice(at, 0, {from: pos, to: j, level: 1});
-              var nstart = j;
-              for (++j; j < i && countsAsNum.test(types[j]); ++j) {}
-              order.splice(at, 0, {from: nstart, to: j, level: 2});
-              pos = j;
-            } else ++j;
-          }
-          if (pos < i) order.splice(at, 0, {from: pos, to: i, level: 1});
-        }
-      }
-      if (order[0].level == 1 && (m = str.match(/^\s+/))) {
-        order[0].from = m[0].length;
-        order.unshift({from: 0, to: m[0].length, level: 0});
-      }
-      if (lst(order).level == 1 && (m = str.match(/\s+$/))) {
-        lst(order).to -= m[0].length;
-        order.push({from: len - m[0].length, to: len, level: 0});
-      }
-      if (order[0].level != lst(order).level)
-        order.push({from: len, to: len, level: order[0].level});
-
-      return order;
-    };
-  })();
-
-  // THE END
-
-  CodeMirror.version = "3.15.0";
-
-  return CodeMirror;
-})();
diff --git a/public/js/lib/codemirror-accessible/codemirror.css b/public/js/lib/codemirror-accessible/codemirror.css
deleted file mode 100755
index 584eecb..0000000
--- a/public/js/lib/codemirror-accessible/codemirror.css
+++ /dev/null
@@ -1,258 +0,0 @@
-/* BASICS */
-
-.CodeMirror {
-  /* Set height, width, borders, and global font properties here */
-  font-family: monospace;
-  height: 300px;
-}
-.CodeMirror-scroll {
-  /* Set scrolling behaviour here */
-  overflow: auto;
-}
-
-/* PADDING */
-
-.CodeMirror-lines {
-  padding: 4px 0; /* Vertical padding around content */
-}
-.CodeMirror pre {
-  padding: 0 4px; /* Horizontal padding of content */
-}
-
-.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
-  background-color: white; /* The little square between H and V scrollbars */
-}
-
-/* GUTTER */
-
-.CodeMirror-gutters {
-  border-right: 1px solid #ddd;
-  background-color: #f7f7f7;
-  white-space: nowrap;
-}
-.CodeMirror-linenumbers {}
-.CodeMirror-linenumber {
-  padding: 0 3px 0 5px;
-  min-width: 20px;
-  text-align: right;
-  color: #999;
-}
-
-/* CURSOR */
-
-.CodeMirror div.CodeMirror-cursor {
-  border-left: 1px solid black;
-  z-index: 3;
-}
-/* Shown when moving in bi-directional text */
-.CodeMirror div.CodeMirror-secondarycursor {
-  border-left: 1px solid silver;
-}
-.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor {
-  width: auto;
-  border: 0;
-  background: #7e7;
-  z-index: 1;
-}
-/* Can style cursor different in overwrite (non-insert) mode */
-.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite {}
-
-.cm-tab { display: inline-block; }
-
-/* DEFAULT THEME */
-
-.cm-s-default .cm-keyword {color: #708;}
-.cm-s-default .cm-atom {color: #219;}
-.cm-s-default .cm-number {color: #164;}
-.cm-s-default .cm-def {color: #00f;}
-.cm-s-default .cm-variable {color: black;}
-.cm-s-default .cm-variable-2 {color: #05a;}
-.cm-s-default .cm-variable-3 {color: #085;}
-.cm-s-default .cm-property {color: black;}
-.cm-s-default .cm-operator {color: black;}
-.cm-s-default .cm-comment {color: #a50;}
-.cm-s-default .cm-string {color: #a11;}
-.cm-s-default .cm-string-2 {color: #f50;}
-.cm-s-default .cm-meta {color: #555;}
-.cm-s-default .cm-error {color: #f00;}
-.cm-s-default .cm-qualifier {color: #555;}
-.cm-s-default .cm-builtin {color: #30a;}
-.cm-s-default .cm-bracket {color: #997;}
-.cm-s-default .cm-tag {color: #170;}
-.cm-s-default .cm-attribute {color: #00c;}
-.cm-s-default .cm-header {color: blue;}
-.cm-s-default .cm-quote {color: #090;}
-.cm-s-default .cm-hr {color: #999;}
-.cm-s-default .cm-link {color: #00c;}
-
-.cm-negative {color: #d44;}
-.cm-positive {color: #292;}
-.cm-header, .cm-strong {font-weight: bold;}
-.cm-em {font-style: italic;}
-.cm-link {text-decoration: underline;}
-
-.cm-invalidchar {color: #f00;}
-
-div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
-div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
-
-/* STOP */
-
-/* The rest of this file contains styles related to the mechanics of
-   the editor. You probably shouldn't touch them. */
-
-.CodeMirror {
-  line-height: 1;
-  position: relative;
-  overflow: hidden;
-  background: white;
-  color: black;
-}
-
-.CodeMirror-scroll {
-  /* 30px is the magic margin used to hide the element's real scrollbars */
-  /* See overflow: hidden in .CodeMirror */
-  margin-bottom: -30px; margin-right: -30px;
-  padding-bottom: 30px; padding-right: 30px;
-  height: 100%;
-  outline: none; /* Prevent dragging from highlighting the element */
-  position: relative;
-}
-.CodeMirror-sizer {
-  position: relative;
-}
-
-/* The fake, visible scrollbars. Used to force redraw during scrolling
-   before actuall scrolling happens, thus preventing shaking and
-   flickering artifacts. */
-.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
-  position: absolute;
-  z-index: 6;
-  display: none;
-}
-.CodeMirror-vscrollbar {
-  right: 0; top: 0;
-  overflow-x: hidden;
-  overflow-y: scroll;
-}
-.CodeMirror-hscrollbar {
-  bottom: 0; left: 0;
-  overflow-y: hidden;
-  overflow-x: scroll;
-}
-.CodeMirror-scrollbar-filler {
-  right: 0; bottom: 0;
-}
-.CodeMirror-gutter-filler {
-  left: 0; bottom: 0;
-}
-
-.CodeMirror-gutters {
-  position: absolute; left: 0; top: 0;
-  padding-bottom: 30px;
-  z-index: 3;
-}
-.CodeMirror-gutter {
-  white-space: normal;
-  height: 100%;
-  padding-bottom: 30px;
-  margin-bottom: -32px;
-  display: inline-block;
-  /* Hack to make IE7 behave */
-  *zoom:1;
-  *display:inline;
-}
-.CodeMirror-gutter-elt {
-  position: absolute;
-  cursor: default;
-  z-index: 4;
-}
-
-.CodeMirror-lines {
-  cursor: text;
-}
-.CodeMirror pre {
-  /* Reset some styles that the rest of the page might have set */
-  -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
-  border-width: 0;
-  background: transparent;
-  font-family: inherit;
-  font-size: inherit;
-  margin: 0;
-  white-space: pre;
-  word-wrap: normal;
-  line-height: inherit;
-  color: inherit;
-  z-index: 2;
-  position: relative;
-  overflow: visible;
-}
-.CodeMirror-wrap pre {
-  word-wrap: break-word;
-  white-space: pre-wrap;
-  word-break: normal;
-}
-.CodeMirror-code pre {
-  border-right: 30px solid transparent;
-  width: -webkit-fit-content;
-  width: -moz-fit-content;
-  width: fit-content;
-}
-.CodeMirror-wrap .CodeMirror-code pre {
-  border-right: none;
-  width: auto;
-}
-.CodeMirror-linebackground {
-  position: absolute;
-  left: 0; right: 0; top: 0; bottom: 0;
-  z-index: 0;
-}
-
-.CodeMirror-linewidget {
-  position: relative;
-  z-index: 2;
-  overflow: auto;
-}
-
-.CodeMirror-widget {
-}
-
-.CodeMirror-wrap .CodeMirror-scroll {
-  overflow-x: hidden;
-}
-
-.CodeMirror-measure {
-  position: absolute;
-  width: 100%; height: 0px;
-  overflow: hidden;
-  visibility: hidden;
-}
-.CodeMirror-measure pre { position: static; }
-
-.CodeMirror div.CodeMirror-cursor {
-  position: absolute;
-  visibility: hidden;
-  border-right: none;
-  width: 0;
-}
-.CodeMirror-focused div.CodeMirror-cursor {
-  visibility: visible;
-}
-
-.CodeMirror-selected { background: #d9d9d9; }
-.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
-
-.cm-searching {
-  background: #ffa;
-  background: rgba(255, 255, 0, .4);
-}
-
-/* IE7 hack to prevent it from returning funny offsetTops on the spans */
-.CodeMirror span { *vertical-align: text-bottom; }
-
-@media print {
-  /* Hide the cursor when printing */
-  .CodeMirror div.CodeMirror-cursor {
-    visibility: hidden;
-  }
-}
diff --git a/public/js/lib/codemirror-accessible/index.html b/public/js/lib/codemirror-accessible/index.html
deleted file mode 100755
index 7a428aa..0000000
--- a/public/js/lib/codemirror-accessible/index.html
+++ /dev/null
@@ -1,9941 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-  <title>CodeMirror Accessible</title>
-
-  <script type="text/javascript" src="codemirror-accessible.js"></script>
-  <script type="text/javascript" src="codemirror-original.js"></script>
-  <script type="text/javascript" src="javascript.js"></script>
-  <script type="text/javascript" src="accessible.js"></script>
-  <link rel="stylesheet" type="text/css" href="codemirror.css">
-
-  <style type="text/css">
-    html, body { margin: 0; padding: 0; }
-    body { padding: 10px 30px; padding-bottom: 40px; font-size: 1.1em; }
-    h4 { margin: 30px 0; }
-    .CodeMirror { height: 500px; width: 90%; margin: 0 auto; border: solid 1px #ccc; }
-    .center {text-align: center;}
-    .yes { color: #33aa33;}
-    .no { color: #aa3333;}
-    .kindof { color: #880; }
-    code { color: #3333aa; outline: solid 1px rgba(0, 0, 0, .1); }
-    #textarea-editor { width: 90%; margin-left: 5%; height: 500px;}
-    #links { float: right; }
-    .clear { clear: both ;}
-    h1 { float: left; margin: 0; padding: 0; padding-bottom: 10px; }
-    h1 a {text-decoration: none; color: #119;}
-    h1 a:hover {text-decoration: underline;}
-    blockquote { border-left: solid 2px #339; margin-left: 10px; padding-left: 10px;}
-  </style>
-
-</head>
-<body>
-
-<h1><a href="http://bgrins.github.io/codemirror-accessible">CodeMirror Accessibility</a></h1>
-<div id="links">
- <small><a href="https://github.com/bgrins/codemirror-accessible">source code</a></small>
-</div>
-<hr class="clear" />
-<p>
-  CodeMirror does not currently fully support screen reader software.  Since CodeMirror <a href="http://codemirror.net/doc/internals.html">does not use contentEditable</a> internally, an extra effort must be made to provide this accessibility.
-</p>
-
-<h2>Analysis of Current Functionality</h2>
-<p>
-   CodeMirror uses a hidden textarea to accept input events, track user selections, provide copy/paste, etc.  This has the benefit of some native input working correctly, but since the textarea is not a mirror of the content being entered, other things do not work.
-</p>
-<p>
-  Using <a href="http://www.nvaccess.org/">NVDA</a>, a screen reader for Windows, this is the behavior seen today with version 3.15 downloaded from <a href="http://codemirror.net/">http://codemirror.net/</a>:
-</p>
-<ul>
-  <li>Text based input <b class="yes">works</b>, as the input is being added directly into the hidden textarea</li>
-  <li>Selection <b class="kindof">works some of the time</b>, as it populates the textarea with the current selection.  It fails when the selection is over 100 lines or 1000 characters.  In this case it replaces the character with a <code>-</code> and marks <code>cm.display.inaccurateSelection</code> for cleanup later</li>
-  <li>Cursor movement <b class="no">does not work</b>.  This is because the textarea is usually left empty, cleared out on regular intervals</li>
-  <li>
-    Entering / exiting the editor <b class="no">does not work</b>.  Although you can generally tab into the editor without a mouse, leaving the editor is tricky and I've had to resort to mouse usage to do this.  Compare the following behavior with the normal textarea at the bottom of the page.
-
-  The <code>tab</code> button's behavior is overriden as you would expect with a code editor, which makes it hard to leave the field.  Perhaps a key like <code>escape</code> could be used to blur the editor?
-
-  Here are some recommendataions from WAI-ARIA 1.0 Authoring Practices - <a href="http://www.w3.org/WAI/PF/aria-practices/#richtext">Expected keyboard interaction with a rich text editor</a>:
-
-  <blockquote>
-Optionally, if the developer wishes to provide the ability to insert a tab into the document, it is recommended one of the following methods be used.
-
-Provide indent and outdent buttons in the menu. Keyboard shortcuts to the buttons should be Control+M for indent and Control+Shift+M for outdent.
-Provide a button in the menu to toggle the use of Tab between the two modes. If this button is used, then Control+M is recommended as a keyboard shortcut to toggle the button.
-  </blockquote>
-
-    Please comment with suggestions on how to deal with this.  Send me a message at bgrinstead@mozilla.com or <a href="https://twitter.com/bgrins">@bgrins</a> if you have any ideas.
-  </li>
-</ul>
-
-<h2>Possible Solution</h2>
-<p>
-  A solution involves resetting the <code>input</code> value to the current line when the cursor location moves with an empty selection.  Then, by calling <code>input.setSelectionRange(from.ch, to.ch)</code> the actual selection location is being moved, and NVDA is able to detect the changes.  This value must stay in the textarea long enough for the screenreader to detect the change, but has to be cleared out quick enough for the next cursor movement to be read properly.  The quick clearing out could be made unnecessary by setting the value of the <code>textarea</code> to <code>CodeMirror.getValue()</code>, however this causes some major performance bottlenecks (see below).
-</p>
-<p>
-  In addition, we do not clip the selection at any maximum limit to ensure that the selection is always consistent in the actual textarea.
-</p>
-<p>
-  <b>Still not fixed:</b> Entering / exiting the editor is still buggy.
-</p>
-
-
-<h3>Implementation Considerations</h3>
-<p>
-  I had hoped that this could be structured as a plugin, and could avoid touching the CodeMirror internals, but that proved to not be possible.  That said, it avoids large modifications to the <code>readInput</code> and <code>resetInput</code> functions, and could easily be hidden behind a property.  <b>View the <a href="https://github.com/bgrins/codemirror-accessible/compare/df4df2366fe254f3ff528e27928af6eae6b9baf5...master#diff-17ed72d8617eb30a518f39b4e72a2033">changes in codemirror-accessible.js</a>.</b>
-</p>
-<p>
-  This still needs to be tested with more advanced CodeMirror features, like <a href="http://codemirror.net/doc/manual.html#markText">atomic markers</a> and <a href="http://codemirror.net/doc/manual.html#api_doc">linked documents</a>, and with other screen readers.  Please let me know if you'd be able to help with testing these features or can give feedback with different screen readers.
-</p>
-
-<h3>Performance Considerations</h3>
-<p>
-  The downside is that this could potentially slow things down.  The selection was intentionally clipped with a low limit, and every time the selection changes, we need to set the textarea value to the current line of the CodeMirror.  Performance on very <a href="https://github.com/marijnh/CodeMirror/issues/1022">long lines with CodeMirror</a> are a known issue, and copying / selecting this data into a textarea is an extra step (though probably not significant compared to text measuring).
-</p>
-<p>
-  Originally, I was setting the textarea's value to the entire content (which seems to be best for the screenreader), but there is a major impact is caused by the computation of the selectionRange in this case.  Textareas <a href="https://developer.mozilla.org/en-US/docs/Web/API/Input.setSelectionRange">setSelectionRange</a> method takes an absolute start and end value, while CodeMirror operates on individual lines.  So we need to count from 0 to currently selected line and add the length of each line to arrive there.
-</p>
-
-<h2>Demos</h2>
-<p>
-  This is working in the demo below.  Compare the first CodeMirror (with the fix applied), the second CodeMirror (using the original version), and a normal textarea (at the bottom).
-</p>
-<p>
-  You can also see a video of the three options here:
-</p>
-
-<div class="center">
-<object style="width: 704.962px; height: 470.567px; border: solid 1px #ccc;" id="scPlayer" class="embeddedObject" type="application/x-shockwave-flash" data="http://content.screencast.com/users/bgrins/folders/Snagit/media/d56dfae9-4567-46e1-993c-8442a25da84c/scplayer.swf" height="530" width="794">
-  <param name="movie" value="http://content.screencast.com/users/bgrins/folders/Snagit/media/d56dfae9-4567-46e1-993c-8442a25da84c/scplayer.swf">
-  <param name="quality" value="high">
-  <param name="bgcolor" value="#FFFFFF">
-  <param name="flashVars" value="thumb=http://content.screencast.com/users/bgrins/folders/Snagit/media/d56dfae9-4567-46e1-993c-8442a25da84c/FirstFrame.jpg&amp;containerwidth=794&amp;containerheight=530&amp;xmp=sc.xmp&amp;advseek=true&amp;content=http://content.screencast.com/users/bgrins/folders/Snagit/media/d56dfae9-4567-46e1-993c-8442a25da84c/2013-08-20_13-52-36.mp4&amp;blurover=false">
-  <param name="allowFullScreen" value="true">
-  <param name="scale" value="showall">
-  <param name="allowScriptAccess" value="always">
-  <param name="base" value="http://content.screencast.com/users/bgrins/folders/Snagit/media/d56dfae9-4567-46e1-993c-8442a25da84c/">
-  <iframe class="embeddedObject" type="text/html" style="overflow: hidden; width: 704.962px; height: 470.567px;" src="http://www.screencast.com/users/bgrins/folders/Snagit/media/d56dfae9-4567-46e1-993c-8442a25da84c/embed" frameborder="0" height="530" scrolling="no" width="794"></iframe>
-</object>
-<br />
-</div>
-</p>
-
-<div>
-<button id="toggle-textarea-visibility">Toggle CodeMirror Internal Textarea Visibility</button> <small>makes it easier to debug and see what is going on</small>
-</div>
-
-<hr />
-
-<h4 id="demo">CodeMirror With Accessibility Fix  <a href="#accessible-demo">direct link</a></h4>
-<div id="accessible-demo">
-<textarea id="editor">
-/*!
- * jQuery JavaScript Library v1.10.2
- * http://jquery.com/
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- *
- * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2013-07-03T13:48Z
- */
-(function( window, undefined ) {
-
-// Can't do this because several apps including ASP.NET trace
-// the stack via arguments.caller.callee and Firefox dies if
-// you try to trace through "use strict" call chains. (#13335)
-// Support: Firefox 18+
-//"use strict";
-var
-  // The deferred used on DOM ready
-  readyList,
-
-  // A central reference to the root jQuery(document)
-  rootjQuery,
-
-  // Support: IE<10
-  // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined`
-  core_strundefined = typeof undefined,
-
-  // Use the correct document accordingly with window argument (sandbox)
-  location = window.location,
-  document = window.document,
-  docElem = document.documentElement,
-
-  // Map over jQuery in case of overwrite
-  _jQuery = window.jQuery,
-
-  // Map over the $ in case of overwrite
-  _$ = window.$,
-
-  // [[Class]] -> type pairs
-  class2type = {},
-
-  // List of deleted data cache ids, so we can reuse them
-  core_deletedIds = [],
-
-  core_version = "1.10.2",
-
-  // Save a reference to some core methods
-  core_concat = core_deletedIds.concat,
-  core_push = core_deletedIds.push,
-  core_slice = core_deletedIds.slice,
-  core_indexOf = core_deletedIds.indexOf,
-  core_toString = class2type.toString,
-  core_hasOwn = class2type.hasOwnProperty,
-  core_trim = core_version.trim,
-
-  // Define a local copy of jQuery
-  jQuery = function( selector, context ) {
-    // The jQuery object is actually just the init constructor 'enhanced'
-    return new jQuery.fn.init( selector, context, rootjQuery );
-  },
-
-  // Used for matching numbers
-  core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
-
-  // Used for splitting on whitespace
-  core_rnotwhite = /\S+/g,
-
-  // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
-  rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
-
-  // A simple way to check for HTML strings
-  // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
-  // Strict HTML recognition (#11290: must start with <)
-  rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
-
-  // Match a standalone tag
-  rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
-
-  // JSON RegExp
-  rvalidchars = /^[\],:{}\s]*$/,
-  rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
-  rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
-  rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
-
-  // Matches dashed string for camelizing
-  rmsPrefix = /^-ms-/,
-  rdashAlpha = /-([\da-z])/gi,
-
-  // Used by jQuery.camelCase as callback to replace()
-  fcamelCase = function( all, letter ) {
-    return letter.toUpperCase();
-  },
-
-  // The ready event handler
-  completed = function( event ) {
-
-    // readyState === "complete" is good enough for us to call the dom ready in oldIE
-    if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {
-      detach();
-      jQuery.ready();
-    }
-  },
-  // Clean-up method for dom ready events
-  detach = function() {
-    if ( document.addEventListener ) {
-      document.removeEventListener( "DOMContentLoaded", completed, false );
-      window.removeEventListener( "load", completed, false );
-
-    } else {
-      document.detachEvent( "onreadystatechange", completed );
-      window.detachEvent( "onload", completed );
-    }
-  };
-
-jQuery.fn = jQuery.prototype = {
-  // The current version of jQuery being used
-  jquery: core_version,
-
-  constructor: jQuery,
-  init: function( selector, context, rootjQuery ) {
-    var match, elem;
-
-    // HANDLE: $(""), $(null), $(undefined), $(false)
-    if ( !selector ) {
-      return this;
-    }
-
-    // Handle HTML strings
-    if ( typeof selector === "string" ) {
-      if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
-        // Assume that strings that start and end with <> are HTML and skip the regex check
-        match = [ null, selector, null ];
-
-      } else {
-        match = rquickExpr.exec( selector );
-      }
-
-      // Match html or make sure no context is specified for #id
-      if ( match && (match[1] || !context) ) {
-
-        // HANDLE: $(html) -> $(array)
-        if ( match[1] ) {
-          context = context instanceof jQuery ? context[0] : context;
-
-          // scripts is true for back-compat
-          jQuery.merge( this, jQuery.parseHTML(
-            match[1],
-            context && context.nodeType ? context.ownerDocument || context : document,
-            true
-          ) );
-
-          // HANDLE: $(html, props)
-          if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
-            for ( match in context ) {
-              // Properties of context are called as methods if possible
-              if ( jQuery.isFunction( this[ match ] ) ) {
-                this[ match ]( context[ match ] );
-
-              // ...and otherwise set as attributes
-              } else {
-                this.attr( match, context[ match ] );
-              }
-            }
-          }
-
-          return this;
-
-        // HANDLE: $(#id)
-        } else {
-          elem = document.getElementById( match[2] );
-
-          // Check parentNode to catch when Blackberry 4.6 returns
-          // nodes that are no longer in the document #6963
-          if ( elem && elem.parentNode ) {
-            // Handle the case where IE and Opera return items
-            // by name instead of ID
-            if ( elem.id !== match[2] ) {
-              return rootjQuery.find( selector );
-            }
-
-            // Otherwise, we inject the element directly into the jQuery object
-            this.length = 1;
-            this[0] = elem;
-          }
-
-          this.context = document;
-          this.selector = selector;
-          return this;
-        }
-
-      // HANDLE: $(expr, $(...))
-      } else if ( !context || context.jquery ) {
-        return ( context || rootjQuery ).find( selector );
-
-      // HANDLE: $(expr, context)
-      // (which is just equivalent to: $(context).find(expr)
-      } else {
-        return this.constructor( context ).find( selector );
-      }
-
-    // HANDLE: $(DOMElement)
-    } else if ( selector.nodeType ) {
-      this.context = this[0] = selector;
-      this.length = 1;
-      return this;
-
-    // HANDLE: $(function)
-    // Shortcut for document ready
-    } else if ( jQuery.isFunction( selector ) ) {
-      return rootjQuery.ready( selector );
-    }
-
-    if ( selector.selector !== undefined ) {
-      this.selector = selector.selector;
-      this.context = selector.context;
-    }
-
-    return jQuery.makeArray( selector, this );
-  },
-
-  // Start with an empty selector
-  selector: "",
-
-  // The default length of a jQuery object is 0
-  length: 0,
-
-  toArray: function() {
-    return core_slice.call( this );
-  },
-
-  // Get the Nth element in the matched element set OR
-  // Get the whole matched element set as a clean array
-  get: function( num ) {
-    return num == null ?
-
-      // Return a 'clean' array
-      this.toArray() :
-
-      // Return just the object
-      ( num < 0 ? this[ this.length + num ] : this[ num ] );
-  },
-
-  // Take an array of elements and push it onto the stack
-  // (returning the new matched element set)
-  pushStack: function( elems ) {
-
-    // Build a new jQuery matched element set
-    var ret = jQuery.merge( this.constructor(), elems );
-
-    // Add the old object onto the stack (as a reference)
-    ret.prevObject = this;
-    ret.context = this.context;
-
-    // Return the newly-formed element set
-    return ret;
-  },
-
-  // Execute a callback for every element in the matched set.
-  // (You can seed the arguments with an array of args, but this is
-  // only used internally.)
-  each: function( callback, args ) {
-    return jQuery.each( this, callback, args );
-  },
-
-  ready: function( fn ) {
-    // Add the callback
-    jQuery.ready.promise().done( fn );
-
-    return this;
-  },
-
-  slice: function() {
-    return this.pushStack( core_slice.apply( this, arguments ) );
-  },
-
-  first: function() {
-    return this.eq( 0 );
-  },
-
-  last: function() {
-    return this.eq( -1 );
-  },
-
-  eq: function( i ) {
-    var len = this.length,
-      j = +i + ( i < 0 ? len : 0 );
-    return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
-  },
-
-  map: function( callback ) {
-    return this.pushStack( jQuery.map(this, function( elem, i ) {
-      return callback.call( elem, i, elem );
-    }));
-  },
-
-  end: function() {
-    return this.prevObject || this.constructor(null);
-  },
-
-  // For internal use only.
-  // Behaves like an Array's method, not like a jQuery method.
-  push: core_push,
-  sort: [].sort,
-  splice: [].splice
-};
-
-// Give the init function the jQuery prototype for later instantiation
-jQuery.fn.init.prototype = jQuery.fn;
-
-jQuery.extend = jQuery.fn.extend = function() {
-  var src, copyIsArray, copy, name, options, clone,
-    target = arguments[0] || {},
-    i = 1,
-    length = arguments.length,
-    deep = false;
-
-  // Handle a deep copy situation
-  if ( typeof target === "boolean" ) {
-    deep = target;
-    target = arguments[1] || {};
-    // skip the boolean and the target
-    i = 2;
-  }
-
-  // Handle case when target is a string or something (possible in deep copy)
-  if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
-    target = {};
-  }
-
-  // extend jQuery itself if only one argument is passed
-  if ( length === i ) {
-    target = this;
-    --i;
-  }
-
-  for ( ; i < length; i++ ) {
-    // Only deal with non-null/undefined values
-    if ( (options = arguments[ i ]) != null ) {
-      // Extend the base object
-      for ( name in options ) {
-        src = target[ name ];
-        copy = options[ name ];
-
-        // Prevent never-ending loop
-        if ( target === copy ) {
-          continue;
-        }
-
-        // Recurse if we're merging plain objects or arrays
-        if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
-          if ( copyIsArray ) {
-            copyIsArray = false;
-            clone = src && jQuery.isArray(src) ? src : [];
-
-          } else {
-            clone = src && jQuery.isPlainObject(src) ? src : {};
-          }
-
-          // Never move original objects, clone them
-          target[ name ] = jQuery.extend( deep, clone, copy );
-
-        // Don't bring in undefined values
-        } else if ( copy !== undefined ) {
-          target[ name ] = copy;
-        }
-      }
-    }
-  }
-
-  // Return the modified object
-  return target;
-};
-
-jQuery.extend({
-  // Unique for each copy of jQuery on the page
-  // Non-digits removed to match rinlinejQuery
-  expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
-
-  noConflict: function( deep ) {
-    if ( window.$ === jQuery ) {
-      window.$ = _$;
-    }
-
-    if ( deep && window.jQuery === jQuery ) {
-      window.jQuery = _jQuery;
-    }
-
-    return jQuery;
-  },
-
-  // Is the DOM ready to be used? Set to true once it occurs.
-  isReady: false,
-
-  // A counter to track how many items to wait for before
-  // the ready event fires. See #6781
-  readyWait: 1,
-
-  // Hold (or release) the ready event
-  holdReady: function( hold ) {
-    if ( hold ) {
-      jQuery.readyWait++;
-    } else {
-      jQuery.ready( true );
-    }
-  },
-
-  // Handle when the DOM is ready
-  ready: function( wait ) {
-
-    // Abort if there are pending holds or we're already ready
-    if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
-      return;
-    }
-
-    // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
-    if ( !document.body ) {
-      return setTimeout( jQuery.ready );
-    }
-
-    // Remember that the DOM is ready
-    jQuery.isReady = true;
-
-    // If a normal DOM Ready event fired, decrement, and wait if need be
-    if ( wait !== true && --jQuery.readyWait > 0 ) {
-      return;
-    }
-
-    // If there are functions bound, to execute
-    readyList.resolveWith( document, [ jQuery ] );
-
-    // Trigger any bound ready events
-    if ( jQuery.fn.trigger ) {
-      jQuery( document ).trigger("ready").off("ready");
-    }
-  },
-
-  // See test/unit/core.js for details concerning isFunction.
-  // Since version 1.3, DOM methods and functions like alert
-  // aren't supported. They return false on IE (#2968).
-  isFunction: function( obj ) {
-    return jQuery.type(obj) === "function";
-  },
-
-  isArray: Array.isArray || function( obj ) {
-    return jQuery.type(obj) === "array";
-  },
-
-  isWindow: function( obj ) {
-    /* jshint eqeqeq: false */
-    return obj != null && obj == obj.window;
-  },
-
-  isNumeric: function( obj ) {
-    return !isNaN( parseFloat(obj) ) && isFinite( obj );
-  },
-
-  type: function( obj ) {
-    if ( obj == null ) {
-      return String( obj );
-    }
-    return typeof obj === "object" || typeof obj === "function" ?
-      class2type[ core_toString.call(obj) ] || "object" :
-      typeof obj;
-  },
-
-  isPlainObject: function( obj ) {
-    var key;
-
-    // Must be an Object.
-    // Because of IE, we also have to check the presence of the constructor property.
-    // Make sure that DOM nodes and window objects don't pass through, as well
-    if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
-      return false;
-    }
-
-    try {
-      // Not own constructor property must be Object
-      if ( obj.constructor &&
-        !core_hasOwn.call(obj, "constructor") &&
-        !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
-        return false;
-      }
-    } catch ( e ) {
-      // IE8,9 Will throw exceptions on certain host objects #9897
-      return false;
-    }
-
-    // Support: IE<9
-    // Handle iteration over inherited properties before own properties.
-    if ( jQuery.support.ownLast ) {
-      for ( key in obj ) {
-        return core_hasOwn.call( obj, key );
-      }
-    }
-
-    // Own properties are enumerated firstly, so to speed up,
-    // if last one is own, then all properties are own.
-    for ( key in obj ) {}
-
-    return key === undefined || core_hasOwn.call( obj, key );
-  },
-
-  isEmptyObject: function( obj ) {
-    var name;
-    for ( name in obj ) {
-      return false;
-    }
-    return true;
-  },
-
-  error: function( msg ) {
-    throw new Error( msg );
-  },
-
-  // data: string of html
-  // context (optional): If specified, the fragment will be created in this context, defaults to document
-  // keepScripts (optional): If true, will include scripts passed in the html string
-  parseHTML: function( data, context, keepScripts ) {
-    if ( !data || typeof data !== "string" ) {
-      return null;
-    }
-    if ( typeof context === "boolean" ) {
-      keepScripts = context;
-      context = false;
-    }
-    context = context || document;
-
-    var parsed = rsingleTag.exec( data ),
-      scripts = !keepScripts && [];
-
-    // Single tag
-    if ( parsed ) {
-      return [ context.createElement( parsed[1] ) ];
-    }
-
-    parsed = jQuery.buildFragment( [ data ], context, scripts );
-    if ( scripts ) {
-      jQuery( scripts ).remove();
-    }
-    return jQuery.merge( [], parsed.childNodes );
-  },
-
-  parseJSON: function( data ) {
-    // Attempt to parse using the native JSON parser first
-    if ( window.JSON && window.JSON.parse ) {
-      return window.JSON.parse( data );
-    }
-
-    if ( data === null ) {
-      return data;
-    }
-
-    if ( typeof data === "string" ) {
-
-      // Make sure leading/trailing whitespace is removed (IE can't handle it)
-      data = jQuery.trim( data );
-
-      if ( data ) {
-        // Make sure the incoming data is actual JSON
-        // Logic borrowed from http://json.org/json2.js
-        if ( rvalidchars.test( data.replace( rvalidescape, "@" )
-          .replace( rvalidtokens, "]" )
-          .replace( rvalidbraces, "")) ) {
-
-          return ( new Function( "return " + data ) )();
-        }
-      }
-    }
-
-    jQuery.error( "Invalid JSON: " + data );
-  },
-
-  // Cross-browser xml parsing
-  parseXML: function( data ) {
-    var xml, tmp;
-    if ( !data || typeof data !== "string" ) {
-      return null;
-    }
-    try {
-      if ( window.DOMParser ) { // Standard
-        tmp = new DOMParser();
-        xml = tmp.parseFromString( data , "text/xml" );
-      } else { // IE
-        xml = new ActiveXObject( "Microsoft.XMLDOM" );
-        xml.async = "false";
-        xml.loadXML( data );
-      }
-    } catch( e ) {
-      xml = undefined;
-    }
-    if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
-      jQuery.error( "Invalid XML: " + data );
-    }
-    return xml;
-  },
-
-  noop: function() {},
-
-  // Evaluates a script in a global context
-  // Workarounds based on findings by Jim Driscoll
-  // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
-  globalEval: function( data ) {
-    if ( data && jQuery.trim( data ) ) {
-      // We use execScript on Internet Explorer
-      // We use an anonymous function so that context is window
-      // rather than jQuery in Firefox
-      ( window.execScript || function( data ) {
-        window[ "eval" ].call( window, data );
-      } )( data );
-    }
-  },
-
-  // Convert dashed to camelCase; used by the css and data modules
-  // Microsoft forgot to hump their vendor prefix (#9572)
-  camelCase: function( string ) {
-    return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
-  },
-
-  nodeName: function( elem, name ) {
-    return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
-  },
-
-  // args is for internal usage only
-  each: function( obj, callback, args ) {
-    var value,
-      i = 0,
-      length = obj.length,
-      isArray = isArraylike( obj );
-
-    if ( args ) {
-      if ( isArray ) {
-        for ( ; i < length; i++ ) {
-          value = callback.apply( obj[ i ], args );
-
-          if ( value === false ) {
-            break;
-          }
-        }
-      } else {
-        for ( i in obj ) {
-          value = callback.apply( obj[ i ], args );
-
-          if ( value === false ) {
-            break;
-          }
-        }
-      }
-
-    // A special, fast, case for the most common use of each
-    } else {
-      if ( isArray ) {
-        for ( ; i < length; i++ ) {
-          value = callback.call( obj[ i ], i, obj[ i ] );
-
-          if ( value === false ) {
-            break;
-          }
-        }
-      } else {
-        for ( i in obj ) {
-          value = callback.call( obj[ i ], i, obj[ i ] );
-
-          if ( value === false ) {
-            break;
-          }
-        }
-      }
-    }
-
-    return obj;
-  },
-
-  // Use native String.trim function wherever possible
-  trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
-    function( text ) {
-      return text == null ?
-        "" :
-        core_trim.call( text );
-    } :
-
-    // Otherwise use our own trimming functionality
-    function( text ) {
-      return text == null ?
-        "" :
-        ( text + "" ).replace( rtrim, "" );
-    },
-
-  // results is for internal usage only
-  makeArray: function( arr, results ) {
-    var ret = results || [];
-
-    if ( arr != null ) {
-      if ( isArraylike( Object(arr) ) ) {
-        jQuery.merge( ret,
-          typeof arr === "string" ?
-          [ arr ] : arr
-        );
-      } else {
-        core_push.call( ret, arr );
-      }
-    }
-
-    return ret;
-  },
-
-  inArray: function( elem, arr, i ) {
-    var len;
-
-    if ( arr ) {
-      if ( core_indexOf ) {
-        return core_indexOf.call( arr, elem, i );
-      }
-
-      len = arr.length;
-      i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
-
-      for ( ; i < len; i++ ) {
-        // Skip accessing in sparse arrays
-        if ( i in arr && arr[ i ] === elem ) {
-          return i;
-        }
-      }
-    }
-
-    return -1;
-  },
-
-  merge: function( first, second ) {
-    var l = second.length,
-      i = first.length,
-      j = 0;
-
-    if ( typeof l === "number" ) {
-      for ( ; j < l; j++ ) {
-        first[ i++ ] = second[ j ];
-      }
-    } else {
-      while ( second[j] !== undefined ) {
-        first[ i++ ] = second[ j++ ];
-      }
-    }
-
-    first.length = i;
-
-    return first;
-  },
-
-  grep: function( elems, callback, inv ) {
-    var retVal,
-      ret = [],
-      i = 0,
-      length = elems.length;
-    inv = !!inv;
-
-    // Go through the array, only saving the items
-    // that pass the validator function
-    for ( ; i < length; i++ ) {
-      retVal = !!callback( elems[ i ], i );
-      if ( inv !== retVal ) {
-        ret.push( elems[ i ] );
-      }
-    }
-
-    return ret;
-  },
-
-  // arg is for internal usage only
-  map: function( elems, callback, arg ) {
-    var value,
-      i = 0,
-      length = elems.length,
-      isArray = isArraylike( elems ),
-      ret = [];
-
-    // Go through the array, translating each of the items to their
-    if ( isArray ) {
-      for ( ; i < length; i++ ) {
-        value = callback( elems[ i ], i, arg );
-
-        if ( value != null ) {
-          ret[ ret.length ] = value;
-        }
-      }
-
-    // Go through every key on the object,
-    } else {
-      for ( i in elems ) {
-        value = callback( elems[ i ], i, arg );
-
-        if ( value != null ) {
-          ret[ ret.length ] = value;
-        }
-      }
-    }
-
-    // Flatten any nested arrays
-    return core_concat.apply( [], ret );
-  },
-
-  // A global GUID counter for objects
-  guid: 1,
-
-  // Bind a function to a context, optionally partially applying any
-  // arguments.
-  proxy: function( fn, context ) {
-    var args, proxy, tmp;
-
-    if ( typeof context === "string" ) {
-      tmp = fn[ context ];
-      context = fn;
-      fn = tmp;
-    }
-
-    // Quick check to determine if target is callable, in the spec
-    // this throws a TypeError, but we will just return undefined.
-    if ( !jQuery.isFunction( fn ) ) {
-      return undefined;
-    }
-
-    // Simulated bind
-    args = core_slice.call( arguments, 2 );
-    proxy = function() {
-      return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
-    };
-
-    // Set the guid of unique handler to the same of original handler, so it can be removed
-    proxy.guid = fn.guid = fn.guid || jQuery.guid++;
-
-    return proxy;
-  },
-
-  // Multifunctional method to get and set values of a collection
-  // The value/s can optionally be executed if it's a function
-  access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
-    var i = 0,
-      length = elems.length,
-      bulk = key == null;
-
-    // Sets many values
-    if ( jQuery.type( key ) === "object" ) {
-      chainable = true;
-      for ( i in key ) {
-        jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
-      }
-
-    // Sets one value
-    } else if ( value !== undefined ) {
-      chainable = true;
-
-      if ( !jQuery.isFunction( value ) ) {
-        raw = true;
-      }
-
-      if ( bulk ) {
-        // Bulk operations run against the entire set
-        if ( raw ) {
-          fn.call( elems, value );
-          fn = null;
-
-        // ...except when executing function values
-        } else {
-          bulk = fn;
-          fn = function( elem, key, value ) {
-            return bulk.call( jQuery( elem ), value );
-          };
-        }
-      }
-
-      if ( fn ) {
-        for ( ; i < length; i++ ) {
-          fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
-        }
-      }
-    }
-
-    return chainable ?
-      elems :
-
-      // Gets
-      bulk ?
-        fn.call( elems ) :
-        length ? fn( elems[0], key ) : emptyGet;
-  },
-
-  now: function() {
-    return ( new Date() ).getTime();
-  },
-
-  // A method for quickly swapping in/out CSS properties to get correct calculations.
-  // Note: this method belongs to the css module but it's needed here for the support module.
-  // If support gets modularized, this method should be moved back to the css module.
-  swap: function( elem, options, callback, args ) {
-    var ret, name,
-      old = {};
-
-    // Remember the old values, and insert the new ones
-    for ( name in options ) {
-      old[ name ] = elem.style[ name ];
-      elem.style[ name ] = options[ name ];
-    }
-
-    ret = callback.apply( elem, args || [] );
-
-    // Revert the old values
-    for ( name in options ) {
-      elem.style[ name ] = old[ name ];
-    }
-
-    return ret;
-  }
-});
-
-jQuery.ready.promise = function( obj ) {
-  if ( !readyList ) {
-
-    readyList = jQuery.Deferred();
-
-    // Catch cases where $(document).ready() is called after the browser event has already occurred.
-    // we once tried to use readyState "interactive" here, but it caused issues like the one
-    // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
-    if ( document.readyState === "complete" ) {
-      // Handle it asynchronously to allow scripts the opportunity to delay ready
-      setTimeout( jQuery.ready );
-
-    // Standards-based browsers support DOMContentLoaded
-    } else if ( document.addEventListener ) {
-      // Use the handy event callback
-      document.addEventListener( "DOMContentLoaded", completed, false );
-
-      // A fallback to window.onload, that will always work
-      window.addEventListener( "load", completed, false );
-
-    // If IE event model is used
-    } else {
-      // Ensure firing before onload, maybe late but safe also for iframes
-      document.attachEvent( "onreadystatechange", completed );
-
-      // A fallback to window.onload, that will always work
-      window.attachEvent( "onload", completed );
-
-      // If IE and not a frame
-      // continually check to see if the document is ready
-      var top = false;
-
-      try {
-        top = window.frameElement == null && document.documentElement;
-      } catch(e) {}
-
-      if ( top && top.doScroll ) {
-        (function doScrollCheck() {
-          if ( !jQuery.isReady ) {
-
-            try {
-              // Use the trick by Diego Perini
-              // http://javascript.nwbox.com/IEContentLoaded/
-              top.doScroll("left");
-            } catch(e) {
-              return setTimeout( doScrollCheck, 50 );
-            }
-
-            // detach all dom ready events
-            detach();
-
-            // and execute any waiting functions
-            jQuery.ready();
-          }
-        })();
-      }
-    }
-  }
-  return readyList.promise( obj );
-};
-
-// Populate the class2type map
-jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
-  class2type[ "[object " + name + "]" ] = name.toLowerCase();
-});
-
-function isArraylike( obj ) {
-  var length = obj.length,
-    type = jQuery.type( obj );
-
-  if ( jQuery.isWindow( obj ) ) {
-    return false;
-  }
-
-  if ( obj.nodeType === 1 && length ) {
-    return true;
-  }
-
-  return type === "array" || type !== "function" &&
-    ( length === 0 ||
-    typeof length === "number" && length > 0 && ( length - 1 ) in obj );
-}
-
-// All jQuery objects should point back to these
-rootjQuery = jQuery(document);
-/*!
- * Sizzle CSS Selector Engine v1.10.2
- * http://sizzlejs.com/
- *
- * Copyright 2013 jQuery Foundation, Inc. and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2013-07-03
- */
-(function( window, undefined ) {
-
-var i,
-  support,
-  cachedruns,
-  Expr,
-  getText,
-  isXML,
-  compile,
-  outermostContext,
-  sortInput,
-
-  // Local document vars
-  setDocument,
-  document,
-  docElem,
-  documentIsHTML,
-  rbuggyQSA,
-  rbuggyMatches,
-  matches,
-  contains,
-
-  // Instance-specific data
-  expando = "sizzle" + -(new Date()),
-  preferredDoc = window.document,
-  dirruns = 0,
-  done = 0,
-  classCache = createCache(),
-  tokenCache = createCache(),
-  compilerCache = createCache(),
-  hasDuplicate = false,
-  sortOrder = function( a, b ) {
-    if ( a === b ) {
-      hasDuplicate = true;
-      return 0;
-    }
-    return 0;
-  },
-
-  // General-purpose constants
-  strundefined = typeof undefined,
-  MAX_NEGATIVE = 1 << 31,
-
-  // Instance methods
-  hasOwn = ({}).hasOwnProperty,
-  arr = [],
-  pop = arr.pop,
-  push_native = arr.push,
-  push = arr.push,
-  slice = arr.slice,
-  // Use a stripped-down indexOf if we can't use a native one
-  indexOf = arr.indexOf || function( elem ) {
-    var i = 0,
-      len = this.length;
-    for ( ; i < len; i++ ) {
-      if ( this[i] === elem ) {
-        return i;
-      }
-    }
-    return -1;
-  },
-
-  booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
-
-  // Regular expressions
-
-  // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
-  whitespace = "[\\x20\\t\\r\\n\\f]",
-  // http://www.w3.org/TR/css3-syntax/#characters
-  characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
-
-  // Loosely modeled on CSS identifier characters
-  // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
-  // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
-  identifier = characterEncoding.replace( "w", "w#" ),
-
-  // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
-  attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
-    "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
-
-  // Prefer arguments quoted,
-  //   then not containing pseudos/brackets,
-  //   then attribute selectors/non-parenthetical expressions,
-  //   then anything else
-  // These preferences are here to reduce the number of selectors
-  //   needing tokenize in the PSEUDO preFilter
-  pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
-
-  // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
-  rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
-
-  rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
-  rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
-
-  rsibling = new RegExp( whitespace + "*[+~]" ),
-  rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ),
-
-  rpseudo = new RegExp( pseudos ),
-  ridentifier = new RegExp( "^" + identifier + "$" ),
-
-  matchExpr = {
-    "ID": new RegExp( "^#(" + characterEncoding + ")" ),
-    "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
-    "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
-    "ATTR": new RegExp( "^" + attributes ),
-    "PSEUDO": new RegExp( "^" + pseudos ),
-    "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
-      "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
-      "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
-    "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
-    // For use in libraries implementing .is()
-    // We use this for POS matching in `select`
-    "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
-      whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
-  },
-
-  rnative = /^[^{]+\{\s*\[native \w/,
-
-  // Easily-parseable/retrievable ID or TAG or CLASS selectors
-  rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
-
-  rinputs = /^(?:input|select|textarea|button)$/i,
-  rheader = /^h\d$/i,
-
-  rescape = /'|\\/g,
-
-  // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
-  runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
-  funescape = function( _, escaped, escapedWhitespace ) {
-    var high = "0x" + escaped - 0x10000;
-    // NaN means non-codepoint
-    // Support: Firefox
-    // Workaround erroneous numeric interpretation of +"0x"
-    return high !== high || escapedWhitespace ?
-      escaped :
-      // BMP codepoint
-      high < 0 ?
-        String.fromCharCode( high + 0x10000 ) :
-        // Supplemental Plane codepoint (surrogate pair)
-        String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
-  };
-
-// Optimize for push.apply( _, NodeList )
-try {
-  push.apply(
-    (arr = slice.call( preferredDoc.childNodes )),
-    preferredDoc.childNodes
-  );
-  // Support: Android<4.0
-  // Detect silently failing push.apply
-  arr[ preferredDoc.childNodes.length ].nodeType;
-} catch ( e ) {
-  push = { apply: arr.length ?
-
-    // Leverage slice if possible
-    function( target, els ) {
-      push_native.apply( target, slice.call(els) );
-    } :
-
-    // Support: IE<9
-    // Otherwise append directly
-    function( target, els ) {
-      var j = target.length,
-        i = 0;
-      // Can't trust NodeList.length
-      while ( (target[j++] = els[i++]) ) {}
-      target.length = j - 1;
-    }
-  };
-}
-
-function Sizzle( selector, context, results, seed ) {
-  var match, elem, m, nodeType,
-    // QSA vars
-    i, groups, old, nid, newContext, newSelector;
-
-  if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
-    setDocument( context );
-  }
-
-  context = context || document;
-  results = results || [];
-
-  if ( !selector || typeof selector !== "string" ) {
-    return results;
-  }
-
-  if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
-    return [];
-  }
-
-  if ( documentIsHTML && !seed ) {
-
-    // Shortcuts
-    if ( (match = rquickExpr.exec( selector )) ) {
-      // Speed-up: Sizzle("#ID")
-      if ( (m = match[1]) ) {
-        if ( nodeType === 9 ) {
-          elem = context.getElementById( m );
-          // Check parentNode to catch when Blackberry 4.6 returns
-          // nodes that are no longer in the document #6963
-          if ( elem && elem.parentNode ) {
-            // Handle the case where IE, Opera, and Webkit return items
-            // by name instead of ID
-            if ( elem.id === m ) {
-              results.push( elem );
-              return results;
-            }
-          } else {
-            return results;
-          }
-        } else {
-          // Context is not a document
-          if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
-            contains( context, elem ) && elem.id === m ) {
-            results.push( elem );
-            return results;
-          }
-        }
-
-      // Speed-up: Sizzle("TAG")
-      } else if ( match[2] ) {
-        push.apply( results, context.getElementsByTagName( selector ) );
-        return results;
-
-      // Speed-up: Sizzle(".CLASS")
-      } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
-        push.apply( results, context.getElementsByClassName( m ) );
-        return results;
-      }
-    }
-
-    // QSA path
-    if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
-      nid = old = expando;
-      newContext = context;
-      newSelector = nodeType === 9 && selector;
-
-      // qSA works strangely on Element-rooted queries
-      // We can work around this by specifying an extra ID on the root
-      // and working up from there (Thanks to Andrew Dupont for the technique)
-      // IE 8 doesn't work on object elements
-      if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
-        groups = tokenize( selector );
-
-        if ( (old = context.getAttribute("id")) ) {
-          nid = old.replace( rescape, "\\$&" );
-        } else {
-          context.setAttribute( "id", nid );
-        }
-        nid = "[id='" + nid + "'] ";
-
-        i = groups.length;
-        while ( i-- ) {
-          groups[i] = nid + toSelector( groups[i] );
-        }
-        newContext = rsibling.test( selector ) && context.parentNode || context;
-        newSelector = groups.join(",");
-      }
-
-      if ( newSelector ) {
-        try {
-          push.apply( results,
-            newContext.querySelectorAll( newSelector )
-          );
-          return results;
-        } catch(qsaError) {
-        } finally {
-          if ( !old ) {
-            context.removeAttribute("id");
-          }
-        }
-      }
-    }
-  }
-
-  // All others
-  return select( selector.replace( rtrim, "$1" ), context, results, seed );
-}
-
-/**
- * Create key-value caches of limited size
- * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
- *  property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
- *  deleting the oldest entry
- */
-function createCache() {
-  var keys = [];
-
-  function cache( key, value ) {
-    // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
-    if ( keys.push( key += " " ) > Expr.cacheLength ) {
-      // Only keep the most recent entries
-      delete cache[ keys.shift() ];
-    }
-    return (cache[ key ] = value);
-  }
-  return cache;
-}
-
-/**
- * Mark a function for special use by Sizzle
- * @param {Function} fn The function to mark
- */
-function markFunction( fn ) {
-  fn[ expando ] = true;
-  return fn;
-}
-
-/**
- * Support testing using an element
- * @param {Function} fn Passed the created div and expects a boolean result
- */
-function assert( fn ) {
-  var div = document.createElement("div");
-
-  try {
-    return !!fn( div );
-  } catch (e) {
-    return false;
-  } finally {
-    // Remove from its parent by default
-    if ( div.parentNode ) {
-      div.parentNode.removeChild( div );
-    }
-    // release memory in IE
-    div = null;
-  }
-}
-
-/**
- * Adds the same handler for all of the specified attrs
- * @param {String} attrs Pipe-separated list of attributes
- * @param {Function} handler The method that will be applied
- */
-function addHandle( attrs, handler ) {
-  var arr = attrs.split("|"),
-    i = attrs.length;
-
-  while ( i-- ) {
-    Expr.attrHandle[ arr[i] ] = handler;
-  }
-}
-
-/**
- * Checks document order of two siblings
- * @param {Element} a
- * @param {Element} b
- * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
- */
-function siblingCheck( a, b ) {
-  var cur = b && a,
-    diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
-      ( ~b.sourceIndex || MAX_NEGATIVE ) -
-      ( ~a.sourceIndex || MAX_NEGATIVE );
-
-  // Use IE sourceIndex if available on both nodes
-  if ( diff ) {
-    return diff;
-  }
-
-  // Check if b follows a
-  if ( cur ) {
-    while ( (cur = cur.nextSibling) ) {
-      if ( cur === b ) {
-        return -1;
-      }
-    }
-  }
-
-  return a ? 1 : -1;
-}
-
-/**
- * Returns a function to use in pseudos for input types
- * @param {String} type
- */
-function createInputPseudo( type ) {
-  return function( elem ) {
-    var name = elem.nodeName.toLowerCase();
-    return name === "input" && elem.type === type;
-  };
-}
-
-/**
- * Returns a function to use in pseudos for buttons
- * @param {String} type
- */
-function createButtonPseudo( type ) {
-  return function( elem ) {
-    var name = elem.nodeName.toLowerCase();
-    return (name === "input" || name === "button") && elem.type === type;
-  };
-}
-
-/**
- * Returns a function to use in pseudos for positionals
- * @param {Function} fn
- */
-function createPositionalPseudo( fn ) {
-  return markFunction(function( argument ) {
-    argument = +argument;
-    return markFunction(function( seed, matches ) {
-      var j,
-        matchIndexes = fn( [], seed.length, argument ),
-        i = matchIndexes.length;
-
-      // Match elements found at the specified indexes
-      while ( i-- ) {
-        if ( seed[ (j = matchIndexes[i]) ] ) {
-          seed[j] = !(matches[j] = seed[j]);
-        }
-      }
-    });
-  });
-}
-
-/**
- * Detect xml
- * @param {Element|Object} elem An element or a document
- */
-isXML = Sizzle.isXML = function( elem ) {
-  // documentElement is verified for cases where it doesn't yet exist
-  // (such as loading iframes in IE - #4833)
-  var documentElement = elem && (elem.ownerDocument || elem).documentElement;
-  return documentElement ? documentElement.nodeName !== "HTML" : false;
-};
-
-// Expose support vars for convenience
-support = Sizzle.support = {};
-
-/**
- * Sets document-related variables once based on the current document
- * @param {Element|Object} [doc] An element or document object to use to set the document
- * @returns {Object} Returns the current document
- */
-setDocument = Sizzle.setDocument = function( node ) {
-  var doc = node ? node.ownerDocument || node : preferredDoc,
-    parent = doc.defaultView;
-
-  // If no document and documentElement is available, return
-  if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
-    return document;
-  }
-
-  // Set our document
-  document = doc;
-  docElem = doc.documentElement;
-
-  // Support tests
-  documentIsHTML = !isXML( doc );
-
-  // Support: IE>8
-  // If iframe document is assigned to "document" variable and if iframe has been reloaded,
-  // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
-  // IE6-8 do not support the defaultView property so parent will be undefined
-  if ( parent && parent.attachEvent && parent !== parent.top ) {
-    parent.attachEvent( "onbeforeunload", function() {
-      setDocument();
-    });
-  }
-
-  /* Attributes
-  ---------------------------------------------------------------------- */
-
-  // Support: IE<8
-  // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
-  support.attributes = assert(function( div ) {
-    div.className = "i";
-    return !div.getAttribute("className");
-  });
-
-  /* getElement(s)By*
-  ---------------------------------------------------------------------- */
-
-  // Check if getElementsByTagName("*") returns only elements
-  support.getElementsByTagName = assert(function( div ) {
-    div.appendChild( doc.createComment("") );
-    return !div.getElementsByTagName("*").length;
-  });
-
-  // Check if getElementsByClassName can be trusted
-  support.getElementsByClassName = assert(function( div ) {
-    div.innerHTML = "<div class='a'></div><div class='a i'></div>";
-
-    // Support: Safari<4
-    // Catch class over-caching
-    div.firstChild.className = "i";
-    // Support: Opera<10
-    // Catch gEBCN failure to find non-leading classes
-    return div.getElementsByClassName("i").length === 2;
-  });
-
-  // Support: IE<10
-  // Check if getElementById returns elements by name
-  // The broken getElementById methods don't pick up programatically-set names,
-  // so use a roundabout getElementsByName test
-  support.getById = assert(function( div ) {
-    docElem.appendChild( div ).id = expando;
-    return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
-  });
-
-  // ID find and filter
-  if ( support.getById ) {
-    Expr.find["ID"] = function( id, context ) {
-      if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
-        var m = context.getElementById( id );
-        // Check parentNode to catch when Blackberry 4.6 returns
-        // nodes that are no longer in the document #6963
-        return m && m.parentNode ? [m] : [];
-      }
-    };
-    Expr.filter["ID"] = function( id ) {
-      var attrId = id.replace( runescape, funescape );
-      return function( elem ) {
-        return elem.getAttribute("id") === attrId;
-      };
-    };
-  } else {
-    // Support: IE6/7
-    // getElementById is not reliable as a find shortcut
-    delete Expr.find["ID"];
-
-    Expr.filter["ID"] =  function( id ) {
-      var attrId = id.replace( runescape, funescape );
-      return function( elem ) {
-        var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
-        return node && node.value === attrId;
-      };
-    };
-  }
-
-  // Tag
-  Expr.find["TAG"] = support.getElementsByTagName ?
-    function( tag, context ) {
-      if ( typeof context.getElementsByTagName !== strundefined ) {
-        return context.getElementsByTagName( tag );
-      }
-    } :
-    function( tag, context ) {
-      var elem,
-        tmp = [],
-        i = 0,
-        results = context.getElementsByTagName( tag );
-
-      // Filter out possible comments
-      if ( tag === "*" ) {
-        while ( (elem = results[i++]) ) {
-          if ( elem.nodeType === 1 ) {
-            tmp.push( elem );
-          }
-        }
-
-        return tmp;
-      }
-      return results;
-    };
-
-  // Class
-  Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
-    if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {
-      return context.getElementsByClassName( className );
-    }
-  };
-
-  /* QSA/matchesSelector
-  ---------------------------------------------------------------------- */
-
-  // QSA and matchesSelector support
-
-  // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
-  rbuggyMatches = [];
-
-  // qSa(:focus) reports false when true (Chrome 21)
-  // We allow this because of a bug in IE8/9 that throws an error
-  // whenever `document.activeElement` is accessed on an iframe
-  // So, we allow :focus to pass through QSA all the time to avoid the IE error
-  // See http://bugs.jquery.com/ticket/13378
-  rbuggyQSA = [];
-
-  if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
-    // Build QSA regex
-    // Regex strategy adopted from Diego Perini
-    assert(function( div ) {
-      // Select is set to empty string on purpose
-      // This is to test IE's treatment of not explicitly
-      // setting a boolean content attribute,
-      // since its presence should be enough
-      // http://bugs.jquery.com/ticket/12359
-      div.innerHTML = "<select><option selected=''></option></select>";
-
-      // Support: IE8
-      // Boolean attributes and "value" are not treated correctly
-      if ( !div.querySelectorAll("[selected]").length ) {
-        rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
-      }
-
-      // Webkit/Opera - :checked should return selected option elements
-      // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
-      // IE8 throws error here and will not see later tests
-      if ( !div.querySelectorAll(":checked").length ) {
-        rbuggyQSA.push(":checked");
-      }
-    });
-
-    assert(function( div ) {
-
-      // Support: Opera 10-12/IE8
-      // ^= $= *= and empty values
-      // Should not select anything
-      // Support: Windows 8 Native Apps
-      // The type attribute is restricted during .innerHTML assignment
-      var input = doc.createElement("input");
-      input.setAttribute( "type", "hidden" );
-      div.appendChild( input ).setAttribute( "t", "" );
-
-      if ( div.querySelectorAll("[t^='']").length ) {
-        rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
-      }
-
-      // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
-      // IE8 throws error here and will not see later tests
-      if ( !div.querySelectorAll(":enabled").length ) {
-        rbuggyQSA.push( ":enabled", ":disabled" );
-      }
-
-      // Opera 10-11 does not throw on post-comma invalid pseudos
-      div.querySelectorAll("*,:x");
-      rbuggyQSA.push(",.*:");
-    });
-  }
-
-  if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector ||
-    docElem.mozMatchesSelector ||
-    docElem.oMatchesSelector ||
-    docElem.msMatchesSelector) )) ) {
-
-    assert(function( div ) {
-      // Check to see if it's possible to do matchesSelector
-      // on a disconnected node (IE 9)
-      support.disconnectedMatch = matches.call( div, "div" );
-
-      // This should fail with an exception
-      // Gecko does not error, returns false instead
-      matches.call( div, "[s!='']:x" );
-      rbuggyMatches.push( "!=", pseudos );
-    });
-  }
-
-  rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
-  rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
-
-  /* Contains
-  ---------------------------------------------------------------------- */
-
-  // Element contains another
-  // Purposefully does not implement inclusive descendent
-  // As in, an element does not contain itself
-  contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ?
-    function( a, b ) {
-      var adown = a.nodeType === 9 ? a.documentElement : a,
-        bup = b && b.parentNode;
-      return a === bup || !!( bup && bup.nodeType === 1 && (
-        adown.contains ?
-          adown.contains( bup ) :
-          a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
-      ));
-    } :
-    function( a, b ) {
-      if ( b ) {
-        while ( (b = b.parentNode) ) {
-          if ( b === a ) {
-            return true;
-          }
-        }
-      }
-      return false;
-    };
-
-  /* Sorting
-  ---------------------------------------------------------------------- */
-
-  // Document order sorting
-  sortOrder = docElem.compareDocumentPosition ?
-  function( a, b ) {
-
-    // Flag for duplicate removal
-    if ( a === b ) {
-      hasDuplicate = true;
-      return 0;
-    }
-
-    var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
-
-    if ( compare ) {
-      // Disconnected nodes
-      if ( compare & 1 ||
-        (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
-
-        // Choose the first element that is related to our preferred document
-        if ( a === doc || contains(preferredDoc, a) ) {
-          return -1;
-        }
-        if ( b === doc || contains(preferredDoc, b) ) {
-          return 1;
-        }
-
-        // Maintain original order
-        return sortInput ?
-          ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
-          0;
-      }
-
-      return compare & 4 ? -1 : 1;
-    }
-
-    // Not directly comparable, sort on existence of method
-    return a.compareDocumentPosition ? -1 : 1;
-  } :
-  function( a, b ) {
-    var cur,
-      i = 0,
-      aup = a.parentNode,
-      bup = b.parentNode,
-      ap = [ a ],
-      bp = [ b ];
-
-    // Exit early if the nodes are identical
-    if ( a === b ) {
-      hasDuplicate = true;
-      return 0;
-
-    // Parentless nodes are either documents or disconnected
-    } else if ( !aup || !bup ) {
-      return a === doc ? -1 :
-        b === doc ? 1 :
-        aup ? -1 :
-        bup ? 1 :
-        sortInput ?
-        ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
-        0;
-
-    // If the nodes are siblings, we can do a quick check
-    } else if ( aup === bup ) {
-      return siblingCheck( a, b );
-    }
-
-    // Otherwise we need full lists of their ancestors for comparison
-    cur = a;
-    while ( (cur = cur.parentNode) ) {
-      ap.unshift( cur );
-    }
-    cur = b;
-    while ( (cur = cur.parentNode) ) {
-      bp.unshift( cur );
-    }
-
-    // Walk down the tree looking for a discrepancy
-    while ( ap[i] === bp[i] ) {
-      i++;
-    }
-
-    return i ?
-      // Do a sibling check if the nodes have a common ancestor
-      siblingCheck( ap[i], bp[i] ) :
-
-      // Otherwise nodes in our document sort first
-      ap[i] === preferredDoc ? -1 :
-      bp[i] === preferredDoc ? 1 :
-      0;
-  };
-
-  return doc;
-};
-
-Sizzle.matches = function( expr, elements ) {
-  return Sizzle( expr, null, null, elements );
-};
-
-Sizzle.matchesSelector = function( elem, expr ) {
-  // Set document vars if needed
-  if ( ( elem.ownerDocument || elem ) !== document ) {
-    setDocument( elem );
-  }
-
-  // Make sure that attribute selectors are quoted
-  expr = expr.replace( rattributeQuotes, "='$1']" );
-
-  if ( support.matchesSelector && documentIsHTML &&
-    ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
-    ( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
-
-    try {
-      var ret = matches.call( elem, expr );
-
-      // IE 9's matchesSelector returns false on disconnected nodes
-      if ( ret || support.disconnectedMatch ||
-          // As well, disconnected nodes are said to be in a document
-          // fragment in IE 9
-          elem.document && elem.document.nodeType !== 11 ) {
-        return ret;
-      }
-    } catch(e) {}
-  }
-
-  return Sizzle( expr, document, null, [elem] ).length > 0;
-};
-
-Sizzle.contains = function( context, elem ) {
-  // Set document vars if needed
-  if ( ( context.ownerDocument || context ) !== document ) {
-    setDocument( context );
-  }
-  return contains( context, elem );
-};
-
-Sizzle.attr = function( elem, name ) {
-  // Set document vars if needed
-  if ( ( elem.ownerDocument || elem ) !== document ) {
-    setDocument( elem );
-  }
-
-  var fn = Expr.attrHandle[ name.toLowerCase() ],
-    // Don't get fooled by Object.prototype properties (jQuery #13807)
-    val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
-      fn( elem, name, !documentIsHTML ) :
-      undefined;
-
-  return val === undefined ?
-    support.attributes || !documentIsHTML ?
-      elem.getAttribute( name ) :
-      (val = elem.getAttributeNode(name)) && val.specified ?
-        val.value :
-        null :
-    val;
-};
-
-Sizzle.error = function( msg ) {
-  throw new Error( "Syntax error, unrecognized expression: " + msg );
-};
-
-/**
- * Document sorting and removing duplicates
- * @param {ArrayLike} results
- */
-Sizzle.uniqueSort = function( results ) {
-  var elem,
-    duplicates = [],
-    j = 0,
-    i = 0;
-
-  // Unless we *know* we can detect duplicates, assume their presence
-  hasDuplicate = !support.detectDuplicates;
-  sortInput = !support.sortStable && results.slice( 0 );
-  results.sort( sortOrder );
-
-  if ( hasDuplicate ) {
-    while ( (elem = results[i++]) ) {
-      if ( elem === results[ i ] ) {
-        j = duplicates.push( i );
-      }
-    }
-    while ( j-- ) {
-      results.splice( duplicates[ j ], 1 );
-    }
-  }
-
-  return results;
-};
-
-/**
- * Utility function for retrieving the text value of an array of DOM nodes
- * @param {Array|Element} elem
- */
-getText = Sizzle.getText = function( elem ) {
-  var node,
-    ret = "",
-    i = 0,
-    nodeType = elem.nodeType;
-
-  if ( !nodeType ) {
-    // If no nodeType, this is expected to be an array
-    for ( ; (node = elem[i]); i++ ) {
-      // Do not traverse comment nodes
-      ret += getText( node );
-    }
-  } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
-    // Use textContent for elements
-    // innerText usage removed for consistency of new lines (see #11153)
-    if ( typeof elem.textContent === "string" ) {
-      return elem.textContent;
-    } else {
-      // Traverse its children
-      for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
-        ret += getText( elem );
-      }
-    }
-  } else if ( nodeType === 3 || nodeType === 4 ) {
-    return elem.nodeValue;
-  }
-  // Do not include comment or processing instruction nodes
-
-  return ret;
-};
-
-Expr = Sizzle.selectors = {
-
-  // Can be adjusted by the user
-  cacheLength: 50,
-
-  createPseudo: markFunction,
-
-  match: matchExpr,
-
-  attrHandle: {},
-
-  find: {},
-
-  relative: {
-    ">": { dir: "parentNode", first: true },
-    " ": { dir: "parentNode" },
-    "+": { dir: "previousSibling", first: true },
-    "~": { dir: "previousSibling" }
-  },
-
-  preFilter: {
-    "ATTR": function( match ) {
-      match[1] = match[1].replace( runescape, funescape );
-
-      // Move the given value to match[3] whether quoted or unquoted
-      match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
-
-      if ( match[2] === "~=" ) {
-        match[3] = " " + match[3] + " ";
-      }
-
-      return match.slice( 0, 4 );
-    },
-
-    "CHILD": function( match ) {
-      /* matches from matchExpr["CHILD"]
-        1 type (only|nth|...)
-        2 what (child|of-type)
-        3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
-        4 xn-component of xn+y argument ([+-]?\d*n|)
-        5 sign of xn-component
-        6 x of xn-component
-        7 sign of y-component
-        8 y of y-component
-      */
-      match[1] = match[1].toLowerCase();
-
-      if ( match[1].slice( 0, 3 ) === "nth" ) {
-        // nth-* requires argument
-        if ( !match[3] ) {
-          Sizzle.error( match[0] );
-        }
-
-        // numeric x and y parameters for Expr.filter.CHILD
-        // remember that false/true cast respectively to 0/1
-        match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
-        match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
-
-      // other types prohibit arguments
-      } else if ( match[3] ) {
-        Sizzle.error( match[0] );
-      }
-
-      return match;
-    },
-
-    "PSEUDO": function( match ) {
-      var excess,
-        unquoted = !match[5] && match[2];
-
-      if ( matchExpr["CHILD"].test( match[0] ) ) {
-        return null;
-      }
-
-      // Accept quoted arguments as-is
-      if ( match[3] && match[4] !== undefined ) {
-        match[2] = match[4];
-
-      // Strip excess characters from unquoted arguments
-      } else if ( unquoted && rpseudo.test( unquoted ) &&
-        // Get excess from tokenize (recursively)
-        (excess = tokenize( unquoted, true )) &&
-        // advance to the next closing parenthesis
-        (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
-
-        // excess is a negative index
-        match[0] = match[0].slice( 0, excess );
-        match[2] = unquoted.slice( 0, excess );
-      }
-
-      // Return only captures needed by the pseudo filter method (type and argument)
-      return match.slice( 0, 3 );
-    }
-  },
-
-  filter: {
-
-    "TAG": function( nodeNameSelector ) {
-      var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
-      return nodeNameSelector === "*" ?
-        function() { return true; } :
-        function( elem ) {
-          return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
-        };
-    },
-
-    "CLASS": function( className ) {
-      var pattern = classCache[ className + " " ];
-
-      return pattern ||
-        (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
-        classCache( className, function( elem ) {
-          return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );
-        });
-    },
-
-    "ATTR": function( name, operator, check ) {
-      return function( elem ) {
-        var result = Sizzle.attr( elem, name );
-
-        if ( result == null ) {
-          return operator === "!=";
-        }
-        if ( !operator ) {
-          return true;
-        }
-
-        result += "";
-
-        return operator === "=" ? result === check :
-          operator === "!=" ? result !== check :
-          operator === "^=" ? check && result.indexOf( check ) === 0 :
-          operator === "*=" ? check && result.indexOf( check ) > -1 :
-          operator === "$=" ? check && result.slice( -check.length ) === check :
-          operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
-          operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
-          false;
-      };
-    },
-
-    "CHILD": function( type, what, argument, first, last ) {
-      var simple = type.slice( 0, 3 ) !== "nth",
-        forward = type.slice( -4 ) !== "last",
-        ofType = what === "of-type";
-
-      return first === 1 && last === 0 ?
-
-        // Shortcut for :nth-*(n)
-        function( elem ) {
-          return !!elem.parentNode;
-        } :
-
-        function( elem, context, xml ) {
-          var cache, outerCache, node, diff, nodeIndex, start,
-            dir = simple !== forward ? "nextSibling" : "previousSibling",
-            parent = elem.parentNode,
-            name = ofType && elem.nodeName.toLowerCase(),
-            useCache = !xml && !ofType;
-
-          if ( parent ) {
-
-            // :(first|last|only)-(child|of-type)
-            if ( simple ) {
-              while ( dir ) {
-                node = elem;
-                while ( (node = node[ dir ]) ) {
-                  if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
-                    return false;
-                  }
-                }
-                // Reverse direction for :only-* (if we haven't yet done so)
-                start = dir = type === "only" && !start && "nextSibling";
-              }
-              return true;
-            }
-
-            start = [ forward ? parent.firstChild : parent.lastChild ];
-
-            // non-xml :nth-child(...) stores cache data on `parent`
-            if ( forward && useCache ) {
-              // Seek `elem` from a previously-cached index
-              outerCache = parent[ expando ] || (parent[ expando ] = {});
-              cache = outerCache[ type ] || [];
-              nodeIndex = cache[0] === dirruns && cache[1];
-              diff = cache[0] === dirruns && cache[2];
-              node = nodeIndex && parent.childNodes[ nodeIndex ];
-
-              while ( (node = ++nodeIndex && node && node[ dir ] ||
-
-                // Fallback to seeking `elem` from the start
-                (diff = nodeIndex = 0) || start.pop()) ) {
-
-                // When found, cache indexes on `parent` and break
-                if ( node.nodeType === 1 && ++diff && node === elem ) {
-                  outerCache[ type ] = [ dirruns, nodeIndex, diff ];
-                  break;
-                }
-              }
-
-            // Use previously-cached element index if available
-            } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
-              diff = cache[1];
-
-            // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
-            } else {
-              // Use the same loop as above to seek `elem` from the start
-              while ( (node = ++nodeIndex && node && node[ dir ] ||
-                (diff = nodeIndex = 0) || start.pop()) ) {
-
-                if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
-                  // Cache the index of each encountered element
-                  if ( useCache ) {
-                    (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
-                  }
-
-                  if ( node === elem ) {
-                    break;
-                  }
-                }
-              }
-            }
-
-            // Incorporate the offset, then check against cycle size
-            diff -= last;
-            return diff === first || ( diff % first === 0 && diff / first >= 0 );
-          }
-        };
-    },
-
-    "PSEUDO": function( pseudo, argument ) {
-      // pseudo-class names are case-insensitive
-      // http://www.w3.org/TR/selectors/#pseudo-classes
-      // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
-      // Remember that setFilters inherits from pseudos
-      var args,
-        fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
-          Sizzle.error( "unsupported pseudo: " + pseudo );
-
-      // The user may use createPseudo to indicate that
-      // arguments are needed to create the filter function
-      // just as Sizzle does
-      if ( fn[ expando ] ) {
-        return fn( argument );
-      }
-
-      // But maintain support for old signatures
-      if ( fn.length > 1 ) {
-        args = [ pseudo, pseudo, "", argument ];
-        return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
-          markFunction(function( seed, matches ) {
-            var idx,
-              matched = fn( seed, argument ),
-              i = matched.length;
-            while ( i-- ) {
-              idx = indexOf.call( seed, matched[i] );
-              seed[ idx ] = !( matches[ idx ] = matched[i] );
-            }
-          }) :
-          function( elem ) {
-            return fn( elem, 0, args );
-          };
-      }
-
-      return fn;
-    }
-  },
-
-  pseudos: {
-    // Potentially complex pseudos
-    "not": markFunction(function( selector ) {
-      // Trim the selector passed to compile
-      // to avoid treating leading and trailing
-      // spaces as combinators
-      var input = [],
-        results = [],
-        matcher = compile( selector.replace( rtrim, "$1" ) );
-
-      return matcher[ expando ] ?
-        markFunction(function( seed, matches, context, xml ) {
-          var elem,
-            unmatched = matcher( seed, null, xml, [] ),
-            i = seed.length;
-
-          // Match elements unmatched by `matcher`
-          while ( i-- ) {
-            if ( (elem = unmatched[i]) ) {
-              seed[i] = !(matches[i] = elem);
-            }
-          }
-        }) :
-        function( elem, context, xml ) {
-          input[0] = elem;
-          matcher( input, null, xml, results );
-          return !results.pop();
-        };
-    }),
-
-    "has": markFunction(function( selector ) {
-      return function( elem ) {
-        return Sizzle( selector, elem ).length > 0;
-      };
-    }),
-
-    "contains": markFunction(function( text ) {
-      return function( elem ) {
-        return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
-      };
-    }),
-
-    // "Whether an element is represented by a :lang() selector
-    // is based solely on the element's language value
-    // being equal to the identifier C,
-    // or beginning with the identifier C immediately followed by "-".
-    // The matching of C against the element's language value is performed case-insensitively.
-    // The identifier C does not have to be a valid language name."
-    // http://www.w3.org/TR/selectors/#lang-pseudo
-    "lang": markFunction( function( lang ) {
-      // lang value must be a valid identifier
-      if ( !ridentifier.test(lang || "") ) {
-        Sizzle.error( "unsupported lang: " + lang );
-      }
-      lang = lang.replace( runescape, funescape ).toLowerCase();
-      return function( elem ) {
-        var elemLang;
-        do {
-          if ( (elemLang = documentIsHTML ?
-            elem.lang :
-            elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
-
-            elemLang = elemLang.toLowerCase();
-            return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
-          }
-        } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
-        return false;
-      };
-    }),
-
-    // Miscellaneous
-    "target": function( elem ) {
-      var hash = window.location && window.location.hash;
-      return hash && hash.slice( 1 ) === elem.id;
-    },
-
-    "root": function( elem ) {
-      return elem === docElem;
-    },
-
-    "focus": function( elem ) {
-      return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
-    },
-
-    // Boolean properties
-    "enabled": function( elem ) {
-      return elem.disabled === false;
-    },
-
-    "disabled": function( elem ) {
-      return elem.disabled === true;
-    },
-
-    "checked": function( elem ) {
-      // In CSS3, :checked should return both checked and selected elements
-      // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
-      var nodeName = elem.nodeName.toLowerCase();
-      return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
-    },
-
-    "selected": function( elem ) {
-      // Accessing this property makes selected-by-default
-      // options in Safari work properly
-      if ( elem.parentNode ) {
-        elem.parentNode.selectedIndex;
-      }
-
-      return elem.selected === true;
-    },
-
-    // Contents
-    "empty": function( elem ) {
-      // http://www.w3.org/TR/selectors/#empty-pseudo
-      // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
-      //   not comment, processing instructions, or others
-      // Thanks to Diego Perini for the nodeName shortcut
-      //   Greater than "@" means alpha characters (specifically not starting with "#" or "?")
-      for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
-        if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
-          return false;
-        }
-      }
-      return true;
-    },
-
-    "parent": function( elem ) {
-      return !Expr.pseudos["empty"]( elem );
-    },
-
-    // Element/input types
-    "header": function( elem ) {
-      return rheader.test( elem.nodeName );
-    },
-
-    "input": function( elem ) {
-      return rinputs.test( elem.nodeName );
-    },
-
-    "button": function( elem ) {
-      var name = elem.nodeName.toLowerCase();
-      return name === "input" && elem.type === "button" || name === "button";
-    },
-
-    "text": function( elem ) {
-      var attr;
-      // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
-      // use getAttribute instead to test this case
-      return elem.nodeName.toLowerCase() === "input" &&
-        elem.type === "text" &&
-        ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
-    },
-
-    // Position-in-collection
-    "first": createPositionalPseudo(function() {
-      return [ 0 ];
-    }),
-
-    "last": createPositionalPseudo(function( matchIndexes, length ) {
-      return [ length - 1 ];
-    }),
-
-    "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
-      return [ argument < 0 ? argument + length : argument ];
-    }),
-
-    "even": createPositionalPseudo(function( matchIndexes, length ) {
-      var i = 0;
-      for ( ; i < length; i += 2 ) {
-        matchIndexes.push( i );
-      }
-      return matchIndexes;
-    }),
-
-    "odd": createPositionalPseudo(function( matchIndexes, length ) {
-      var i = 1;
-      for ( ; i < length; i += 2 ) {
-        matchIndexes.push( i );
-      }
-      return matchIndexes;
-    }),
-
-    "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
-      var i = argument < 0 ? argument + length : argument;
-      for ( ; --i >= 0; ) {
-        matchIndexes.push( i );
-      }
-      return matchIndexes;
-    }),
-
-    "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
-      var i = argument < 0 ? argument + length : argument;
-      for ( ; ++i < length; ) {
-        matchIndexes.push( i );
-      }
-      return matchIndexes;
-    })
-  }
-};
-
-Expr.pseudos["nth"] = Expr.pseudos["eq"];
-
-// Add button/input type pseudos
-for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
-  Expr.pseudos[ i ] = createInputPseudo( i );
-}
-for ( i in { submit: true, reset: true } ) {
-  Expr.pseudos[ i ] = createButtonPseudo( i );
-}
-
-// Easy API for creating new setFilters
-function setFilters() {}
-setFilters.prototype = Expr.filters = Expr.pseudos;
-Expr.setFilters = new setFilters();
-
-function tokenize( selector, parseOnly ) {
-  var matched, match, tokens, type,
-    soFar, groups, preFilters,
-    cached = tokenCache[ selector + " " ];
-
-  if ( cached ) {
-    return parseOnly ? 0 : cached.slice( 0 );
-  }
-
-  soFar = selector;
-  groups = [];
-  preFilters = Expr.preFilter;
-
-  while ( soFar ) {
-
-    // Comma and first run
-    if ( !matched || (match = rcomma.exec( soFar )) ) {
-      if ( match ) {
-        // Don't consume trailing commas as valid
-        soFar = soFar.slice( match[0].length ) || soFar;
-      }
-      groups.push( tokens = [] );
-    }
-
-    matched = false;
-
-    // Combinators
-    if ( (match = rcombinators.exec( soFar )) ) {
-      matched = match.shift();
-      tokens.push({
-        value: matched,
-        // Cast descendant combinators to space
-        type: match[0].replace( rtrim, " " )
-      });
-      soFar = soFar.slice( matched.length );
-    }
-
-    // Filters
-    for ( type in Expr.filter ) {
-      if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
-        (match = preFilters[ type ]( match ))) ) {
-        matched = match.shift();
-        tokens.push({
-          value: matched,
-          type: type,
-          matches: match
-        });
-        soFar = soFar.slice( matched.length );
-      }
-    }
-
-    if ( !matched ) {
-      break;
-    }
-  }
-
-  // Return the length of the invalid excess
-  // if we're just parsing
-  // Otherwise, throw an error or return tokens
-  return parseOnly ?
-    soFar.length :
-    soFar ?
-      Sizzle.error( selector ) :
-      // Cache the tokens
-      tokenCache( selector, groups ).slice( 0 );
-}
-
-function toSelector( tokens ) {
-  var i = 0,
-    len = tokens.length,
-    selector = "";
-  for ( ; i < len; i++ ) {
-    selector += tokens[i].value;
-  }
-  return selector;
-}
-
-function addCombinator( matcher, combinator, base ) {
-  var dir = combinator.dir,
-    checkNonElements = base && dir === "parentNode",
-    doneName = done++;
-
-  return combinator.first ?
-    // Check against closest ancestor/preceding element
-    function( elem, context, xml ) {
-      while ( (elem = elem[ dir ]) ) {
-        if ( elem.nodeType === 1 || checkNonElements ) {
-          return matcher( elem, context, xml );
-        }
-      }
-    } :
-
-    // Check against all ancestor/preceding elements
-    function( elem, context, xml ) {
-      var data, cache, outerCache,
-        dirkey = dirruns + " " + doneName;
-
-      // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
-      if ( xml ) {
-        while ( (elem = elem[ dir ]) ) {
-          if ( elem.nodeType === 1 || checkNonElements ) {
-            if ( matcher( elem, context, xml ) ) {
-              return true;
-            }
-          }
-        }
-      } else {
-        while ( (elem = elem[ dir ]) ) {
-          if ( elem.nodeType === 1 || checkNonElements ) {
-            outerCache = elem[ expando ] || (elem[ expando ] = {});
-            if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
-              if ( (data = cache[1]) === true || data === cachedruns ) {
-                return data === true;
-              }
-            } else {
-              cache = outerCache[ dir ] = [ dirkey ];
-              cache[1] = matcher( elem, context, xml ) || cachedruns;
-              if ( cache[1] === true ) {
-                return true;
-              }
-            }
-          }
-        }
-      }
-    };
-}
-
-function elementMatcher( matchers ) {
-  return matchers.length > 1 ?
-    function( elem, context, xml ) {
-      var i = matchers.length;
-      while ( i-- ) {
-        if ( !matchers[i]( elem, context, xml ) ) {
-          return false;
-        }
-      }
-      return true;
-    } :
-    matchers[0];
-}
-
-function condense( unmatched, map, filter, context, xml ) {
-  var elem,
-    newUnmatched = [],
-    i = 0,
-    len = unmatched.length,
-    mapped = map != null;
-
-  for ( ; i < len; i++ ) {
-    if ( (elem = unmatched[i]) ) {
-      if ( !filter || filter( elem, context, xml ) ) {
-        newUnmatched.push( elem );
-        if ( mapped ) {
-          map.push( i );
-        }
-      }
-    }
-  }
-
-  return newUnmatched;
-}
-
-function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
-  if ( postFilter && !postFilter[ expando ] ) {
-    postFilter = setMatcher( postFilter );
-  }
-  if ( postFinder && !postFinder[ expando ] ) {
-    postFinder = setMatcher( postFinder, postSelector );
-  }
-  return markFunction(function( seed, results, context, xml ) {
-    var temp, i, elem,
-      preMap = [],
-      postMap = [],
-      preexisting = results.length,
-
-      // Get initial elements from seed or context
-      elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
-
-      // Prefilter to get matcher input, preserving a map for seed-results synchronization
-      matcherIn = preFilter && ( seed || !selector ) ?
-        condense( elems, preMap, preFilter, context, xml ) :
-        elems,
-
-      matcherOut = matcher ?
-        // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
-        postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
-
-          // ...intermediate processing is necessary
-          [] :
-
-          // ...otherwise use results directly
-          results :
-        matcherIn;
-
-    // Find primary matches
-    if ( matcher ) {
-      matcher( matcherIn, matcherOut, context, xml );
-    }
-
-    // Apply postFilter
-    if ( postFilter ) {
-      temp = condense( matcherOut, postMap );
-      postFilter( temp, [], context, xml );
-
-      // Un-match failing elements by moving them back to matcherIn
-      i = temp.length;
-      while ( i-- ) {
-        if ( (elem = temp[i]) ) {
-          matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
-        }
-      }
-    }
-
-    if ( seed ) {
-      if ( postFinder || preFilter ) {
-        if ( postFinder ) {
-          // Get the final matcherOut by condensing this intermediate into postFinder contexts
-          temp = [];
-          i = matcherOut.length;
-          while ( i-- ) {
-            if ( (elem = matcherOut[i]) ) {
-              // Restore matcherIn since elem is not yet a final match
-              temp.push( (matcherIn[i] = elem) );
-            }
-          }
-          postFinder( null, (matcherOut = []), temp, xml );
-        }
-
-        // Move matched elements from seed to results to keep them synchronized
-        i = matcherOut.length;
-        while ( i-- ) {
-          if ( (elem = matcherOut[i]) &&
-            (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
-
-            seed[temp] = !(results[temp] = elem);
-          }
-        }
-      }
-
-    // Add elements to results, through postFinder if defined
-    } else {
-      matcherOut = condense(
-        matcherOut === results ?
-          matcherOut.splice( preexisting, matcherOut.length ) :
-          matcherOut
-      );
-      if ( postFinder ) {
-        postFinder( null, results, matcherOut, xml );
-      } else {
-        push.apply( results, matcherOut );
-      }
-    }
-  });
-}
-
-function matcherFromTokens( tokens ) {
-  var checkContext, matcher, j,
-    len = tokens.length,
-    leadingRelative = Expr.relative[ tokens[0].type ],
-    implicitRelative = leadingRelative || Expr.relative[" "],
-    i = leadingRelative ? 1 : 0,
-
-    // The foundational matcher ensures that elements are reachable from top-level context(s)
-    matchContext = addCombinator( function( elem ) {
-      return elem === checkContext;
-    }, implicitRelative, true ),
-    matchAnyContext = addCombinator( function( elem ) {
-      return indexOf.call( checkContext, elem ) > -1;
-    }, implicitRelative, true ),
-    matchers = [ function( elem, context, xml ) {
-      return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
-        (checkContext = context).nodeType ?
-          matchContext( elem, context, xml ) :
-          matchAnyContext( elem, context, xml ) );
-    } ];
-
-  for ( ; i < len; i++ ) {
-    if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
-      matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
-    } else {
-      matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
-
-      // Return special upon seeing a positional matcher
-      if ( matcher[ expando ] ) {
-        // Find the next relative operator (if any) for proper handling
-        j = ++i;
-        for ( ; j < len; j++ ) {
-          if ( Expr.relative[ tokens[j].type ] ) {
-            break;
-          }
-        }
-        return setMatcher(
-          i > 1 && elementMatcher( matchers ),
-          i > 1 && toSelector(
-            // If the preceding token was a descendant combinator, insert an implicit any-element `*`
-            tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
-          ).replace( rtrim, "$1" ),
-          matcher,
-          i < j && matcherFromTokens( tokens.slice( i, j ) ),
-          j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
-          j < len && toSelector( tokens )
-        );
-      }
-      matchers.push( matcher );
-    }
-  }
-
-  return elementMatcher( matchers );
-}
-
-function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
-  // A counter to specify which element is currently being matched
-  var matcherCachedRuns = 0,
-    bySet = setMatchers.length > 0,
-    byElement = elementMatchers.length > 0,
-    superMatcher = function( seed, context, xml, results, expandContext ) {
-      var elem, j, matcher,
-        setMatched = [],
-        matchedCount = 0,
-        i = "0",
-        unmatched = seed && [],
-        outermost = expandContext != null,
-        contextBackup = outermostContext,
-        // We must always have either seed elements or context
-        elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
-        // Use integer dirruns iff this is the outermost matcher
-        dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
-
-      if ( outermost ) {
-        outermostContext = context !== document && context;
-        cachedruns = matcherCachedRuns;
-      }
-
-      // Add elements passing elementMatchers directly to results
-      // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
-      for ( ; (elem = elems[i]) != null; i++ ) {
-        if ( byElement && elem ) {
-          j = 0;
-          while ( (matcher = elementMatchers[j++]) ) {
-            if ( matcher( elem, context, xml ) ) {
-              results.push( elem );
-              break;
-            }
-          }
-          if ( outermost ) {
-            dirruns = dirrunsUnique;
-            cachedruns = ++matcherCachedRuns;
-          }
-        }
-
-        // Track unmatched elements for set filters
-        if ( bySet ) {
-          // They will have gone through all possible matchers
-          if ( (elem = !matcher && elem) ) {
-            matchedCount--;
-          }
-
-          // Lengthen the array for every element, matched or not
-          if ( seed ) {
-            unmatched.push( elem );
-          }
-        }
-      }
-
-      // Apply set filters to unmatched elements
-      matchedCount += i;
-      if ( bySet && i !== matchedCount ) {
-        j = 0;
-        while ( (matcher = setMatchers[j++]) ) {
-          matcher( unmatched, setMatched, context, xml );
-        }
-
-        if ( seed ) {
-          // Reintegrate element matches to eliminate the need for sorting
-          if ( matchedCount > 0 ) {
-            while ( i-- ) {
-              if ( !(unmatched[i] || setMatched[i]) ) {
-                setMatched[i] = pop.call( results );
-              }
-            }
-          }
-
-          // Discard index placeholder values to get only actual matches
-          setMatched = condense( setMatched );
-        }
-
-        // Add matches to results
-        push.apply( results, setMatched );
-
-        // Seedless set matches succeeding multiple successful matchers stipulate sorting
-        if ( outermost && !seed && setMatched.length > 0 &&
-          ( matchedCount + setMatchers.length ) > 1 ) {
-
-          Sizzle.uniqueSort( results );
-        }
-      }
-
-      // Override manipulation of globals by nested matchers
-      if ( outermost ) {
-        dirruns = dirrunsUnique;
-        outermostContext = contextBackup;
-      }
-
-      return unmatched;
-    };
-
-  return bySet ?
-    markFunction( superMatcher ) :
-    superMatcher;
-}
-
-compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
-  var i,
-    setMatchers = [],
-    elementMatchers = [],
-    cached = compilerCache[ selector + " " ];
-
-  if ( !cached ) {
-    // Generate a function of recursive functions that can be used to check each element
-    if ( !group ) {
-      group = tokenize( selector );
-    }
-    i = group.length;
-    while ( i-- ) {
-      cached = matcherFromTokens( group[i] );
-      if ( cached[ expando ] ) {
-        setMatchers.push( cached );
-      } else {
-        elementMatchers.push( cached );
-      }
-    }
-
-    // Cache the compiled function
-    cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
-  }
-  return cached;
-};
-
-function multipleContexts( selector, contexts, results ) {
-  var i = 0,
-    len = contexts.length;
-  for ( ; i < len; i++ ) {
-    Sizzle( selector, contexts[i], results );
-  }
-  return results;
-}
-
-function select( selector, context, results, seed ) {
-  var i, tokens, token, type, find,
-    match = tokenize( selector );
-
-  if ( !seed ) {
-    // Try to minimize operations if there is only one group
-    if ( match.length === 1 ) {
-
-      // Take a shortcut and set the context if the root selector is an ID
-      tokens = match[0] = match[0].slice( 0 );
-      if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
-          support.getById && context.nodeType === 9 && documentIsHTML &&
-          Expr.relative[ tokens[1].type ] ) {
-
-        context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
-        if ( !context ) {
-          return results;
-        }
-        selector = selector.slice( tokens.shift().value.length );
-      }
-
-      // Fetch a seed set for right-to-left matching
-      i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
-      while ( i-- ) {
-        token = tokens[i];
-
-        // Abort if we hit a combinator
-        if ( Expr.relative[ (type = token.type) ] ) {
-          break;
-        }
-        if ( (find = Expr.find[ type ]) ) {
-          // Search, expanding context for leading sibling combinators
-          if ( (seed = find(
-            token.matches[0].replace( runescape, funescape ),
-            rsibling.test( tokens[0].type ) && context.parentNode || context
-          )) ) {
-
-            // If seed is empty or no tokens remain, we can return early
-            tokens.splice( i, 1 );
-            selector = seed.length && toSelector( tokens );
-            if ( !selector ) {
-              push.apply( results, seed );
-              return results;
-            }
-
-            break;
-          }
-        }
-      }
-    }
-  }
-
-  // Compile and execute a filtering function
-  // Provide `match` to avoid retokenization if we modified the selector above
-  compile( selector, match )(
-    seed,
-    context,
-    !documentIsHTML,
-    results,
-    rsibling.test( selector )
-  );
-  return results;
-}
-
-// One-time assignments
-
-// Sort stability
-support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
-
-// Support: Chrome<14
-// Always assume duplicates if they aren't passed to the comparison function
-support.detectDuplicates = hasDuplicate;
-
-// Initialize against the default document
-setDocument();
-
-// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
-// Detached nodes confoundingly follow *each other*
-support.sortDetached = assert(function( div1 ) {
-  // Should return 1, but returns 4 (following)
-  return div1.compareDocumentPosition( document.createElement("div") ) & 1;
-});
-
-// Support: IE<8
-// Prevent attribute/property "interpolation"
-// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
-if ( !assert(function( div ) {
-  div.innerHTML = "<a href='#'></a>";
-  return div.firstChild.getAttribute("href") === "#" ;
-}) ) {
-  addHandle( "type|href|height|width", function( elem, name, isXML ) {
-    if ( !isXML ) {
-      return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
-    }
-  });
-}
-
-// Support: IE<9
-// Use defaultValue in place of getAttribute("value")
-if ( !support.attributes || !assert(function( div ) {
-  div.innerHTML = "<input/>";
-  div.firstChild.setAttribute( "value", "" );
-  return div.firstChild.getAttribute( "value" ) === "";
-}) ) {
-  addHandle( "value", function( elem, name, isXML ) {
-    if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
-      return elem.defaultValue;
-    }
-  });
-}
-
-// Support: IE<9
-// Use getAttributeNode to fetch booleans when getAttribute lies
-if ( !assert(function( div ) {
-  return div.getAttribute("disabled") == null;
-}) ) {
-  addHandle( booleans, function( elem, name, isXML ) {
-    var val;
-    if ( !isXML ) {
-      return (val = elem.getAttributeNode( name )) && val.specified ?
-        val.value :
-        elem[ name ] === true ? name.toLowerCase() : null;
-    }
-  });
-}
-
-jQuery.find = Sizzle;
-jQuery.expr = Sizzle.selectors;
-jQuery.expr[":"] = jQuery.expr.pseudos;
-jQuery.unique = Sizzle.uniqueSort;
-jQuery.text = Sizzle.getText;
-jQuery.isXMLDoc = Sizzle.isXML;
-jQuery.contains = Sizzle.contains;
-
-
-})( window );
-// String to Object options format cache
-var optionsCache = {};
-
-// Convert String-formatted options into Object-formatted ones and store in cache
-function createOptions( options ) {
-  var object = optionsCache[ options ] = {};
-  jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
-    object[ flag ] = true;
-  });
-  return object;
-}
-
-/*
- * Create a callback list using the following parameters:
- *
- *  options: an optional list of space-separated options that will change how
- *      the callback list behaves or a more traditional option object
- *
- * By default a callback list will act like an event callback list and can be
- * "fired" multiple times.
- *
- * Possible options:
- *
- *  once:     will ensure the callback list can only be fired once (like a Deferred)
- *
- *  memory:     will keep track of previous values and will call any callback added
- *          after the list has been fired right away with the latest "memorized"
- *          values (like a Deferred)
- *
- *  unique:     will ensure a callback can only be added once (no duplicate in the list)
- *
- *  stopOnFalse:  interrupt callings when a callback returns false
- *
- */
-jQuery.Callbacks = function( options ) {
-
-  // Convert options from String-formatted to Object-formatted if needed
-  // (we check in cache first)
-  options = typeof options === "string" ?
-    ( optionsCache[ options ] || createOptions( options ) ) :
-    jQuery.extend( {}, options );
-
-  var // Flag to know if list is currently firing
-    firing,
-    // Last fire value (for non-forgettable lists)
-    memory,
-    // Flag to know if list was already fired
-    fired,
-    // End of the loop when firing
-    firingLength,
-    // Index of currently firing callback (modified by remove if needed)
-    firingIndex,
-    // First callback to fire (used internally by add and fireWith)
-    firingStart,
-    // Actual callback list
-    list = [],
-    // Stack of fire calls for repeatable lists
-    stack = !options.once && [],
-    // Fire callbacks
-    fire = function( data ) {
-      memory = options.memory && data;
-      fired = true;
-      firingIndex = firingStart || 0;
-      firingStart = 0;
-      firingLength = list.length;
-      firing = true;
-      for ( ; list && firingIndex < firingLength; firingIndex++ ) {
-        if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
-          memory = false; // To prevent further calls using add
-          break;
-        }
-      }
-      firing = false;
-      if ( list ) {
-        if ( stack ) {
-          if ( stack.length ) {
-            fire( stack.shift() );
-          }
-        } else if ( memory ) {
-          list = [];
-        } else {
-          self.disable();
-        }
-      }
-    },
-    // Actual Callbacks object
-    self = {
-      // Add a callback or a collection of callbacks to the list
-      add: function() {
-        if ( list ) {
-          // First, we save the current length
-          var start = list.length;
-          (function add( args ) {
-            jQuery.each( args, function( _, arg ) {
-              var type = jQuery.type( arg );
-              if ( type === "function" ) {
-                if ( !options.unique || !self.has( arg ) ) {
-                  list.push( arg );
-                }
-              } else if ( arg && arg.length && type !== "string" ) {
-                // Inspect recursively
-                add( arg );
-              }
-            });
-          })( arguments );
-          // Do we need to add the callbacks to the
-          // current firing batch?
-          if ( firing ) {
-            firingLength = list.length;
-          // With memory, if we're not firing then
-          // we should call right away
-          } else if ( memory ) {
-            firingStart = start;
-            fire( memory );
-          }
-        }
-        return this;
-      },
-      // Remove a callback from the list
-      remove: function() {
-        if ( list ) {
-          jQuery.each( arguments, function( _, arg ) {
-            var index;
-            while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
-              list.splice( index, 1 );
-              // Handle firing indexes
-              if ( firing ) {
-                if ( index <= firingLength ) {
-                  firingLength--;
-                }
-                if ( index <= firingIndex ) {
-                  firingIndex--;
-                }
-              }
-            }
-          });
-        }
-        return this;
-      },
-      // Check if a given callback is in the list.
-      // If no argument is given, return whether or not list has callbacks attached.
-      has: function( fn ) {
-        return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
-      },
-      // Remove all callbacks from the list
-      empty: function() {
-        list = [];
-        firingLength = 0;
-        return this;
-      },
-      // Have the list do nothing anymore
-      disable: function() {
-        list = stack = memory = undefined;
-        return this;
-      },
-      // Is it disabled?
-      disabled: function() {
-        return !list;
-      },
-      // Lock the list in its current state
-      lock: function() {
-        stack = undefined;
-        if ( !memory ) {
-          self.disable();
-        }
-        return this;
-      },
-      // Is it locked?
-      locked: function() {
-        return !stack;
-      },
-      // Call all callbacks with the given context and arguments
-      fireWith: function( context, args ) {
-        if ( list && ( !fired || stack ) ) {
-          args = args || [];
-          args = [ context, args.slice ? args.slice() : args ];
-          if ( firing ) {
-            stack.push( args );
-          } else {
-            fire( args );
-          }
-        }
-        return this;
-      },
-      // Call all the callbacks with the given arguments
-      fire: function() {
-        self.fireWith( this, arguments );
-        return this;
-      },
-      // To know if the callbacks have already been called at least once
-      fired: function() {
-        return !!fired;
-      }
-    };
-
-  return self;
-};
-jQuery.extend({
-
-  Deferred: function( func ) {
-    var tuples = [
-        // action, add listener, listener list, final state
-        [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
-        [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
-        [ "notify", "progress", jQuery.Callbacks("memory") ]
-      ],
-      state = "pending",
-      promise = {
-        state: function() {
-          return state;
-        },
-        always: function() {
-          deferred.done( arguments ).fail( arguments );
-          return this;
-        },
-        then: function( /* fnDone, fnFail, fnProgress */ ) {
-          var fns = arguments;
-          return jQuery.Deferred(function( newDefer ) {
-            jQuery.each( tuples, function( i, tuple ) {
-              var action = tuple[ 0 ],
-                fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
-              // deferred[ done | fail | progress ] for forwarding actions to newDefer
-              deferred[ tuple[1] ](function() {
-                var returned = fn && fn.apply( this, arguments );
-                if ( returned && jQuery.isFunction( returned.promise ) ) {
-                  returned.promise()
-                    .done( newDefer.resolve )
-                    .fail( newDefer.reject )
-                    .progress( newDefer.notify );
-                } else {
-                  newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
-                }
-              });
-            });
-            fns = null;
-          }).promise();
-        },
-        // Get a promise for this deferred
-        // If obj is provided, the promise aspect is added to the object
-        promise: function( obj ) {
-          return obj != null ? jQuery.extend( obj, promise ) : promise;
-        }
-      },
-      deferred = {};
-
-    // Keep pipe for back-compat
-    promise.pipe = promise.then;
-
-    // Add list-specific methods
-    jQuery.each( tuples, function( i, tuple ) {
-      var list = tuple[ 2 ],
-        stateString = tuple[ 3 ];
-
-      // promise[ done | fail | progress ] = list.add
-      promise[ tuple[1] ] = list.add;
-
-      // Handle state
-      if ( stateString ) {
-        list.add(function() {
-          // state = [ resolved | rejected ]
-          state = stateString;
-
-        // [ reject_list | resolve_list ].disable; progress_list.lock
-        }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
-      }
-
-      // deferred[ resolve | reject | notify ]
-      deferred[ tuple[0] ] = function() {
-        deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
-        return this;
-      };
-      deferred[ tuple[0] + "With" ] = list.fireWith;
-    });
-
-    // Make the deferred a promise
-    promise.promise( deferred );
-
-    // Call given func if any
-    if ( func ) {
-      func.call( deferred, deferred );
-    }
-
-    // All done!
-    return deferred;
-  },
-
-  // Deferred helper
-  when: function( subordinate /* , ..., subordinateN */ ) {
-    var i = 0,
-      resolveValues = core_slice.call( arguments ),
-      length = resolveValues.length,
-
-      // the count of uncompleted subordinates
-      remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
-
-      // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
-      deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
-
-      // Update function for both resolve and progress values
-      updateFunc = function( i, contexts, values ) {
-        return function( value ) {
-          contexts[ i ] = this;
-          values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
-          if( values === progressValues ) {
-            deferred.notifyWith( contexts, values );
-          } else if ( !( --remaining ) ) {
-            deferred.resolveWith( contexts, values );
-          }
-        };
-      },
-
-      progressValues, progressContexts, resolveContexts;
-
-    // add listeners to Deferred subordinates; treat others as resolved
-    if ( length > 1 ) {
-      progressValues = new Array( length );
-      progressContexts = new Array( length );
-      resolveContexts = new Array( length );
-      for ( ; i < length; i++ ) {
-        if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
-          resolveValues[ i ].promise()
-            .done( updateFunc( i, resolveContexts, resolveValues ) )
-            .fail( deferred.reject )
-            .progress( updateFunc( i, progressContexts, progressValues ) );
-        } else {
-          --remaining;
-        }
-      }
-    }
-
-    // if we're not waiting on anything, resolve the master
-    if ( !remaining ) {
-      deferred.resolveWith( resolveContexts, resolveValues );
-    }
-
-    return deferred.promise();
-  }
-});
-jQuery.support = (function( support ) {
-
-  var all, a, input, select, fragment, opt, eventName, isSupported, i,
-    div = document.createElement("div");
-
-  // Setup
-  div.setAttribute( "className", "t" );
-  div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
-
-  // Finish early in limited (non-browser) environments
-  all = div.getElementsByTagName("*") || [];
-  a = div.getElementsByTagName("a")[ 0 ];
-  if ( !a || !a.style || !all.length ) {
-    return support;
-  }
-
-  // First batch of tests
-  select = document.createElement("select");
-  opt = select.appendChild( document.createElement("option") );
-  input = div.getElementsByTagName("input")[ 0 ];
-
-  a.style.cssText = "top:1px;float:left;opacity:.5";
-
-  // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
-  support.getSetAttribute = div.className !== "t";
-
-  // IE strips leading whitespace when .innerHTML is used
-  support.leadingWhitespace = div.firstChild.nodeType === 3;
-
-  // Make sure that tbody elements aren't automatically inserted
-  // IE will insert them into empty tables
-  support.tbody = !div.getElementsByTagName("tbody").length;
-
-  // Make sure that link elements get serialized correctly by innerHTML
-  // This requires a wrapper element in IE
-  support.htmlSerialize = !!div.getElementsByTagName("link").length;
-
-  // Get the style information from getAttribute
-  // (IE uses .cssText instead)
-  support.style = /top/.test( a.getAttribute("style") );
-
-  // Make sure that URLs aren't manipulated
-  // (IE normalizes it by default)
-  support.hrefNormalized = a.getAttribute("href") === "/a";
-
-  // Make sure that element opacity exists
-  // (IE uses filter instead)
-  // Use a regex to work around a WebKit issue. See #5145
-  support.opacity = /^0.5/.test( a.style.opacity );
-
-  // Verify style float existence
-  // (IE uses styleFloat instead of cssFloat)
-  support.cssFloat = !!a.style.cssFloat;
-
-  // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
-  support.checkOn = !!input.value;
-
-  // Make sure that a selected-by-default option has a working selected property.
-  // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
-  support.optSelected = opt.selected;
-
-  // Tests for enctype support on a form (#6743)
-  support.enctype = !!document.createElement("form").enctype;
-
-  // Makes sure cloning an html5 element does not cause problems
-  // Where outerHTML is undefined, this still works
-  support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>";
-
-  // Will be defined later
-  support.inlineBlockNeedsLayout = false;
-  support.shrinkWrapBlocks = false;
-  support.pixelPosition = false;
-  support.deleteExpando = true;
-  support.noCloneEvent = true;
-  support.reliableMarginRight = true;
-  support.boxSizingReliable = true;
-
-  // Make sure checked status is properly cloned
-  input.checked = true;
-  support.noCloneChecked = input.cloneNode( true ).checked;
-
-  // Make sure that the options inside disabled selects aren't marked as disabled
-  // (WebKit marks them as disabled)
-  select.disabled = true;
-  support.optDisabled = !opt.disabled;
-
-  // Support: IE<9
-  try {
-    delete div.test;
-  } catch( e ) {
-    support.deleteExpando = false;
-  }
-
-  // Check if we can trust getAttribute("value")
-  input = document.createElement("input");
-  input.setAttribute( "value", "" );
-  support.input = input.getAttribute( "value" ) === "";
-
-  // Check if an input maintains its value after becoming a radio
-  input.value = "t";
-  input.setAttribute( "type", "radio" );
-  support.radioValue = input.value === "t";
-
-  // #11217 - WebKit loses check when the name is after the checked attribute
-  input.setAttribute( "checked", "t" );
-  input.setAttribute( "name", "t" );
-
-  fragment = document.createDocumentFragment();
-  fragment.appendChild( input );
-
-  // Check if a disconnected checkbox will retain its checked
-  // value of true after appended to the DOM (IE6/7)
-  support.appendChecked = input.checked;
-
-  // WebKit doesn't clone checked state correctly in fragments
-  support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
-
-  // Support: IE<9
-  // Opera does not clone events (and typeof div.attachEvent === undefined).
-  // IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
-  if ( div.attachEvent ) {
-    div.attachEvent( "onclick", function() {
-      support.noCloneEvent = false;
-    });
-
-    div.cloneNode( true ).click();
-  }
-
-  // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)
-  // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
-  for ( i in { submit: true, change: true, focusin: true }) {
-    div.setAttribute( eventName = "on" + i, "t" );
-
-    support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false;
-  }
-
-  div.style.backgroundClip = "content-box";
-  div.cloneNode( true ).style.backgroundClip = "";
-  support.clearCloneStyle = div.style.backgroundClip === "content-box";
-
-  // Support: IE<9
-  // Iteration over object's inherited properties before its own.
-  for ( i in jQuery( support ) ) {
-    break;
-  }
-  support.ownLast = i !== "0";
-
-  // Run tests that need a body at doc ready
-  jQuery(function() {
-    var container, marginDiv, tds,
-      divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
-      body = document.getElementsByTagName("body")[0];
-
-    if ( !body ) {
-      // Return for frameset docs that don't have a body
-      return;
-    }
-
-    container = document.createElement("div");
-    container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
-
-    body.appendChild( container ).appendChild( div );
-
-    // Support: IE8
-    // Check if table cells still have offsetWidth/Height when they are set
-    // to display:none and there are still other visible table cells in a
-    // table row; if so, offsetWidth/Height are not reliable for use when
-    // determining if an element has been hidden directly using
-    // display:none (it is still safe to use offsets if a parent element is
-    // hidden; don safety goggles and see bug #4512 for more information).
-    div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
-    tds = div.getElementsByTagName("td");
-    tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
-    isSupported = ( tds[ 0 ].offsetHeight === 0 );
-
-    tds[ 0 ].style.display = "";
-    tds[ 1 ].style.display = "none";
-
-    // Support: IE8
-    // Check if empty table cells still have offsetWidth/Height
-    support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
-
-    // Check box-sizing and margin behavior.
-    div.innerHTML = "";
-    div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
-
-    // Workaround failing boxSizing test due to offsetWidth returning wrong value
-    // with some non-1 values of body zoom, ticket #13543
-    jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() {
-      support.boxSizing = div.offsetWidth === 4;
-    });
-
-    // Use window.getComputedStyle because jsdom on node.js will break without it.
-    if ( window.getComputedStyle ) {
-      support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
-      support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
-
-      // Check if div with explicit width and no margin-right incorrectly
-      // gets computed margin-right based on width of container. (#3333)
-      // Fails in WebKit before Feb 2011 nightlies
-      // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
-      marginDiv = div.appendChild( document.createElement("div") );
-      marginDiv.style.cssText = div.style.cssText = divReset;
-      marginDiv.style.marginRight = marginDiv.style.width = "0";
-      div.style.width = "1px";
-
-      support.reliableMarginRight =
-        !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
-    }
-
-    if ( typeof div.style.zoom !== core_strundefined ) {
-      // Support: IE<8
-      // Check if natively block-level elements act like inline-block
-      // elements when setting their display to 'inline' and giving
-      // them layout
-      div.innerHTML = "";
-      div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
-      support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
-
-      // Support: IE6
-      // Check if elements with layout shrink-wrap their children
-      div.style.display = "block";
-      div.innerHTML = "<div></div>";
-      div.firstChild.style.width = "5px";
-      support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
-
-      if ( support.inlineBlockNeedsLayout ) {
-        // Prevent IE 6 from affecting layout for positioned elements #11048
-        // Prevent IE from shrinking the body in IE 7 mode #12869
-        // Support: IE<8
-        body.style.zoom = 1;
-      }
-    }
-
-    body.removeChild( container );
-
-    // Null elements to avoid leaks in IE
-    container = div = tds = marginDiv = null;
-  });
-
-  // Null elements to avoid leaks in IE
-  all = select = fragment = opt = a = input = null;
-
-  return support;
-})({});
-
-var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
-  rmultiDash = /([A-Z])/g;
-
-function internalData( elem, name, data, pvt /* Internal Use Only */ ){
-  if ( !jQuery.acceptData( elem ) ) {
-    return;
-  }
-
-  var ret, thisCache,
-    internalKey = jQuery.expando,
-
-    // We have to handle DOM nodes and JS objects differently because IE6-7
-    // can't GC object references properly across the DOM-JS boundary
-    isNode = elem.nodeType,
-
-    // Only DOM nodes need the global jQuery cache; JS object data is
-    // attached directly to the object so GC can occur automatically
-    cache = isNode ? jQuery.cache : elem,
-
-    // Only defining an ID for JS objects if its cache already exists allows
-    // the code to shortcut on the same path as a DOM node with no cache
-    id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
-
-  // Avoid doing any more work than we need to when trying to get data on an
-  // object that has no data at all
-  if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) {
-    return;
-  }
-
-  if ( !id ) {
-    // Only DOM nodes need a new unique ID for each element since their data
-    // ends up in the global cache
-    if ( isNode ) {
-      id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++;
-    } else {
-      id = internalKey;
-    }
-  }
-
-  if ( !cache[ id ] ) {
-    // Avoid exposing jQuery metadata on plain JS objects when the object
-    // is serialized using JSON.stringify
-    cache[ id ] = isNode ? {} : { toJSON: jQuery.noop };
-  }
-
-  // An object can be passed to jQuery.data instead of a key/value pair; this gets
-  // shallow copied over onto the existing cache
-  if ( typeof name === "object" || typeof name === "function" ) {
-    if ( pvt ) {
-      cache[ id ] = jQuery.extend( cache[ id ], name );
-    } else {
-      cache[ id ].data = jQuery.extend( cache[ id ].data, name );
-    }
-  }
-
-  thisCache = cache[ id ];
-
-  // jQuery data() is stored in a separate object inside the object's internal data
-  // cache in order to avoid key collisions between internal data and user-defined
-  // data.
-  if ( !pvt ) {
-    if ( !thisCache.data ) {
-      thisCache.data = {};
-    }
-
-    thisCache = thisCache.data;
-  }
-
-  if ( data !== undefined ) {
-    thisCache[ jQuery.camelCase( name ) ] = data;
-  }
-
-  // Check for both converted-to-camel and non-converted data property names
-  // If a data property was specified
-  if ( typeof name === "string" ) {
-
-    // First Try to find as-is property data
-    ret = thisCache[ name ];
-
-    // Test for null|undefined property data
-    if ( ret == null ) {
-
-      // Try to find the camelCased property
-      ret = thisCache[ jQuery.camelCase( name ) ];
-    }
-  } else {
-    ret = thisCache;
-  }
-
-  return ret;
-}
-
-function internalRemoveData( elem, name, pvt ) {
-  if ( !jQuery.acceptData( elem ) ) {
-    return;
-  }
-
-  var thisCache, i,
-    isNode = elem.nodeType,
-
-    // See jQuery.data for more information
-    cache = isNode ? jQuery.cache : elem,
-    id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
-
-  // If there is already no cache entry for this object, there is no
-  // purpose in continuing
-  if ( !cache[ id ] ) {
-    return;
-  }
-
-  if ( name ) {
-
-    thisCache = pvt ? cache[ id ] : cache[ id ].data;
-
-    if ( thisCache ) {
-
-      // Support array or space separated string names for data keys
-      if ( !jQuery.isArray( name ) ) {
-
-        // try the string as a key before any manipulation
-        if ( name in thisCache ) {
-          name = [ name ];
-        } else {
-
-          // split the camel cased version by spaces unless a key with the spaces exists
-          name = jQuery.camelCase( name );
-          if ( name in thisCache ) {
-            name = [ name ];
-          } else {
-            name = name.split(" ");
-          }
-        }
-      } else {
-        // If "name" is an array of keys...
-        // When data is initially created, via ("key", "val") signature,
-        // keys will be converted to camelCase.
-        // Since there is no way to tell _how_ a key was added, remove
-        // both plain key and camelCase key. #12786
-        // This will only penalize the array argument path.
-        name = name.concat( jQuery.map( name, jQuery.camelCase ) );
-      }
-
-      i = name.length;
-      while ( i-- ) {
-        delete thisCache[ name[i] ];
-      }
-
-      // If there is no data left in the cache, we want to continue
-      // and let the cache object itself get destroyed
-      if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) {
-        return;
-      }
-    }
-  }
-
-  // See jQuery.data for more information
-  if ( !pvt ) {
-    delete cache[ id ].data;
-
-    // Don't destroy the parent cache unless the internal data object
-    // had been the only thing left in it
-    if ( !isEmptyDataObject( cache[ id ] ) ) {
-      return;
-    }
-  }
-
-  // Destroy the cache
-  if ( isNode ) {
-    jQuery.cleanData( [ elem ], true );
-
-  // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
-  /* jshint eqeqeq: false */
-  } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
-    /* jshint eqeqeq: true */
-    delete cache[ id ];
-
-  // When all else fails, null
-  } else {
-    cache[ id ] = null;
-  }
-}
-
-jQuery.extend({
-  cache: {},
-
-  // The following elements throw uncatchable exceptions if you
-  // attempt to add expando properties to them.
-  noData: {
-    "applet": true,
-    "embed": true,
-    // Ban all objects except for Flash (which handle expandos)
-    "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
-  },
-
-  hasData: function( elem ) {
-    elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
-    return !!elem && !isEmptyDataObject( elem );
-  },
-
-  data: function( elem, name, data ) {
-    return internalData( elem, name, data );
-  },
-
-  removeData: function( elem, name ) {
-    return internalRemoveData( elem, name );
-  },
-
-  // For internal use only.
-  _data: function( elem, name, data ) {
-    return internalData( elem, name, data, true );
-  },
-
-  _removeData: function( elem, name ) {
-    return internalRemoveData( elem, name, true );
-  },
-
-  // A method for determining if a DOM node can handle the data expando
-  acceptData: function( elem ) {
-    // Do not set data on non-element because it will not be cleared (#8335).
-    if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {
-      return false;
-    }
-
-    var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
-
-    // nodes accept data unless otherwise specified; rejection can be conditional
-    return !noData || noData !== true && elem.getAttribute("classid") === noData;
-  }
-});
-
-jQuery.fn.extend({
-  data: function( key, value ) {
-    var attrs, name,
-      data = null,
-      i = 0,
-      elem = this[0];
-
-    // Special expections of .data basically thwart jQuery.access,
-    // so implement the relevant behavior ourselves
-
-    // Gets all values
-    if ( key === undefined ) {
-      if ( this.length ) {
-        data = jQuery.data( elem );
-
-        if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
-          attrs = elem.attributes;
-          for ( ; i < attrs.length; i++ ) {
-            name = attrs[i].name;
-
-            if ( name.indexOf("data-") === 0 ) {
-              name = jQuery.camelCase( name.slice(5) );
-
-              dataAttr( elem, name, data[ name ] );
-            }
-          }
-          jQuery._data( elem, "parsedAttrs", true );
-        }
-      }
-
-      return data;
-    }
-
-    // Sets multiple values
-    if ( typeof key === "object" ) {
-      return this.each(function() {
-        jQuery.data( this, key );
-      });
-    }
-
-    return arguments.length > 1 ?
-
-      // Sets one value
-      this.each(function() {
-        jQuery.data( this, key, value );
-      }) :
-
-      // Gets one value
-      // Try to fetch any internally stored data first
-      elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;
-  },
-
-  removeData: function( key ) {
-    return this.each(function() {
-      jQuery.removeData( this, key );
-    });
-  }
-});
-
-function dataAttr( elem, key, data ) {
-  // If nothing was found internally, try to fetch any
-  // data from the HTML5 data-* attribute
-  if ( data === undefined && elem.nodeType === 1 ) {
-
-    var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
-
-    data = elem.getAttribute( name );
-
-    if ( typeof data === "string" ) {
-      try {
-        data = data === "true" ? true :
-          data === "false" ? false :
-          data === "null" ? null :
-          // Only convert to a number if it doesn't change the string
-          +data + "" === data ? +data :
-          rbrace.test( data ) ? jQuery.parseJSON( data ) :
-            data;
-      } catch( e ) {}
-
-      // Make sure we set the data so it isn't changed later
-      jQuery.data( elem, key, data );
-
-    } else {
-      data = undefined;
-    }
-  }
-
-  return data;
-}
-
-// checks a cache object for emptiness
-function isEmptyDataObject( obj ) {
-  var name;
-  for ( name in obj ) {
-
-    // if the public data object is empty, the private is still empty
-    if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
-      continue;
-    }
-    if ( name !== "toJSON" ) {
-      return false;
-    }
-  }
-
-  return true;
-}
-jQuery.extend({
-  queue: function( elem, type, data ) {
-    var queue;
-
-    if ( elem ) {
-      type = ( type || "fx" ) + "queue";
-      queue = jQuery._data( elem, type );
-
-      // Speed up dequeue by getting out quickly if this is just a lookup
-      if ( data ) {
-        if ( !queue || jQuery.isArray(data) ) {
-          queue = jQuery._data( elem, type, jQuery.makeArray(data) );
-        } else {
-          queue.push( data );
-        }
-      }
-      return queue || [];
-    }
-  },
-
-  dequeue: function( elem, type ) {
-    type = type || "fx";
-
-    var queue = jQuery.queue( elem, type ),
-      startLength = queue.length,
-      fn = queue.shift(),
-      hooks = jQuery._queueHooks( elem, type ),
-      next = function() {
-        jQuery.dequeue( elem, type );
-      };
-
-    // If the fx queue is dequeued, always remove the progress sentinel
-    if ( fn === "inprogress" ) {
-      fn = queue.shift();
-      startLength--;
-    }
-
-    if ( fn ) {
-
-      // Add a progress sentinel to prevent the fx queue from being
-      // automatically dequeued
-      if ( type === "fx" ) {
-        queue.unshift( "inprogress" );
-      }
-
-      // clear up the last queue stop function
-      delete hooks.stop;
-      fn.call( elem, next, hooks );
-    }
-
-    if ( !startLength && hooks ) {
-      hooks.empty.fire();
-    }
-  },
-
-  // not intended for public consumption - generates a queueHooks object, or returns the current one
-  _queueHooks: function( elem, type ) {
-    var key = type + "queueHooks";
-    return jQuery._data( elem, key ) || jQuery._data( elem, key, {
-      empty: jQuery.Callbacks("once memory").add(function() {
-        jQuery._removeData( elem, type + "queue" );
-        jQuery._removeData( elem, key );
-      })
-    });
-  }
-});
-
-jQuery.fn.extend({
-  queue: function( type, data ) {
-    var setter = 2;
-
-    if ( typeof type !== "string" ) {
-      data = type;
-      type = "fx";
-      setter--;
-    }
-
-    if ( arguments.length < setter ) {
-      return jQuery.queue( this[0], type );
-    }
-
-    return data === undefined ?
-      this :
-      this.each(function() {
-        var queue = jQuery.queue( this, type, data );
-
-        // ensure a hooks for this queue
-        jQuery._queueHooks( this, type );
-
-        if ( type === "fx" && queue[0] !== "inprogress" ) {
-          jQuery.dequeue( this, type );
-        }
-      });
-  },
-  dequeue: function( type ) {
-    return this.each(function() {
-      jQuery.dequeue( this, type );
-    });
-  },
-  // Based off of the plugin by Clint Helfers, with permission.
-  // http://blindsignals.com/index.php/2009/07/jquery-delay/
-  delay: function( time, type ) {
-    time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
-    type = type || "fx";
-
-    return this.queue( type, function( next, hooks ) {
-      var timeout = setTimeout( next, time );
-      hooks.stop = function() {
-        clearTimeout( timeout );
-      };
-    });
-  },
-  clearQueue: function( type ) {
-    return this.queue( type || "fx", [] );
-  },
-  // Get a promise resolved when queues of a certain type
-  // are emptied (fx is the type by default)
-  promise: function( type, obj ) {
-    var tmp,
-      count = 1,
-      defer = jQuery.Deferred(),
-      elements = this,
-      i = this.length,
-      resolve = function() {
-        if ( !( --count ) ) {
-          defer.resolveWith( elements, [ elements ] );
-        }
-      };
-
-    if ( typeof type !== "string" ) {
-      obj = type;
-      type = undefined;
-    }
-    type = type || "fx";
-
-    while( i-- ) {
-      tmp = jQuery._data( elements[ i ], type + "queueHooks" );
-      if ( tmp && tmp.empty ) {
-        count++;
-        tmp.empty.add( resolve );
-      }
-    }
-    resolve();
-    return defer.promise( obj );
-  }
-});
-var nodeHook, boolHook,
-  rclass = /[\t\r\n\f]/g,
-  rreturn = /\r/g,
-  rfocusable = /^(?:input|select|textarea|button|object)$/i,
-  rclickable = /^(?:a|area)$/i,
-  ruseDefault = /^(?:checked|selected)$/i,
-  getSetAttribute = jQuery.support.getSetAttribute,
-  getSetInput = jQuery.support.input;
-
-jQuery.fn.extend({
-  attr: function( name, value ) {
-    return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
-  },
-
-  removeAttr: function( name ) {
-    return this.each(function() {
-      jQuery.removeAttr( this, name );
-    });
-  },
-
-  prop: function( name, value ) {
-    return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
-  },
-
-  removeProp: function( name ) {
-    name = jQuery.propFix[ name ] || name;
-    return this.each(function() {
-      // try/catch handles cases where IE balks (such as removing a property on window)
-      try {
-        this[ name ] = undefined;
-        delete this[ name ];
-      } catch( e ) {}
-    });
-  },
-
-  addClass: function( value ) {
-    var classes, elem, cur, clazz, j,
-      i = 0,
-      len = this.length,
-      proceed = typeof value === "string" && value;
-
-    if ( jQuery.isFunction( value ) ) {
-      return this.each(function( j ) {
-        jQuery( this ).addClass( value.call( this, j, this.className ) );
-      });
-    }
-
-    if ( proceed ) {
-      // The disjunction here is for better compressibility (see removeClass)
-      classes = ( value || "" ).match( core_rnotwhite ) || [];
-
-      for ( ; i < len; i++ ) {
-        elem = this[ i ];
-        cur = elem.nodeType === 1 && ( elem.className ?
-          ( " " + elem.className + " " ).replace( rclass, " " ) :
-          " "
-        );
-
-        if ( cur ) {
-          j = 0;
-          while ( (clazz = classes[j++]) ) {
-            if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
-              cur += clazz + " ";
-            }
-          }
-          elem.className = jQuery.trim( cur );
-
-        }
-      }
-    }
-
-    return this;
-  },
-
-  removeClass: function( value ) {
-    var classes, elem, cur, clazz, j,
-      i = 0,
-      len = this.length,
-      proceed = arguments.length === 0 || typeof value === "string" && value;
-
-    if ( jQuery.isFunction( value ) ) {
-      return this.each(function( j ) {
-        jQuery( this ).removeClass( value.call( this, j, this.className ) );
-      });
-    }
-    if ( proceed ) {
-      classes = ( value || "" ).match( core_rnotwhite ) || [];
-
-      for ( ; i < len; i++ ) {
-        elem = this[ i ];
-        // This expression is here for better compressibility (see addClass)
-        cur = elem.nodeType === 1 && ( elem.className ?
-          ( " " + elem.className + " " ).replace( rclass, " " ) :
-          ""
-        );
-
-        if ( cur ) {
-          j = 0;
-          while ( (clazz = classes[j++]) ) {
-            // Remove *all* instances
-            while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
-              cur = cur.replace( " " + clazz + " ", " " );
-            }
-          }
-          elem.className = value ? jQuery.trim( cur ) : "";
-        }
-      }
-    }
-
-    return this;
-  },
-
-  toggleClass: function( value, stateVal ) {
-    var type = typeof value;
-
-    if ( typeof stateVal === "boolean" && type === "string" ) {
-      return stateVal ? this.addClass( value ) : this.removeClass( value );
-    }
-
-    if ( jQuery.isFunction( value ) ) {
-      return this.each(function( i ) {
-        jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
-      });
-    }
-
-    return this.each(function() {
-      if ( type === "string" ) {
-        // toggle individual class names
-        var className,
-          i = 0,
-          self = jQuery( this ),
-          classNames = value.match( core_rnotwhite ) || [];
-
-        while ( (className = classNames[ i++ ]) ) {
-          // check each className given, space separated list
-          if ( self.hasClass( className ) ) {
-            self.removeClass( className );
-          } else {
-            self.addClass( className );
-          }
-        }
-
-      // Toggle whole class name
-      } else if ( type === core_strundefined || type === "boolean" ) {
-        if ( this.className ) {
-          // store className if set
-          jQuery._data( this, "__className__", this.className );
-        }
-
-        // If the element has a class name or if we're passed "false",
-        // then remove the whole classname (if there was one, the above saved it).
-        // Otherwise bring back whatever was previously saved (if anything),
-        // falling back to the empty string if nothing was stored.
-        this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
-      }
-    });
-  },
-
-  hasClass: function( selector ) {
-    var className = " " + selector + " ",
-      i = 0,
-      l = this.length;
-    for ( ; i < l; i++ ) {
-      if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
-        return true;
-      }
-    }
-
-    return false;
-  },
-
-  val: function( value ) {
-    var ret, hooks, isFunction,
-      elem = this[0];
-
-    if ( !arguments.length ) {
-      if ( elem ) {
-        hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
-
-        if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
-          return ret;
-        }
-
-        ret = elem.value;
-
-        return typeof ret === "string" ?
-          // handle most common string cases
-          ret.replace(rreturn, "") :
-          // handle cases where value is null/undef or number
-          ret == null ? "" : ret;
-      }
-
-      return;
-    }
-
-    isFunction = jQuery.isFunction( value );
-
-    return this.each(function( i ) {
-      var val;
-
-      if ( this.nodeType !== 1 ) {
-        return;
-      }
-
-      if ( isFunction ) {
-        val = value.call( this, i, jQuery( this ).val() );
-      } else {
-        val = value;
-      }
-
-      // Treat null/undefined as ""; convert numbers to string
-      if ( val == null ) {
-        val = "";
-      } else if ( typeof val === "number" ) {
-        val += "";
-      } else if ( jQuery.isArray( val ) ) {
-        val = jQuery.map(val, function ( value ) {
-          return value == null ? "" : value + "";
-        });
-      }
-
-      hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
-
-      // If set returns undefined, fall back to normal setting
-      if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
-        this.value = val;
-      }
-    });
-  }
-});
-
-jQuery.extend({
-  valHooks: {
-    option: {
-      get: function( elem ) {
-        // Use proper attribute retrieval(#6932, #12072)
-        var val = jQuery.find.attr( elem, "value" );
-        return val != null ?
-          val :
-          elem.text;
-      }
-    },
-    select: {
-      get: function( elem ) {
-        var value, option,
-          options = elem.options,
-          index = elem.selectedIndex,
-          one = elem.type === "select-one" || index < 0,
-          values = one ? null : [],
-          max = one ? index + 1 : options.length,
-          i = index < 0 ?
-            max :
-            one ? index : 0;
-
-        // Loop through all the selected options
-        for ( ; i < max; i++ ) {
-          option = options[ i ];
-
-          // oldIE doesn't update selected after form reset (#2551)
-          if ( ( option.selected || i === index ) &&
-              // Don't return options that are disabled or in a disabled optgroup
-              ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
-              ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
-
-            // Get the specific value for the option
-            value = jQuery( option ).val();
-
-            // We don't need an array for one selects
-            if ( one ) {
-              return value;
-            }
-
-            // Multi-Selects return an array
-            values.push( value );
-          }
-        }
-
-        return values;
-      },
-
-      set: function( elem, value ) {
-        var optionSet, option,
-          options = elem.options,
-          values = jQuery.makeArray( value ),
-          i = options.length;
-
-        while ( i-- ) {
-          option = options[ i ];
-          if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) {
-            optionSet = true;
-          }
-        }
-
-        // force browsers to behave consistently when non-matching value is set
-        if ( !optionSet ) {
-          elem.selectedIndex = -1;
-        }
-        return values;
-      }
-    }
-  },
-
-  attr: function( elem, name, value ) {
-    var hooks, ret,
-      nType = elem.nodeType;
-
-    // don't get/set attributes on text, comment and attribute nodes
-    if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
-      return;
-    }
-
-    // Fallback to prop when attributes are not supported
-    if ( typeof elem.getAttribute === core_strundefined ) {
-      return jQuery.prop( elem, name, value );
-    }
-
-    // All attributes are lowercase
-    // Grab necessary hook if one is defined
-    if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
-      name = name.toLowerCase();
-      hooks = jQuery.attrHooks[ name ] ||
-        ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
-    }
-
-    if ( value !== undefined ) {
-
-      if ( value === null ) {
-        jQuery.removeAttr( elem, name );
-
-      } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
-        return ret;
-
-      } else {
-        elem.setAttribute( name, value + "" );
-        return value;
-      }
-
-    } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
-      return ret;
-
-    } else {
-      ret = jQuery.find.attr( elem, name );
-
-      // Non-existent attributes return null, we normalize to undefined
-      return ret == null ?
-        undefined :
-        ret;
-    }
-  },
-
-  removeAttr: function( elem, value ) {
-    var name, propName,
-      i = 0,
-      attrNames = value && value.match( core_rnotwhite );
-
-    if ( attrNames && elem.nodeType === 1 ) {
-      while ( (name = attrNames[i++]) ) {
-        propName = jQuery.propFix[ name ] || name;
-
-        // Boolean attributes get special treatment (#10870)
-        if ( jQuery.expr.match.bool.test( name ) ) {
-          // Set corresponding property to false
-          if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
-            elem[ propName ] = false;
-          // Support: IE<9
-          // Also clear defaultChecked/defaultSelected (if appropriate)
-          } else {
-            elem[ jQuery.camelCase( "default-" + name ) ] =
-              elem[ propName ] = false;
-          }
-
-        // See #9699 for explanation of this approach (setting first, then removal)
-        } else {
-          jQuery.attr( elem, name, "" );
-        }
-
-        elem.removeAttribute( getSetAttribute ? name : propName );
-      }
-    }
-  },
-
-  attrHooks: {
-    type: {
-      set: function( elem, value ) {
-        if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
-          // Setting the type on a radio button after the value resets the value in IE6-9
-          // Reset value to default in case type is set after value during creation
-          var val = elem.value;
-          elem.setAttribute( "type", value );
-          if ( val ) {
-            elem.value = val;
-          }
-          return value;
-        }
-      }
-    }
-  },
-
-  propFix: {
-    "for": "htmlFor",
-    "class": "className"
-  },
-
-  prop: function( elem, name, value ) {
-    var ret, hooks, notxml,
-      nType = elem.nodeType;
-
-    // don't get/set properties on text, comment and attribute nodes
-    if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
-      return;
-    }
-
-    notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
-    if ( notxml ) {
-      // Fix name and attach hooks
-      name = jQuery.propFix[ name ] || name;
-      hooks = jQuery.propHooks[ name ];
-    }
-
-    if ( value !== undefined ) {
-      return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
-        ret :
-        ( elem[ name ] = value );
-
-    } else {
-      return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
-        ret :
-        elem[ name ];
-    }
-  },
-
-  propHooks: {
-    tabIndex: {
-      get: function( elem ) {
-        // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
-        // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
-        // Use proper attribute retrieval(#12072)
-        var tabindex = jQuery.find.attr( elem, "tabindex" );
-
-        return tabindex ?
-          parseInt( tabindex, 10 ) :
-          rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
-            0 :
-            -1;
-      }
-    }
-  }
-});
-
-// Hooks for boolean attributes
-boolHook = {
-  set: function( elem, value, name ) {
-    if ( value === false ) {
-      // Remove boolean attributes when set to false
-      jQuery.removeAttr( elem, name );
-    } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
-      // IE<8 needs the *property* name
-      elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
-
-    // Use defaultChecked and defaultSelected for oldIE
-    } else {
-      elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
-    }
-
-    return name;
-  }
-};
-jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
-  var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr;
-
-  jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ?
-    function( elem, name, isXML ) {
-      var fn = jQuery.expr.attrHandle[ name ],
-        ret = isXML ?
-          undefined :
-          /* jshint eqeqeq: false */
-          (jQuery.expr.attrHandle[ name ] = undefined) !=
-            getter( elem, name, isXML ) ?
-
-            name.toLowerCase() :
-            null;
-      jQuery.expr.attrHandle[ name ] = fn;
-      return ret;
-    } :
-    function( elem, name, isXML ) {
-      return isXML ?
-        undefined :
-        elem[ jQuery.camelCase( "default-" + name ) ] ?
-          name.toLowerCase() :
-          null;
-    };
-});
-
-// fix oldIE attroperties
-if ( !getSetInput || !getSetAttribute ) {
-  jQuery.attrHooks.value = {
-    set: function( elem, value, name ) {
-      if ( jQuery.nodeName( elem, "input" ) ) {
-        // Does not return so that setAttribute is also used
-        elem.defaultValue = value;
-      } else {
-        // Use nodeHook if defined (#1954); otherwise setAttribute is fine
-        return nodeHook && nodeHook.set( elem, value, name );
-      }
-    }
-  };
-}
-
-// IE6/7 do not support getting/setting some attributes with get/setAttribute
-if ( !getSetAttribute ) {
-
-  // Use this for any attribute in IE6/7
-  // This fixes almost every IE6/7 issue
-  nodeHook = {
-    set: function( elem, value, name ) {
-      // Set the existing or create a new attribute node
-      var ret = elem.getAttributeNode( name );
-      if ( !ret ) {
-        elem.setAttributeNode(
-          (ret = elem.ownerDocument.createAttribute( name ))
-        );
-      }
-
-      ret.value = value += "";
-
-      // Break association with cloned elements by also using setAttribute (#9646)
-      return name === "value" || value === elem.getAttribute( name ) ?
-        value :
-        undefined;
-    }
-  };
-  jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords =
-    // Some attributes are constructed with empty-string values when not defined
-    function( elem, name, isXML ) {
-      var ret;
-      return isXML ?
-        undefined :
-        (ret = elem.getAttributeNode( name )) && ret.value !== "" ?
-          ret.value :
-          null;
-    };
-  jQuery.valHooks.button = {
-    get: function( elem, name ) {
-      var ret = elem.getAttributeNode( name );
-      return ret && ret.specified ?
-        ret.value :
-        undefined;
-    },
-    set: nodeHook.set
-  };
-
-  // Set contenteditable to false on removals(#10429)
-  // Setting to empty string throws an error as an invalid value
-  jQuery.attrHooks.contenteditable = {
-    set: function( elem, value, name ) {
-      nodeHook.set( elem, value === "" ? false : value, name );
-    }
-  };
-
-  // Set width and height to auto instead of 0 on empty string( Bug #8150 )
-  // This is for removals
-  jQuery.each([ "width", "height" ], function( i, name ) {
-    jQuery.attrHooks[ name ] = {
-      set: function( elem, value ) {
-        if ( value === "" ) {
-          elem.setAttribute( name, "auto" );
-          return value;
-        }
-      }
-    };
-  });
-}
-
-
-// Some attributes require a special call on IE
-// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
-if ( !jQuery.support.hrefNormalized ) {
-  // href/src property should get the full normalized URL (#10299/#12915)
-  jQuery.each([ "href", "src" ], function( i, name ) {
-    jQuery.propHooks[ name ] = {
-      get: function( elem ) {
-        return elem.getAttribute( name, 4 );
-      }
-    };
-  });
-}
-
-if ( !jQuery.support.style ) {
-  jQuery.attrHooks.style = {
-    get: function( elem ) {
-      // Return undefined in the case of empty string
-      // Note: IE uppercases css property names, but if we were to .toLowerCase()
-      // .cssText, that would destroy case senstitivity in URL's, like in "background"
-      return elem.style.cssText || undefined;
-    },
-    set: function( elem, value ) {
-      return ( elem.style.cssText = value + "" );
-    }
-  };
-}
-
-// Safari mis-reports the default selected property of an option
-// Accessing the parent's selectedIndex property fixes it
-if ( !jQuery.support.optSelected ) {
-  jQuery.propHooks.selected = {
-    get: function( elem ) {
-      var parent = elem.parentNode;
-
-      if ( parent ) {
-        parent.selectedIndex;
-
-        // Make sure that it also works with optgroups, see #5701
-        if ( parent.parentNode ) {
-          parent.parentNode.selectedIndex;
-        }
-      }
-      return null;
-    }
-  };
-}
-
-jQuery.each([
-  "tabIndex",
-  "readOnly",
-  "maxLength",
-  "cellSpacing",
-  "cellPadding",
-  "rowSpan",
-  "colSpan",
-  "useMap",
-  "frameBorder",
-  "contentEditable"
-], function() {
-  jQuery.propFix[ this.toLowerCase() ] = this;
-});
-
-// IE6/7 call enctype encoding
-if ( !jQuery.support.enctype ) {
-  jQuery.propFix.enctype = "encoding";
-}
-
-// Radios and checkboxes getter/setter
-jQuery.each([ "radio", "checkbox" ], function() {
-  jQuery.valHooks[ this ] = {
-    set: function( elem, value ) {
-      if ( jQuery.isArray( value ) ) {
-        return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
-      }
-    }
-  };
-  if ( !jQuery.support.checkOn ) {
-    jQuery.valHooks[ this ].get = function( elem ) {
-      // Support: Webkit
-      // "" is returned instead of "on" if a value isn't specified
-      return elem.getAttribute("value") === null ? "on" : elem.value;
-    };
-  }
-});
-var rformElems = /^(?:input|select|textarea)$/i,
-  rkeyEvent = /^key/,
-  rmouseEvent = /^(?:mouse|contextmenu)|click/,
-  rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
-  rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
-
-function returnTrue() {
-  return true;
-}
-
-function returnFalse() {
-  return false;
-}
-
-function safeActiveElement() {
-  try {
-    return document.activeElement;
-  } catch ( err ) { }
-}
-
-/*
- * Helper functions for managing events -- not part of the public interface.
- * Props to Dean Edwards' addEvent library for many of the ideas.
- */
-jQuery.event = {
-
-  global: {},
-
-  add: function( elem, types, handler, data, selector ) {
-    var tmp, events, t, handleObjIn,
-      special, eventHandle, handleObj,
-      handlers, type, namespaces, origType,
-      elemData = jQuery._data( elem );
-
-    // Don't attach events to noData or text/comment nodes (but allow plain objects)
-    if ( !elemData ) {
-      return;
-    }
-
-    // Caller can pass in an object of custom data in lieu of the handler
-    if ( handler.handler ) {
-      handleObjIn = handler;
-      handler = handleObjIn.handler;
-      selector = handleObjIn.selector;
-    }
-
-    // Make sure that the handler has a unique ID, used to find/remove it later
-    if ( !handler.guid ) {
-      handler.guid = jQuery.guid++;
-    }
-
-    // Init the element's event structure and main handler, if this is the first
-    if ( !(events = elemData.events) ) {
-      events = elemData.events = {};
-    }
-    if ( !(eventHandle = elemData.handle) ) {
-      eventHandle = elemData.handle = function( e ) {
-        // Discard the second event of a jQuery.event.trigger() and
-        // when an event is called after a page has unloaded
-        return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?
-          jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
-          undefined;
-      };
-      // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
-      eventHandle.elem = elem;
-    }
-
-    // Handle multiple events separated by a space
-    types = ( types || "" ).match( core_rnotwhite ) || [""];
-    t = types.length;
-    while ( t-- ) {
-      tmp = rtypenamespace.exec( types[t] ) || [];
-      type = origType = tmp[1];
-      namespaces = ( tmp[2] || "" ).split( "." ).sort();
-
-      // There *must* be a type, no attaching namespace-only handlers
-      if ( !type ) {
-        continue;
-      }
-
-      // If event changes its type, use the special event handlers for the changed type
-      special = jQuery.event.special[ type ] || {};
-
-      // If selector defined, determine special event api type, otherwise given type
-      type = ( selector ? special.delegateType : special.bindType ) || type;
-
-      // Update special based on newly reset type
-      special = jQuery.event.special[ type ] || {};
-
-      // handleObj is passed to all event handlers
-      handleObj = jQuery.extend({
-        type: type,
-        origType: origType,
-        data: data,
-        handler: handler,
-        guid: handler.guid,
-        selector: selector,
-        needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
-        namespace: namespaces.join(".")
-      }, handleObjIn );
-
-      // Init the event handler queue if we're the first
-      if ( !(handlers = events[ type ]) ) {
-        handlers = events[ type ] = [];
-        handlers.delegateCount = 0;
-
-        // Only use addEventListener/attachEvent if the special events handler returns false
-        if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
-          // Bind the global event handler to the element
-          if ( elem.addEventListener ) {
-            elem.addEventListener( type, eventHandle, false );
-
-          } else if ( elem.attachEvent ) {
-            elem.attachEvent( "on" + type, eventHandle );
-          }
-        }
-      }
-
-      if ( special.add ) {
-        special.add.call( elem, handleObj );
-
-        if ( !handleObj.handler.guid ) {
-          handleObj.handler.guid = handler.guid;
-        }
-      }
-
-      // Add to the element's handler list, delegates in front
-      if ( selector ) {
-        handlers.splice( handlers.delegateCount++, 0, handleObj );
-      } else {
-        handlers.push( handleObj );
-      }
-
-      // Keep track of which events have ever been used, for event optimization
-      jQuery.event.global[ type ] = true;
-    }
-
-    // Nullify elem to prevent memory leaks in IE
-    elem = null;
-  },
-
-  // Detach an event or set of events from an element
-  remove: function( elem, types, handler, selector, mappedTypes ) {
-    var j, handleObj, tmp,
-      origCount, t, events,
-      special, handlers, type,
-      namespaces, origType,
-      elemData = jQuery.hasData( elem ) && jQuery._data( elem );
-
-    if ( !elemData || !(events = elemData.events) ) {
-      return;
-    }
-
-    // Once for each type.namespace in types; type may be omitted
-    types = ( types || "" ).match( core_rnotwhite ) || [""];
-    t = types.length;
-    while ( t-- ) {
-      tmp = rtypenamespace.exec( types[t] ) || [];
-      type = origType = tmp[1];
-      namespaces = ( tmp[2] || "" ).split( "." ).sort();
-
-      // Unbind all events (on this namespace, if provided) for the element
-      if ( !type ) {
-        for ( type in events ) {
-          jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
-        }
-        continue;
-      }
-
-      special = jQuery.event.special[ type ] || {};
-      type = ( selector ? special.delegateType : special.bindType ) || type;
-      handlers = events[ type ] || [];
-      tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
-
-      // Remove matching events
-      origCount = j = handlers.length;
-      while ( j-- ) {
-        handleObj = handlers[ j ];
-
-        if ( ( mappedTypes || origType === handleObj.origType ) &&
-          ( !handler || handler.guid === handleObj.guid ) &&
-          ( !tmp || tmp.test( handleObj.namespace ) ) &&
-          ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
-          handlers.splice( j, 1 );
-
-          if ( handleObj.selector ) {
-            handlers.delegateCount--;
-          }
-          if ( special.remove ) {
-            special.remove.call( elem, handleObj );
-          }
-        }
-      }
-
-      // Remove generic event handler if we removed something and no more handlers exist
-      // (avoids potential for endless recursion during removal of special event handlers)
-      if ( origCount && !handlers.length ) {
-        if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
-          jQuery.removeEvent( elem, type, elemData.handle );
-        }
-
-        delete events[ type ];
-      }
-    }
-
-    // Remove the expando if it's no longer used
-    if ( jQuery.isEmptyObject( events ) ) {
-      delete elemData.handle;
-
-      // removeData also checks for emptiness and clears the expando if empty
-      // so use it instead of delete
-      jQuery._removeData( elem, "events" );
-    }
-  },
-
-  trigger: function( event, data, elem, onlyHandlers ) {
-    var handle, ontype, cur,
-      bubbleType, special, tmp, i,
-      eventPath = [ elem || document ],
-      type = core_hasOwn.call( event, "type" ) ? event.type : event,
-      namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
-
-    cur = tmp = elem = elem || document;
-
-    // Don't do events on text and comment nodes
-    if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
-      return;
-    }
-
-    // focus/blur morphs to focusin/out; ensure we're not firing them right now
-    if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
-      return;
-    }
-
-    if ( type.indexOf(".") >= 0 ) {
-      // Namespaced trigger; create a regexp to match event type in handle()
-      namespaces = type.split(".");
-      type = namespaces.shift();
-      namespaces.sort();
-    }
-    ontype = type.indexOf(":") < 0 && "on" + type;
-
-    // Caller can pass in a jQuery.Event object, Object, or just an event type string
-    event = event[ jQuery.expando ] ?
-      event :
-      new jQuery.Event( type, typeof event === "object" && event );
-
-    // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
-    event.isTrigger = onlyHandlers ? 2 : 3;
-    event.namespace = namespaces.join(".");
-    event.namespace_re = event.namespace ?
-      new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
-      null;
-
-    // Clean up the event in case it is being reused
-    event.result = undefined;
-    if ( !event.target ) {
-      event.target = elem;
-    }
-
-    // Clone any incoming data and prepend the event, creating the handler arg list
-    data = data == null ?
-      [ event ] :
-      jQuery.makeArray( data, [ event ] );
-
-    // Allow special events to draw outside the lines
-    special = jQuery.event.special[ type ] || {};
-    if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
-      return;
-    }
-
-    // Determine event propagation path in advance, per W3C events spec (#9951)
-    // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
-    if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
-
-      bubbleType = special.delegateType || type;
-      if ( !rfocusMorph.test( bubbleType + type ) ) {
-        cur = cur.parentNode;
-      }
-      for ( ; cur; cur = cur.parentNode ) {
-        eventPath.push( cur );
-        tmp = cur;
-      }
-
-      // Only add window if we got to document (e.g., not plain obj or detached DOM)
-      if ( tmp === (elem.ownerDocument || document) ) {
-        eventPath.push( tmp.defaultView || tmp.parentWindow || window );
-      }
-    }
-
-    // Fire handlers on the event path
-    i = 0;
-    while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
-
-      event.type = i > 1 ?
-        bubbleType :
-        special.bindType || type;
-
-      // jQuery handler
-      handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
-      if ( handle ) {
-        handle.apply( cur, data );
-      }
-
-      // Native handler
-      handle = ontype && cur[ ontype ];
-      if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
-        event.preventDefault();
-      }
-    }
-    event.type = type;
-
-    // If nobody prevented the default action, do it now
-    if ( !onlyHandlers && !event.isDefaultPrevented() ) {
-
-      if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
-        jQuery.acceptData( elem ) ) {
-
-        // Call a native DOM method on the target with the same name name as the event.
-        // Can't use an .isFunction() check here because IE6/7 fails that test.
-        // Don't do default actions on window, that's where global variables be (#6170)
-        if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
-
-          // Don't re-trigger an onFOO event when we call its FOO() method
-          tmp = elem[ ontype ];
-
-          if ( tmp ) {
-            elem[ ontype ] = null;
-          }
-
-          // Prevent re-triggering of the same event, since we already bubbled it above
-          jQuery.event.triggered = type;
-          try {
-            elem[ type ]();
-          } catch ( e ) {
-            // IE<9 dies on focus/blur to hidden element (#1486,#12518)
-            // only reproducible on winXP IE8 native, not IE9 in IE8 mode
-          }
-          jQuery.event.triggered = undefined;
-
-          if ( tmp ) {
-            elem[ ontype ] = tmp;
-          }
-        }
-      }
-    }
-
-    return event.result;
-  },
-
-  dispatch: function( event ) {
-
-    // Make a writable jQuery.Event from the native event object
-    event = jQuery.event.fix( event );
-
-    var i, ret, handleObj, matched, j,
-      handlerQueue = [],
-      args = core_slice.call( arguments ),
-      handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
-      special = jQuery.event.special[ event.type ] || {};
-
-    // Use the fix-ed jQuery.Event rather than the (read-only) native event
-    args[0] = event;
-    event.delegateTarget = this;
-
-    // Call the preDispatch hook for the mapped type, and let it bail if desired
-    if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
-      return;
-    }
-
-    // Determine handlers
-    handlerQueue = jQuery.event.handlers.call( this, event, handlers );
-
-    // Run delegates first; they may want to stop propagation beneath us
-    i = 0;
-    while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
-      event.currentTarget = matched.elem;
-
-      j = 0;
-      while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
-
-        // Triggered event must either 1) have no namespace, or
-        // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
-        if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
-
-          event.handleObj = handleObj;
-          event.data = handleObj.data;
-
-          ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
-              .apply( matched.elem, args );
-
-          if ( ret !== undefined ) {
-            if ( (event.result = ret) === false ) {
-              event.preventDefault();
-              event.stopPropagation();
-            }
-          }
-        }
-      }
-    }
-
-    // Call the postDispatch hook for the mapped type
-    if ( special.postDispatch ) {
-      special.postDispatch.call( this, event );
-    }
-
-    return event.result;
-  },
-
-  handlers: function( event, handlers ) {
-    var sel, handleObj, matches, i,
-      handlerQueue = [],
-      delegateCount = handlers.delegateCount,
-      cur = event.target;
-
-    // Find delegate handlers
-    // Black-hole SVG <use> instance trees (#13180)
-    // Avoid non-left-click bubbling in Firefox (#3861)
-    if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
-
-      /* jshint eqeqeq: false */
-      for ( ; cur != this; cur = cur.parentNode || this ) {
-        /* jshint eqeqeq: true */
-
-        // Don't check non-elements (#13208)
-        // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
-        if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) {
-          matches = [];
-          for ( i = 0; i < delegateCount; i++ ) {
-            handleObj = handlers[ i ];
-
-            // Don't conflict with Object.prototype properties (#13203)
-            sel = handleObj.selector + " ";
-
-            if ( matches[ sel ] === undefined ) {
-              matches[ sel ] = handleObj.needsContext ?
-                jQuery( sel, this ).index( cur ) >= 0 :
-                jQuery.find( sel, this, null, [ cur ] ).length;
-            }
-            if ( matches[ sel ] ) {
-              matches.push( handleObj );
-            }
-          }
-          if ( matches.length ) {
-            handlerQueue.push({ elem: cur, handlers: matches });
-          }
-        }
-      }
-    }
-
-    // Add the remaining (directly-bound) handlers
-    if ( delegateCount < handlers.length ) {
-      handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
-    }
-
-    return handlerQueue;
-  },
-
-  fix: function( event ) {
-    if ( event[ jQuery.expando ] ) {
-      return event;
-    }
-
-    // Create a writable copy of the event object and normalize some properties
-    var i, prop, copy,
-      type = event.type,
-      originalEvent = event,
-      fixHook = this.fixHooks[ type ];
-
-    if ( !fixHook ) {
-      this.fixHooks[ type ] = fixHook =
-        rmouseEvent.test( type ) ? this.mouseHooks :
-        rkeyEvent.test( type ) ? this.keyHooks :
-        {};
-    }
-    copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
-
-    event = new jQuery.Event( originalEvent );
-
-    i = copy.length;
-    while ( i-- ) {
-      prop = copy[ i ];
-      event[ prop ] = originalEvent[ prop ];
-    }
-
-    // Support: IE<9
-    // Fix target property (#1925)
-    if ( !event.target ) {
-      event.target = originalEvent.srcElement || document;
-    }
-
-    // Support: Chrome 23+, Safari?
-    // Target should not be a text node (#504, #13143)
-    if ( event.target.nodeType === 3 ) {
-      event.target = event.target.parentNode;
-    }
-
-    // Support: IE<9
-    // For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
-    event.metaKey = !!event.metaKey;
-
-    return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
-  },
-
-  // Includes some event props shared by KeyEvent and MouseEvent
-  props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
-
-  fixHooks: {},
-
-  keyHooks: {
-    props: "char charCode key keyCode".split(" "),
-    filter: function( event, original ) {
-
-      // Add which for key events
-      if ( event.which == null ) {
-        event.which = original.charCode != null ? original.charCode : original.keyCode;
-      }
-
-      return event;
-    }
-  },
-
-  mouseHooks: {
-    props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
-    filter: function( event, original ) {
-      var body, eventDoc, doc,
-        button = original.button,
-        fromElement = original.fromElement;
-
-      // Calculate pageX/Y if missing and clientX/Y available
-      if ( event.pageX == null && original.clientX != null ) {
-        eventDoc = event.target.ownerDocument || document;
-        doc = eventDoc.documentElement;
-        body = eventDoc.body;
-
-        event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
-        event.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );
-      }
-
-      // Add relatedTarget, if necessary
-      if ( !event.relatedTarget && fromElement ) {
-        event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
-      }
-
-      // Add which for click: 1 === left; 2 === middle; 3 === right
-      // Note: button is not normalized, so don't use it
-      if ( !event.which && button !== undefined ) {
-        event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
-      }
-
-      return event;
-    }
-  },
-
-  special: {
-    load: {
-      // Prevent triggered image.load events from bubbling to window.load
-      noBubble: true
-    },
-    focus: {
-      // Fire native event if possible so blur/focus sequence is correct
-      trigger: function() {
-        if ( this !== safeActiveElement() && this.focus ) {
-          try {
-            this.focus();
-            return false;
-          } catch ( e ) {
-            // Support: IE<9
-            // If we error on focus to hidden element (#1486, #12518),
-            // let .trigger() run the handlers
-          }
-        }
-      },
-      delegateType: "focusin"
-    },
-    blur: {
-      trigger: function() {
-        if ( this === safeActiveElement() && this.blur ) {
-          this.blur();
-          return false;
-        }
-      },
-      delegateType: "focusout"
-    },
-    click: {
-      // For checkbox, fire native event so checked state will be right
-      trigger: function() {
-        if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
-          this.click();
-          return false;
-        }
-      },
-
-      // For cross-browser consistency, don't fire native .click() on links
-      _default: function( event ) {
-        return jQuery.nodeName( event.target, "a" );
-      }
-    },
-
-    beforeunload: {
-      postDispatch: function( event ) {
-
-        // Even when returnValue equals to undefined Firefox will still show alert
-        if ( event.result !== undefined ) {
-          event.originalEvent.returnValue = event.result;
-        }
-      }
-    }
-  },
-
-  simulate: function( type, elem, event, bubble ) {
-    // Piggyback on a donor event to simulate a different one.
-    // Fake originalEvent to avoid donor's stopPropagation, but if the
-    // simulated event prevents default then we do the same on the donor.
-    var e = jQuery.extend(
-      new jQuery.Event(),
-      event,
-      {
-        type: type,
-        isSimulated: true,
-        originalEvent: {}
-      }
-    );
-    if ( bubble ) {
-      jQuery.event.trigger( e, null, elem );
-    } else {
-      jQuery.event.dispatch.call( elem, e );
-    }
-    if ( e.isDefaultPrevented() ) {
-      event.preventDefault();
-    }
-  }
-};
-
-jQuery.removeEvent = document.removeEventListener ?
-  function( elem, type, handle ) {
-    if ( elem.removeEventListener ) {
-      elem.removeEventListener( type, handle, false );
-    }
-  } :
-  function( elem, type, handle ) {
-    var name = "on" + type;
-
-    if ( elem.detachEvent ) {
-
-      // #8545, #7054, preventing memory leaks for custom events in IE6-8
-      // detachEvent needed property on element, by name of that event, to properly expose it to GC
-      if ( typeof elem[ name ] === core_strundefined ) {
-        elem[ name ] = null;
-      }
-
-      elem.detachEvent( name, handle );
-    }
-  };
-
-jQuery.Event = function( src, props ) {
-  // Allow instantiation without the 'new' keyword
-  if ( !(this instanceof jQuery.Event) ) {
-    return new jQuery.Event( src, props );
-  }
-
-  // Event object
-  if ( src && src.type ) {
-    this.originalEvent = src;
-    this.type = src.type;
-
-    // Events bubbling up the document may have been marked as prevented
-    // by a handler lower down the tree; reflect the correct value.
-    this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
-      src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
-
-  // Event type
-  } else {
-    this.type = src;
-  }
-
-  // Put explicitly provided properties onto the event object
-  if ( props ) {
-    jQuery.extend( this, props );
-  }
-
-  // Create a timestamp if incoming event doesn't have one
-  this.timeStamp = src && src.timeStamp || jQuery.now();
-
-  // Mark it as fixed
-  this[ jQuery.expando ] = true;
-};
-
-// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
-// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
-jQuery.Event.prototype = {
-  isDefaultPrevented: returnFalse,
-  isPropagationStopped: returnFalse,
-  isImmediatePropagationStopped: returnFalse,
-
-  preventDefault: function() {
-    var e = this.originalEvent;
-
-    this.isDefaultPrevented = returnTrue;
-    if ( !e ) {
-      return;
-    }
-
-    // If preventDefault exists, run it on the original event
-    if ( e.preventDefault ) {
-      e.preventDefault();
-
-    // Support: IE
-    // Otherwise set the returnValue property of the original event to false
-    } else {
-      e.returnValue = false;
-    }
-  },
-  stopPropagation: function() {
-    var e = this.originalEvent;
-
-    this.isPropagationStopped = returnTrue;
-    if ( !e ) {
-      return;
-    }
-    // If stopPropagation exists, run it on the original event
-    if ( e.stopPropagation ) {
-      e.stopPropagation();
-    }
-
-    // Support: IE
-    // Set the cancelBubble property of the original event to true
-    e.cancelBubble = true;
-  },
-  stopImmediatePropagation: function() {
-    this.isImmediatePropagationStopped = returnTrue;
-    this.stopPropagation();
-  }
-};
-
-// Create mouseenter/leave events using mouseover/out and event-time checks
-jQuery.each({
-  mouseenter: "mouseover",
-  mouseleave: "mouseout"
-}, function( orig, fix ) {
-  jQuery.event.special[ orig ] = {
-    delegateType: fix,
-    bindType: fix,
-
-    handle: function( event ) {
-      var ret,
-        target = this,
-        related = event.relatedTarget,
-        handleObj = event.handleObj;
-
-      // For mousenter/leave call the handler if related is outside the target.
-      // NB: No relatedTarget if the mouse left/entered the browser window
-      if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
-        event.type = handleObj.origType;
-        ret = handleObj.handler.apply( this, arguments );
-        event.type = fix;
-      }
-      return ret;
-    }
-  };
-});
-
-// IE submit delegation
-if ( !jQuery.support.submitBubbles ) {
-
-  jQuery.event.special.submit = {
-    setup: function() {
-      // Only need this for delegated form submit events
-      if ( jQuery.nodeName( this, "form" ) ) {
-        return false;
-      }
-
-      // Lazy-add a submit handler when a descendant form may potentially be submitted
-      jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
-        // Node name check avoids a VML-related crash in IE (#9807)
-        var elem = e.target,
-          form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
-        if ( form && !jQuery._data( form, "submitBubbles" ) ) {
-          jQuery.event.add( form, "submit._submit", function( event ) {
-            event._submit_bubble = true;
-          });
-          jQuery._data( form, "submitBubbles", true );
-        }
-      });
-      // return undefined since we don't need an event listener
-    },
-
-    postDispatch: function( event ) {
-      // If form was submitted by the user, bubble the event up the tree
-      if ( event._submit_bubble ) {
-        delete event._submit_bubble;
-        if ( this.parentNode && !event.isTrigger ) {
-          jQuery.event.simulate( "submit", this.parentNode, event, true );
-        }
-      }
-    },
-
-    teardown: function() {
-      // Only need this for delegated form submit events
-      if ( jQuery.nodeName( this, "form" ) ) {
-        return false;
-      }
-
-      // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
-      jQuery.event.remove( this, "._submit" );
-    }
-  };
-}
-
-// IE change delegation and checkbox/radio fix
-if ( !jQuery.support.changeBubbles ) {
-
-  jQuery.event.special.change = {
-
-    setup: function() {
-
-      if ( rformElems.test( this.nodeName ) ) {
-        // IE doesn't fire change on a check/radio until blur; trigger it on click
-        // after a propertychange. Eat the blur-change in special.change.handle.
-        // This still fires onchange a second time for check/radio after blur.
-        if ( this.type === "checkbox" || this.type === "radio" ) {
-          jQuery.event.add( this, "propertychange._change", function( event ) {
-            if ( event.originalEvent.propertyName === "checked" ) {
-              this._just_changed = true;
-            }
-          });
-          jQuery.event.add( this, "click._change", function( event ) {
-            if ( this._just_changed && !event.isTrigger ) {
-              this._just_changed = false;
-            }
-            // Allow triggered, simulated change events (#11500)
-            jQuery.event.simulate( "change", this, event, true );
-          });
-        }
-        return false;
-      }
-      // Delegated event; lazy-add a change handler on descendant inputs
-      jQuery.event.add( this, "beforeactivate._change", function( e ) {
-        var elem = e.target;
-
-        if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) {
-          jQuery.event.add( elem, "change._change", function( event ) {
-            if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
-              jQuery.event.simulate( "change", this.parentNode, event, true );
-            }
-          });
-          jQuery._data( elem, "changeBubbles", true );
-        }
-      });
-    },
-
-    handle: function( event ) {
-      var elem = event.target;
-
-      // Swallow native change events from checkbox/radio, we already triggered them above
-      if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
-        return event.handleObj.handler.apply( this, arguments );
-      }
-    },
-
-    teardown: function() {
-      jQuery.event.remove( this, "._change" );
-
-      return !rformElems.test( this.nodeName );
-    }
-  };
-}
-
-// Create "bubbling" focus and blur events
-if ( !jQuery.support.focusinBubbles ) {
-  jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
-
-    // Attach a single capturing handler while someone wants focusin/focusout
-    var attaches = 0,
-      handler = function( event ) {
-        jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
-      };
-
-    jQuery.event.special[ fix ] = {
-      setup: function() {
-        if ( attaches++ === 0 ) {
-          document.addEventListener( orig, handler, true );
-        }
-      },
-      teardown: function() {
-        if ( --attaches === 0 ) {
-          document.removeEventListener( orig, handler, true );
-        }
-      }
-    };
-  });
-}
-
-jQuery.fn.extend({
-
-  on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
-    var type, origFn;
-
-    // Types can be a map of types/handlers
-    if ( typeof types === "object" ) {
-      // ( types-Object, selector, data )
-      if ( typeof selector !== "string" ) {
-        // ( types-Object, data )
-        data = data || selector;
-        selector = undefined;
-      }
-      for ( type in types ) {
-        this.on( type, selector, data, types[ type ], one );
-      }
-      return this;
-    }
-
-    if ( data == null && fn == null ) {
-      // ( types, fn )
-      fn = selector;
-      data = selector = undefined;
-    } else if ( fn == null ) {
-      if ( typeof selector === "string" ) {
-        // ( types, selector, fn )
-        fn = data;
-        data = undefined;
-      } else {
-        // ( types, data, fn )
-        fn = data;
-        data = selector;
-        selector = undefined;
-      }
-    }
-    if ( fn === false ) {
-      fn = returnFalse;
-    } else if ( !fn ) {
-      return this;
-    }
-
-    if ( one === 1 ) {
-      origFn = fn;
-      fn = function( event ) {
-        // Can use an empty set, since event contains the info
-        jQuery().off( event );
-        return origFn.apply( this, arguments );
-      };
-      // Use same guid so caller can remove using origFn
-      fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
-    }
-    return this.each( function() {
-      jQuery.event.add( this, types, fn, data, selector );
-    });
-  },
-  one: function( types, selector, data, fn ) {
-    return this.on( types, selector, data, fn, 1 );
-  },
-  off: function( types, selector, fn ) {
-    var handleObj, type;
-    if ( types && types.preventDefault && types.handleObj ) {
-      // ( event )  dispatched jQuery.Event
-      handleObj = types.handleObj;
-      jQuery( types.delegateTarget ).off(
-        handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
-        handleObj.selector,
-        handleObj.handler
-      );
-      return this;
-    }
-    if ( typeof types === "object" ) {
-      // ( types-object [, selector] )
-      for ( type in types ) {
-        this.off( type, selector, types[ type ] );
-      }
-      return this;
-    }
-    if ( selector === false || typeof selector === "function" ) {
-      // ( types [, fn] )
-      fn = selector;
-      selector = undefined;
-    }
-    if ( fn === false ) {
-      fn = returnFalse;
-    }
-    return this.each(function() {
-      jQuery.event.remove( this, types, fn, selector );
-    });
-  },
-
-  trigger: function( type, data ) {
-    return this.each(function() {
-      jQuery.event.trigger( type, data, this );
-    });
-  },
-  triggerHandler: function( type, data ) {
-    var elem = this[0];
-    if ( elem ) {
-      return jQuery.event.trigger( type, data, elem, true );
-    }
-  }
-});
-var isSimple = /^.[^:#\[\.,]*$/,
-  rparentsprev = /^(?:parents|prev(?:Until|All))/,
-  rneedsContext = jQuery.expr.match.needsContext,
-  // methods guaranteed to produce a unique set when starting from a unique set
-  guaranteedUnique = {
-    children: true,
-    contents: true,
-    next: true,
-    prev: true
-  };
-
-jQuery.fn.extend({
-  find: function( selector ) {
-    var i,
-      ret = [],
-      self = this,
-      len = self.length;
-
-    if ( typeof selector !== "string" ) {
-      return this.pushStack( jQuery( selector ).filter(function() {
-        for ( i = 0; i < len; i++ ) {
-          if ( jQuery.contains( self[ i ], this ) ) {
-            return true;
-          }
-        }
-      }) );
-    }
-
-    for ( i = 0; i < len; i++ ) {
-      jQuery.find( selector, self[ i ], ret );
-    }
-
-    // Needed because $( selector, context ) becomes $( context ).find( selector )
-    ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
-    ret.selector = this.selector ? this.selector + " " + selector : selector;
-    return ret;
-  },
-
-  has: function( target ) {
-    var i,
-      targets = jQuery( target, this ),
-      len = targets.length;
-
-    return this.filter(function() {
-      for ( i = 0; i < len; i++ ) {
-        if ( jQuery.contains( this, targets[i] ) ) {
-          return true;
-        }
-      }
-    });
-  },
-
-  not: function( selector ) {
-    return this.pushStack( winnow(this, selector || [], true) );
-  },
-
-  filter: function( selector ) {
-    return this.pushStack( winnow(this, selector || [], false) );
-  },
-
-  is: function( selector ) {
-    return !!winnow(
-      this,
-
-      // If this is a positional/relative selector, check membership in the returned set
-      // so $("p:first").is("p:last") won't return true for a doc with two "p".
-      typeof selector === "string" && rneedsContext.test( selector ) ?
-        jQuery( selector ) :
-        selector || [],
-      false
-    ).length;
-  },
-
-  closest: function( selectors, context ) {
-    var cur,
-      i = 0,
-      l = this.length,
-      ret = [],
-      pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
-        jQuery( selectors, context || this.context ) :
-        0;
-
-    for ( ; i < l; i++ ) {
-      for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
-        // Always skip document fragments
-        if ( cur.nodeType < 11 && (pos ?
-          pos.index(cur) > -1 :
-
-          // Don't pass non-elements to Sizzle
-          cur.nodeType === 1 &&
-            jQuery.find.matchesSelector(cur, selectors)) ) {
-
-          cur = ret.push( cur );
-          break;
-        }
-      }
-    }
-
-    return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );
-  },
-
-  // Determine the position of an element within
-  // the matched set of elements
-  index: function( elem ) {
-
-    // No argument, return index in parent
-    if ( !elem ) {
-      return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
-    }
-
-    // index in selector
-    if ( typeof elem === "string" ) {
-      return jQuery.inArray( this[0], jQuery( elem ) );
-    }
-
-    // Locate the position of the desired element
-    return jQuery.inArray(
-      // If it receives a jQuery object, the first element is used
-      elem.jquery ? elem[0] : elem, this );
-  },
-
-  add: function( selector, context ) {
-    var set = typeof selector === "string" ?
-        jQuery( selector, context ) :
-        jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
-      all = jQuery.merge( this.get(), set );
-
-    return this.pushStack( jQuery.unique(all) );
-  },
-
-  addBack: function( selector ) {
-    return this.add( selector == null ?
-      this.prevObject : this.prevObject.filter(selector)
-    );
-  }
-});
-
-function sibling( cur, dir ) {
-  do {
-    cur = cur[ dir ];
-  } while ( cur && cur.nodeType !== 1 );
-
-  return cur;
-}
-
-jQuery.each({
-  parent: function( elem ) {
-    var parent = elem.parentNode;
-    return parent && parent.nodeType !== 11 ? parent : null;
-  },
-  parents: function( elem ) {
-    return jQuery.dir( elem, "parentNode" );
-  },
-  parentsUntil: function( elem, i, until ) {
-    return jQuery.dir( elem, "parentNode", until );
-  },
-  next: function( elem ) {
-    return sibling( elem, "nextSibling" );
-  },
-  prev: function( elem ) {
-    return sibling( elem, "previousSibling" );
-  },
-  nextAll: function( elem ) {
-    return jQuery.dir( elem, "nextSibling" );
-  },
-  prevAll: function( elem ) {
-    return jQuery.dir( elem, "previousSibling" );
-  },
-  nextUntil: function( elem, i, until ) {
-    return jQuery.dir( elem, "nextSibling", until );
-  },
-  prevUntil: function( elem, i, until ) {
-    return jQuery.dir( elem, "previousSibling", until );
-  },
-  siblings: function( elem ) {
-    return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
-  },
-  children: function( elem ) {
-    return jQuery.sibling( elem.firstChild );
-  },
-  contents: function( elem ) {
-    return jQuery.nodeName( elem, "iframe" ) ?
-      elem.contentDocument || elem.contentWindow.document :
-      jQuery.merge( [], elem.childNodes );
-  }
-}, function( name, fn ) {
-  jQuery.fn[ name ] = function( until, selector ) {
-    var ret = jQuery.map( this, fn, until );
-
-    if ( name.slice( -5 ) !== "Until" ) {
-      selector = until;
-    }
-
-    if ( selector && typeof selector === "string" ) {
-      ret = jQuery.filter( selector, ret );
-    }
-
-    if ( this.length > 1 ) {
-      // Remove duplicates
-      if ( !guaranteedUnique[ name ] ) {
-        ret = jQuery.unique( ret );
-      }
-
-      // Reverse order for parents* and prev-derivatives
-      if ( rparentsprev.test( name ) ) {
-        ret = ret.reverse();
-      }
-    }
-
-    return this.pushStack( ret );
-  };
-});
-
-jQuery.extend({
-  filter: function( expr, elems, not ) {
-    var elem = elems[ 0 ];
-
-    if ( not ) {
-      expr = ":not(" + expr + ")";
-    }
-
-    return elems.length === 1 && elem.nodeType === 1 ?
-      jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
-      jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
-        return elem.nodeType === 1;
-      }));
-  },
-
-  dir: function( elem, dir, until ) {
-    var matched = [],
-      cur = elem[ dir ];
-
-    while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
-      if ( cur.nodeType === 1 ) {
-        matched.push( cur );
-      }
-      cur = cur[dir];
-    }
-    return matched;
-  },
-
-  sibling: function( n, elem ) {
-    var r = [];
-
-    for ( ; n; n = n.nextSibling ) {
-      if ( n.nodeType === 1 && n !== elem ) {
-        r.push( n );
-      }
-    }
-
-    return r;
-  }
-});
-
-// Implement the identical functionality for filter and not
-function winnow( elements, qualifier, not ) {
-  if ( jQuery.isFunction( qualifier ) ) {
-    return jQuery.grep( elements, function( elem, i ) {
-      /* jshint -W018 */
-      return !!qualifier.call( elem, i, elem ) !== not;
-    });
-
-  }
-
-  if ( qualifier.nodeType ) {
-    return jQuery.grep( elements, function( elem ) {
-      return ( elem === qualifier ) !== not;
-    });
-
-  }
-
-  if ( typeof qualifier === "string" ) {
-    if ( isSimple.test( qualifier ) ) {
-      return jQuery.filter( qualifier, elements, not );
-    }
-
-    qualifier = jQuery.filter( qualifier, elements );
-  }
-
-  return jQuery.grep( elements, function( elem ) {
-    return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not;
-  });
-}
-function createSafeFragment( document ) {
-  var list = nodeNames.split( "|" ),
-    safeFrag = document.createDocumentFragment();
-
-  if ( safeFrag.createElement ) {
-    while ( list.length ) {
-      safeFrag.createElement(
-        list.pop()
-      );
-    }
-  }
-  return safeFrag;
-}
-
-var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
-    "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
-  rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
-  rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
-  rleadingWhitespace = /^\s+/,
-  rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
-  rtagName = /<([\w:]+)/,
-  rtbody = /<tbody/i,
-  rhtml = /<|&#?\w+;/,
-  rnoInnerhtml = /<(?:script|style|link)/i,
-  manipulation_rcheckableType = /^(?:checkbox|radio)$/i,
-  // checked="checked" or checked
-  rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
-  rscriptType = /^$|\/(?:java|ecma)script/i,
-  rscriptTypeMasked = /^true\/(.*)/,
-  rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
-
-  // We have to close these tags to support XHTML (#13200)
-  wrapMap = {
-    option: [ 1, "<select multiple='multiple'>", "</select>" ],
-    legend: [ 1, "<fieldset>", "</fieldset>" ],
-    area: [ 1, "<map>", "</map>" ],
-    param: [ 1, "<object>", "</object>" ],
-    thead: [ 1, "<table>", "</table>" ],
-    tr: [ 2, "<table><tbody>", "</tbody></table>" ],
-    col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
-    td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
-
-    // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
-    // unless wrapped in a div with non-breaking characters in front of it.
-    _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>"  ]
-  },
-  safeFragment = createSafeFragment( document ),
-  fragmentDiv = safeFragment.appendChild( document.createElement("div") );
-
-wrapMap.optgroup = wrapMap.option;
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-jQuery.fn.extend({
-  text: function( value ) {
-    return jQuery.access( this, function( value ) {
-      return value === undefined ?
-        jQuery.text( this ) :
-        this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
-    }, null, value, arguments.length );
-  },
-
-  append: function() {
-    return this.domManip( arguments, function( elem ) {
-      if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
-        var target = manipulationTarget( this, elem );
-        target.appendChild( elem );
-      }
-    });
-  },
-
-  prepend: function() {
-    return this.domManip( arguments, function( elem ) {
-      if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
-        var target = manipulationTarget( this, elem );
-        target.insertBefore( elem, target.firstChild );
-      }
-    });
-  },
-
-  before: function() {
-    return this.domManip( arguments, function( elem ) {
-      if ( this.parentNode ) {
-        this.parentNode.insertBefore( elem, this );
-      }
-    });
-  },
-
-  after: function() {
-    return this.domManip( arguments, function( elem ) {
-      if ( this.parentNode ) {
-        this.parentNode.insertBefore( elem, this.nextSibling );
-      }
-    });
-  },
-
-  // keepData is for internal use only--do not document
-  remove: function( selector, keepData ) {
-    var elem,
-      elems = selector ? jQuery.filter( selector, this ) : this,
-      i = 0;
-
-    for ( ; (elem = elems[i]) != null; i++ ) {
-
-      if ( !keepData && elem.nodeType === 1 ) {
-        jQuery.cleanData( getAll( elem ) );
-      }
-
-      if ( elem.parentNode ) {
-        if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
-          setGlobalEval( getAll( elem, "script" ) );
-        }
-        elem.parentNode.removeChild( elem );
-      }
-    }
-
-    return this;
-  },
-
-  empty: function() {
-    var elem,
-      i = 0;
-
-    for ( ; (elem = this[i]) != null; i++ ) {
-      // Remove element nodes and prevent memory leaks
-      if ( elem.nodeType === 1 ) {
-        jQuery.cleanData( getAll( elem, false ) );
-      }
-
-      // Remove any remaining nodes
-      while ( elem.firstChild ) {
-        elem.removeChild( elem.firstChild );
-      }
-
-      // If this is a select, ensure that it displays empty (#12336)
-      // Support: IE<9
-      if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
-        elem.options.length = 0;
-      }
-    }
-
-    return this;
-  },
-
-  clone: function( dataAndEvents, deepDataAndEvents ) {
-    dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
-    deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
-
-    return this.map( function () {
-      return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
-    });
-  },
-
-  html: function( value ) {
-    return jQuery.access( this, function( value ) {
-      var elem = this[0] || {},
-        i = 0,
-        l = this.length;
-
-      if ( value === undefined ) {
-        return elem.nodeType === 1 ?
-          elem.innerHTML.replace( rinlinejQuery, "" ) :
-          undefined;
-      }
-
-      // See if we can take a shortcut and just use innerHTML
-      if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
-        ( jQuery.support.htmlSerialize || !rnoshimcache.test( value )  ) &&
-        ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
-        !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
-
-        value = value.replace( rxhtmlTag, "<$1></$2>" );
-
-        try {
-          for (; i < l; i++ ) {
-            // Remove element nodes and prevent memory leaks
-            elem = this[i] || {};
-            if ( elem.nodeType === 1 ) {
-              jQuery.cleanData( getAll( elem, false ) );
-              elem.innerHTML = value;
-            }
-          }
-
-          elem = 0;
-
-        // If using innerHTML throws an exception, use the fallback method
-        } catch(e) {}
-      }
-
-      if ( elem ) {
-        this.empty().append( value );
-      }
-    }, null, value, arguments.length );
-  },
-
-  replaceWith: function() {
-    var
-      // Snapshot the DOM in case .domManip sweeps something relevant into its fragment
-      args = jQuery.map( this, function( elem ) {
-        return [ elem.nextSibling, elem.parentNode ];
-      }),
-      i = 0;
-
-    // Make the changes, replacing each context element with the new content
-    this.domManip( arguments, function( elem ) {
-      var next = args[ i++ ],
-        parent = args[ i++ ];
-
-      if ( parent ) {
-        // Don't use the snapshot next if it has moved (#13810)
-        if ( next && next.parentNode !== parent ) {
-          next = this.nextSibling;
-        }
-        jQuery( this ).remove();
-        parent.insertBefore( elem, next );
-      }
-    // Allow new content to include elements from the context set
-    }, true );
-
-    // Force removal if there was no new content (e.g., from empty arguments)
-    return i ? this : this.remove();
-  },
-
-  detach: function( selector ) {
-    return this.remove( selector, true );
-  },
-
-  domManip: function( args, callback, allowIntersection ) {
-
-    // Flatten any nested arrays
-    args = core_concat.apply( [], args );
-
-    var first, node, hasScripts,
-      scripts, doc, fragment,
-      i = 0,
-      l = this.length,
-      set = this,
-      iNoClone = l - 1,
-      value = args[0],
-      isFunction = jQuery.isFunction( value );
-
-    // We can't cloneNode fragments that contain checked, in WebKit
-    if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {
-      return this.each(function( index ) {
-        var self = set.eq( index );
-        if ( isFunction ) {
-          args[0] = value.call( this, index, self.html() );
-        }
-        self.domManip( args, callback, allowIntersection );
-      });
-    }
-
-    if ( l ) {
-      fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this );
-      first = fragment.firstChild;
-
-      if ( fragment.childNodes.length === 1 ) {
-        fragment = first;
-      }
-
-      if ( first ) {
-        scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
-        hasScripts = scripts.length;
-
-        // Use the original fragment for the last item instead of the first because it can end up
-        // being emptied incorrectly in certain situations (#8070).
-        for ( ; i < l; i++ ) {
-          node = fragment;
-
-          if ( i !== iNoClone ) {
-            node = jQuery.clone( node, true, true );
-
-            // Keep references to cloned scripts for later restoration
-            if ( hasScripts ) {
-              jQuery.merge( scripts, getAll( node, "script" ) );
-            }
-          }
-
-          callback.call( this[i], node, i );
-        }
-
-        if ( hasScripts ) {
-          doc = scripts[ scripts.length - 1 ].ownerDocument;
-
-          // Reenable scripts
-          jQuery.map( scripts, restoreScript );
-
-          // Evaluate executable scripts on first document insertion
-          for ( i = 0; i < hasScripts; i++ ) {
-            node = scripts[ i ];
-            if ( rscriptType.test( node.type || "" ) &&
-              !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
-
-              if ( node.src ) {
-                // Hope ajax is available...
-                jQuery._evalUrl( node.src );
-              } else {
-                jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
-              }
-            }
-          }
-        }
-
-        // Fix #11809: Avoid leaking memory
-        fragment = first = null;
-      }
-    }
-
-    return this;
-  }
-});
-
-// Support: IE<8
-// Manipulating tables requires a tbody
-function manipulationTarget( elem, content ) {
-  return jQuery.nodeName( elem, "table" ) &&
-    jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ?
-
-    elem.getElementsByTagName("tbody")[0] ||
-      elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
-    elem;
-}
-
-// Replace/restore the type attribute of script elements for safe DOM manipulation
-function disableScript( elem ) {
-  elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type;
-  return elem;
-}
-function restoreScript( elem ) {
-  var match = rscriptTypeMasked.exec( elem.type );
-  if ( match ) {
-    elem.type = match[1];
-  } else {
-    elem.removeAttribute("type");
-  }
-  return elem;
-}
-
-// Mark scripts as having already been evaluated
-function setGlobalEval( elems, refElements ) {
-  var elem,
-    i = 0;
-  for ( ; (elem = elems[i]) != null; i++ ) {
-    jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );
-  }
-}
-
-function cloneCopyEvent( src, dest ) {
-
-  if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
-    return;
-  }
-
-  var type, i, l,
-    oldData = jQuery._data( src ),
-    curData = jQuery._data( dest, oldData ),
-    events = oldData.events;
-
-  if ( events ) {
-    delete curData.handle;
-    curData.events = {};
-
-    for ( type in events ) {
-      for ( i = 0, l = events[ type ].length; i < l; i++ ) {
-        jQuery.event.add( dest, type, events[ type ][ i ] );
-      }
-    }
-  }
-
-  // make the cloned public data object a copy from the original
-  if ( curData.data ) {
-    curData.data = jQuery.extend( {}, curData.data );
-  }
-}
-
-function fixCloneNodeIssues( src, dest ) {
-  var nodeName, e, data;
-
-  // We do not need to do anything for non-Elements
-  if ( dest.nodeType !== 1 ) {
-    return;
-  }
-
-  nodeName = dest.nodeName.toLowerCase();
-
-  // IE6-8 copies events bound via attachEvent when using cloneNode.
-  if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) {
-    data = jQuery._data( dest );
-
-    for ( e in data.events ) {
-      jQuery.removeEvent( dest, e, data.handle );
-    }
-
-    // Event data gets referenced instead of copied if the expando gets copied too
-    dest.removeAttribute( jQuery.expando );
-  }
-
-  // IE blanks contents when cloning scripts, and tries to evaluate newly-set text
-  if ( nodeName === "script" && dest.text !== src.text ) {
-    disableScript( dest ).text = src.text;
-    restoreScript( dest );
-
-  // IE6-10 improperly clones children of object elements using classid.
-  // IE10 throws NoModificationAllowedError if parent is null, #12132.
-  } else if ( nodeName === "object" ) {
-    if ( dest.parentNode ) {
-      dest.outerHTML = src.outerHTML;
-    }
-
-    // This path appears unavoidable for IE9. When cloning an object
-    // element in IE9, the outerHTML strategy above is not sufficient.
-    // If the src has innerHTML and the destination does not,
-    // copy the src.innerHTML into the dest.innerHTML. #10324
-    if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {
-      dest.innerHTML = src.innerHTML;
-    }
-
-  } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) {
-    // IE6-8 fails to persist the checked state of a cloned checkbox
-    // or radio button. Worse, IE6-7 fail to give the cloned element
-    // a checked appearance if the defaultChecked value isn't also set
-
-    dest.defaultChecked = dest.checked = src.checked;
-
-    // IE6-7 get confused and end up setting the value of a cloned
-    // checkbox/radio button to an empty string instead of "on"
-    if ( dest.value !== src.value ) {
-      dest.value = src.value;
-    }
-
-  // IE6-8 fails to return the selected option to the default selected
-  // state when cloning options
-  } else if ( nodeName === "option" ) {
-    dest.defaultSelected = dest.selected = src.defaultSelected;
-
-  // IE6-8 fails to set the defaultValue to the correct value when
-  // cloning other types of input fields
-  } else if ( nodeName === "input" || nodeName === "textarea" ) {
-    dest.defaultValue = src.defaultValue;
-  }
-}
-
-jQuery.each({
-  appendTo: "append",
-  prependTo: "prepend",
-  insertBefore: "before",
-  insertAfter: "after",
-  replaceAll: "replaceWith"
-}, function( name, original ) {
-  jQuery.fn[ name ] = function( selector ) {
-    var elems,
-      i = 0,
-      ret = [],
-      insert = jQuery( selector ),
-      last = insert.length - 1;
-
-    for ( ; i <= last; i++ ) {
-      elems = i === last ? this : this.clone(true);
-      jQuery( insert[i] )[ original ]( elems );
-
-      // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
-      core_push.apply( ret, elems.get() );
-    }
-
-    return this.pushStack( ret );
-  };
-});
-
-function getAll( context, tag ) {
-  var elems, elem,
-    i = 0,
-    found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) :
-      typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) :
-      undefined;
-
-  if ( !found ) {
-    for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
-      if ( !tag || jQuery.nodeName( elem, tag ) ) {
-        found.push( elem );
-      } else {
-        jQuery.merge( found, getAll( elem, tag ) );
-      }
-    }
-  }
-
-  return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
-    jQuery.merge( [ context ], found ) :
-    found;
-}
-
-// Used in buildFragment, fixes the defaultChecked property
-function fixDefaultChecked( elem ) {
-  if ( manipulation_rcheckableType.test( elem.type ) ) {
-    elem.defaultChecked = elem.checked;
-  }
-}
-
-jQuery.extend({
-  clone: function( elem, dataAndEvents, deepDataAndEvents ) {
-    var destElements, node, clone, i, srcElements,
-      inPage = jQuery.contains( elem.ownerDocument, elem );
-
-    if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
-      clone = elem.cloneNode( true );
-
-    // IE<=8 does not properly clone detached, unknown element nodes
-    } else {
-      fragmentDiv.innerHTML = elem.outerHTML;
-      fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
-    }
-
-    if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
-        (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
-
-      // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
-      destElements = getAll( clone );
-      srcElements = getAll( elem );
-
-      // Fix all IE cloning issues
-      for ( i = 0; (node = srcElements[i]) != null; ++i ) {
-        // Ensure that the destination node is not null; Fixes #9587
-        if ( destElements[i] ) {
-          fixCloneNodeIssues( node, destElements[i] );
-        }
-      }
-    }
-
-    // Copy the events from the original to the clone
-    if ( dataAndEvents ) {
-      if ( deepDataAndEvents ) {
-        srcElements = srcElements || getAll( elem );
-        destElements = destElements || getAll( clone );
-
-        for ( i = 0; (node = srcElements[i]) != null; i++ ) {
-          cloneCopyEvent( node, destElements[i] );
-        }
-      } else {
-        cloneCopyEvent( elem, clone );
-      }
-    }
-
-    // Preserve script evaluation history
-    destElements = getAll( clone, "script" );
-    if ( destElements.length > 0 ) {
-      setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
-    }
-
-    destElements = srcElements = node = null;
-
-    // Return the cloned set
-    return clone;
-  },
-
-  buildFragment: function( elems, context, scripts, selection ) {
-    var j, elem, contains,
-      tmp, tag, tbody, wrap,
-      l = elems.length,
-
-      // Ensure a safe fragment
-      safe = createSafeFragment( context ),
-
-      nodes = [],
-      i = 0;
-
-    for ( ; i < l; i++ ) {
-      elem = elems[ i ];
-
-      if ( elem || elem === 0 ) {
-
-        // Add nodes directly
-        if ( jQuery.type( elem ) === "object" ) {
-          jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
-
-        // Convert non-html into a text node
-        } else if ( !rhtml.test( elem ) ) {
-          nodes.push( context.createTextNode( elem ) );
-
-        // Convert html into DOM nodes
-        } else {
-          tmp = tmp || safe.appendChild( context.createElement("div") );
-
-          // Deserialize a standard representation
-          tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
-          wrap = wrapMap[ tag ] || wrapMap._default;
-
-          tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];
-
-          // Descend through wrappers to the right content
-          j = wrap[0];
-          while ( j-- ) {
-            tmp = tmp.lastChild;
-          }
-
-          // Manually add leading whitespace removed by IE
-          if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
-            nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
-          }
-
-          // Remove IE's autoinserted <tbody> from table fragments
-          if ( !jQuery.support.tbody ) {
-
-            // String was a <table>, *may* have spurious <tbody>
-            elem = tag === "table" && !rtbody.test( elem ) ?
-              tmp.firstChild :
-
-              // String was a bare <thead> or <tfoot>
-              wrap[1] === "<table>" && !rtbody.test( elem ) ?
-                tmp :
-                0;
-
-            j = elem && elem.childNodes.length;
-            while ( j-- ) {
-              if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {
-                elem.removeChild( tbody );
-              }
-            }
-          }
-
-          jQuery.merge( nodes, tmp.childNodes );
-
-          // Fix #12392 for WebKit and IE > 9
-          tmp.textContent = "";
-
-          // Fix #12392 for oldIE
-          while ( tmp.firstChild ) {
-            tmp.removeChild( tmp.firstChild );
-          }
-
-          // Remember the top-level container for proper cleanup
-          tmp = safe.lastChild;
-        }
-      }
-    }
-
-    // Fix #11356: Clear elements from fragment
-    if ( tmp ) {
-      safe.removeChild( tmp );
-    }
-
-    // Reset defaultChecked for any radios and checkboxes
-    // about to be appended to the DOM in IE 6/7 (#8060)
-    if ( !jQuery.support.appendChecked ) {
-      jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
-    }
-
-    i = 0;
-    while ( (elem = nodes[ i++ ]) ) {
-
-      // #4087 - If origin and destination elements are the same, and this is
-      // that element, do not do anything
-      if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
-        continue;
-      }
-
-      contains = jQuery.contains( elem.ownerDocument, elem );
-
-      // Append to fragment
-      tmp = getAll( safe.appendChild( elem ), "script" );
-
-      // Preserve script evaluation history
-      if ( contains ) {
-        setGlobalEval( tmp );
-      }
-
-      // Capture executables
-      if ( scripts ) {
-        j = 0;
-        while ( (elem = tmp[ j++ ]) ) {
-          if ( rscriptType.test( elem.type || "" ) ) {
-            scripts.push( elem );
-          }
-        }
-      }
-    }
-
-    tmp = null;
-
-    return safe;
-  },
-
-  cleanData: function( elems, /* internal */ acceptData ) {
-    var elem, type, id, data,
-      i = 0,
-      internalKey = jQuery.expando,
-      cache = jQuery.cache,
-      deleteExpando = jQuery.support.deleteExpando,
-      special = jQuery.event.special;
-
-    for ( ; (elem = elems[i]) != null; i++ ) {
-
-      if ( acceptData || jQuery.acceptData( elem ) ) {
-
-        id = elem[ internalKey ];
-        data = id && cache[ id ];
-
-        if ( data ) {
-          if ( data.events ) {
-            for ( type in data.events ) {
-              if ( special[ type ] ) {
-                jQuery.event.remove( elem, type );
-
-              // This is a shortcut to avoid jQuery.event.remove's overhead
-              } else {
-                jQuery.removeEvent( elem, type, data.handle );
-              }
-            }
-          }
-
-          // Remove cache only if it was not already removed by jQuery.event.remove
-          if ( cache[ id ] ) {
-
-            delete cache[ id ];
-
-            // IE does not allow us to delete expando properties from nodes,
-            // nor does it have a removeAttribute function on Document nodes;
-            // we must handle all of these cases
-            if ( deleteExpando ) {
-              delete elem[ internalKey ];
-
-            } else if ( typeof elem.removeAttribute !== core_strundefined ) {
-              elem.removeAttribute( internalKey );
-
-            } else {
-              elem[ internalKey ] = null;
-            }
-
-            core_deletedIds.push( id );
-          }
-        }
-      }
-    }
-  },
-
-  _evalUrl: function( url ) {
-    return jQuery.ajax({
-      url: url,
-      type: "GET",
-      dataType: "script",
-      async: false,
-      global: false,
-      "throws": true
-    });
-  }
-});
-jQuery.fn.extend({
-  wrapAll: function( html ) {
-    if ( jQuery.isFunction( html ) ) {
-      return this.each(function(i) {
-        jQuery(this).wrapAll( html.call(this, i) );
-      });
-    }
-
-    if ( this[0] ) {
-      // The elements to wrap the target around
-      var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
-
-      if ( this[0].parentNode ) {
-        wrap.insertBefore( this[0] );
-      }
-
-      wrap.map(function() {
-        var elem = this;
-
-        while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
-          elem = elem.firstChild;
-        }
-
-        return elem;
-      }).append( this );
-    }
-
-    return this;
-  },
-
-  wrapInner: function( html ) {
-    if ( jQuery.isFunction( html ) ) {
-      return this.each(function(i) {
-        jQuery(this).wrapInner( html.call(this, i) );
-      });
-    }
-
-    return this.each(function() {
-      var self = jQuery( this ),
-        contents = self.contents();
-
-      if ( contents.length ) {
-        contents.wrapAll( html );
-
-      } else {
-        self.append( html );
-      }
-    });
-  },
-
-  wrap: function( html ) {
-    var isFunction = jQuery.isFunction( html );
-
-    return this.each(function(i) {
-      jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
-    });
-  },
-
-  unwrap: function() {
-    return this.parent().each(function() {
-      if ( !jQuery.nodeName( this, "body" ) ) {
-        jQuery( this ).replaceWith( this.childNodes );
-      }
-    }).end();
-  }
-});
-var iframe, getStyles, curCSS,
-  ralpha = /alpha\([^)]*\)/i,
-  ropacity = /opacity\s*=\s*([^)]*)/,
-  rposition = /^(top|right|bottom|left)$/,
-  // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
-  // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
-  rdisplayswap = /^(none|table(?!-c[ea]).+)/,
-  rmargin = /^margin/,
-  rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
-  rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
-  rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ),
-  elemdisplay = { BODY: "block" },
-
-  cssShow = { position: "absolute", visibility: "hidden", display: "block" },
-  cssNormalTransform = {
-    letterSpacing: 0,
-    fontWeight: 400
-  },
-
-  cssExpand = [ "Top", "Right", "Bottom", "Left" ],
-  cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
-
-// return a css property mapped to a potentially vendor prefixed property
-function vendorPropName( style, name ) {
-
-  // shortcut for names that are not vendor prefixed
-  if ( name in style ) {
-    return name;
-  }
-
-  // check for vendor prefixed names
-  var capName = name.charAt(0).toUpperCase() + name.slice(1),
-    origName = name,
-    i = cssPrefixes.length;
-
-  while ( i-- ) {
-    name = cssPrefixes[ i ] + capName;
-    if ( name in style ) {
-      return name;
-    }
-  }
-
-  return origName;
-}
-
-function isHidden( elem, el ) {
-  // isHidden might be called from jQuery#filter function;
-  // in that case, element will be second argument
-  elem = el || elem;
-  return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
-}
-
-function showHide( elements, show ) {
-  var display, elem, hidden,
-    values = [],
-    index = 0,
-    length = elements.length;
-
-  for ( ; index < length; index++ ) {
-    elem = elements[ index ];
-    if ( !elem.style ) {
-      continue;
-    }
-
-    values[ index ] = jQuery._data( elem, "olddisplay" );
-    display = elem.style.display;
-    if ( show ) {
-      // Reset the inline display of this element to learn if it is
-      // being hidden by cascaded rules or not
-      if ( !values[ index ] && display === "none" ) {
-        elem.style.display = "";
-      }
-
-      // Set elements which have been overridden with display: none
-      // in a stylesheet to whatever the default browser style is
-      // for such an element
-      if ( elem.style.display === "" && isHidden( elem ) ) {
-        values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
-      }
-    } else {
-
-      if ( !values[ index ] ) {
-        hidden = isHidden( elem );
-
-        if ( display && display !== "none" || !hidden ) {
-          jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
-        }
-      }
-    }
-  }
-
-  // Set the display of most of the elements in a second loop
-  // to avoid the constant reflow
-  for ( index = 0; index < length; index++ ) {
-    elem = elements[ index ];
-    if ( !elem.style ) {
-      continue;
-    }
-    if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
-      elem.style.display = show ? values[ index ] || "" : "none";
-    }
-  }
-
-  return elements;
-}
-
-jQuery.fn.extend({
-  css: function( name, value ) {
-    return jQuery.access( this, function( elem, name, value ) {
-      var len, styles,
-        map = {},
-        i = 0;
-
-      if ( jQuery.isArray( name ) ) {
-        styles = getStyles( elem );
-        len = name.length;
-
-        for ( ; i < len; i++ ) {
-          map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
-        }
-
-        return map;
-      }
-
-      return value !== undefined ?
-        jQuery.style( elem, name, value ) :
-        jQuery.css( elem, name );
-    }, name, value, arguments.length > 1 );
-  },
-  show: function() {
-    return showHide( this, true );
-  },
-  hide: function() {
-    return showHide( this );
-  },
-  toggle: function( state ) {
-    if ( typeof state === "boolean" ) {
-      return state ? this.show() : this.hide();
-    }
-
-    return this.each(function() {
-      if ( isHidden( this ) ) {
-        jQuery( this ).show();
-      } else {
-        jQuery( this ).hide();
-      }
-    });
-  }
-});
-
-jQuery.extend({
-  // Add in style property hooks for overriding the default
-  // behavior of getting and setting a style property
-  cssHooks: {
-    opacity: {
-      get: function( elem, computed ) {
-        if ( computed ) {
-          // We should always get a number back from opacity
-          var ret = curCSS( elem, "opacity" );
-          return ret === "" ? "1" : ret;
-        }
-      }
-    }
-  },
-
-  // Don't automatically add "px" to these possibly-unitless properties
-  cssNumber: {
-    "columnCount": true,
-    "fillOpacity": true,
-    "fontWeight": true,
-    "lineHeight": true,
-    "opacity": true,
-    "order": true,
-    "orphans": true,
-    "widows": true,
-    "zIndex": true,
-    "zoom": true
-  },
-
-  // Add in properties whose names you wish to fix before
-  // setting or getting the value
-  cssProps: {
-    // normalize float css property
-    "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
-  },
-
-  // Get and set the style property on a DOM Node
-  style: function( elem, name, value, extra ) {
-    // Don't set styles on text and comment nodes
-    if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
-      return;
-    }
-
-    // Make sure that we're working with the right name
-    var ret, type, hooks,
-      origName = jQuery.camelCase( name ),
-      style = elem.style;
-
-    name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
-
-    // gets hook for the prefixed version
-    // followed by the unprefixed version
-    hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
-
-    // Check if we're setting a value
-    if ( value !== undefined ) {
-      type = typeof value;
-
-      // convert relative number strings (+= or -=) to relative numbers. #7345
-      if ( type === "string" && (ret = rrelNum.exec( value )) ) {
-        value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
-        // Fixes bug #9237
-        type = "number";
-      }
-
-      // Make sure that NaN and null values aren't set. See: #7116
-      if ( value == null || type === "number" && isNaN( value ) ) {
-        return;
-      }
-
-      // If a number was passed in, add 'px' to the (except for certain CSS properties)
-      if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
-        value += "px";
-      }
-
-      // Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
-      // but it would mean to define eight (for every problematic property) identical functions
-      if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
-        style[ name ] = "inherit";
-      }
-
-      // If a hook was provided, use that value, otherwise just set the specified value
-      if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
-
-        // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
-        // Fixes bug #5509
-        try {
-          style[ name ] = value;
-        } catch(e) {}
-      }
-
-    } else {
-      // If a hook was provided get the non-computed value from there
-      if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
-        return ret;
-      }
-
-      // Otherwise just get the value from the style object
-      return style[ name ];
-    }
-  },
-
-  css: function( elem, name, extra, styles ) {
-    var num, val, hooks,
-      origName = jQuery.camelCase( name );
-
-    // Make sure that we're working with the right name
-    name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
-
-    // gets hook for the prefixed version
-    // followed by the unprefixed version
-    hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
-
-    // If a hook was provided get the computed value from there
-    if ( hooks && "get" in hooks ) {
-      val = hooks.get( elem, true, extra );
-    }
-
-    // Otherwise, if a way to get the computed value exists, use that
-    if ( val === undefined ) {
-      val = curCSS( elem, name, styles );
-    }
-
-    //convert "normal" to computed value
-    if ( val === "normal" && name in cssNormalTransform ) {
-      val = cssNormalTransform[ name ];
-    }
-
-    // Return, converting to number if forced or a qualifier was provided and val looks numeric
-    if ( extra === "" || extra ) {
-      num = parseFloat( val );
-      return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
-    }
-    return val;
-  }
-});
-
-// NOTE: we've included the "window" in window.getComputedStyle
-// because jsdom on node.js will break without it.
-if ( window.getComputedStyle ) {
-  getStyles = function( elem ) {
-    return window.getComputedStyle( elem, null );
-  };
-
-  curCSS = function( elem, name, _computed ) {
-    var width, minWidth, maxWidth,
-      computed = _computed || getStyles( elem ),
-
-      // getPropertyValue is only needed for .css('filter') in IE9, see #12537
-      ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,
-      style = elem.style;
-
-    if ( computed ) {
-
-      if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
-        ret = jQuery.style( elem, name );
-      }
-
-      // A tribute to the "awesome hack by Dean Edwards"
-      // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
-      // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
-      // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
-      if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
-
-        // Remember the original values
-        width = style.width;
-        minWidth = style.minWidth;
-        maxWidth = style.maxWidth;
-
-        // Put in the new values to get a computed value out
-        style.minWidth = style.maxWidth = style.width = ret;
-        ret = computed.width;
-
-        // Revert the changed values
-        style.width = width;
-        style.minWidth = minWidth;
-        style.maxWidth = maxWidth;
-      }
-    }
-
-    return ret;
-  };
-} else if ( document.documentElement.currentStyle ) {
-  getStyles = function( elem ) {
-    return elem.currentStyle;
-  };
-
-  curCSS = function( elem, name, _computed ) {
-    var left, rs, rsLeft,
-      computed = _computed || getStyles( elem ),
-      ret = computed ? computed[ name ] : undefined,
-      style = elem.style;
-
-    // Avoid setting ret to empty string here
-    // so we don't default to auto
-    if ( ret == null && style && style[ name ] ) {
-      ret = style[ name ];
-    }
-
-    // From the awesome hack by Dean Edwards
-    // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
-
-    // If we're not dealing with a regular pixel number
-    // but a number that has a weird ending, we need to convert it to pixels
-    // but not position css attributes, as those are proportional to the parent element instead
-    // and we can't measure the parent instead because it might trigger a "stacking dolls" problem
-    if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
-
-      // Remember the original values
-      left = style.left;
-      rs = elem.runtimeStyle;
-      rsLeft = rs && rs.left;
-
-      // Put in the new values to get a computed value out
-      if ( rsLeft ) {
-        rs.left = elem.currentStyle.left;
-      }
-      style.left = name === "fontSize" ? "1em" : ret;
-      ret = style.pixelLeft + "px";
-
-      // Revert the changed values
-      style.left = left;
-      if ( rsLeft ) {
-        rs.left = rsLeft;
-      }
-    }
-
-    return ret === "" ? "auto" : ret;
-  };
-}
-
-function setPositiveNumber( elem, value, subtract ) {
-  var matches = rnumsplit.exec( value );
-  return matches ?
-    // Guard against undefined "subtract", e.g., when used as in cssHooks
-    Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
-    value;
-}
-
-function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
-  var i = extra === ( isBorderBox ? "border" : "content" ) ?
-    // If we already have the right measurement, avoid augmentation
-    4 :
-    // Otherwise initialize for horizontal or vertical properties
-    name === "width" ? 1 : 0,
-
-    val = 0;
-
-  for ( ; i < 4; i += 2 ) {
-    // both box models exclude margin, so add it if we want it
-    if ( extra === "margin" ) {
-      val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
-    }
-
-    if ( isBorderBox ) {
-      // border-box includes padding, so remove it if we want content
-      if ( extra === "content" ) {
-        val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
-      }
-
-      // at this point, extra isn't border nor margin, so remove border
-      if ( extra !== "margin" ) {
-        val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
-      }
-    } else {
-      // at this point, extra isn't content, so add padding
-      val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
-
-      // at this point, extra isn't content nor padding, so add border
-      if ( extra !== "padding" ) {
-        val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
-      }
-    }
-  }
-
-  return val;
-}
-
-function getWidthOrHeight( elem, name, extra ) {
-
-  // Start with offset property, which is equivalent to the border-box value
-  var valueIsBorderBox = true,
-    val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
-    styles = getStyles( elem ),
-    isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
-
-  // some non-html elements return undefined for offsetWidth, so check for null/undefined
-  // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
-  // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
-  if ( val <= 0 || val == null ) {
-    // Fall back to computed then uncomputed css if necessary
-    val = curCSS( elem, name, styles );
-    if ( val < 0 || val == null ) {
-      val = elem.style[ name ];
-    }
-
-    // Computed unit is not pixels. Stop here and return.
-    if ( rnumnonpx.test(val) ) {
-      return val;
-    }
-
-    // we need the check for style in case a browser which returns unreliable values
-    // for getComputedStyle silently falls back to the reliable elem.style
-    valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
-
-    // Normalize "", auto, and prepare for extra
-    val = parseFloat( val ) || 0;
-  }
-
-  // use the active box-sizing model to add/subtract irrelevant styles
-  return ( val +
-    augmentWidthOrHeight(
-      elem,
-      name,
-      extra || ( isBorderBox ? "border" : "content" ),
-      valueIsBorderBox,
-      styles
-    )
-  ) + "px";
-}
-
-// Try to determine the default display value of an element
-function css_defaultDisplay( nodeName ) {
-  var doc = document,
-    display = elemdisplay[ nodeName ];
-
-  if ( !display ) {
-    display = actualDisplay( nodeName, doc );
-
-    // If the simple way fails, read from inside an iframe
-    if ( display === "none" || !display ) {
-      // Use the already-created iframe if possible
-      iframe = ( iframe ||
-        jQuery("<iframe frameborder='0' width='0' height='0'/>")
-        .css( "cssText", "display:block !important" )
-      ).appendTo( doc.documentElement );
-
-      // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
-      doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;
-      doc.write("<!doctype html><html><body>");
-      doc.close();
-
-      display = actualDisplay( nodeName, doc );
-      iframe.detach();
-    }
-
-    // Store the correct default display
-    elemdisplay[ nodeName ] = display;
-  }
-
-  return display;
-}
-
-// Called ONLY from within css_defaultDisplay
-function actualDisplay( name, doc ) {
-  var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
-    display = jQuery.css( elem[0], "display" );
-  elem.remove();
-  return display;
-}
-
-jQuery.each([ "height", "width" ], function( i, name ) {
-  jQuery.cssHooks[ name ] = {
-    get: function( elem, computed, extra ) {
-      if ( computed ) {
-        // certain elements can have dimension info if we invisibly show them
-        // however, it must have a current display style that would benefit from this
-        return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ?
-          jQuery.swap( elem, cssShow, function() {
-            return getWidthOrHeight( elem, name, extra );
-          }) :
-          getWidthOrHeight( elem, name, extra );
-      }
-    },
-
-    set: function( elem, value, extra ) {
-      var styles = extra && getStyles( elem );
-      return setPositiveNumber( elem, value, extra ?
-        augmentWidthOrHeight(
-          elem,
-          name,
-          extra,
-          jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
-          styles
-        ) : 0
-      );
-    }
-  };
-});
-
-if ( !jQuery.support.opacity ) {
-  jQuery.cssHooks.opacity = {
-    get: function( elem, computed ) {
-      // IE uses filters for opacity
-      return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
-        ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
-        computed ? "1" : "";
-    },
-
-    set: function( elem, value ) {
-      var style = elem.style,
-        currentStyle = elem.currentStyle,
-        opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
-        filter = currentStyle && currentStyle.filter || style.filter || "";
-
-      // IE has trouble with opacity if it does not have layout
-      // Force it by setting the zoom level
-      style.zoom = 1;
-
-      // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
-      // if value === "", then remove inline opacity #12685
-      if ( ( value >= 1 || value === "" ) &&
-          jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
-          style.removeAttribute ) {
-
-        // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
-        // if "filter:" is present at all, clearType is disabled, we want to avoid this
-        // style.removeAttribute is IE Only, but so apparently is this code path...
-        style.removeAttribute( "filter" );
-
-        // if there is no filter style applied in a css rule or unset inline opacity, we are done
-        if ( value === "" || currentStyle && !currentStyle.filter ) {
-          return;
-        }
-      }
-
-      // otherwise, set new filter values
-      style.filter = ralpha.test( filter ) ?
-        filter.replace( ralpha, opacity ) :
-        filter + " " + opacity;
-    }
-  };
-}
-
-// These hooks cannot be added until DOM ready because the support test
-// for it is not run until after DOM ready
-jQuery(function() {
-  if ( !jQuery.support.reliableMarginRight ) {
-    jQuery.cssHooks.marginRight = {
-      get: function( elem, computed ) {
-        if ( computed ) {
-          // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
-          // Work around by temporarily setting element display to inline-block
-          return jQuery.swap( elem, { "display": "inline-block" },
-            curCSS, [ elem, "marginRight" ] );
-        }
-      }
-    };
-  }
-
-  // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
-  // getComputedStyle returns percent when specified for top/left/bottom/right
-  // rather than make the css module depend on the offset module, we just check for it here
-  if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
-    jQuery.each( [ "top", "left" ], function( i, prop ) {
-      jQuery.cssHooks[ prop ] = {
-        get: function( elem, computed ) {
-          if ( computed ) {
-            computed = curCSS( elem, prop );
-            // if curCSS returns percentage, fallback to offset
-            return rnumnonpx.test( computed ) ?
-              jQuery( elem ).position()[ prop ] + "px" :
-              computed;
-          }
-        }
-      };
-    });
-  }
-
-});
-
-if ( jQuery.expr && jQuery.expr.filters ) {
-  jQuery.expr.filters.hidden = function( elem ) {
-    // Support: Opera <= 12.12
-    // Opera reports offsetWidths and offsetHeights less than zero on some elements
-    return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||
-      (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
-  };
-
-  jQuery.expr.filters.visible = function( elem ) {
-    return !jQuery.expr.filters.hidden( elem );
-  };
-}
-
-// These hooks are used by animate to expand properties
-jQuery.each({
-  margin: "",
-  padding: "",
-  border: "Width"
-}, function( prefix, suffix ) {
-  jQuery.cssHooks[ prefix + suffix ] = {
-    expand: function( value ) {
-      var i = 0,
-        expanded = {},
-
-        // assumes a single number if not a string
-        parts = typeof value === "string" ? value.split(" ") : [ value ];
-
-      for ( ; i < 4; i++ ) {
-        expanded[ prefix + cssExpand[ i ] + suffix ] =
-          parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
-      }
-
-      return expanded;
-    }
-  };
-
-  if ( !rmargin.test( prefix ) ) {
-    jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
-  }
-});
-var r20 = /%20/g,
-  rbracket = /\[\]$/,
-  rCRLF = /\r?\n/g,
-  rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
-  rsubmittable = /^(?:input|select|textarea|keygen)/i;
-
-jQuery.fn.extend({
-  serialize: function() {
-    return jQuery.param( this.serializeArray() );
-  },
-  serializeArray: function() {
-    return this.map(function(){
-      // Can add propHook for "elements" to filter or add form elements
-      var elements = jQuery.prop( this, "elements" );
-      return elements ? jQuery.makeArray( elements ) : this;
-    })
-    .filter(function(){
-      var type = this.type;
-      // Use .is(":disabled") so that fieldset[disabled] works
-      return this.name && !jQuery( this ).is( ":disabled" ) &&
-        rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
-        ( this.checked || !manipulation_rcheckableType.test( type ) );
-    })
-    .map(function( i, elem ){
-      var val = jQuery( this ).val();
-
-      return val == null ?
-        null :
-        jQuery.isArray( val ) ?
-          jQuery.map( val, function( val ){
-            return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
-          }) :
-          { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
-    }).get();
-  }
-});
-
-//Serialize an array of form elements or a set of
-//key/values into a query string
-jQuery.param = function( a, traditional ) {
-  var prefix,
-    s = [],
-    add = function( key, value ) {
-      // If value is a function, invoke it and return its value
-      value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
-      s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
-    };
-
-  // Set traditional to true for jQuery <= 1.3.2 behavior.
-  if ( traditional === undefined ) {
-    traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
-  }
-
-  // If an array was passed in, assume that it is an array of form elements.
-  if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
-    // Serialize the form elements
-    jQuery.each( a, function() {
-      add( this.name, this.value );
-    });
-
-  } else {
-    // If traditional, encode the "old" way (the way 1.3.2 or older
-    // did it), otherwise encode params recursively.
-    for ( prefix in a ) {
-      buildParams( prefix, a[ prefix ], traditional, add );
-    }
-  }
-
-  // Return the resulting serialization
-  return s.join( "&" ).replace( r20, "+" );
-};
-
-function buildParams( prefix, obj, traditional, add ) {
-  var name;
-
-  if ( jQuery.isArray( obj ) ) {
-    // Serialize array item.
-    jQuery.each( obj, function( i, v ) {
-      if ( traditional || rbracket.test( prefix ) ) {
-        // Treat each array item as a scalar.
-        add( prefix, v );
-
-      } else {
-        // Item is non-scalar (array or object), encode its numeric index.
-        buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
-      }
-    });
-
-  } else if ( !traditional && jQuery.type( obj ) === "object" ) {
-    // Serialize object item.
-    for ( name in obj ) {
-      buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
-    }
-
-  } else {
-    // Serialize scalar item.
-    add( prefix, obj );
-  }
-}
-jQuery.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( i, name ) {
-
-  // Handle event binding
-  jQuery.fn[ name ] = function( data, fn ) {
-    return arguments.length > 0 ?
-      this.on( name, null, data, fn ) :
-      this.trigger( name );
-  };
-});
-
-jQuery.fn.extend({
-  hover: function( fnOver, fnOut ) {
-    return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
-  },
-
-  bind: function( types, data, fn ) {
-    return this.on( types, null, data, fn );
-  },
-  unbind: function( types, fn ) {
-    return this.off( types, null, fn );
-  },
-
-  delegate: function( selector, types, data, fn ) {
-    return this.on( types, selector, data, fn );
-  },
-  undelegate: function( selector, types, fn ) {
-    // ( namespace ) or ( selector, types [, fn] )
-    return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
-  }
-});
-var
-  // Document location
-  ajaxLocParts,
-  ajaxLocation,
-  ajax_nonce = jQuery.now(),
-
-  ajax_rquery = /\?/,
-  rhash = /#.*$/,
-  rts = /([?&])_=[^&]*/,
-  rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
-  // #7653, #8125, #8152: local protocol detection
-  rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
-  rnoContent = /^(?:GET|HEAD)$/,
-  rprotocol = /^\/\//,
-  rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
-
-  // Keep a copy of the old load method
-  _load = jQuery.fn.load,
-
-  /* Prefilters
-   * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
-   * 2) These are called:
-   *    - BEFORE asking for a transport
-   *    - AFTER param serialization (s.data is a string if s.processData is true)
-   * 3) key is the dataType
-   * 4) the catchall symbol "*" can be used
-   * 5) execution will start with transport dataType and THEN continue down to "*" if needed
-   */
-  prefilters = {},
-
-  /* Transports bindings
-   * 1) key is the dataType
-   * 2) the catchall symbol "*" can be used
-   * 3) selection will start with transport dataType and THEN go to "*" if needed
-   */
-  transports = {},
-
-  // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
-  allTypes = "*/".concat("*");
-
-// #8138, IE may throw an exception when accessing
-// a field from window.location if document.domain has been set
-try {
-  ajaxLocation = location.href;
-} catch( e ) {
-  // Use the href attribute of an A element
-  // since IE will modify it given document.location
-  ajaxLocation = document.createElement( "a" );
-  ajaxLocation.href = "";
-  ajaxLocation = ajaxLocation.href;
-}
-
-// Segment location into parts
-ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
-
-// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
-function addToPrefiltersOrTransports( structure ) {
-
-  // dataTypeExpression is optional and defaults to "*"
-  return function( dataTypeExpression, func ) {
-
-    if ( typeof dataTypeExpression !== "string" ) {
-      func = dataTypeExpression;
-      dataTypeExpression = "*";
-    }
-
-    var dataType,
-      i = 0,
-      dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];
-
-    if ( jQuery.isFunction( func ) ) {
-      // For each dataType in the dataTypeExpression
-      while ( (dataType = dataTypes[i++]) ) {
-        // Prepend if requested
-        if ( dataType[0] === "+" ) {
-          dataType = dataType.slice( 1 ) || "*";
-          (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
-
-        // Otherwise append
-        } else {
-          (structure[ dataType ] = structure[ dataType ] || []).push( func );
-        }
-      }
-    }
-  };
-}
-
-// Base inspection function for prefilters and transports
-function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
-
-  var inspected = {},
-    seekingTransport = ( structure === transports );
-
-  function inspect( dataType ) {
-    var selected;
-    inspected[ dataType ] = true;
-    jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
-      var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
-      if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
-        options.dataTypes.unshift( dataTypeOrTransport );
-        inspect( dataTypeOrTransport );
-        return false;
-      } else if ( seekingTransport ) {
-        return !( selected = dataTypeOrTransport );
-      }
-    });
-    return selected;
-  }
-
-  return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
-}
-
-// A special extend for ajax options
-// that takes "flat" options (not to be deep extended)
-// Fixes #9887
-function ajaxExtend( target, src ) {
-  var deep, key,
-    flatOptions = jQuery.ajaxSettings.flatOptions || {};
-
-  for ( key in src ) {
-    if ( src[ key ] !== undefined ) {
-      ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
-    }
-  }
-  if ( deep ) {
-    jQuery.extend( true, target, deep );
-  }
-
-  return target;
-}
-
-jQuery.fn.load = function( url, params, callback ) {
-  if ( typeof url !== "string" && _load ) {
-    return _load.apply( this, arguments );
-  }
-
-  var selector, response, type,
-    self = this,
-    off = url.indexOf(" ");
-
-  if ( off >= 0 ) {
-    selector = url.slice( off, url.length );
-    url = url.slice( 0, off );
-  }
-
-  // If it's a function
-  if ( jQuery.isFunction( params ) ) {
-
-    // We assume that it's the callback
-    callback = params;
-    params = undefined;
-
-  // Otherwise, build a param string
-  } else if ( params && typeof params === "object" ) {
-    type = "POST";
-  }
-
-  // If we have elements to modify, make the request
-  if ( self.length > 0 ) {
-    jQuery.ajax({
-      url: url,
-
-      // if "type" variable is undefined, then "GET" method will be used
-      type: type,
-      dataType: "html",
-      data: params
-    }).done(function( responseText ) {
-
-      // Save response for use in complete callback
-      response = arguments;
-
-      self.html( selector ?
-
-        // If a selector was specified, locate the right elements in a dummy div
-        // Exclude scripts to avoid IE 'Permission Denied' errors
-        jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
-
-        // Otherwise use the full result
-        responseText );
-
-    }).complete( callback && function( jqXHR, status ) {
-      self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
-    });
-  }
-
-  return this;
-};
-
-// Attach a bunch of functions for handling common AJAX events
-jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){
-  jQuery.fn[ type ] = function( fn ){
-    return this.on( type, fn );
-  };
-});
-
-jQuery.extend({
-
-  // Counter for holding the number of active queries
-  active: 0,
-
-  // Last-Modified header cache for next request
-  lastModified: {},
-  etag: {},
-
-  ajaxSettings: {
-    url: ajaxLocation,
-    type: "GET",
-    isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
-    global: true,
-    processData: true,
-    async: true,
-    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
-    /*
-    timeout: 0,
-    data: null,
-    dataType: null,
-    username: null,
-    password: null,
-    cache: null,
-    throws: false,
-    traditional: false,
-    headers: {},
-    */
-
-    accepts: {
-      "*": allTypes,
-      text: "text/plain",
-      html: "text/html",
-      xml: "application/xml, text/xml",
-      json: "application/json, text/javascript"
-    },
-
-    contents: {
-      xml: /xml/,
-      html: /html/,
-      json: /json/
-    },
-
-    responseFields: {
-      xml: "responseXML",
-      text: "responseText",
-      json: "responseJSON"
-    },
-
-    // Data converters
-    // Keys separate source (or catchall "*") and destination types with a single space
-    converters: {
-
-      // Convert anything to text
-      "* text": String,
-
-      // Text to html (true = no transformation)
-      "text html": true,
-
-      // Evaluate text as a json expression
-      "text json": jQuery.parseJSON,
-
-      // Parse text as xml
-      "text xml": jQuery.parseXML
-    },
-
-    // For options that shouldn't be deep extended:
-    // you can add your own custom options here if
-    // and when you create one that shouldn't be
-    // deep extended (see ajaxExtend)
-    flatOptions: {
-      url: true,
-      context: true
-    }
-  },
-
-  // Creates a full fledged settings object into target
-  // with both ajaxSettings and settings fields.
-  // If target is omitted, writes into ajaxSettings.
-  ajaxSetup: function( target, settings ) {
-    return settings ?
-
-      // Building a settings object
-      ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
-
-      // Extending ajaxSettings
-      ajaxExtend( jQuery.ajaxSettings, target );
-  },
-
-  ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
-  ajaxTransport: addToPrefiltersOrTransports( transports ),
-
-  // Main method
-  ajax: function( url, options ) {
-
-    // If url is an object, simulate pre-1.5 signature
-    if ( typeof url === "object" ) {
-      options = url;
-      url = undefined;
-    }
-
-    // Force options to be an object
-    options = options || {};
-
-    var // Cross-domain detection vars
-      parts,
-      // Loop variable
-      i,
-      // URL without anti-cache param
-      cacheURL,
-      // Response headers as string
-      responseHeadersString,
-      // timeout handle
-      timeoutTimer,
-
-      // To know if global events are to be dispatched
-      fireGlobals,
-
-      transport,
-      // Response headers
-      responseHeaders,
-      // Create the final options object
-      s = jQuery.ajaxSetup( {}, options ),
-      // Callbacks context
-      callbackContext = s.context || s,
-      // Context for global events is callbackContext if it is a DOM node or jQuery collection
-      globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
-        jQuery( callbackContext ) :
-        jQuery.event,
-      // Deferreds
-      deferred = jQuery.Deferred(),
-      completeDeferred = jQuery.Callbacks("once memory"),
-      // Status-dependent callbacks
-      statusCode = s.statusCode || {},
-      // Headers (they are sent all at once)
-      requestHeaders = {},
-      requestHeadersNames = {},
-      // The jqXHR state
-      state = 0,
-      // Default abort message
-      strAbort = "canceled",
-      // Fake xhr
-      jqXHR = {
-        readyState: 0,
-
-        // Builds headers hashtable if needed
-        getResponseHeader: function( key ) {
-          var match;
-          if ( state === 2 ) {
-            if ( !responseHeaders ) {
-              responseHeaders = {};
-              while ( (match = rheaders.exec( responseHeadersString )) ) {
-                responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
-              }
-            }
-            match = responseHeaders[ key.toLowerCase() ];
-          }
-          return match == null ? null : match;
-        },
-
-        // Raw string
-        getAllResponseHeaders: function() {
-          return state === 2 ? responseHeadersString : null;
-        },
-
-        // Caches the header
-        setRequestHeader: function( name, value ) {
-          var lname = name.toLowerCase();
-          if ( !state ) {
-            name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
-            requestHeaders[ name ] = value;
-          }
-          return this;
-        },
-
-        // Overrides response content-type header
-        overrideMimeType: function( type ) {
-          if ( !state ) {
-            s.mimeType = type;
-          }
-          return this;
-        },
-
-        // Status-dependent callbacks
-        statusCode: function( map ) {
-          var code;
-          if ( map ) {
-            if ( state < 2 ) {
-              for ( code in map ) {
-                // Lazy-add the new callback in a way that preserves old ones
-                statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
-              }
-            } else {
-              // Execute the appropriate callbacks
-              jqXHR.always( map[ jqXHR.status ] );
-            }
-          }
-          return this;
-        },
-
-        // Cancel the request
-        abort: function( statusText ) {
-          var finalText = statusText || strAbort;
-          if ( transport ) {
-            transport.abort( finalText );
-          }
-          done( 0, finalText );
-          return this;
-        }
-      };
-
-    // Attach deferreds
-    deferred.promise( jqXHR ).complete = completeDeferred.add;
-    jqXHR.success = jqXHR.done;
-    jqXHR.error = jqXHR.fail;
-
-    // Remove hash character (#7531: and string promotion)
-    // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
-    // Handle falsy url in the settings object (#10093: consistency with old signature)
-    // We also use the url parameter if available
-    s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
-
-    // Alias method option to type as per ticket #12004
-    s.type = options.method || options.type || s.method || s.type;
-
-    // Extract dataTypes list
-    s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""];
-
-    // A cross-domain request is in order when we have a protocol:host:port mismatch
-    if ( s.crossDomain == null ) {
-      parts = rurl.exec( s.url.toLowerCase() );
-      s.crossDomain = !!( parts &&
-        ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
-          ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
-            ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
-      );
-    }
-
-    // Convert data if not already a string
-    if ( s.data && s.processData && typeof s.data !== "string" ) {
-      s.data = jQuery.param( s.data, s.traditional );
-    }
-
-    // Apply prefilters
-    inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
-
-    // If request was aborted inside a prefilter, stop there
-    if ( state === 2 ) {
-      return jqXHR;
-    }
-
-    // We can fire global events as of now if asked to
-    fireGlobals = s.global;
-
-    // Watch for a new set of requests
-    if ( fireGlobals && jQuery.active++ === 0 ) {
-      jQuery.event.trigger("ajaxStart");
-    }
-
-    // Uppercase the type
-    s.type = s.type.toUpperCase();
-
-    // Determine if request has content
-    s.hasContent = !rnoContent.test( s.type );
-
-    // Save the URL in case we're toying with the If-Modified-Since
-    // and/or If-None-Match header later on
-    cacheURL = s.url;
-
-    // More options handling for requests with no content
-    if ( !s.hasContent ) {
-
-      // If data is available, append data to url
-      if ( s.data ) {
-        cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
-        // #9682: remove data so that it's not used in an eventual retry
-        delete s.data;
-      }
-
-      // Add anti-cache in url if needed
-      if ( s.cache === false ) {
-        s.url = rts.test( cacheURL ) ?
-
-          // If there is already a '_' parameter, set its value
-          cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) :
-
-          // Otherwise add one to the end
-          cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++;
-      }
-    }
-
-    // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
-    if ( s.ifModified ) {
-      if ( jQuery.lastModified[ cacheURL ] ) {
-        jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
-      }
-      if ( jQuery.etag[ cacheURL ] ) {
-        jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
-      }
-    }
-
-    // Set the correct header, if data is being sent
-    if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
-      jqXHR.setRequestHeader( "Content-Type", s.contentType );
-    }
-
-    // Set the Accepts header for the server, depending on the dataType
-    jqXHR.setRequestHeader(
-      "Accept",
-      s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
-        s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
-        s.accepts[ "*" ]
-    );
-
-    // Check for headers option
-    for ( i in s.headers ) {
-      jqXHR.setRequestHeader( i, s.headers[ i ] );
-    }
-
-    // Allow custom headers/mimetypes and early abort
-    if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
-      // Abort if not done already and return
-      return jqXHR.abort();
-    }
-
-    // aborting is no longer a cancellation
-    strAbort = "abort";
-
-    // Install callbacks on deferreds
-    for ( i in { success: 1, error: 1, complete: 1 } ) {
-      jqXHR[ i ]( s[ i ] );
-    }
-
-    // Get transport
-    transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
-
-    // If no transport, we auto-abort
-    if ( !transport ) {
-      done( -1, "No Transport" );
-    } else {
-      jqXHR.readyState = 1;
-
-      // Send global event
-      if ( fireGlobals ) {
-        globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
-      }
-      // Timeout
-      if ( s.async && s.timeout > 0 ) {
-        timeoutTimer = setTimeout(function() {
-          jqXHR.abort("timeout");
-        }, s.timeout );
-      }
-
-      try {
-        state = 1;
-        transport.send( requestHeaders, done );
-      } catch ( e ) {
-        // Propagate exception as error if not done
-        if ( state < 2 ) {
-          done( -1, e );
-        // Simply rethrow otherwise
-        } else {
-          throw e;
-        }
-      }
-    }
-
-    // Callback for when everything is done
-    function done( status, nativeStatusText, responses, headers ) {
-      var isSuccess, success, error, response, modified,
-        statusText = nativeStatusText;
-
-      // Called once
-      if ( state === 2 ) {
-        return;
-      }
-
-      // State is "done" now
-      state = 2;
-
-      // Clear timeout if it exists
-      if ( timeoutTimer ) {
-        clearTimeout( timeoutTimer );
-      }
-
-      // Dereference transport for early garbage collection
-      // (no matter how long the jqXHR object will be used)
-      transport = undefined;
-
-      // Cache response headers
-      responseHeadersString = headers || "";
-
-      // Set readyState
-      jqXHR.readyState = status > 0 ? 4 : 0;
-
-      // Determine if successful
-      isSuccess = status >= 200 && status < 300 || status === 304;
-
-      // Get response data
-      if ( responses ) {
-        response = ajaxHandleResponses( s, jqXHR, responses );
-      }
-
-      // Convert no matter what (that way responseXXX fields are always set)
-      response = ajaxConvert( s, response, jqXHR, isSuccess );
-
-      // If successful, handle type chaining
-      if ( isSuccess ) {
-
-        // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
-        if ( s.ifModified ) {
-          modified = jqXHR.getResponseHeader("Last-Modified");
-          if ( modified ) {
-            jQuery.lastModified[ cacheURL ] = modified;
-          }
-          modified = jqXHR.getResponseHeader("etag");
-          if ( modified ) {
-            jQuery.etag[ cacheURL ] = modified;
-          }
-        }
-
-        // if no content
-        if ( status === 204 || s.type === "HEAD" ) {
-          statusText = "nocontent";
-
-        // if not modified
-        } else if ( status === 304 ) {
-          statusText = "notmodified";
-
-        // If we have data, let's convert it
-        } else {
-          statusText = response.state;
-          success = response.data;
-          error = response.error;
-          isSuccess = !error;
-        }
-      } else {
-        // We extract error from statusText
-        // then normalize statusText and status for non-aborts
-        error = statusText;
-        if ( status || !statusText ) {
-          statusText = "error";
-          if ( status < 0 ) {
-            status = 0;
-          }
-        }
-      }
-
-      // Set data for the fake xhr object
-      jqXHR.status = status;
-      jqXHR.statusText = ( nativeStatusText || statusText ) + "";
-
-      // Success/Error
-      if ( isSuccess ) {
-        deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
-      } else {
-        deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
-      }
-
-      // Status-dependent callbacks
-      jqXHR.statusCode( statusCode );
-      statusCode = undefined;
-
-      if ( fireGlobals ) {
-        globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
-          [ jqXHR, s, isSuccess ? success : error ] );
-      }
-
-      // Complete
-      completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
-
-      if ( fireGlobals ) {
-        globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
-        // Handle the global AJAX counter
-        if ( !( --jQuery.active ) ) {
-          jQuery.event.trigger("ajaxStop");
-        }
-      }
-    }
-
-    return jqXHR;
-  },
-
-  getJSON: function( url, data, callback ) {
-    return jQuery.get( url, data, callback, "json" );
-  },
-
-  getScript: function( url, callback ) {
-    return jQuery.get( url, undefined, callback, "script" );
-  }
-});
-
-jQuery.each( [ "get", "post" ], function( i, method ) {
-  jQuery[ method ] = function( url, data, callback, type ) {
-    // shift arguments if data argument was omitted
-    if ( jQuery.isFunction( data ) ) {
-      type = type || callback;
-      callback = data;
-      data = undefined;
-    }
-
-    return jQuery.ajax({
-      url: url,
-      type: method,
-      dataType: type,
-      data: data,
-      success: callback
-    });
-  };
-});
-
-/* Handles responses to an ajax request:
- * - finds the right dataType (mediates between content-type and expected dataType)
- * - returns the corresponding response
- */
-function ajaxHandleResponses( s, jqXHR, responses ) {
-  var firstDataType, ct, finalDataType, type,
-    contents = s.contents,
-    dataTypes = s.dataTypes;
-
-  // Remove auto dataType and get content-type in the process
-  while( dataTypes[ 0 ] === "*" ) {
-    dataTypes.shift();
-    if ( ct === undefined ) {
-      ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
-    }
-  }
-
-  // Check if we're dealing with a known content-type
-  if ( ct ) {
-    for ( type in contents ) {
-      if ( contents[ type ] && contents[ type ].test( ct ) ) {
-        dataTypes.unshift( type );
-        break;
-      }
-    }
-  }
-
-  // Check to see if we have a response for the expected dataType
-  if ( dataTypes[ 0 ] in responses ) {
-    finalDataType = dataTypes[ 0 ];
-  } else {
-    // Try convertible dataTypes
-    for ( type in responses ) {
-      if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
-        finalDataType = type;
-        break;
-      }
-      if ( !firstDataType ) {
-        firstDataType = type;
-      }
-    }
-    // Or just use first one
-    finalDataType = finalDataType || firstDataType;
-  }
-
-  // If we found a dataType
-  // We add the dataType to the list if needed
-  // and return the corresponding response
-  if ( finalDataType ) {
-    if ( finalDataType !== dataTypes[ 0 ] ) {
-      dataTypes.unshift( finalDataType );
-    }
-    return responses[ finalDataType ];
-  }
-}
-
-/* Chain conversions given the request and the original response
- * Also sets the responseXXX fields on the jqXHR instance
- */
-function ajaxConvert( s, response, jqXHR, isSuccess ) {
-  var conv2, current, conv, tmp, prev,
-    converters = {},
-    // Work with a copy of dataTypes in case we need to modify it for conversion
-    dataTypes = s.dataTypes.slice();
-
-  // Create converters map with lowercased keys
-  if ( dataTypes[ 1 ] ) {
-    for ( conv in s.converters ) {
-      converters[ conv.toLowerCase() ] = s.converters[ conv ];
-    }
-  }
-
-  current = dataTypes.shift();
-
-  // Convert to each sequential dataType
-  while ( current ) {
-
-    if ( s.responseFields[ current ] ) {
-      jqXHR[ s.responseFields[ current ] ] = response;
-    }
-
-    // Apply the dataFilter if provided
-    if ( !prev && isSuccess && s.dataFilter ) {
-      response = s.dataFilter( response, s.dataType );
-    }
-
-    prev = current;
-    current = dataTypes.shift();
-
-    if ( current ) {
-
-      // There's only work to do if current dataType is non-auto
-      if ( current === "*" ) {
-
-        current = prev;
-
-      // Convert response if prev dataType is non-auto and differs from current
-      } else if ( prev !== "*" && prev !== current ) {
-
-        // Seek a direct converter
-        conv = converters[ prev + " " + current ] || converters[ "* " + current ];
-
-        // If none found, seek a pair
-        if ( !conv ) {
-          for ( conv2 in converters ) {
-
-            // If conv2 outputs current
-            tmp = conv2.split( " " );
-            if ( tmp[ 1 ] === current ) {
-
-              // If prev can be converted to accepted input
-              conv = converters[ prev + " " + tmp[ 0 ] ] ||
-                converters[ "* " + tmp[ 0 ] ];
-              if ( conv ) {
-                // Condense equivalence converters
-                if ( conv === true ) {
-                  conv = converters[ conv2 ];
-
-                // Otherwise, insert the intermediate dataType
-                } else if ( converters[ conv2 ] !== true ) {
-                  current = tmp[ 0 ];
-                  dataTypes.unshift( tmp[ 1 ] );
-                }
-                break;
-              }
-            }
-          }
-        }
-
-        // Apply converter (if not an equivalence)
-        if ( conv !== true ) {
-
-          // Unless errors are allowed to bubble, catch and return them
-          if ( conv && s[ "throws" ] ) {
-            response = conv( response );
-          } else {
-            try {
-              response = conv( response );
-            } catch ( e ) {
-              return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
-            }
-          }
-        }
-      }
-    }
-  }
-
-  return { state: "success", data: response };
-}
-// Install script dataType
-jQuery.ajaxSetup({
-  accepts: {
-    script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
-  },
-  contents: {
-    script: /(?:java|ecma)script/
-  },
-  converters: {
-    "text script": function( text ) {
-      jQuery.globalEval( text );
-      return text;
-    }
-  }
-});
-
-// Handle cache's special case and global
-jQuery.ajaxPrefilter( "script", function( s ) {
-  if ( s.cache === undefined ) {
-    s.cache = false;
-  }
-  if ( s.crossDomain ) {
-    s.type = "GET";
-    s.global = false;
-  }
-});
-
-// Bind script tag hack transport
-jQuery.ajaxTransport( "script", function(s) {
-
-  // This transport only deals with cross domain requests
-  if ( s.crossDomain ) {
-
-    var script,
-      head = document.head || jQuery("head")[0] || document.documentElement;
-
-    return {
-
-      send: function( _, callback ) {
-
-        script = document.createElement("script");
-
-        script.async = true;
-
-        if ( s.scriptCharset ) {
-          script.charset = s.scriptCharset;
-        }
-
-        script.src = s.url;
-
-        // Attach handlers for all browsers
-        script.onload = script.onreadystatechange = function( _, isAbort ) {
-
-          if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
-
-            // Handle memory leak in IE
-            script.onload = script.onreadystatechange = null;
-
-            // Remove the script
-            if ( script.parentNode ) {
-              script.parentNode.removeChild( script );
-            }
-
-            // Dereference the script
-            script = null;
-
-            // Callback if not abort
-            if ( !isAbort ) {
-              callback( 200, "success" );
-            }
-          }
-        };
-
-        // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
-        // Use native DOM manipulation to avoid our domManip AJAX trickery
-        head.insertBefore( script, head.firstChild );
-      },
-
-      abort: function() {
-        if ( script ) {
-          script.onload( undefined, true );
-        }
-      }
-    };
-  }
-});
-var oldCallbacks = [],
-  rjsonp = /(=)\?(?=&|$)|\?\?/;
-
-// Default jsonp settings
-jQuery.ajaxSetup({
-  jsonp: "callback",
-  jsonpCallback: function() {
-    var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) );
-    this[ callback ] = true;
-    return callback;
-  }
-});
-
-// Detect, normalize options and install callbacks for jsonp requests
-jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
-
-  var callbackName, overwritten, responseContainer,
-    jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
-      "url" :
-      typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
-    );
-
-  // Handle iff the expected data type is "jsonp" or we have a parameter to set
-  if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
-
-    // Get callback name, remembering preexisting value associated with it
-    callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
-      s.jsonpCallback() :
-      s.jsonpCallback;
-
-    // Insert callback into url or form data
-    if ( jsonProp ) {
-      s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
-    } else if ( s.jsonp !== false ) {
-      s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
-    }
-
-    // Use data converter to retrieve json after script execution
-    s.converters["script json"] = function() {
-      if ( !responseContainer ) {
-        jQuery.error( callbackName + " was not called" );
-      }
-      return responseContainer[ 0 ];
-    };
-
-    // force json dataType
-    s.dataTypes[ 0 ] = "json";
-
-    // Install callback
-    overwritten = window[ callbackName ];
-    window[ callbackName ] = function() {
-      responseContainer = arguments;
-    };
-
-    // Clean-up function (fires after converters)
-    jqXHR.always(function() {
-      // Restore preexisting value
-      window[ callbackName ] = overwritten;
-
-      // Save back as free
-      if ( s[ callbackName ] ) {
-        // make sure that re-using the options doesn't screw things around
-        s.jsonpCallback = originalSettings.jsonpCallback;
-
-        // save the callback name for future use
-        oldCallbacks.push( callbackName );
-      }
-
-      // Call if it was a function and we have a response
-      if ( responseContainer && jQuery.isFunction( overwritten ) ) {
-        overwritten( responseContainer[ 0 ] );
-      }
-
-      responseContainer = overwritten = undefined;
-    });
-
-    // Delegate to script
-    return "script";
-  }
-});
-var xhrCallbacks, xhrSupported,
-  xhrId = 0,
-  // #5280: Internet Explorer will keep connections alive if we don't abort on unload
-  xhrOnUnloadAbort = window.ActiveXObject && function() {
-    // Abort all pending requests
-    var key;
-    for ( key in xhrCallbacks ) {
-      xhrCallbacks[ key ]( undefined, true );
-    }
-  };
-
-// Functions to create xhrs
-function createStandardXHR() {
-  try {
-    return new window.XMLHttpRequest();
-  } catch( e ) {}
-}
-
-function createActiveXHR() {
-  try {
-    return new window.ActiveXObject("Microsoft.XMLHTTP");
-  } catch( e ) {}
-}
-
-// Create the request object
-// (This is still attached to ajaxSettings for backward compatibility)
-jQuery.ajaxSettings.xhr = window.ActiveXObject ?
-  /* Microsoft failed to properly
-   * implement the XMLHttpRequest in IE7 (can't request local files),
-   * so we use the ActiveXObject when it is available
-   * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
-   * we need a fallback.
-   */
-  function() {
-    return !this.isLocal && createStandardXHR() || createActiveXHR();
-  } :
-  // For all other browsers, use the standard XMLHttpRequest object
-  createStandardXHR;
-
-// Determine support properties
-xhrSupported = jQuery.ajaxSettings.xhr();
-jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
-xhrSupported = jQuery.support.ajax = !!xhrSupported;
-
-// Create transport if the browser can provide an xhr
-if ( xhrSupported ) {
-
-  jQuery.ajaxTransport(function( s ) {
-    // Cross domain only allowed if supported through XMLHttpRequest
-    if ( !s.crossDomain || jQuery.support.cors ) {
-
-      var callback;
-
-      return {
-        send: function( headers, complete ) {
-
-          // Get a new xhr
-          var handle, i,
-            xhr = s.xhr();
-
-          // Open the socket
-          // Passing null username, generates a login popup on Opera (#2865)
-          if ( s.username ) {
-            xhr.open( s.type, s.url, s.async, s.username, s.password );
-          } else {
-            xhr.open( s.type, s.url, s.async );
-          }
-
-          // Apply custom fields if provided
-          if ( s.xhrFields ) {
-            for ( i in s.xhrFields ) {
-              xhr[ i ] = s.xhrFields[ i ];
-            }
-          }
-
-          // Override mime type if needed
-          if ( s.mimeType && xhr.overrideMimeType ) {
-            xhr.overrideMimeType( s.mimeType );
-          }
-
-          // X-Requested-With header
-          // For cross-domain requests, seeing as conditions for a preflight are
-          // akin to a jigsaw puzzle, we simply never set it to be sure.
-          // (it can always be set on a per-request basis or even using ajaxSetup)
-          // For same-domain requests, won't change header if already provided.
-          if ( !s.crossDomain && !headers["X-Requested-With"] ) {
-            headers["X-Requested-With"] = "XMLHttpRequest";
-          }
-
-          // Need an extra try/catch for cross domain requests in Firefox 3
-          try {
-            for ( i in headers ) {
-              xhr.setRequestHeader( i, headers[ i ] );
-            }
-          } catch( err ) {}
-
-          // Do send the request
-          // This may raise an exception which is actually
-          // handled in jQuery.ajax (so no try/catch here)
-          xhr.send( ( s.hasContent && s.data ) || null );
-
-          // Listener
-          callback = function( _, isAbort ) {
-            var status, responseHeaders, statusText, responses;
-
-            // Firefox throws exceptions when accessing properties
-            // of an xhr when a network error occurred
-            // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
-            try {
-
-              // Was never called and is aborted or complete
-              if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
-
-                // Only called once
-                callback = undefined;
-
-                // Do not keep as active anymore
-                if ( handle ) {
-                  xhr.onreadystatechange = jQuery.noop;
-                  if ( xhrOnUnloadAbort ) {
-                    delete xhrCallbacks[ handle ];
-                  }
-                }
-
-                // If it's an abort
-                if ( isAbort ) {
-                  // Abort it manually if needed
-                  if ( xhr.readyState !== 4 ) {
-                    xhr.abort();
-                  }
-                } else {
-                  responses = {};
-                  status = xhr.status;
-                  responseHeaders = xhr.getAllResponseHeaders();
-
-                  // When requesting binary data, IE6-9 will throw an exception
-                  // on any attempt to access responseText (#11426)
-                  if ( typeof xhr.responseText === "string" ) {
-                    responses.text = xhr.responseText;
-                  }
-
-                  // Firefox throws an exception when accessing
-                  // statusText for faulty cross-domain requests
-                  try {
-                    statusText = xhr.statusText;
-                  } catch( e ) {
-                    // We normalize with Webkit giving an empty statusText
-                    statusText = "";
-                  }
-
-                  // Filter status for non standard behaviors
-
-                  // If the request is local and we have data: assume a success
-                  // (success with no data won't get notified, that's the best we
-                  // can do given current implementations)
-                  if ( !status && s.isLocal && !s.crossDomain ) {
-                    status = responses.text ? 200 : 404;
-                  // IE - #1450: sometimes returns 1223 when it should be 204
-                  } else if ( status === 1223 ) {
-                    status = 204;
-                  }
-                }
-              }
-            } catch( firefoxAccessException ) {
-              if ( !isAbort ) {
-                complete( -1, firefoxAccessException );
-              }
-            }
-
-            // Call complete if needed
-            if ( responses ) {
-              complete( status, statusText, responses, responseHeaders );
-            }
-          };
-
-          if ( !s.async ) {
-            // if we're in sync mode we fire the callback
-            callback();
-          } else if ( xhr.readyState === 4 ) {
-            // (IE6 & IE7) if it's in cache and has been
-            // retrieved directly we need to fire the callback
-            setTimeout( callback );
-          } else {
-            handle = ++xhrId;
-            if ( xhrOnUnloadAbort ) {
-              // Create the active xhrs callbacks list if needed
-              // and attach the unload handler
-              if ( !xhrCallbacks ) {
-                xhrCallbacks = {};
-                jQuery( window ).unload( xhrOnUnloadAbort );
-              }
-              // Add to list of active xhrs callbacks
-              xhrCallbacks[ handle ] = callback;
-            }
-            xhr.onreadystatechange = callback;
-          }
-        },
-
-        abort: function() {
-          if ( callback ) {
-            callback( undefined, true );
-          }
-        }
-      };
-    }
-  });
-}
-var fxNow, timerId,
-  rfxtypes = /^(?:toggle|show|hide)$/,
-  rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ),
-  rrun = /queueHooks$/,
-  animationPrefilters = [ defaultPrefilter ],
-  tweeners = {
-    "*": [function( prop, value ) {
-      var tween = this.createTween( prop, value ),
-        target = tween.cur(),
-        parts = rfxnum.exec( value ),
-        unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
-
-        // Starting value computation is required for potential unit mismatches
-        start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
-          rfxnum.exec( jQuery.css( tween.elem, prop ) ),
-        scale = 1,
-        maxIterations = 20;
-
-      if ( start && start[ 3 ] !== unit ) {
-        // Trust units reported by jQuery.css
-        unit = unit || start[ 3 ];
-
-        // Make sure we update the tween properties later on
-        parts = parts || [];
-
-        // Iteratively approximate from a nonzero starting point
-        start = +target || 1;
-
-        do {
-          // If previous iteration zeroed out, double until we get *something*
-          // Use a string for doubling factor so we don't accidentally see scale as unchanged below
-          scale = scale || ".5";
-
-          // Adjust and apply
-          start = start / scale;
-          jQuery.style( tween.elem, prop, start + unit );
-
-        // Update scale, tolerating zero or NaN from tween.cur()
-        // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
-        } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
-      }
-
-      // Update tween properties
-      if ( parts ) {
-        start = tween.start = +start || +target || 0;
-        tween.unit = unit;
-        // If a +=/-= token was provided, we're doing a relative animation
-        tween.end = parts[ 1 ] ?
-          start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
-          +parts[ 2 ];
-      }
-
-      return tween;
-    }]
-  };
-
-// Animations created synchronously will run synchronously
-function createFxNow() {
-  setTimeout(function() {
-    fxNow = undefined;
-  });
-  return ( fxNow = jQuery.now() );
-}
-
-function createTween( value, prop, animation ) {
-  var tween,
-    collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
-    index = 0,
-    length = collection.length;
-  for ( ; index < length; index++ ) {
-    if ( (tween = collection[ index ].call( animation, prop, value )) ) {
-
-      // we're done with this property
-      return tween;
-    }
-  }
-}
-
-function Animation( elem, properties, options ) {
-  var result,
-    stopped,
-    index = 0,
-    length = animationPrefilters.length,
-    deferred = jQuery.Deferred().always( function() {
-      // don't match elem in the :animated selector
-      delete tick.elem;
-    }),
-    tick = function() {
-      if ( stopped ) {
-        return false;
-      }
-      var currentTime = fxNow || createFxNow(),
-        remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
-        // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
-        temp = remaining / animation.duration || 0,
-        percent = 1 - temp,
-        index = 0,
-        length = animation.tweens.length;
-
-      for ( ; index < length ; index++ ) {
-        animation.tweens[ index ].run( percent );
-      }
-
-      deferred.notifyWith( elem, [ animation, percent, remaining ]);
-
-      if ( percent < 1 && length ) {
-        return remaining;
-      } else {
-        deferred.resolveWith( elem, [ animation ] );
-        return false;
-      }
-    },
-    animation = deferred.promise({
-      elem: elem,
-      props: jQuery.extend( {}, properties ),
-      opts: jQuery.extend( true, { specialEasing: {} }, options ),
-      originalProperties: properties,
-      originalOptions: options,
-      startTime: fxNow || createFxNow(),
-      duration: options.duration,
-      tweens: [],
-      createTween: function( prop, end ) {
-        var tween = jQuery.Tween( elem, animation.opts, prop, end,
-            animation.opts.specialEasing[ prop ] || animation.opts.easing );
-        animation.tweens.push( tween );
-        return tween;
-      },
-      stop: function( gotoEnd ) {
-        var index = 0,
-          // if we are going to the end, we want to run all the tweens
-          // otherwise we skip this part
-          length = gotoEnd ? animation.tweens.length : 0;
-        if ( stopped ) {
-          return this;
-        }
-        stopped = true;
-        for ( ; index < length ; index++ ) {
-          animation.tweens[ index ].run( 1 );
-        }
-
-        // resolve when we played the last frame
-        // otherwise, reject
-        if ( gotoEnd ) {
-          deferred.resolveWith( elem, [ animation, gotoEnd ] );
-        } else {
-          deferred.rejectWith( elem, [ animation, gotoEnd ] );
-        }
-        return this;
-      }
-    }),
-    props = animation.props;
-
-  propFilter( props, animation.opts.specialEasing );
-
-  for ( ; index < length ; index++ ) {
-    result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
-    if ( result ) {
-      return result;
-    }
-  }
-
-  jQuery.map( props, createTween, animation );
-
-  if ( jQuery.isFunction( animation.opts.start ) ) {
-    animation.opts.start.call( elem, animation );
-  }
-
-  jQuery.fx.timer(
-    jQuery.extend( tick, {
-      elem: elem,
-      anim: animation,
-      queue: animation.opts.queue
-    })
-  );
-
-  // attach callbacks from options
-  return animation.progress( animation.opts.progress )
-    .done( animation.opts.done, animation.opts.complete )
-    .fail( animation.opts.fail )
-    .always( animation.opts.always );
-}
-
-function propFilter( props, specialEasing ) {
-  var index, name, easing, value, hooks;
-
-  // camelCase, specialEasing and expand cssHook pass
-  for ( index in props ) {
-    name = jQuery.camelCase( index );
-    easing = specialEasing[ name ];
-    value = props[ index ];
-    if ( jQuery.isArray( value ) ) {
-      easing = value[ 1 ];
-      value = props[ index ] = value[ 0 ];
-    }
-
-    if ( index !== name ) {
-      props[ name ] = value;
-      delete props[ index ];
-    }
-
-    hooks = jQuery.cssHooks[ name ];
-    if ( hooks && "expand" in hooks ) {
-      value = hooks.expand( value );
-      delete props[ name ];
-
-      // not quite $.extend, this wont overwrite keys already present.
-      // also - reusing 'index' from above because we have the correct "name"
-      for ( index in value ) {
-        if ( !( index in props ) ) {
-          props[ index ] = value[ index ];
-          specialEasing[ index ] = easing;
-        }
-      }
-    } else {
-      specialEasing[ name ] = easing;
-    }
-  }
-}
-
-jQuery.Animation = jQuery.extend( Animation, {
-
-  tweener: function( props, callback ) {
-    if ( jQuery.isFunction( props ) ) {
-      callback = props;
-      props = [ "*" ];
-    } else {
-      props = props.split(" ");
-    }
-
-    var prop,
-      index = 0,
-      length = props.length;
-
-    for ( ; index < length ; index++ ) {
-      prop = props[ index ];
-      tweeners[ prop ] = tweeners[ prop ] || [];
-      tweeners[ prop ].unshift( callback );
-    }
-  },
-
-  prefilter: function( callback, prepend ) {
-    if ( prepend ) {
-      animationPrefilters.unshift( callback );
-    } else {
-      animationPrefilters.push( callback );
-    }
-  }
-});
-
-function defaultPrefilter( elem, props, opts ) {
-  /* jshint validthis: true */
-  var prop, value, toggle, tween, hooks, oldfire,
-    anim = this,
-    orig = {},
-    style = elem.style,
-    hidden = elem.nodeType && isHidden( elem ),
-    dataShow = jQuery._data( elem, "fxshow" );
-
-  // handle queue: false promises
-  if ( !opts.queue ) {
-    hooks = jQuery._queueHooks( elem, "fx" );
-    if ( hooks.unqueued == null ) {
-      hooks.unqueued = 0;
-      oldfire = hooks.empty.fire;
-      hooks.empty.fire = function() {
-        if ( !hooks.unqueued ) {
-          oldfire();
-        }
-      };
-    }
-    hooks.unqueued++;
-
-    anim.always(function() {
-      // doing this makes sure that the complete handler will be called
-      // before this completes
-      anim.always(function() {
-        hooks.unqueued--;
-        if ( !jQuery.queue( elem, "fx" ).length ) {
-          hooks.empty.fire();
-        }
-      });
-    });
-  }
-
-  // height/width overflow pass
-  if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
-    // Make sure that nothing sneaks out
-    // Record all 3 overflow attributes because IE does not
-    // change the overflow attribute when overflowX and
-    // overflowY are set to the same value
-    opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
-
-    // Set display property to inline-block for height/width
-    // animations on inline elements that are having width/height animated
-    if ( jQuery.css( elem, "display" ) === "inline" &&
-        jQuery.css( elem, "float" ) === "none" ) {
-
-      // inline-level elements accept inline-block;
-      // block-level elements need to be inline with layout
-      if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) {
-        style.display = "inline-block";
-
-      } else {
-        style.zoom = 1;
-      }
-    }
-  }
-
-  if ( opts.overflow ) {
-    style.overflow = "hidden";
-    if ( !jQuery.support.shrinkWrapBlocks ) {
-      anim.always(function() {
-        style.overflow = opts.overflow[ 0 ];
-        style.overflowX = opts.overflow[ 1 ];
-        style.overflowY = opts.overflow[ 2 ];
-      });
-    }
-  }
-
-
-  // show/hide pass
-  for ( prop in props ) {
-    value = props[ prop ];
-    if ( rfxtypes.exec( value ) ) {
-      delete props[ prop ];
-      toggle = toggle || value === "toggle";
-      if ( value === ( hidden ? "hide" : "show" ) ) {
-        continue;
-      }
-      orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
-    }
-  }
-
-  if ( !jQuery.isEmptyObject( orig ) ) {
-    if ( dataShow ) {
-      if ( "hidden" in dataShow ) {
-        hidden = dataShow.hidden;
-      }
-    } else {
-      dataShow = jQuery._data( elem, "fxshow", {} );
-    }
-
-    // store state if its toggle - enables .stop().toggle() to "reverse"
-    if ( toggle ) {
-      dataShow.hidden = !hidden;
-    }
-    if ( hidden ) {
-      jQuery( elem ).show();
-    } else {
-      anim.done(function() {
-        jQuery( elem ).hide();
-      });
-    }
-    anim.done(function() {
-      var prop;
-      jQuery._removeData( elem, "fxshow" );
-      for ( prop in orig ) {
-        jQuery.style( elem, prop, orig[ prop ] );
-      }
-    });
-    for ( prop in orig ) {
-      tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
-
-      if ( !( prop in dataShow ) ) {
-        dataShow[ prop ] = tween.start;
-        if ( hidden ) {
-          tween.end = tween.start;
-          tween.start = prop === "width" || prop === "height" ? 1 : 0;
-        }
-      }
-    }
-  }
-}
-
-function Tween( elem, options, prop, end, easing ) {
-  return new Tween.prototype.init( elem, options, prop, end, easing );
-}
-jQuery.Tween = Tween;
-
-Tween.prototype = {
-  constructor: Tween,
-  init: function( elem, options, prop, end, easing, unit ) {
-    this.elem = elem;
-    this.prop = prop;
-    this.easing = easing || "swing";
-    this.options = options;
-    this.start = this.now = this.cur();
-    this.end = end;
-    this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
-  },
-  cur: function() {
-    var hooks = Tween.propHooks[ this.prop ];
-
-    return hooks && hooks.get ?
-      hooks.get( this ) :
-      Tween.propHooks._default.get( this );
-  },
-  run: function( percent ) {
-    var eased,
-      hooks = Tween.propHooks[ this.prop ];
-
-    if ( this.options.duration ) {
-      this.pos = eased = jQuery.easing[ this.easing ](
-        percent, this.options.duration * percent, 0, 1, this.options.duration
-      );
-    } else {
-      this.pos = eased = percent;
-    }
-    this.now = ( this.end - this.start ) * eased + this.start;
-
-    if ( this.options.step ) {
-      this.options.step.call( this.elem, this.now, this );
-    }
-
-    if ( hooks && hooks.set ) {
-      hooks.set( this );
-    } else {
-      Tween.propHooks._default.set( this );
-    }
-    return this;
-  }
-};
-
-Tween.prototype.init.prototype = Tween.prototype;
-
-Tween.propHooks = {
-  _default: {
-    get: function( tween ) {
-      var result;
-
-      if ( tween.elem[ tween.prop ] != null &&
-        (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
-        return tween.elem[ tween.prop ];
-      }
-
-      // passing an empty string as a 3rd parameter to .css will automatically
-      // attempt a parseFloat and fallback to a string if the parse fails
-      // so, simple values such as "10px" are parsed to Float.
-      // complex values such as "rotate(1rad)" are returned as is.
-      result = jQuery.css( tween.elem, tween.prop, "" );
-      // Empty strings, null, undefined and "auto" are converted to 0.
-      return !result || result === "auto" ? 0 : result;
-    },
-    set: function( tween ) {
-      // use step hook for back compat - use cssHook if its there - use .style if its
-      // available and use plain properties where available
-      if ( jQuery.fx.step[ tween.prop ] ) {
-        jQuery.fx.step[ tween.prop ]( tween );
-      } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
-        jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
-      } else {
-        tween.elem[ tween.prop ] = tween.now;
-      }
-    }
-  }
-};
-
-// Support: IE <=9
-// Panic based approach to setting things on disconnected nodes
-
-Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
-  set: function( tween ) {
-    if ( tween.elem.nodeType && tween.elem.parentNode ) {
-      tween.elem[ tween.prop ] = tween.now;
-    }
-  }
-};
-
-jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
-  var cssFn = jQuery.fn[ name ];
-  jQuery.fn[ name ] = function( speed, easing, callback ) {
-    return speed == null || typeof speed === "boolean" ?
-      cssFn.apply( this, arguments ) :
-      this.animate( genFx( name, true ), speed, easing, callback );
-  };
-});
-
-jQuery.fn.extend({
-  fadeTo: function( speed, to, easing, callback ) {
-
-    // show any hidden elements after setting opacity to 0
-    return this.filter( isHidden ).css( "opacity", 0 ).show()
-
-      // animate to the value specified
-      .end().animate({ opacity: to }, speed, easing, callback );
-  },
-  animate: function( prop, speed, easing, callback ) {
-    var empty = jQuery.isEmptyObject( prop ),
-      optall = jQuery.speed( speed, easing, callback ),
-      doAnimation = function() {
-        // Operate on a copy of prop so per-property easing won't be lost
-        var anim = Animation( this, jQuery.extend( {}, prop ), optall );
-
-        // Empty animations, or finishing resolves immediately
-        if ( empty || jQuery._data( this, "finish" ) ) {
-          anim.stop( true );
-        }
-      };
-      doAnimation.finish = doAnimation;
-
-    return empty || optall.queue === false ?
-      this.each( doAnimation ) :
-      this.queue( optall.queue, doAnimation );
-  },
-  stop: function( type, clearQueue, gotoEnd ) {
-    var stopQueue = function( hooks ) {
-      var stop = hooks.stop;
-      delete hooks.stop;
-      stop( gotoEnd );
-    };
-
-    if ( typeof type !== "string" ) {
-      gotoEnd = clearQueue;
-      clearQueue = type;
-      type = undefined;
-    }
-    if ( clearQueue && type !== false ) {
-      this.queue( type || "fx", [] );
-    }
-
-    return this.each(function() {
-      var dequeue = true,
-        index = type != null && type + "queueHooks",
-        timers = jQuery.timers,
-        data = jQuery._data( this );
-
-      if ( index ) {
-        if ( data[ index ] && data[ index ].stop ) {
-          stopQueue( data[ index ] );
-        }
-      } else {
-        for ( index in data ) {
-          if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
-            stopQueue( data[ index ] );
-          }
-        }
-      }
-
-      for ( index = timers.length; index--; ) {
-        if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
-          timers[ index ].anim.stop( gotoEnd );
-          dequeue = false;
-          timers.splice( index, 1 );
-        }
-      }
-
-      // start the next in the queue if the last step wasn't forced
-      // timers currently will call their complete callbacks, which will dequeue
-      // but only if they were gotoEnd
-      if ( dequeue || !gotoEnd ) {
-        jQuery.dequeue( this, type );
-      }
-    });
-  },
-  finish: function( type ) {
-    if ( type !== false ) {
-      type = type || "fx";
-    }
-    return this.each(function() {
-      var index,
-        data = jQuery._data( this ),
-        queue = data[ type + "queue" ],
-        hooks = data[ type + "queueHooks" ],
-        timers = jQuery.timers,
-        length = queue ? queue.length : 0;
-
-      // enable finishing flag on private data
-      data.finish = true;
-
-      // empty the queue first
-      jQuery.queue( this, type, [] );
-
-      if ( hooks && hooks.stop ) {
-        hooks.stop.call( this, true );
-      }
-
-      // look for any active animations, and finish them
-      for ( index = timers.length; index--; ) {
-        if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
-          timers[ index ].anim.stop( true );
-          timers.splice( index, 1 );
-        }
-      }
-
-      // look for any animations in the old queue and finish them
-      for ( index = 0; index < length; index++ ) {
-        if ( queue[ index ] && queue[ index ].finish ) {
-          queue[ index ].finish.call( this );
-        }
-      }
-
-      // turn off finishing flag
-      delete data.finish;
-    });
-  }
-});
-
-// Generate parameters to create a standard animation
-function genFx( type, includeWidth ) {
-  var which,
-    attrs = { height: type },
-    i = 0;
-
-  // if we include width, step value is 1 to do all cssExpand values,
-  // if we don't include width, step value is 2 to skip over Left and Right
-  includeWidth = includeWidth? 1 : 0;
-  for( ; i < 4 ; i += 2 - includeWidth ) {
-    which = cssExpand[ i ];
-    attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
-  }
-
-  if ( includeWidth ) {
-    attrs.opacity = attrs.width = type;
-  }
-
-  return attrs;
-}
-
-// Generate shortcuts for custom animations
-jQuery.each({
-  slideDown: genFx("show"),
-  slideUp: genFx("hide"),
-  slideToggle: genFx("toggle"),
-  fadeIn: { opacity: "show" },
-  fadeOut: { opacity: "hide" },
-  fadeToggle: { opacity: "toggle" }
-}, function( name, props ) {
-  jQuery.fn[ name ] = function( speed, easing, callback ) {
-    return this.animate( props, speed, easing, callback );
-  };
-});
-
-jQuery.speed = function( speed, easing, fn ) {
-  var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
-    complete: fn || !fn && easing ||
-      jQuery.isFunction( speed ) && speed,
-    duration: speed,
-    easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
-  };
-
-  opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
-    opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
-
-  // normalize opt.queue - true/undefined/null -> "fx"
-  if ( opt.queue == null || opt.queue === true ) {
-    opt.queue = "fx";
-  }
-
-  // Queueing
-  opt.old = opt.complete;
-
-  opt.complete = function() {
-    if ( jQuery.isFunction( opt.old ) ) {
-      opt.old.call( this );
-    }
-
-    if ( opt.queue ) {
-      jQuery.dequeue( this, opt.queue );
-    }
-  };
-
-  return opt;
-};
-
-jQuery.easing = {
-  linear: function( p ) {
-    return p;
-  },
-  swing: function( p ) {
-    return 0.5 - Math.cos( p*Math.PI ) / 2;
-  }
-};
-
-jQuery.timers = [];
-jQuery.fx = Tween.prototype.init;
-jQuery.fx.tick = function() {
-  var timer,
-    timers = jQuery.timers,
-    i = 0;
-
-  fxNow = jQuery.now();
-
-  for ( ; i < timers.length; i++ ) {
-    timer = timers[ i ];
-    // Checks the timer has not already been removed
-    if ( !timer() && timers[ i ] === timer ) {
-      timers.splice( i--, 1 );
-    }
-  }
-
-  if ( !timers.length ) {
-    jQuery.fx.stop();
-  }
-  fxNow = undefined;
-};
-
-jQuery.fx.timer = function( timer ) {
-  if ( timer() && jQuery.timers.push( timer ) ) {
-    jQuery.fx.start();
-  }
-};
-
-jQuery.fx.interval = 13;
-
-jQuery.fx.start = function() {
-  if ( !timerId ) {
-    timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
-  }
-};
-
-jQuery.fx.stop = function() {
-  clearInterval( timerId );
-  timerId = null;
-};
-
-jQuery.fx.speeds = {
-  slow: 600,
-  fast: 200,
-  // Default speed
-  _default: 400
-};
-
-// Back Compat <1.8 extension point
-jQuery.fx.step = {};
-
-if ( jQuery.expr && jQuery.expr.filters ) {
-  jQuery.expr.filters.animated = function( elem ) {
-    return jQuery.grep(jQuery.timers, function( fn ) {
-      return elem === fn.elem;
-    }).length;
-  };
-}
-jQuery.fn.offset = function( options ) {
-  if ( arguments.length ) {
-    return options === undefined ?
-      this :
-      this.each(function( i ) {
-        jQuery.offset.setOffset( this, options, i );
-      });
-  }
-
-  var docElem, win,
-    box = { top: 0, left: 0 },
-    elem = this[ 0 ],
-    doc = elem && elem.ownerDocument;
-
-  if ( !doc ) {
-    return;
-  }
-
-  docElem = doc.documentElement;
-
-  // Make sure it's not a disconnected DOM node
-  if ( !jQuery.contains( docElem, elem ) ) {
-    return box;
-  }
-
-  // If we don't have gBCR, just use 0,0 rather than error
-  // BlackBerry 5, iOS 3 (original iPhone)
-  if ( typeof elem.getBoundingClientRect !== core_strundefined ) {
-    box = elem.getBoundingClientRect();
-  }
-  win = getWindow( doc );
-  return {
-    top: box.top  + ( win.pageYOffset || docElem.scrollTop )  - ( docElem.clientTop  || 0 ),
-    left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
-  };
-};
-
-jQuery.offset = {
-
-  setOffset: function( elem, options, i ) {
-    var position = jQuery.css( elem, "position" );
-
-    // set position first, in-case top/left are set even on static elem
-    if ( position === "static" ) {
-      elem.style.position = "relative";
-    }
-
-    var curElem = jQuery( elem ),
-      curOffset = curElem.offset(),
-      curCSSTop = jQuery.css( elem, "top" ),
-      curCSSLeft = jQuery.css( elem, "left" ),
-      calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
-      props = {}, curPosition = {}, curTop, curLeft;
-
-    // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
-    if ( calculatePosition ) {
-      curPosition = curElem.position();
-      curTop = curPosition.top;
-      curLeft = curPosition.left;
-    } else {
-      curTop = parseFloat( curCSSTop ) || 0;
-      curLeft = parseFloat( curCSSLeft ) || 0;
-    }
-
-    if ( jQuery.isFunction( options ) ) {
-      options = options.call( elem, i, curOffset );
-    }
-
-    if ( options.top != null ) {
-      props.top = ( options.top - curOffset.top ) + curTop;
-    }
-    if ( options.left != null ) {
-      props.left = ( options.left - curOffset.left ) + curLeft;
-    }
-
-    if ( "using" in options ) {
-      options.using.call( elem, props );
-    } else {
-      curElem.css( props );
-    }
-  }
-};
-
-
-jQuery.fn.extend({
-
-  position: function() {
-    if ( !this[ 0 ] ) {
-      return;
-    }
-
-    var offsetParent, offset,
-      parentOffset = { top: 0, left: 0 },
-      elem = this[ 0 ];
-
-    // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent
-    if ( jQuery.css( elem, "position" ) === "fixed" ) {
-      // we assume that getBoundingClientRect is available when computed position is fixed
-      offset = elem.getBoundingClientRect();
-    } else {
-      // Get *real* offsetParent
-      offsetParent = this.offsetParent();
-
-      // Get correct offsets
-      offset = this.offset();
-      if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
-        parentOffset = offsetParent.offset();
-      }
-
-      // Add offsetParent borders
-      parentOffset.top  += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
-      parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
-    }
-
-    // Subtract parent offsets and element margins
-    // note: when an element has margin: auto the offsetLeft and marginLeft
-    // are the same in Safari causing offset.left to incorrectly be 0
-    return {
-      top:  offset.top  - parentOffset.top - jQuery.css( elem, "marginTop", true ),
-      left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)
-    };
-  },
-
-  offsetParent: function() {
-    return this.map(function() {
-      var offsetParent = this.offsetParent || docElem;
-      while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) {
-        offsetParent = offsetParent.offsetParent;
-      }
-      return offsetParent || docElem;
-    });
-  }
-});
-
-
-// Create scrollLeft and scrollTop methods
-jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
-  var top = /Y/.test( prop );
-
-  jQuery.fn[ method ] = function( val ) {
-    return jQuery.access( this, function( elem, method, val ) {
-      var win = getWindow( elem );
-
-      if ( val === undefined ) {
-        return win ? (prop in win) ? win[ prop ] :
-          win.document.documentElement[ method ] :
-          elem[ method ];
-      }
-
-      if ( win ) {
-        win.scrollTo(
-          !top ? val : jQuery( win ).scrollLeft(),
-          top ? val : jQuery( win ).scrollTop()
-        );
-
-      } else {
-        elem[ method ] = val;
-      }
-    }, method, val, arguments.length, null );
-  };
-});
-
-function getWindow( elem ) {
-  return jQuery.isWindow( elem ) ?
-    elem :
-    elem.nodeType === 9 ?
-      elem.defaultView || elem.parentWindow :
-      false;
-}
-// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
-jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
-  jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
-    // margin is only for outerHeight, outerWidth
-    jQuery.fn[ funcName ] = function( margin, value ) {
-      var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
-        extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
-
-      return jQuery.access( this, function( elem, type, value ) {
-        var doc;
-
-        if ( jQuery.isWindow( elem ) ) {
-          // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
-          // isn't a whole lot we can do. See pull request at this URL for discussion:
-          // https://github.com/jquery/jquery/pull/764
-          return elem.document.documentElement[ "client" + name ];
-        }
-
-        // Get document width or height
-        if ( elem.nodeType === 9 ) {
-          doc = elem.documentElement;
-
-          // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
-          // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
-          return Math.max(
-            elem.body[ "scroll" + name ], doc[ "scroll" + name ],
-            elem.body[ "offset" + name ], doc[ "offset" + name ],
-            doc[ "client" + name ]
-          );
-        }
-
-        return value === undefined ?
-          // Get width or height on the element, requesting but not forcing parseFloat
-          jQuery.css( elem, type, extra ) :
-
-          // Set width or height on the element
-          jQuery.style( elem, type, value, extra );
-      }, type, chainable ? margin : undefined, chainable, null );
-    };
-  });
-});
-// Limit scope pollution from any deprecated API
-// (function() {
-
-// The number of elements contained in the matched element set
-jQuery.fn.size = function() {
-  return this.length;
-};
-
-jQuery.fn.andSelf = jQuery.fn.addBack;
-
-// })();
-if ( typeof module === "object" && module && typeof module.exports === "object" ) {
-  // Expose jQuery as module.exports in loaders that implement the Node
-  // module pattern (including browserify). Do not create the global, since
-  // the user will be storing it themselves locally, and globals are frowned
-  // upon in the Node module world.
-  module.exports = jQuery;
-} else {
-  // Otherwise expose jQuery to the global object as usual
-  window.jQuery = window.$ = jQuery;
-
-  // Register as a named AMD module, since jQuery can be concatenated with other
-  // files that may use define, but not via a proper concatenation script that
-  // understands anonymous AMD modules. A named AMD is safest and most robust
-  // way to register. Lowercase jquery is used because AMD module names are
-  // derived from file names, and jQuery is normally delivered in a lowercase
-  // file name. Do this after creating the global so that if an AMD module wants
-  // to call noConflict to hide this version of jQuery, it will work.
-  if ( typeof define === "function" && define.amd ) {
-    define( "jquery", [], function () { return jQuery; } );
-  }
-}
-
-})( window );
-
-
-</textarea>
-</div>
-
-<hr />
-
-<h4>CodeMirror Original <a href="#original-demo">direct link</a></h4>
-<div id="original-demo">
-<textarea id="editor2"></textarea>
-</div>
-
-<h4>Normal Textarea <a href="#textarea-demo">direct link</a></h4>
-<div id="textarea-demo">
-  <textarea id="textarea-editor" spellcheck="false"></textarea>
-</div>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/public/js/lib/codemirror-accessible/javascript.js b/public/js/lib/codemirror-accessible/javascript.js
deleted file mode 100755
index 905e76d..0000000
--- a/public/js/lib/codemirror-accessible/javascript.js
+++ /dev/null
@@ -1,482 +0,0 @@
-// TODO actually recognize syntax of TypeScript constructs
-
-
-var opts= function(config, parserConfig) {
-  var indentUnit = config.indentUnit;
-  var statementIndent = parserConfig.statementIndent;
-  var jsonMode = parserConfig.json;
-  var isTS = parserConfig.typescript;
-
-  // Tokenizer
-
-  var keywords = function(){
-    function kw(type) {return {type: type, style: "keyword"};}
-    var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c");
-    var operator = kw("operator"), atom = {type: "atom", style: "atom"};
-
-    var jsKeywords = {
-      "if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
-      "return": C, "break": C, "continue": C, "new": C, "delete": C, "throw": C,
-      "var": kw("var"), "const": kw("var"), "let": kw("var"),
-      "function": kw("function"), "catch": kw("catch"),
-      "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"),
-      "in": operator, "typeof": operator, "instanceof": operator,
-      "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom,
-      "this": kw("this")
-    };
-
-    // Extend the 'normal' keywords with the TypeScript language extensions
-    if (isTS) {
-      var type = {type: "variable", style: "variable-3"};
-      var tsKeywords = {
-        // object-like things
-        "interface": kw("interface"),
-        "class": kw("class"),
-        "extends": kw("extends"),
-        "constructor": kw("constructor"),
-
-        // scope modifiers
-        "public": kw("public"),
-        "private": kw("private"),
-        "protected": kw("protected"),
-        "static": kw("static"),
-
-        "super": kw("super"),
-
-        // types
-        "string": type, "number": type, "bool": type, "any": type
-      };
-
-      for (var attr in tsKeywords) {
-        jsKeywords[attr] = tsKeywords[attr];
-      }
-    }
-
-    return jsKeywords;
-  }();
-
-  var isOperatorChar = /[+\-*&%=<>!?|~^]/;
-
-  function chain(stream, state, f) {
-    state.tokenize = f;
-    return f(stream, state);
-  }
-
-  function nextUntilUnescaped(stream, end) {
-    var escaped = false, next;
-    while ((next = stream.next()) != null) {
-      if (next == end && !escaped)
-        return false;
-      escaped = !escaped && next == "\\";
-    }
-    return escaped;
-  }
-
-  // Used as scratch variables to communicate multiple values without
-  // consing up tons of objects.
-  var type, content;
-  function ret(tp, style, cont) {
-    type = tp; content = cont;
-    return style;
-  }
-
-  function jsTokenBase(stream, state) {
-    var ch = stream.next();
-    if (ch == '"' || ch == "'")
-      return chain(stream, state, jsTokenString(ch));
-    else if (/[\[\]{}\(\),;\:\.]/.test(ch))
-      return ret(ch);
-    else if (ch == "0" && stream.eat(/x/i)) {
-      stream.eatWhile(/[\da-f]/i);
-      return ret("number", "number");
-    }
-    else if (/\d/.test(ch) || ch == "-" && stream.eat(/\d/)) {
-      stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);
-      return ret("number", "number");
-    }
-    else if (ch == "/") {
-      if (stream.eat("*")) {
-        return chain(stream, state, jsTokenComment);
-      }
-      else if (stream.eat("/")) {
-        stream.skipToEnd();
-        return ret("comment", "comment");
-      }
-      else if (state.lastType == "operator" || state.lastType == "keyword c" ||
-               /^[\[{}\(,;:]$/.test(state.lastType)) {
-        nextUntilUnescaped(stream, "/");
-        stream.eatWhile(/[gimy]/); // 'y' is "sticky" option in Mozilla
-        return ret("regexp", "string-2");
-      }
-      else {
-        stream.eatWhile(isOperatorChar);
-        return ret("operator", null, stream.current());
-      }
-    }
-    else if (ch == "#") {
-      stream.skipToEnd();
-      return ret("error", "error");
-    }
-    else if (isOperatorChar.test(ch)) {
-      stream.eatWhile(isOperatorChar);
-      return ret("operator", null, stream.current());
-    }
-    else {
-      stream.eatWhile(/[\w\$_]/);
-      var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word];
-      return (known && state.lastType != ".") ? ret(known.type, known.style, word) :
-                     ret("variable", "variable", word);
-    }
-  }
-
-  function jsTokenString(quote) {
-    return function(stream, state) {
-      if (!nextUntilUnescaped(stream, quote))
-        state.tokenize = jsTokenBase;
-      return ret("string", "string");
-    };
-  }
-
-  function jsTokenComment(stream, state) {
-    var maybeEnd = false, ch;
-    while (ch = stream.next()) {
-      if (ch == "/" && maybeEnd) {
-        state.tokenize = jsTokenBase;
-        break;
-      }
-      maybeEnd = (ch == "*");
-    }
-    return ret("comment", "comment");
-  }
-
-  // Parser
-
-  var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true, "this": true};
-
-  function JSLexical(indented, column, type, align, prev, info) {
-    this.indented = indented;
-    this.column = column;
-    this.type = type;
-    this.prev = prev;
-    this.info = info;
-    if (align != null) this.align = align;
-  }
-
-  function inScope(state, varname) {
-    for (var v = state.localVars; v; v = v.next)
-      if (v.name == varname) return true;
-  }
-
-  function parseJS(state, style, type, content, stream) {
-    var cc = state.cc;
-    // Communicate our context to the combinators.
-    // (Less wasteful than consing up a hundred closures on every call.)
-    cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc;
-
-    if (!state.lexical.hasOwnProperty("align"))
-      state.lexical.align = true;
-
-    while(true) {
-      var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;
-      if (combinator(type, content)) {
-        while(cc.length && cc[cc.length - 1].lex)
-          cc.pop()();
-        if (cx.marked) return cx.marked;
-        if (type == "variable" && inScope(state, content)) return "variable-2";
-        return style;
-      }
-    }
-  }
-
-  // Combinator utils
-
-  var cx = {state: null, column: null, marked: null, cc: null};
-  function pass() {
-    for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);
-  }
-  function cont() {
-    pass.apply(null, arguments);
-    return true;
-  }
-  function register(varname) {
-    function inList(list) {
-      for (var v = list; v; v = v.next)
-        if (v.name == varname) return true;
-      return false;
-    }
-    var state = cx.state;
-    if (state.context) {
-      cx.marked = "def";
-      if (inList(state.localVars)) return;
-      state.localVars = {name: varname, next: state.localVars};
-    } else {
-      if (inList(state.globalVars)) return;
-      state.globalVars = {name: varname, next: state.globalVars};
-    }
-  }
-
-  // Combinators
-
-  var defaultVars = {name: "this", next: {name: "arguments"}};
-  function pushcontext() {
-    cx.state.context = {prev: cx.state.context, vars: cx.state.localVars};
-    cx.state.localVars = defaultVars;
-  }
-  function popcontext() {
-    cx.state.localVars = cx.state.context.vars;
-    cx.state.context = cx.state.context.prev;
-  }
-  function pushlex(type, info) {
-    var result = function() {
-      var state = cx.state, indent = state.indented;
-      if (state.lexical.type == "stat") indent = state.lexical.indented;
-      state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);
-    };
-    result.lex = true;
-    return result;
-  }
-  function poplex() {
-    var state = cx.state;
-    if (state.lexical.prev) {
-      if (state.lexical.type == ")")
-        state.indented = state.lexical.indented;
-      state.lexical = state.lexical.prev;
-    }
-  }
-  poplex.lex = true;
-
-  function expect(wanted) {
-    return function(type) {
-      if (type == wanted) return cont();
-      else if (wanted == ";") return pass();
-      else return cont(arguments.callee);
-    };
-  }
-
-  function statement(type) {
-    if (type == "var") return cont(pushlex("vardef"), vardef1, expect(";"), poplex);
-    if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex);
-    if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
-    if (type == "{") return cont(pushlex("}"), block, poplex);
-    if (type == ";") return cont();
-    if (type == "if") return cont(pushlex("form"), expression, statement, poplex, maybeelse);
-    if (type == "function") return cont(functiondef);
-    if (type == "for") return cont(pushlex("form"), expect("("), pushlex(")"), forspec1, expect(")"),
-                                   poplex, statement, poplex);
-    if (type == "variable") return cont(pushlex("stat"), maybelabel);
-    if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"),
-                                      block, poplex, poplex);
-    if (type == "case") return cont(expression, expect(":"));
-    if (type == "default") return cont(expect(":"));
-    if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"),
-                                     statement, poplex, popcontext);
-    return pass(pushlex("stat"), expression, expect(";"), poplex);
-  }
-  function expression(type) {
-    return expressionInner(type, false);
-  }
-  function expressionNoComma(type) {
-    return expressionInner(type, true);
-  }
-  function expressionInner(type, noComma) {
-    var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
-    if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
-    if (type == "function") return cont(functiondef);
-    if (type == "keyword c") return cont(noComma ? maybeexpressionNoComma : maybeexpression);
-    if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);
-    if (type == "operator") return cont(noComma ? expressionNoComma : expression);
-    if (type == "[") return cont(pushlex("]"), commasep(expressionNoComma, "]"), poplex, maybeop);
-    if (type == "{") return cont(pushlex("}"), commasep(objprop, "}"), poplex, maybeop);
-    return cont();
-  }
-  function maybeexpression(type) {
-    if (type.match(/[;\}\)\],]/)) return pass();
-    return pass(expression);
-  }
-  function maybeexpressionNoComma(type) {
-    if (type.match(/[;\}\)\],]/)) return pass();
-    return pass(expressionNoComma);
-  }
-
-  function maybeoperatorComma(type, value) {
-    if (type == ",") return cont(expression);
-    return maybeoperatorNoComma(type, value, false);
-  }
-  function maybeoperatorNoComma(type, value, noComma) {
-    var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;
-    var expr = noComma == false ? expression : expressionNoComma;
-    if (type == "operator") {
-      if (/\+\+|--/.test(value)) return cont(me);
-      if (value == "?") return cont(expression, expect(":"), expr);
-      return cont(expr);
-    }
-    if (type == ";") return;
-    if (type == "(") return cont(pushlex(")", "call"), commasep(expressionNoComma, ")"), poplex, me);
-    if (type == ".") return cont(property, me);
-    if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me);
-  }
-  function maybelabel(type) {
-    if (type == ":") return cont(poplex, statement);
-    return pass(maybeoperatorComma, expect(";"), poplex);
-  }
-  function property(type) {
-    if (type == "variable") {cx.marked = "property"; return cont();}
-  }
-  function objprop(type, value) {
-    if (type == "variable") {
-      cx.marked = "property";
-      if (value == "get" || value == "set") return cont(getterSetter);
-    } else if (type == "number" || type == "string") {
-      cx.marked = type + " property";
-    }
-    if (atomicTypes.hasOwnProperty(type)) return cont(expect(":"), expressionNoComma);
-  }
-  function getterSetter(type) {
-    if (type == ":") return cont(expression);
-    if (type != "variable") return cont(expect(":"), expression);
-    cx.marked = "property";
-    return cont(functiondef);
-  }
-  function commasep(what, end) {
-    function proceed(type) {
-      if (type == ",") {
-        var lex = cx.state.lexical;
-        if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;
-        return cont(what, proceed);
-      }
-      if (type == end) return cont();
-      return cont(expect(end));
-    }
-    return function(type) {
-      if (type == end) return cont();
-      else return pass(what, proceed);
-    };
-  }
-  function block(type) {
-    if (type == "}") return cont();
-    return pass(statement, block);
-  }
-  function maybetype(type) {
-    if (type == ":") return cont(typedef);
-    return pass();
-  }
-  function typedef(type) {
-    if (type == "variable"){cx.marked = "variable-3"; return cont();}
-    return pass();
-  }
-  function vardef1(type, value) {
-    if (type == "variable") {
-      register(value);
-      return isTS ? cont(maybetype, vardef2) : cont(vardef2);
-    }
-    return pass();
-  }
-  function vardef2(type, value) {
-    if (value == "=") return cont(expressionNoComma, vardef2);
-    if (type == ",") return cont(vardef1);
-  }
-  function maybeelse(type, value) {
-    if (type == "keyword b" && value == "else") return cont(pushlex("form"), statement, poplex);
-  }
-  function forspec1(type) {
-    if (type == "var") return cont(vardef1, expect(";"), forspec2);
-    if (type == ";") return cont(forspec2);
-    if (type == "variable") return cont(formaybein);
-    return pass(expression, expect(";"), forspec2);
-  }
-  function formaybein(_type, value) {
-    if (value == "in") return cont(expression);
-    return cont(maybeoperatorComma, forspec2);
-  }
-  function forspec2(type, value) {
-    if (type == ";") return cont(forspec3);
-    if (value == "in") return cont(expression);
-    return pass(expression, expect(";"), forspec3);
-  }
-  function forspec3(type) {
-    if (type != ")") cont(expression);
-  }
-  function functiondef(type, value) {
-    if (type == "variable") {register(value); return cont(functiondef);}
-    if (type == "(") return cont(pushlex(")"), pushcontext, commasep(funarg, ")"), poplex, statement, popcontext);
-  }
-  function funarg(type, value) {
-    if (type == "variable") {register(value); return isTS ? cont(maybetype) : cont();}
-  }
-
-  // Interface
-
-  return {
-    startState: function(basecolumn) {
-      return {
-        tokenize: jsTokenBase,
-        lastType: null,
-        cc: [],
-        lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
-        localVars: parserConfig.localVars,
-        globalVars: parserConfig.globalVars,
-        context: parserConfig.localVars && {vars: parserConfig.localVars},
-        indented: 0
-      };
-    },
-
-    token: function(stream, state) {
-      if (stream.sol()) {
-        if (!state.lexical.hasOwnProperty("align"))
-          state.lexical.align = false;
-        state.indented = stream.indentation();
-      }
-      if (state.tokenize != jsTokenComment && stream.eatSpace()) return null;
-      var style = state.tokenize(stream, state);
-      if (type == "comment") return style;
-      state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type;
-      return parseJS(state, style, type, content, stream);
-    },
-
-    indent: function(state, textAfter) {
-      if (state.tokenize == jsTokenComment) return CodeMirror.Pass;
-      if (state.tokenize != jsTokenBase) return 0;
-      var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical;
-      // Kludge to prevent 'maybelse' from blocking lexical scope pops
-      for (var i = state.cc.length - 1; i >= 0; --i) {
-        var c = state.cc[i];
-        if (c == poplex) lexical = lexical.prev;
-        else if (c != maybeelse || /^else\b/.test(textAfter)) break;
-      }
-      if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev;
-      if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat")
-        lexical = lexical.prev;
-      var type = lexical.type, closing = firstChar == type;
-
-      if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? 4 : 0);
-      else if (type == "form" && firstChar == "{") return lexical.indented;
-      else if (type == "form") return lexical.indented + indentUnit;
-      else if (type == "stat")
-        return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? statementIndent || indentUnit : 0);
-      else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false)
-        return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
-      else if (lexical.align) return lexical.column + (closing ? 0 : 1);
-      else return lexical.indented + (closing ? 0 : indentUnit);
-    },
-
-    electricChars: ":{}",
-    blockCommentStart: jsonMode ? null : "/*",
-    blockCommentEnd: jsonMode ? null : "*/",
-    lineComment: jsonMode ? null : "//",
-    fold: "brace",
-
-    helperType: jsonMode ? "json" : "javascript",
-    jsonMode: jsonMode
-  };
-};
-
-CodeMirror.defineMode("javascript", opts );
-CodeMirrorOriginal.defineMode("javascript", opts );
-CodeMirror.defineMIME("text/javascript", "javascript");
-CodeMirror.defineMIME("text/ecmascript", "javascript");
-CodeMirror.defineMIME("application/javascript", "javascript");
-CodeMirror.defineMIME("application/ecmascript", "javascript");
-CodeMirror.defineMIME("application/json", {name: "javascript", json: true});
-CodeMirror.defineMIME("application/x-json", {name: "javascript", json: true});
-CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true });
-CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true });
diff --git a/public/js/lib/codemirror-accessible/stress.html b/public/js/lib/codemirror-accessible/stress.html
deleted file mode 100755
index fba041a..0000000
--- a/public/js/lib/codemirror-accessible/stress.html
+++ /dev/null
@@ -1,749 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-  <title>CodeMirror Accessible</title>
-
-  <script type="text/javascript" src="codemirror-accessible.js"></script>
-  <script type="text/javascript" src="codemirror-original.js"></script>
-  <script type="text/javascript" src="javascript.js"></script>
-  <script type="text/javascript" src="accessible.js"></script>
-  <link rel="stylesheet" type="text/css" href="codemirror.css">
-
-  <style type="text/css">
-    html, body { margin: 0; padding: 0; }
-    body { padding: 10px 30px; padding-bottom: 40px; font-size: 1.1em; }
-    h4 { margin: 30px 0; }
-    .CodeMirror { height: 500px; width: 90%; margin: 0 auto; border: solid 1px #ccc; }
-    .center {text-align: center;}
-    .yes { color: #33aa33;}
-    .no { color: #aa3333;}
-    .kindof { color: #880; }
-    code { color: #3333aa; outline: solid 1px rgba(0, 0, 0, .1); }
-    #textarea-editor { width: 90%; margin-left: 5%; height: 500px;}
-    #links { float: right; }
-    .clear { clear: both ;}
-    h1 { float: left; margin: 0; padding: 0; padding-bottom: 10px; }
-    h1 a {text-decoration: none; color: #119;}
-    h1 a:hover {text-decoration: underline;}
-  </style>
-  <script>
-    window.waitToLoad = true;
-  </script>
-</head>
-<body>
-
-<h1><a href="http://bgrins.github.io/codemirror-accessible">CodeMirror Accessibility</a></h1>
-<div id="links">
- <small><a href="https://github.com/bgrins/codemirror-accessible">source code</a></small>
-</div>
-<hr class="clear" />
-
-<div>
-  This page is just an experiment.  When you are are ready, you can click <button onclick="load();">initialize huge codemirror editors</button>.  Careful - <b class="no">this may be very slow</b>.
-</div>
-
-<div>
-<button id="toggle-textarea-visibility">Toggle CodeMirror Internal Textarea Visibility</button> <small>makes it easier to debug and see what is going on</small>
-</div>
-
-<hr />
-
-<h4 id="demo">CodeMirror With Accessibility Fix</h4>
-<textarea id="editor">/*
- * This is a JavaScript Scratchpad.
- *
- * Enter some JavaScript, then Right Click or choose from the Execute Menu:
- * 1. Run to evaluate the selected text (Ctrl+R),
- * 2. Inspect to bring up an Object Inspector on the result (Ctrl+I), or,
- * 3. Display to insert the result in a comment after the selection. (Ctrl+L)
- */
-
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
- * This is a JavaScript Scratchpad.
- *
- * Enter some JavaScript, then Right Click or choose from the Execute Menu:
- * 1. Run to evaluate the selected text (Ctrl+R),
- * 2. Inspect to bring up an Object Inspector on the result (Ctrl+I), or,
- * 3. Display to insert the result in a comment after the selection. (Ctrl+L)
- */
-
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
- * This is a JavaScript Scratchpad.
- *
- * Enter some JavaScript, then Right Click or choose from the Execute Menu:
- * 1. Run to evaluate the selected text (Ctrl+R),
- * 2. Inspect to bring up an Object Inspector on the result (Ctrl+I), or,
- * 3. Display to insert the result in a comment after the selection. (Ctrl+L)
- */
-
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtautoid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.call(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e);}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YAHOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYDOWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["toString","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.constructor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.length>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+|\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&&ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);},getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});},_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]==1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTopWidth",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-</textarea>
-
-<hr />
-
-<h4>CodeMirror Original</h4>
-<div id="original-demo">
-<textarea id="editor2"></textarea>
-</div>
-
-<h4>Normal Textarea</h4>
-<div id="textarea-demo">
-  <textarea id="textarea-editor" spellcheck="false"></textarea>
-</div>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/public/js/lib/codemirror/.gitattributes b/public/js/lib/codemirror/.gitattributes
deleted file mode 100644
index f8bdd60..0000000
--- a/public/js/lib/codemirror/.gitattributes
+++ /dev/null
@@ -1,8 +0,0 @@
-*.txt   text
-*.js    text
-*.html  text
-*.md    text
-*.json  text
-*.yml   text
-*.css   text
-*.svg   text
diff --git a/public/js/lib/codemirror/.gitignore b/public/js/lib/codemirror/.gitignore
deleted file mode 100644
index b720b9b..0000000
--- a/public/js/lib/codemirror/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-/node_modules
-/npm-debug.log
-test.html
-.tern-*
-*~
-*.swp
-.idea
-*.iml
diff --git a/public/js/lib/codemirror/.travis.yml b/public/js/lib/codemirror/.travis.yml
deleted file mode 100644
index baa0031..0000000
--- a/public/js/lib/codemirror/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: node_js
-node_js:
-  - 0.8
diff --git a/public/js/lib/codemirror/AUTHORS b/public/js/lib/codemirror/AUTHORS
deleted file mode 100644
index afa3cc0..0000000
--- a/public/js/lib/codemirror/AUTHORS
+++ /dev/null
@@ -1,423 +0,0 @@
-List of CodeMirror contributors. Updated before every release.
-
-4r2r
-Aaron Brooks
-Abdelouahab
-Abe Fettig
-Adam Ahmed
-Adam King
-adanlobato
-Adán Lobato
-Adrian Aichner
-aeroson
-Ahmad Amireh
-Ahmad M. Zawawi
-ahoward
-Akeksandr Motsjonov
-Alberto González Palomo
-Alberto Pose
-Albert Xing
-Alexander Pavlov
-Alexander Schepanovski
-Alexander Shvets
-Alexander Solovyov
-Alexandre Bique
-alexey-k
-Alex Piggott
-Amsul
-amuntean
-Amy
-Ananya Sen
-anaran
-AndersMad
-Anders Nawroth
-Anderson Mesquita
-Andrea G
-Andreas Reischuck
-Andre von Houck
-Andrey Fedorov
-Andrey Klyuchnikov
-Andrey Lushnikov
-Andy Joslin
-Andy Kimball
-Andy Li
-angelozerr
-angelo.zerr@gmail.com
-Ankit Ahuja
-Ansel Santosa
-Anthony Grimes
-Anton Kovalyov
-areos
-as3boyan
-AtomicPages LLC
-Atul Bhouraskar
-Aurelian Oancea
-Bastian Müller
-Bem Jones-Bey
-benbro
-Beni Cherniavsky-Paskin
-Benjamin DeCoste
-Ben Keen
-Bernhard Sirlinger
-Bert Chang
-Billy Moon
-binny
-B Krishna Chaitanya
-Blaine G
-blukat29
-boomyjee
-borawjm
-Brandon Frohs
-Brandon Wamboldt
-Brett Zamir
-Brian Grinstead
-Brian Sletten
-Bruce Mitchener
-Chandra Sekhar Pydi
-Charles Skelton
-Cheah Chu Yeow
-Chris Coyier
-Chris Granger
-Chris Houseknecht
-Chris Morgan
-Christian Oyarzun
-Christopher Brown
-ciaranj
-CodeAnimal
-ComFreek
-Curtis Gagliardi
-dagsta
-daines
-Dale Jung
-Dan Bentley
-Dan Heberden
-Daniel, Dao Quang Minh
-Daniele Di Sarli
-Daniel Faust
-Daniel Huigens
-Daniel KJ
-Daniel Neel
-Daniel Parnell
-Danny Yoo
-darealshinji
-Darius Roberts
-Dave Myers
-David Mignot
-David Pathakjee
-David Vázquez
-deebugger
-Deep Thought
-Devon Carew
-dignifiedquire
-Dimage Sapelkin
-domagoj412
-Dominator008
-Domizio Demichelis
-Doug Wikle
-Drew Bratcher
-Drew Hintz
-Drew Khoury
-Dror BG
-duralog
-eborden
-edsharp
-ekhaled
-Enam Mijbah Noor
-Eric Allam
-eustas
-Fabien O'Carroll
-Fabio Zendhi Nagao
-Faiza Alsaied
-Fauntleroy
-fbuchinger
-feizhang365
-Felipe Lalanne
-Felix Raab
-Filip Noetzel
-flack
-ForbesLindesay
-Forbes Lindesay
-Ford_Lawnmower
-Frank Wiegand
-Gabriel Gheorghian
-Gabriel Horner
-Gabriel Nahmias
-galambalazs
-Gautam Mehta
-gekkoe
-Gerard Braad
-Gergely Hegykozi
-Glenn Jorde
-Glenn Ruehle
-Golevka
-Gordon Smith
-Grant Skinner
-greengiant
-Gregory Koberger
-Guillaume Massé
-Guillaume Massé
-Gustavo Rodrigues
-Hakan Tunc
-Hans Engel
-Hardest
-Hasan Karahan
-Herculano Campos
-Hiroyuki Makino
-hitsthings
-Hocdoc
-Ian Beck
-Ian Dickinson
-Ian Wehrman
-Ian Wetherbee
-Ice White
-ICHIKAWA, Yuji
-ilvalle
-Ingo Richter
-Irakli Gozalishvili
-Ivan Kurnosov
-Jacob Lee
-Jakob Miland
-Jakub Vrana
-Jakub Vrána
-James Campos
-James Thorne
-Jamie Hill
-Jan Jongboom
-jankeromnes
-Jan Keromnes
-Jan Odvarko
-Jan T. Sott
-Jared Forsyth
-Jason
-Jason Barnabe
-Jason Grout
-Jason Johnston
-Jason San Jose
-Jason Siefken
-Jaydeep Solanki
-Jean Boussier
-jeffkenton
-Jeff Pickhardt
-jem (graphite)
-Jeremy Parmenter
-Jochen Berger
-Johan Ask
-John Connor
-John Lees-Miller
-John Snelson
-John Van Der Loo
-Jonathan Malmaud
-jongalloway
-Jon Malmaud
-Jon Sangster
-Joost-Wim Boekesteijn
-Joseph Pecoraro
-Joshua Newman
-Josh Watzman
-jots
-jsoojeon
-Juan Benavides Romero
-Jucovschi Constantin
-Juho Vuori
-Justin Hileman
-jwallers@gmail.com
-kaniga
-Ken Newman
-Ken Rockot
-Kevin Sawicki
-Kevin Ushey
-Klaus Silveira
-Koh Zi Han, Cliff
-komakino
-Konstantin Lopuhin
-koops
-ks-ifware
-kubelsmieci
-Lanfei
-Lanny
-Laszlo Vidacs
-leaf corcoran
-Leonid Khachaturov
-Leon Sorokin
-Leonya Khachaturov
-Liam Newman
-LM
-lochel
-Lorenzo Stoakes
-Luciano Longo
-Luke Stagner
-lynschinzer
-Maksim Lin
-Maksym Taran
-Malay Majithia
-Manuel Rego Casasnovas
-Marat Dreizin
-Marcel Gerber
-Marco Aurélio
-Marco Munizaga
-Marcus Bointon
-Marijn Haverbeke
-Mário Gonçalves
-Mario Pietsch
-Mark Lentczner
-Marko Bonaci
-Martin Balek
-Martín Gaitán
-Martin Hasoň
-Mason Malone
-Mateusz Paprocki
-Mathias Bynens
-mats cronqvist
-Matthew Beale
-Matthias Bussonnier
-Matthias BUSSONNIER
-Matt McDonald
-Matt Pass
-Matt Sacks
-mauricio
-Maximilian Hils
-Maxim Kraev
-Max Kirsch
-Max Xiantu
-mbarkhau
-Metatheos
-Micah Dubinko
-Michael Lehenbauer
-Michael Zhou
-Mighty Guava
-Miguel Castillo
-Mike
-Mike Brevoort
-Mike Diaz
-Mike Ivanov
-Mike Kadin
-MinRK
-Miraculix87
-misfo
-mloginov
-Moritz Schwörer
-mps
-mtaran-google
-Narciso Jaramillo
-Nathan Williams
-ndr
-nerbert
-nextrevision
-nguillaumin
-Ng Zhi An
-Nicholas Bollweg
-Nicholas Bollweg (Nick)
-Nick Small
-Niels van Groningen
-nightwing
-Nikita Beloglazov
-Nikita Vasilyev
-Nikolay Kostov
-nilp0inter
-Nisarg Jhaveri
-nlwillia
-Norman Rzepka
-pablo
-Page
-Panupong Pasupat
-paris
-Patil Arpith
-Patrick Stoica
-Patrick Strawderman
-Paul Garvin
-Paul Ivanov
-Pavel Feldman
-Pavel Strashkin
-Paweł Bartkiewicz
-peteguhl
-Peter Flynn
-peterkroon
-Peter Kroon
-prasanthj
-Prasanth J
-Radek Piórkowski
-Rahul
-Randall Mason
-Randy Burden
-Randy Edmunds
-Rasmus Erik Voel Jensen
-Richard van der Meer
-Richard Z.H. Wang
-Robert Crossfield
-Roberto Abdelkader Martínez Pérez
-robertop23
-Robert Plummer
-Ruslan Osmanov
-Ryan Prior
-sabaca
-Samuel Ainsworth
-sandeepshetty
-Sander AKA Redsandro
-santec
-Sascha Peilicke
-satchmorun
-sathyamoorthi
-SCLINIC\jdecker
-Scott Aikin
-Scott Goodhew
-Sebastian Zaha
-shaund
-shaun gilchrist
-Shawn A
-sheopory
-Shiv Deepak
-Shmuel Englard
-Shubham Jain
-silverwind
-snasa
-soliton4
-sonson
-spastorelli
-srajanpaliwal
-Stanislav Oaserele
-Stas Kobzar
-Stefan Borsje
-Steffen Beyer
-Steve O'Hara
-stoskov
-Taha Jahangir
-Takuji Shimokawa
-Tarmil
-tfjgeorge
-Thaddee Tyl
-TheHowl
-think
-Thomas Dvornik
-Thomas Schmid
-Tim Alby
-Tim Baumann
-Timothy Farrell
-Timothy Hatcher
-TobiasBg
-Tomas-A
-Tomas Varaneckas
-Tom Erik Støwer
-Tom MacWright
-Tony Jian
-Travis Heppe
-Triangle717
-twifkak
-Vestimir Markov
-vf
-Vincent Woo
-Volker Mische
-wenli
-Wesley Wiser
-Will Binns-Smith
-William Jamieson
-William Stein
-Willy
-Wojtek Ptak
-Xavier Mendez
-Yassin N. Hassan
-YNH Webdev
-Yunchi Luo
-Yuvi Panda
-Zachary Dremann
-zziuni
-魏鹏刚
diff --git a/public/js/lib/codemirror/CONTRIBUTING.md b/public/js/lib/codemirror/CONTRIBUTING.md
deleted file mode 100644
index c4296ce..0000000
--- a/public/js/lib/codemirror/CONTRIBUTING.md
+++ /dev/null
@@ -1,76 +0,0 @@
-# How to contribute
-
-- [Getting help](#getting-help-)
-- [Submitting bug reports](#submitting-bug-reports-)
-- [Contributing code](#contributing-code-)
-
-## Getting help
-
-Community discussion, questions, and informal bug reporting is done on the
-[discuss.CodeMirror forum](http://discuss.codemirror.net).
-
-## Submitting bug reports
-
-The preferred way to report bugs is to use the
-[GitHub issue tracker](http://github.com/codemirror/CodeMirror/issues). Before
-reporting a bug, read these pointers.
-
-**Note:** The issue tracker is for *bugs*, not requests for help. Questions
-should be asked on the
-[discuss.CodeMirror forum](http://discuss.codemirror.net) instead.
-
-### Reporting bugs effectively
-
-- CodeMirror is maintained by volunteers. They don't owe you anything, so be
-  polite. Reports with an indignant or belligerent tone tend to be moved to the
-  bottom of the pile.
-
-- Include information about **the browser in which the problem occurred**. Even
-  if you tested several browsers, and the problem occurred in all of them,
-  mention this fact in the bug report. Also include browser version numbers and
-  the operating system that you're on.
-
-- Mention which release of CodeMirror you're using. Preferably, try also with
-  the current development snapshot, to ensure the problem has not already been
-  fixed.
-
-- Mention very precisely what went wrong. "X is broken" is not a good bug
-  report. What did you expect to happen? What happened instead? Describe the
-  exact steps a maintainer has to take to make the problem occur. We can not
-  fix something that we can not observe.
-
-- If the problem can not be reproduced in any of the demos included in the
-  CodeMirror distribution, please provide an HTML document that demonstrates
-  the problem. The best way to do this is to go to
-  [jsbin.com](http://jsbin.com/ihunin/edit), enter it there, press save, and
-  include the resulting link in your bug report.
-
-## Contributing code
-
-- Make sure you have a [GitHub Account](https://github.com/signup/free)
-- Fork [CodeMirror](https://github.com/codemirror/CodeMirror/)
-  ([how to fork a repo](https://help.github.com/articles/fork-a-repo))
-- Make your changes
-- If your changes are easy to test or likely to regress, add tests.
-  Tests for the core go into `test/test.js`, some modes have their own
-  test suite under `mode/XXX/test.js`. Feel free to add new test
-  suites to modes that don't have one yet (be sure to link the new
-  tests into `test/index.html`).
-- Follow the general code style of the rest of the project (see
-  below). Run `bin/lint` to verify that the linter is happy.
-- Make sure all tests pass. Visit `test/index.html` in your browser to
-  run them.
-- Submit a pull request
-([how to create a pull request](https://help.github.com/articles/fork-a-repo))
-
-### Coding standards
-
-- 2 spaces per indentation level, no tabs.
-- Include semicolons after statements.
-- Note that the linter (`bin/lint`) which is run after each commit
-  complains about unused variables and functions. Prefix their names
-  with an underscore to muffle it.
-
-- CodeMirror does *not* follow JSHint or JSLint prescribed style.
-  Patches that try to 'fix' code to pass one of these linters will be
-  unceremoniously discarded.
diff --git a/public/js/lib/codemirror/LICENSE b/public/js/lib/codemirror/LICENSE
deleted file mode 100644
index d21bbea..0000000
--- a/public/js/lib/codemirror/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (C) 2014 by Marijn Haverbeke <marijnh@gmail.com> and others
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/public/js/lib/codemirror/README.md b/public/js/lib/codemirror/README.md
deleted file mode 100644
index 42b06f7..0000000
--- a/public/js/lib/codemirror/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# CodeMirror
-[![Build Status](https://travis-ci.org/codemirror/CodeMirror.svg)](https://travis-ci.org/codemirror/CodeMirror)
-[![NPM version](https://img.shields.io/npm/v/codemirror.svg)](https://www.npmjs.org/package/codemirror)
-
-CodeMirror is a JavaScript component that provides a code editor in
-the browser. When a mode is available for the language you are coding
-in, it will color your code, and optionally help with indentation.
-
-The project page is http://codemirror.net  
-The manual is at http://codemirror.net/doc/manual.html  
-The contributing guidelines are in [CONTRIBUTING.md](https://github.com/codemirror/CodeMirror/blob/master/CONTRIBUTING.md)
diff --git a/public/js/lib/codemirror/addon/comment/comment.js b/public/js/lib/codemirror/addon/comment/comment.js
deleted file mode 100644
index 2dd114d..0000000
--- a/public/js/lib/codemirror/addon/comment/comment.js
+++ /dev/null
@@ -1,183 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  var noOptions = {};
-  var nonWS = /[^\s\u00a0]/;
-  var Pos = CodeMirror.Pos;
-
-  function firstNonWS(str) {
-    var found = str.search(nonWS);
-    return found == -1 ? 0 : found;
-  }
-
-  CodeMirror.commands.toggleComment = function(cm) {
-    var minLine = Infinity, ranges = cm.listSelections(), mode = null;
-    for (var i = ranges.length - 1; i >= 0; i--) {
-      var from = ranges[i].from(), to = ranges[i].to();
-      if (from.line >= minLine) continue;
-      if (to.line >= minLine) to = Pos(minLine, 0);
-      minLine = from.line;
-      if (mode == null) {
-        if (cm.uncomment(from, to)) mode = "un";
-        else { cm.lineComment(from, to); mode = "line"; }
-      } else if (mode == "un") {
-        cm.uncomment(from, to);
-      } else {
-        cm.lineComment(from, to);
-      }
-    }
-  };
-
-  CodeMirror.defineExtension("lineComment", function(from, to, options) {
-    if (!options) options = noOptions;
-    var self = this, mode = self.getModeAt(from);
-    var commentString = options.lineComment || mode.lineComment;
-    if (!commentString) {
-      if (options.blockCommentStart || mode.blockCommentStart) {
-        options.fullLines = true;
-        self.blockComment(from, to, options);
-      }
-      return;
-    }
-    var firstLine = self.getLine(from.line);
-    if (firstLine == null) return;
-    var end = Math.min(to.ch != 0 || to.line == from.line ? to.line + 1 : to.line, self.lastLine() + 1);
-    var pad = options.padding == null ? " " : options.padding;
-    var blankLines = options.commentBlankLines || from.line == to.line;
-
-    self.operation(function() {
-      if (options.indent) {
-        var baseString = firstLine.slice(0, firstNonWS(firstLine));
-        for (var i = from.line; i < end; ++i) {
-          var line = self.getLine(i), cut = baseString.length;
-          if (!blankLines && !nonWS.test(line)) continue;
-          if (line.slice(0, cut) != baseString) cut = firstNonWS(line);
-          self.replaceRange(baseString + commentString + pad, Pos(i, 0), Pos(i, cut));
-        }
-      } else {
-        for (var i = from.line; i < end; ++i) {
-          if (blankLines || nonWS.test(self.getLine(i)))
-            self.replaceRange(commentString + pad, Pos(i, 0));
-        }
-      }
-    });
-  });
-
-  CodeMirror.defineExtension("blockComment", function(from, to, options) {
-    if (!options) options = noOptions;
-    var self = this, mode = self.getModeAt(from);
-    var startString = options.blockCommentStart || mode.blockCommentStart;
-    var endString = options.blockCommentEnd || mode.blockCommentEnd;
-    if (!startString || !endString) {
-      if ((options.lineComment || mode.lineComment) && options.fullLines != false)
-        self.lineComment(from, to, options);
-      return;
-    }
-
-    var end = Math.min(to.line, self.lastLine());
-    if (end != from.line && to.ch == 0 && nonWS.test(self.getLine(end))) --end;
-
-    var pad = options.padding == null ? " " : options.padding;
-    if (from.line > end) return;
-
-    self.operation(function() {
-      if (options.fullLines != false) {
-        var lastLineHasText = nonWS.test(self.getLine(end));
-        self.replaceRange(pad + endString, Pos(end));
-        self.replaceRange(startString + pad, Pos(from.line, 0));
-        var lead = options.blockCommentLead || mode.blockCommentLead;
-        if (lead != null) for (var i = from.line + 1; i <= end; ++i)
-          if (i != end || lastLineHasText)
-            self.replaceRange(lead + pad, Pos(i, 0));
-      } else {
-        self.replaceRange(endString, to);
-        self.replaceRange(startString, from);
-      }
-    });
-  });
-
-  CodeMirror.defineExtension("uncomment", function(from, to, options) {
-    if (!options) options = noOptions;
-    var self = this, mode = self.getModeAt(from);
-    var end = Math.min(to.ch != 0 || to.line == from.line ? to.line : to.line - 1, self.lastLine()), start = Math.min(from.line, end);
-
-    // Try finding line comments
-    var lineString = options.lineComment || mode.lineComment, lines = [];
-    var pad = options.padding == null ? " " : options.padding, didSomething;
-    lineComment: {
-      if (!lineString) break lineComment;
-      for (var i = start; i <= end; ++i) {
-        var line = self.getLine(i);
-        var found = line.indexOf(lineString);
-        if (found > -1 && !/comment/.test(self.getTokenTypeAt(Pos(i, found + 1)))) found = -1;
-        if (found == -1 && (i != end || i == start) && nonWS.test(line)) break lineComment;
-        if (found > -1 && nonWS.test(line.slice(0, found))) break lineComment;
-        lines.push(line);
-      }
-      self.operation(function() {
-        for (var i = start; i <= end; ++i) {
-          var line = lines[i - start];
-          var pos = line.indexOf(lineString), endPos = pos + lineString.length;
-          if (pos < 0) continue;
-          if (line.slice(endPos, endPos + pad.length) == pad) endPos += pad.length;
-          didSomething = true;
-          self.replaceRange("", Pos(i, pos), Pos(i, endPos));
-        }
-      });
-      if (didSomething) return true;
-    }
-
-    // Try block comments
-    var startString = options.blockCommentStart || mode.blockCommentStart;
-    var endString = options.blockCommentEnd || mode.blockCommentEnd;
-    if (!startString || !endString) return false;
-    var lead = options.blockCommentLead || mode.blockCommentLead;
-    var startLine = self.getLine(start), endLine = end == start ? startLine : self.getLine(end);
-    var open = startLine.indexOf(startString), close = endLine.lastIndexOf(endString);
-    if (close == -1 && start != end) {
-      endLine = self.getLine(--end);
-      close = endLine.lastIndexOf(endString);
-    }
-    if (open == -1 || close == -1 ||
-        !/comment/.test(self.getTokenTypeAt(Pos(start, open + 1))) ||
-        !/comment/.test(self.getTokenTypeAt(Pos(end, close + 1))))
-      return false;
-
-    // Avoid killing block comments completely outside the selection.
-    // Positions of the last startString before the start of the selection, and the first endString after it.
-    var lastStart = startLine.lastIndexOf(startString, from.ch);
-    var firstEnd = lastStart == -1 ? -1 : startLine.slice(0, from.ch).indexOf(endString, lastStart + startString.length);
-    if (lastStart != -1 && firstEnd != -1 && firstEnd + endString.length != from.ch) return false;
-    // Positions of the first endString after the end of the selection, and the last startString before it.
-    firstEnd = endLine.indexOf(endString, to.ch);
-    var almostLastStart = endLine.slice(to.ch).lastIndexOf(startString, firstEnd - to.ch);
-    lastStart = (firstEnd == -1 || almostLastStart == -1) ? -1 : to.ch + almostLastStart;
-    if (firstEnd != -1 && lastStart != -1 && lastStart != to.ch) return false;
-
-    self.operation(function() {
-      self.replaceRange("", Pos(end, close - (pad && endLine.slice(close - pad.length, close) == pad ? pad.length : 0)),
-                        Pos(end, close + endString.length));
-      var openEnd = open + startString.length;
-      if (pad && startLine.slice(openEnd, openEnd + pad.length) == pad) openEnd += pad.length;
-      self.replaceRange("", Pos(start, open), Pos(start, openEnd));
-      if (lead) for (var i = start + 1; i <= end; ++i) {
-        var line = self.getLine(i), found = line.indexOf(lead);
-        if (found == -1 || nonWS.test(line.slice(0, found))) continue;
-        var foundEnd = found + lead.length;
-        if (pad && line.slice(foundEnd, foundEnd + pad.length) == pad) foundEnd += pad.length;
-        self.replaceRange("", Pos(i, found), Pos(i, foundEnd));
-      }
-    });
-    return true;
-  });
-});
diff --git a/public/js/lib/codemirror/addon/comment/continuecomment.js b/public/js/lib/codemirror/addon/comment/continuecomment.js
deleted file mode 100644
index b11d51e..0000000
--- a/public/js/lib/codemirror/addon/comment/continuecomment.js
+++ /dev/null
@@ -1,85 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  var modes = ["clike", "css", "javascript"];
-
-  for (var i = 0; i < modes.length; ++i)
-    CodeMirror.extendMode(modes[i], {blockCommentContinue: " * "});
-
-  function continueComment(cm) {
-    if (cm.getOption("disableInput")) return CodeMirror.Pass;
-    var ranges = cm.listSelections(), mode, inserts = [];
-    for (var i = 0; i < ranges.length; i++) {
-      var pos = ranges[i].head, token = cm.getTokenAt(pos);
-      if (token.type != "comment") return CodeMirror.Pass;
-      var modeHere = CodeMirror.innerMode(cm.getMode(), token.state).mode;
-      if (!mode) mode = modeHere;
-      else if (mode != modeHere) return CodeMirror.Pass;
-
-      var insert = null;
-      if (mode.blockCommentStart && mode.blockCommentContinue) {
-        var end = token.string.indexOf(mode.blockCommentEnd);
-        var full = cm.getRange(CodeMirror.Pos(pos.line, 0), CodeMirror.Pos(pos.line, token.end)), found;
-        if (end != -1 && end == token.string.length - mode.blockCommentEnd.length && pos.ch >= end) {
-          // Comment ended, don't continue it
-        } else if (token.string.indexOf(mode.blockCommentStart) == 0) {
-          insert = full.slice(0, token.start);
-          if (!/^\s*$/.test(insert)) {
-            insert = "";
-            for (var j = 0; j < token.start; ++j) insert += " ";
-          }
-        } else if ((found = full.indexOf(mode.blockCommentContinue)) != -1 &&
-                   found + mode.blockCommentContinue.length > token.start &&
-                   /^\s*$/.test(full.slice(0, found))) {
-          insert = full.slice(0, found);
-        }
-        if (insert != null) insert += mode.blockCommentContinue;
-      }
-      if (insert == null && mode.lineComment && continueLineCommentEnabled(cm)) {
-        var line = cm.getLine(pos.line), found = line.indexOf(mode.lineComment);
-        if (found > -1) {
-          insert = line.slice(0, found);
-          if (/\S/.test(insert)) insert = null;
-          else insert += mode.lineComment + line.slice(found + mode.lineComment.length).match(/^\s*/)[0];
-        }
-      }
-      if (insert == null) return CodeMirror.Pass;
-      inserts[i] = "\n" + insert;
-    }
-
-    cm.operation(function() {
-      for (var i = ranges.length - 1; i >= 0; i--)
-        cm.replaceRange(inserts[i], ranges[i].from(), ranges[i].to(), "+insert");
-    });
-  }
-
-  function continueLineCommentEnabled(cm) {
-    var opt = cm.getOption("continueComments");
-    if (opt && typeof opt == "object")
-      return opt.continueLineComment !== false;
-    return true;
-  }
-
-  CodeMirror.defineOption("continueComments", null, function(cm, val, prev) {
-    if (prev && prev != CodeMirror.Init)
-      cm.removeKeyMap("continueComment");
-    if (val) {
-      var key = "Enter";
-      if (typeof val == "string")
-        key = val;
-      else if (typeof val == "object" && val.key)
-        key = val.key;
-      var map = {name: "continueComment"};
-      map[key] = continueComment;
-      cm.addKeyMap(map);
-    }
-  });
-});
diff --git a/public/js/lib/codemirror/addon/dialog/dialog.css b/public/js/lib/codemirror/addon/dialog/dialog.css
deleted file mode 100644
index 2e7c0fc..0000000
--- a/public/js/lib/codemirror/addon/dialog/dialog.css
+++ /dev/null
@@ -1,32 +0,0 @@
-.CodeMirror-dialog {
-  position: absolute;
-  left: 0; right: 0;
-  background: white;
-  z-index: 15;
-  padding: .1em .8em;
-  overflow: hidden;
-  color: #333;
-}
-
-.CodeMirror-dialog-top {
-  border-bottom: 1px solid #eee;
-  top: 0;
-}
-
-.CodeMirror-dialog-bottom {
-  border-top: 1px solid #eee;
-  bottom: 0;
-}
-
-.CodeMirror-dialog input {
-  border: none;
-  outline: none;
-  background: transparent;
-  width: 20em;
-  color: inherit;
-  font-family: monospace;
-}
-
-.CodeMirror-dialog button {
-  font-size: 70%;
-}
diff --git a/public/js/lib/codemirror/addon/dialog/dialog.js b/public/js/lib/codemirror/addon/dialog/dialog.js
deleted file mode 100644
index e0e8ad4..0000000
--- a/public/js/lib/codemirror/addon/dialog/dialog.js
+++ /dev/null
@@ -1,155 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// Open simple dialogs on top of an editor. Relies on dialog.css.
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  function dialogDiv(cm, template, bottom) {
-    var wrap = cm.getWrapperElement();
-    var dialog;
-    dialog = wrap.appendChild(document.createElement("div"));
-    if (bottom)
-      dialog.className = "CodeMirror-dialog CodeMirror-dialog-bottom";
-    else
-      dialog.className = "CodeMirror-dialog CodeMirror-dialog-top";
-
-    if (typeof template == "string") {
-      dialog.innerHTML = template;
-    } else { // Assuming it's a detached DOM element.
-      dialog.appendChild(template);
-    }
-    return dialog;
-  }
-
-  function closeNotification(cm, newVal) {
-    if (cm.state.currentNotificationClose)
-      cm.state.currentNotificationClose();
-    cm.state.currentNotificationClose = newVal;
-  }
-
-  CodeMirror.defineExtension("openDialog", function(template, callback, options) {
-    if (!options) options = {};
-
-    closeNotification(this, null);
-
-    var dialog = dialogDiv(this, template, options.bottom);
-    var closed = false, me = this;
-    function close(newVal) {
-      if (typeof newVal == 'string') {
-        inp.value = newVal;
-      } else {
-        if (closed) return;
-        closed = true;
-        dialog.parentNode.removeChild(dialog);
-        me.focus();
-
-        if (options.onClose) options.onClose(dialog);
-      }
-    }
-
-    var inp = dialog.getElementsByTagName("input")[0], button;
-    if (inp) {
-      if (options.value) {
-        inp.value = options.value;
-        inp.select();
-      }
-
-      if (options.onInput)
-        CodeMirror.on(inp, "input", function(e) { options.onInput(e, inp.value, close);});
-      if (options.onKeyUp)
-        CodeMirror.on(inp, "keyup", function(e) {options.onKeyUp(e, inp.value, close);});
-
-      CodeMirror.on(inp, "keydown", function(e) {
-        if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) { return; }
-        if (e.keyCode == 27 || (options.closeOnEnter !== false && e.keyCode == 13)) {
-          inp.blur();
-          CodeMirror.e_stop(e);
-          close();
-        }
-        if (e.keyCode == 13) callback(inp.value, e);
-      });
-
-      if (options.closeOnBlur !== false) CodeMirror.on(inp, "blur", close);
-
-      inp.focus();
-    } else if (button = dialog.getElementsByTagName("button")[0]) {
-      CodeMirror.on(button, "click", function() {
-        close();
-        me.focus();
-      });
-
-      if (options.closeOnBlur !== false) CodeMirror.on(button, "blur", close);
-
-      button.focus();
-    }
-    return close;
-  });
-
-  CodeMirror.defineExtension("openConfirm", function(template, callbacks, options) {
-    closeNotification(this, null);
-    var dialog = dialogDiv(this, template, options && options.bottom);
-    var buttons = dialog.getElementsByTagName("button");
-    var closed = false, me = this, blurring = 1;
-    function close() {
-      if (closed) return;
-      closed = true;
-      dialog.parentNode.removeChild(dialog);
-      me.focus();
-    }
-    buttons[0].focus();
-    for (var i = 0; i < buttons.length; ++i) {
-      var b = buttons[i];
-      (function(callback) {
-        CodeMirror.on(b, "click", function(e) {
-          CodeMirror.e_preventDefault(e);
-          close();
-          if (callback) callback(me);
-        });
-      })(callbacks[i]);
-      CodeMirror.on(b, "blur", function() {
-        --blurring;
-        setTimeout(function() { if (blurring <= 0) close(); }, 200);
-      });
-      CodeMirror.on(b, "focus", function() { ++blurring; });
-    }
-  });
-
-  /*
-   * openNotification
-   * Opens a notification, that can be closed with an optional timer
-   * (default 5000ms timer) and always closes on click.
-   *
-   * If a notification is opened while another is opened, it will close the
-   * currently opened one and open the new one immediately.
-   */
-  CodeMirror.defineExtension("openNotification", function(template, options) {
-    closeNotification(this, close);
-    var dialog = dialogDiv(this, template, options && options.bottom);
-    var closed = false, doneTimer;
-    var duration = options && typeof options.duration !== "undefined" ? options.duration : 5000;
-
-    function close() {
-      if (closed) return;
-      closed = true;
-      clearTimeout(doneTimer);
-      dialog.parentNode.removeChild(dialog);
-    }
-
-    CodeMirror.on(dialog, 'click', function(e) {
-      CodeMirror.e_preventDefault(e);
-      close();
-    });
-
-    if (duration)
-      doneTimer = setTimeout(close, duration);
-
-    return close;
-  });
-});
diff --git a/public/js/lib/codemirror/addon/display/fullscreen.css b/public/js/lib/codemirror/addon/display/fullscreen.css
deleted file mode 100644
index 437acd8..0000000
--- a/public/js/lib/codemirror/addon/display/fullscreen.css
+++ /dev/null
@@ -1,6 +0,0 @@
-.CodeMirror-fullscreen {
-  position: fixed;
-  top: 0; left: 0; right: 0; bottom: 0;
-  height: auto;
-  z-index: 9;
-}
diff --git a/public/js/lib/codemirror/addon/display/fullscreen.js b/public/js/lib/codemirror/addon/display/fullscreen.js
deleted file mode 100644
index cd3673b..0000000
--- a/public/js/lib/codemirror/addon/display/fullscreen.js
+++ /dev/null
@@ -1,41 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  CodeMirror.defineOption("fullScreen", false, function(cm, val, old) {
-    if (old == CodeMirror.Init) old = false;
-    if (!old == !val) return;
-    if (val) setFullscreen(cm);
-    else setNormal(cm);
-  });
-
-  function setFullscreen(cm) {
-    var wrap = cm.getWrapperElement();
-    cm.state.fullScreenRestore = {scrollTop: window.pageYOffset, scrollLeft: window.pageXOffset,
-                                  width: wrap.style.width, height: wrap.style.height};
-    wrap.style.width = "";
-    wrap.style.height = "auto";
-    wrap.className += " CodeMirror-fullscreen";
-    document.documentElement.style.overflow = "hidden";
-    cm.refresh();
-  }
-
-  function setNormal(cm) {
-    var wrap = cm.getWrapperElement();
-    wrap.className = wrap.className.replace(/\s*CodeMirror-fullscreen\b/, "");
-    document.documentElement.style.overflow = "";
-    var info = cm.state.fullScreenRestore;
-    wrap.style.width = info.width; wrap.style.height = info.height;
-    window.scrollTo(info.scrollLeft, info.scrollTop);
-    cm.refresh();
-  }
-});
diff --git a/public/js/lib/codemirror/addon/display/panel.js b/public/js/lib/codemirror/addon/display/panel.js
deleted file mode 100644
index 22c0453..0000000
--- a/public/js/lib/codemirror/addon/display/panel.js
+++ /dev/null
@@ -1,94 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  CodeMirror.defineExtension("addPanel", function(node, options) {
-    if (!this.state.panels) initPanels(this);
-
-    var info = this.state.panels;
-    if (options && options.position == "bottom")
-      info.wrapper.appendChild(node);
-    else
-      info.wrapper.insertBefore(node, info.wrapper.firstChild);
-    var height = (options && options.height) || node.offsetHeight;
-    this._setSize(null, info.heightLeft -= height);
-    info.panels++;
-    return new Panel(this, node, options, height);
-  });
-
-  function Panel(cm, node, options, height) {
-    this.cm = cm;
-    this.node = node;
-    this.options = options;
-    this.height = height;
-    this.cleared = false;
-  }
-
-  Panel.prototype.clear = function() {
-    if (this.cleared) return;
-    this.cleared = true;
-    var info = this.cm.state.panels;
-    this.cm._setSize(null, info.heightLeft += this.height);
-    info.wrapper.removeChild(this.node);
-    if (--info.panels == 0) removePanels(this.cm);
-  };
-
-  Panel.prototype.changed = function(height) {
-    var newHeight = height == null ? this.node.offsetHeight : height;
-    var info = this.cm.state.panels;
-    this.cm._setSize(null, info.height += (newHeight - this.height));
-    this.height = newHeight;
-  };
-
-  function initPanels(cm) {
-    var wrap = cm.getWrapperElement();
-    var style = window.getComputedStyle ? window.getComputedStyle(wrap) : wrap.currentStyle;
-    var height = parseInt(style.height);
-    var info = cm.state.panels = {
-      setHeight: wrap.style.height,
-      heightLeft: height,
-      panels: 0,
-      wrapper: document.createElement("div")
-    };
-    wrap.parentNode.insertBefore(info.wrapper, wrap);
-    var hasFocus = cm.hasFocus();
-    info.wrapper.appendChild(wrap);
-    if (hasFocus) cm.focus();
-
-    cm._setSize = cm.setSize;
-    if (height != null) cm.setSize = function(width, newHeight) {
-      if (newHeight == null) return this._setSize(width, newHeight);
-      info.setHeight = newHeight;
-      if (typeof newHeight != "number") {
-        var px = /^(\d+\.?\d*)px$/.exec(newHeight);
-        if (px) {
-          newHeight = Number(px[1]);
-        } else {
-          info.wrapper.style.height = newHeight;
-          newHeight = info.wrapper.offsetHeight;
-          info.wrapper.style.height = "";
-        }
-      }
-      cm._setSize(width, info.heightLeft += (newHeight - height));
-      height = newHeight;
-    };
-  }
-
-  function removePanels(cm) {
-    var info = cm.state.panels;
-    cm.state.panels = null;
-
-    var wrap = cm.getWrapperElement();
-    info.wrapper.parentNode.replaceChild(wrap, info.wrapper);
-    wrap.style.height = info.setHeight;
-    cm.setSize = cm._setSize;
-    cm.setSize();
-  }
-});
diff --git a/public/js/lib/codemirror/addon/display/placeholder.js b/public/js/lib/codemirror/addon/display/placeholder.js
deleted file mode 100644
index bb0c393..0000000
--- a/public/js/lib/codemirror/addon/display/placeholder.js
+++ /dev/null
@@ -1,58 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  CodeMirror.defineOption("placeholder", "", function(cm, val, old) {
-    var prev = old && old != CodeMirror.Init;
-    if (val && !prev) {
-      cm.on("blur", onBlur);
-      cm.on("change", onChange);
-      onChange(cm);
-    } else if (!val && prev) {
-      cm.off("blur", onBlur);
-      cm.off("change", onChange);
-      clearPlaceholder(cm);
-      var wrapper = cm.getWrapperElement();
-      wrapper.className = wrapper.className.replace(" CodeMirror-empty", "");
-    }
-
-    if (val && !cm.hasFocus()) onBlur(cm);
-  });
-
-  function clearPlaceholder(cm) {
-    if (cm.state.placeholder) {
-      cm.state.placeholder.parentNode.removeChild(cm.state.placeholder);
-      cm.state.placeholder = null;
-    }
-  }
-  function setPlaceholder(cm) {
-    clearPlaceholder(cm);
-    var elt = cm.state.placeholder = document.createElement("pre");
-    elt.style.cssText = "height: 0; overflow: visible";
-    elt.className = "CodeMirror-placeholder";
-    elt.appendChild(document.createTextNode(cm.getOption("placeholder")));
-    cm.display.lineSpace.insertBefore(elt, cm.display.lineSpace.firstChild);
-  }
-
-  function onBlur(cm) {
-    if (isEmpty(cm)) setPlaceholder(cm);
-  }
-  function onChange(cm) {
-    var wrapper = cm.getWrapperElement(), empty = isEmpty(cm);
-    wrapper.className = wrapper.className.replace(" CodeMirror-empty", "") + (empty ? " CodeMirror-empty" : "");
-
-    if (empty) setPlaceholder(cm);
-    else clearPlaceholder(cm);
-  }
-
-  function isEmpty(cm) {
-    return (cm.lineCount() === 1) && (cm.getLine(0) === "");
-  }
-});
diff --git a/public/js/lib/codemirror/addon/display/rulers.js b/public/js/lib/codemirror/addon/display/rulers.js
deleted file mode 100644
index 13185d3..0000000
--- a/public/js/lib/codemirror/addon/display/rulers.js
+++ /dev/null
@@ -1,64 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  CodeMirror.defineOption("rulers", false, function(cm, val, old) {
-    if (old && old != CodeMirror.Init) {
-      clearRulers(cm);
-      cm.off("refresh", refreshRulers);
-    }
-    if (val && val.length) {
-      setRulers(cm);
-      cm.on("refresh", refreshRulers);
-    }
-  });
-
-  function clearRulers(cm) {
-    for (var i = cm.display.lineSpace.childNodes.length - 1; i >= 0; i--) {
-      var node = cm.display.lineSpace.childNodes[i];
-      if (/(^|\s)CodeMirror-ruler($|\s)/.test(node.className))
-        node.parentNode.removeChild(node);
-    }
-  }
-
-  function setRulers(cm) {
-    var val = cm.getOption("rulers");
-    var cw = cm.defaultCharWidth();
-    var left = cm.charCoords(CodeMirror.Pos(cm.firstLine(), 0), "div").left;
-    var minH = cm.display.scroller.offsetHeight + 30;
-    for (var i = 0; i < val.length; i++) {
-      var elt = document.createElement("div");
-      elt.className = "CodeMirror-ruler";
-      var col, cls = null, conf = val[i];
-      if (typeof conf == "number") {
-        col = conf;
-      } else {
-        col = conf.column;
-        if (conf.className) elt.className += " " + conf.className;
-        if (conf.color) elt.style.borderColor = conf.color;
-        if (conf.lineStyle) elt.style.borderLeftStyle = conf.lineStyle;
-        if (conf.width) elt.style.borderLeftWidth = conf.width;
-        cls = val[i].className;
-      }
-      elt.style.left = (left + col * cw) + "px";
-      elt.style.top = "-50px";
-      elt.style.bottom = "-20px";
-      elt.style.minHeight = minH + "px";
-      cm.display.lineSpace.insertBefore(elt, cm.display.cursorDiv);
-    }
-  }
-
-  function refreshRulers(cm) {
-    clearRulers(cm);
-    setRulers(cm);
-  }
-});
diff --git a/public/js/lib/codemirror/addon/edit/closebrackets.js b/public/js/lib/codemirror/addon/edit/closebrackets.js
deleted file mode 100644
index f6b42f0..0000000
--- a/public/js/lib/codemirror/addon/edit/closebrackets.js
+++ /dev/null
@@ -1,159 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  var DEFAULT_BRACKETS = "()[]{}''\"\"";
-  var DEFAULT_EXPLODE_ON_ENTER = "[]{}";
-  var SPACE_CHAR_REGEX = /\s/;
-
-  var Pos = CodeMirror.Pos;
-
-  CodeMirror.defineOption("autoCloseBrackets", false, function(cm, val, old) {
-    if (old != CodeMirror.Init && old)
-      cm.removeKeyMap("autoCloseBrackets");
-    if (!val) return;
-    var pairs = DEFAULT_BRACKETS, explode = DEFAULT_EXPLODE_ON_ENTER;
-    if (typeof val == "string") pairs = val;
-    else if (typeof val == "object") {
-      if (val.pairs != null) pairs = val.pairs;
-      if (val.explode != null) explode = val.explode;
-    }
-    var map = buildKeymap(pairs);
-    if (explode) map.Enter = buildExplodeHandler(explode);
-    cm.addKeyMap(map);
-  });
-
-  function charsAround(cm, pos) {
-    var str = cm.getRange(Pos(pos.line, pos.ch - 1),
-                          Pos(pos.line, pos.ch + 1));
-    return str.length == 2 ? str : null;
-  }
-
-  // Project the token type that will exists after the given char is
-  // typed, and use it to determine whether it would cause the start
-  // of a string token.
-  function enteringString(cm, pos, ch) {
-    var line = cm.getLine(pos.line);
-    var token = cm.getTokenAt(pos);
-    if (/\bstring2?\b/.test(token.type)) return false;
-    var stream = new CodeMirror.StringStream(line.slice(0, pos.ch) + ch + line.slice(pos.ch), 4);
-    stream.pos = stream.start = token.start;
-    for (;;) {
-      var type1 = cm.getMode().token(stream, token.state);
-      if (stream.pos >= pos.ch + 1) return /\bstring2?\b/.test(type1);
-      stream.start = stream.pos;
-    }
-  }
-
-  function buildKeymap(pairs) {
-    var map = {
-      name : "autoCloseBrackets",
-      Backspace: function(cm) {
-        if (cm.getOption("disableInput")) return CodeMirror.Pass;
-        var ranges = cm.listSelections();
-        for (var i = 0; i < ranges.length; i++) {
-          if (!ranges[i].empty()) return CodeMirror.Pass;
-          var around = charsAround(cm, ranges[i].head);
-          if (!around || pairs.indexOf(around) % 2 != 0) return CodeMirror.Pass;
-        }
-        for (var i = ranges.length - 1; i >= 0; i--) {
-          var cur = ranges[i].head;
-          cm.replaceRange("", Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1));
-        }
-      }
-    };
-    var closingBrackets = "";
-    for (var i = 0; i < pairs.length; i += 2) (function(left, right) {
-      closingBrackets += right;
-      map["'" + left + "'"] = function(cm) {
-        if (cm.getOption("disableInput")) return CodeMirror.Pass;
-        var ranges = cm.listSelections(), type, next;
-        for (var i = 0; i < ranges.length; i++) {
-          var range = ranges[i], cur = range.head, curType;
-          var next = cm.getRange(cur, Pos(cur.line, cur.ch + 1));
-          if (!range.empty()) {
-            curType = "surround";
-          } else if (left == right && next == right) {
-            if (cm.getRange(cur, Pos(cur.line, cur.ch + 3)) == left + left + left)
-              curType = "skipThree";
-            else
-              curType = "skip";
-          } else if (left == right && cur.ch > 1 &&
-                     cm.getRange(Pos(cur.line, cur.ch - 2), cur) == left + left &&
-                     (cur.ch <= 2 || cm.getRange(Pos(cur.line, cur.ch - 3), Pos(cur.line, cur.ch - 2)) != left)) {
-            curType = "addFour";
-          } else if (left == '"' || left == "'") {
-            if (!CodeMirror.isWordChar(next) && enteringString(cm, cur, left)) curType = "both";
-            else return CodeMirror.Pass;
-          } else if (cm.getLine(cur.line).length == cur.ch || closingBrackets.indexOf(next) >= 0 || SPACE_CHAR_REGEX.test(next)) {
-            curType = "both";
-          } else {
-            return CodeMirror.Pass;
-          }
-          if (!type) type = curType;
-          else if (type != curType) return CodeMirror.Pass;
-        }
-
-        cm.operation(function() {
-          if (type == "skip") {
-            cm.execCommand("goCharRight");
-          } else if (type == "skipThree") {
-            for (var i = 0; i < 3; i++)
-              cm.execCommand("goCharRight");
-          } else if (type == "surround") {
-            var sels = cm.getSelections();
-            for (var i = 0; i < sels.length; i++)
-              sels[i] = left + sels[i] + right;
-            cm.replaceSelections(sels, "around");
-          } else if (type == "both") {
-            cm.replaceSelection(left + right, null);
-            cm.execCommand("goCharLeft");
-          } else if (type == "addFour") {
-            cm.replaceSelection(left + left + left + left, "before");
-            cm.execCommand("goCharRight");
-          }
-        });
-      };
-      if (left != right) map["'" + right + "'"] = function(cm) {
-        var ranges = cm.listSelections();
-        for (var i = 0; i < ranges.length; i++) {
-          var range = ranges[i];
-          if (!range.empty() ||
-              cm.getRange(range.head, Pos(range.head.line, range.head.ch + 1)) != right)
-            return CodeMirror.Pass;
-        }
-        cm.execCommand("goCharRight");
-      };
-    })(pairs.charAt(i), pairs.charAt(i + 1));
-    return map;
-  }
-
-  function buildExplodeHandler(pairs) {
-    return function(cm) {
-      if (cm.getOption("disableInput")) return CodeMirror.Pass;
-      var ranges = cm.listSelections();
-      for (var i = 0; i < ranges.length; i++) {
-        if (!ranges[i].empty()) return CodeMirror.Pass;
-        var around = charsAround(cm, ranges[i].head);
-        if (!around || pairs.indexOf(around) % 2 != 0) return CodeMirror.Pass;
-      }
-      cm.operation(function() {
-        cm.replaceSelection("\n\n", null);
-        cm.execCommand("goCharLeft");
-        ranges = cm.listSelections();
-        for (var i = 0; i < ranges.length; i++) {
-          var line = ranges[i].head.line;
-          cm.indentLine(line, null, true);
-          cm.indentLine(line + 1, null, true);
-        }
-      });
-    };
-  }
-});
diff --git a/public/js/lib/codemirror/addon/edit/closetag.js b/public/js/lib/codemirror/addon/edit/closetag.js
deleted file mode 100644
index a0bec7d..0000000
--- a/public/js/lib/codemirror/addon/edit/closetag.js
+++ /dev/null
@@ -1,159 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-/**
- * Tag-closer extension for CodeMirror.
- *
- * This extension adds an "autoCloseTags" option that can be set to
- * either true to get the default behavior, or an object to further
- * configure its behavior.
- *
- * These are supported options:
- *
- * `whenClosing` (default true)
- *   Whether to autoclose when the '/' of a closing tag is typed.
- * `whenOpening` (default true)
- *   Whether to autoclose the tag when the final '>' of an opening
- *   tag is typed.
- * `dontCloseTags` (default is empty tags for HTML, none for XML)
- *   An array of tag names that should not be autoclosed.
- * `indentTags` (default is block tags for HTML, none for XML)
- *   An array of tag names that should, when opened, cause a
- *   blank line to be added inside the tag, and the blank line and
- *   closing line to be indented.
- *
- * See demos/closetag.html for a usage example.
- */
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"), require("../fold/xml-fold"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror", "../fold/xml-fold"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  CodeMirror.defineOption("autoCloseTags", false, function(cm, val, old) {
-    if (old != CodeMirror.Init && old)
-      cm.removeKeyMap("autoCloseTags");
-    if (!val) return;
-    var map = {name: "autoCloseTags"};
-    if (typeof val != "object" || val.whenClosing)
-      map["'/'"] = function(cm) { return autoCloseSlash(cm); };
-    if (typeof val != "object" || val.whenOpening)
-      map["'>'"] = function(cm) { return autoCloseGT(cm); };
-    cm.addKeyMap(map);
-  });
-
-  var htmlDontClose = ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param",
-                       "source", "track", "wbr"];
-  var htmlIndent = ["applet", "blockquote", "body", "button", "div", "dl", "fieldset", "form", "frameset", "h1", "h2", "h3", "h4",
-                    "h5", "h6", "head", "html", "iframe", "layer", "legend", "object", "ol", "p", "select", "table", "ul"];
-
-  function autoCloseGT(cm) {
-    if (cm.getOption("disableInput")) return CodeMirror.Pass;
-    var ranges = cm.listSelections(), replacements = [];
-    for (var i = 0; i < ranges.length; i++) {
-      if (!ranges[i].empty()) return CodeMirror.Pass;
-      var pos = ranges[i].head, tok = cm.getTokenAt(pos);
-      var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;
-      if (inner.mode.name != "xml" || !state.tagName) return CodeMirror.Pass;
-
-      var opt = cm.getOption("autoCloseTags"), html = inner.mode.configuration == "html";
-      var dontCloseTags = (typeof opt == "object" && opt.dontCloseTags) || (html && htmlDontClose);
-      var indentTags = (typeof opt == "object" && opt.indentTags) || (html && htmlIndent);
-
-      var tagName = state.tagName;
-      if (tok.end > pos.ch) tagName = tagName.slice(0, tagName.length - tok.end + pos.ch);
-      var lowerTagName = tagName.toLowerCase();
-      // Don't process the '>' at the end of an end-tag or self-closing tag
-      if (!tagName ||
-          tok.type == "string" && (tok.end != pos.ch || !/[\"\']/.test(tok.string.charAt(tok.string.length - 1)) || tok.string.length == 1) ||
-          tok.type == "tag" && state.type == "closeTag" ||
-          tok.string.indexOf("/") == (tok.string.length - 1) || // match something like <someTagName />
-          dontCloseTags && indexOf(dontCloseTags, lowerTagName) > -1 ||
-          closingTagExists(cm, tagName, pos, state, true))
-        return CodeMirror.Pass;
-
-      var indent = indentTags && indexOf(indentTags, lowerTagName) > -1;
-      replacements[i] = {indent: indent,
-                         text: ">" + (indent ? "\n\n" : "") + "</" + tagName + ">",
-                         newPos: indent ? CodeMirror.Pos(pos.line + 1, 0) : CodeMirror.Pos(pos.line, pos.ch + 1)};
-    }
-
-    for (var i = ranges.length - 1; i >= 0; i--) {
-      var info = replacements[i];
-      cm.replaceRange(info.text, ranges[i].head, ranges[i].anchor, "+insert");
-      var sel = cm.listSelections().slice(0);
-      sel[i] = {head: info.newPos, anchor: info.newPos};
-      cm.setSelections(sel);
-      if (info.indent) {
-        cm.indentLine(info.newPos.line, null, true);
-        cm.indentLine(info.newPos.line + 1, null, true);
-      }
-    }
-  }
-
-  function autoCloseSlash(cm) {
-    if (cm.getOption("disableInput")) return CodeMirror.Pass;
-    var ranges = cm.listSelections(), replacements = [];
-    for (var i = 0; i < ranges.length; i++) {
-      if (!ranges[i].empty()) return CodeMirror.Pass;
-      var pos = ranges[i].head, tok = cm.getTokenAt(pos);
-      var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;
-      if (tok.type == "string" || tok.string.charAt(0) != "<" ||
-          tok.start != pos.ch - 1)
-        return CodeMirror.Pass;
-      // Kludge to get around the fact that we are not in XML mode
-      // when completing in JS/CSS snippet in htmlmixed mode. Does not
-      // work for other XML embedded languages (there is no general
-      // way to go from a mixed mode to its current XML state).
-      if (inner.mode.name != "xml") {
-        if (cm.getMode().name == "htmlmixed" && inner.mode.name == "javascript")
-          replacements[i] = "/script>";
-        else if (cm.getMode().name == "htmlmixed" && inner.mode.name == "css")
-          replacements[i] = "/style>";
-        else
-          return CodeMirror.Pass;
-      } else {
-        if (!state.context || !state.context.tagName ||
-            closingTagExists(cm, state.context.tagName, pos, state))
-          return CodeMirror.Pass;
-        replacements[i] = "/" + state.context.tagName + ">";
-      }
-    }
-    cm.replaceSelections(replacements);
-    ranges = cm.listSelections();
-    for (var i = 0; i < ranges.length; i++)
-      if (i == ranges.length - 1 || ranges[i].head.line < ranges[i + 1].head.line)
-        cm.indentLine(ranges[i].head.line);
-  }
-
-  function indexOf(collection, elt) {
-    if (collection.indexOf) return collection.indexOf(elt);
-    for (var i = 0, e = collection.length; i < e; ++i)
-      if (collection[i] == elt) return i;
-    return -1;
-  }
-
-  // If xml-fold is loaded, we use its functionality to try and verify
-  // whether a given tag is actually unclosed.
-  function closingTagExists(cm, tagName, pos, state, newTag) {
-    if (!CodeMirror.scanForClosingTag) return false;
-    var end = Math.min(cm.lastLine() + 1, pos.line + 500);
-    var nextClose = CodeMirror.scanForClosingTag(cm, pos, null, end);
-    if (!nextClose || nextClose.tag != tagName) return false;
-    var cx = state.context;
-    // If the immediate wrapping context contains onCx instances of
-    // the same tag, a closing tag only exists if there are at least
-    // that many closing tags of that type following.
-    for (var onCx = newTag ? 1 : 0; cx && cx.tagName == tagName; cx = cx.prev) ++onCx;
-    pos = nextClose.to;
-    for (var i = 1; i < onCx; i++) {
-      var next = CodeMirror.scanForClosingTag(cm, pos, null, end);
-      if (!next || next.tag != tagName) return false;
-      pos = next.to;
-    }
-    return true;
-  }
-});
diff --git a/public/js/lib/codemirror/addon/edit/continuelist.js b/public/js/lib/codemirror/addon/edit/continuelist.js
deleted file mode 100644
index ca8d267..0000000
--- a/public/js/lib/codemirror/addon/edit/continuelist.js
+++ /dev/null
@@ -1,51 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  var listRE = /^(\s*)(>[> ]*|[*+-]\s|(\d+)\.)(\s*)/,
-      emptyListRE = /^(\s*)(>[> ]*|[*+-]|(\d+)\.)(\s*)$/,
-      unorderedListRE = /[*+-]\s/;
-
-  CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) {
-    if (cm.getOption("disableInput")) return CodeMirror.Pass;
-    var ranges = cm.listSelections(), replacements = [];
-    for (var i = 0; i < ranges.length; i++) {
-      var pos = ranges[i].head, match;
-      var eolState = cm.getStateAfter(pos.line);
-      var inList = eolState.list !== false;
-      var inQuote = eolState.quote !== false;
-
-      if (!ranges[i].empty() || (!inList && !inQuote) || !(match = cm.getLine(pos.line).match(listRE))) {
-        cm.execCommand("newlineAndIndent");
-        return;
-      }
-      if (cm.getLine(pos.line).match(emptyListRE)) {
-        cm.replaceRange("", {
-          line: pos.line, ch: 0
-        }, {
-          line: pos.line, ch: pos.ch + 1
-        });
-        replacements[i] = "\n";
-
-      } else {
-        var indent = match[1], after = match[4];
-        var bullet = unorderedListRE.test(match[2]) || match[2].indexOf(">") >= 0
-          ? match[2]
-          : (parseInt(match[3], 10) + 1) + ".";
-
-        replacements[i] = "\n" + indent + bullet + after;
-      }
-    }
-
-    cm.replaceSelections(replacements);
-  };
-});
diff --git a/public/js/lib/codemirror/addon/edit/matchbrackets.js b/public/js/lib/codemirror/addon/edit/matchbrackets.js
deleted file mode 100644
index fa1ae03..0000000
--- a/public/js/lib/codemirror/addon/edit/matchbrackets.js
+++ /dev/null
@@ -1,120 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  var ie_lt8 = /MSIE \d/.test(navigator.userAgent) &&
-    (document.documentMode == null || document.documentMode < 8);
-
-  var Pos = CodeMirror.Pos;
-
-  var matching = {"(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<"};
-
-  function findMatchingBracket(cm, where, strict, config) {
-    var line = cm.getLineHandle(where.line), pos = where.ch - 1;
-    var match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)];
-    if (!match) return null;
-    var dir = match.charAt(1) == ">" ? 1 : -1;
-    if (strict && (dir > 0) != (pos == where.ch)) return null;
-    var style = cm.getTokenTypeAt(Pos(where.line, pos + 1));
-
-    var found = scanForBracket(cm, Pos(where.line, pos + (dir > 0 ? 1 : 0)), dir, style || null, config);
-    if (found == null) return null;
-    return {from: Pos(where.line, pos), to: found && found.pos,
-            match: found && found.ch == match.charAt(0), forward: dir > 0};
-  }
-
-  // bracketRegex is used to specify which type of bracket to scan
-  // should be a regexp, e.g. /[[\]]/
-  //
-  // Note: If "where" is on an open bracket, then this bracket is ignored.
-  //
-  // Returns false when no bracket was found, null when it reached
-  // maxScanLines and gave up
-  function scanForBracket(cm, where, dir, style, config) {
-    var maxScanLen = (config && config.maxScanLineLength) || 10000;
-    var maxScanLines = (config && config.maxScanLines) || 1000;
-
-    var stack = [];
-    var re = config && config.bracketRegex ? config.bracketRegex : /[(){}[\]]/;
-    var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1)
-                          : Math.max(cm.firstLine() - 1, where.line - maxScanLines);
-    for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) {
-      var line = cm.getLine(lineNo);
-      if (!line) continue;
-      var pos = dir > 0 ? 0 : line.length - 1, end = dir > 0 ? line.length : -1;
-      if (line.length > maxScanLen) continue;
-      if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0);
-      for (; pos != end; pos += dir) {
-        var ch = line.charAt(pos);
-        if (re.test(ch) && (style === undefined || cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style)) {
-          var match = matching[ch];
-          if ((match.charAt(1) == ">") == (dir > 0)) stack.push(ch);
-          else if (!stack.length) return {pos: Pos(lineNo, pos), ch: ch};
-          else stack.pop();
-        }
-      }
-    }
-    return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null;
-  }
-
-  function matchBrackets(cm, autoclear, config) {
-    // Disable brace matching in long lines, since it'll cause hugely slow updates
-    var maxHighlightLen = cm.state.matchBrackets.maxHighlightLineLength || 1000;
-    var marks = [], ranges = cm.listSelections();
-    for (var i = 0; i < ranges.length; i++) {
-      var match = ranges[i].empty() && findMatchingBracket(cm, ranges[i].head, false, config);
-      if (match && cm.getLine(match.from.line).length <= maxHighlightLen) {
-        var style = match.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket";
-        marks.push(cm.markText(match.from, Pos(match.from.line, match.from.ch + 1), {className: style}));
-        if (match.to && cm.getLine(match.to.line).length <= maxHighlightLen)
-          marks.push(cm.markText(match.to, Pos(match.to.line, match.to.ch + 1), {className: style}));
-      }
-    }
-
-    if (marks.length) {
-      // Kludge to work around the IE bug from issue #1193, where text
-      // input stops going to the textare whever this fires.
-      if (ie_lt8 && cm.state.focused) cm.display.input.focus();
-
-      var clear = function() {
-        cm.operation(function() {
-          for (var i = 0; i < marks.length; i++) marks[i].clear();
-        });
-      };
-      if (autoclear) setTimeout(clear, 800);
-      else return clear;
-    }
-  }
-
-  var currentlyHighlighted = null;
-  function doMatchBrackets(cm) {
-    cm.operation(function() {
-      if (currentlyHighlighted) {currentlyHighlighted(); currentlyHighlighted = null;}
-      currentlyHighlighted = matchBrackets(cm, false, cm.state.matchBrackets);
-    });
-  }
-
-  CodeMirror.defineOption("matchBrackets", false, function(cm, val, old) {
-    if (old && old != CodeMirror.Init)
-      cm.off("cursorActivity", doMatchBrackets);
-    if (val) {
-      cm.state.matchBrackets = typeof val == "object" ? val : {};
-      cm.on("cursorActivity", doMatchBrackets);
-    }
-  });
-
-  CodeMirror.defineExtension("matchBrackets", function() {matchBrackets(this, true);});
-  CodeMirror.defineExtension("findMatchingBracket", function(pos, strict, config){
-    return findMatchingBracket(this, pos, strict, config);
-  });
-  CodeMirror.defineExtension("scanForBracket", function(pos, dir, style, config){
-    return scanForBracket(this, pos, dir, style, config);
-  });
-});
diff --git a/public/js/lib/codemirror/addon/edit/matchtags.js b/public/js/lib/codemirror/addon/edit/matchtags.js
deleted file mode 100644
index fb1911a..0000000
--- a/public/js/lib/codemirror/addon/edit/matchtags.js
+++ /dev/null
@@ -1,66 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"), require("../fold/xml-fold"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror", "../fold/xml-fold"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  CodeMirror.defineOption("matchTags", false, function(cm, val, old) {
-    if (old && old != CodeMirror.Init) {
-      cm.off("cursorActivity", doMatchTags);
-      cm.off("viewportChange", maybeUpdateMatch);
-      clear(cm);
-    }
-    if (val) {
-      cm.state.matchBothTags = typeof val == "object" && val.bothTags;
-      cm.on("cursorActivity", doMatchTags);
-      cm.on("viewportChange", maybeUpdateMatch);
-      doMatchTags(cm);
-    }
-  });
-
-  function clear(cm) {
-    if (cm.state.tagHit) cm.state.tagHit.clear();
-    if (cm.state.tagOther) cm.state.tagOther.clear();
-    cm.state.tagHit = cm.state.tagOther = null;
-  }
-
-  function doMatchTags(cm) {
-    cm.state.failedTagMatch = false;
-    cm.operation(function() {
-      clear(cm);
-      if (cm.somethingSelected()) return;
-      var cur = cm.getCursor(), range = cm.getViewport();
-      range.from = Math.min(range.from, cur.line); range.to = Math.max(cur.line + 1, range.to);
-      var match = CodeMirror.findMatchingTag(cm, cur, range);
-      if (!match) return;
-      if (cm.state.matchBothTags) {
-        var hit = match.at == "open" ? match.open : match.close;
-        if (hit) cm.state.tagHit = cm.markText(hit.from, hit.to, {className: "CodeMirror-matchingtag"});
-      }
-      var other = match.at == "close" ? match.open : match.close;
-      if (other)
-        cm.state.tagOther = cm.markText(other.from, other.to, {className: "CodeMirror-matchingtag"});
-      else
-        cm.state.failedTagMatch = true;
-    });
-  }
-
-  function maybeUpdateMatch(cm) {
-    if (cm.state.failedTagMatch) doMatchTags(cm);
-  }
-
-  CodeMirror.commands.toMatchingTag = function(cm) {
-    var found = CodeMirror.findMatchingTag(cm, cm.getCursor());
-    if (found) {
-      var other = found.at == "close" ? found.open : found.close;
-      if (other) cm.extendSelection(other.to, other.from);
-    }
-  };
-});
diff --git a/public/js/lib/codemirror/addon/edit/trailingspace.js b/public/js/lib/codemirror/addon/edit/trailingspace.js
deleted file mode 100644
index fa7b56b..0000000
--- a/public/js/lib/codemirror/addon/edit/trailingspace.js
+++ /dev/null
@@ -1,27 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  CodeMirror.defineOption("showTrailingSpace", false, function(cm, val, prev) {
-    if (prev == CodeMirror.Init) prev = false;
-    if (prev && !val)
-      cm.removeOverlay("trailingspace");
-    else if (!prev && val)
-      cm.addOverlay({
-        token: function(stream) {
-          for (var l = stream.string.length, i = l; i && /\s/.test(stream.string.charAt(i - 1)); --i) {}
-          if (i > stream.pos) { stream.pos = i; return null; }
-          stream.pos = l;
-          return "trailingspace";
-        },
-        name: "trailingspace"
-      });
-  });
-});
diff --git a/public/js/lib/codemirror/addon/emmet/emmet.js b/public/js/lib/codemirror/addon/emmet/emmet.js
deleted file mode 100644
index a5e8042..0000000
--- a/public/js/lib/codemirror/addon/emmet/emmet.js
+++ /dev/null
@@ -1,43080 +0,0 @@
-!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var o;"undefined"!=typeof window?o=window:"undefined"!=typeof global?o=global:"undefined"!=typeof self&&(o=self),o.emmetCodeMirror=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
-"use strict";
-
-var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
-
-var _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
-
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
-
-Object.defineProperty(exports, "__esModule", {
-	value: true
-});
-/**
- * Emmet Editor interface implementation for CodeMirror.
- * Interface is optimized for multiple cursor usage: authors
- * should run acttion multiple times and update `selectionIndex`
- * property on each iteration.
- */
-
-var emmet = _interopRequire(require("./emmet"));
-
-var modeMap = {
-	"text/html": "html",
-	"application/xml": "xml",
-	"text/xsl": "xsl",
-	"text/css": "css",
-	"text/x-less": "less",
-	"text/x-scss": "scss",
-	"text/x-sass": "sass"
-};
-
-exports.modeMap = modeMap;
-
-var EmmetEditor = (function () {
-	function EmmetEditor(ctx) {
-		var selIndex = arguments[1] === undefined ? 0 : arguments[1];
-
-		_classCallCheck(this, EmmetEditor);
-
-		this.context = ctx;
-		this.selectionIndex = selIndex || 0;
-	}
-
-	_createClass(EmmetEditor, {
-		selectionList: {
-
-			/**
-    * Returns list of selections for current CodeMirror instance. 
-    * @return {Array}
-    */
-
-			value: function selectionList() {
-				var cm = this.context;
-				return cm.listSelections().map(function (sel) {
-					var anchor = posToIndex(cm, sel.anchor);
-					var head = posToIndex(cm, sel.head);
-
-					return {
-						start: Math.min(anchor, head),
-						end: Math.max(anchor, head)
-					};
-				});
-			}
-		},
-		getCaretPos: {
-			value: function getCaretPos() {
-				return this.getSelectionRange().start;
-			}
-		},
-		setCaretPos: {
-			value: function setCaretPos(pos) {
-				this.createSelection(pos);
-			}
-		},
-		getSelectionRange: {
-
-			/**
-    * Returns current selection range (for current selection index)
-    * @return {Object}
-    */
-
-			value: function getSelectionRange() {
-				return this.selectionList()[this.selectionIndex];
-			}
-		},
-		createSelection: {
-			value: function createSelection(start, end) {
-				if (typeof end == "undefined") {
-					end = start;
-				}
-
-				var sels = this.selectionList();
-				var cm = this.context;
-				sels[this.selectionIndex] = { start: start, end: end };
-				this.context.setSelections(sels.map(function (sel) {
-					return {
-						head: indexToPos(cm, sel.start),
-						anchor: indexToPos(cm, sel.end)
-					};
-				}));
-			}
-		},
-		getSelection: {
-
-			/**
-    * Returns current selection
-    * @return {String}
-    */
-
-			value: function getSelection() {
-				var sel = this.getSelectionRange();
-				sel.start = indexToPos(this.context, sel.start);
-				sel.end = indexToPos(this.context, sel.end);
-				return this.context.getRange(sel.start, sel.end);
-			}
-		},
-		getCurrentLineRange: {
-			value: function getCurrentLineRange() {
-				var caret = indexToPos(this.context, this.getCaretPos());
-				return {
-					start: posToIndex(this.context, caret.line, 0),
-					end: posToIndex(this.context, caret.line, this.context.getLine(caret.line).length)
-				};
-			}
-		},
-		getCurrentLine: {
-			value: function getCurrentLine() {
-				var caret = indexToPos(this.context, this.getCaretPos());
-				return this.context.getLine(caret.line) || "";
-			}
-		},
-		replaceContent: {
-			value: function replaceContent(value, start, end, noIndent) {
-				if (typeof end == "undefined") {
-					end = typeof start == "undefined" ? this.getContent().length : start;
-				}
-				if (typeof start == "undefined") {
-					start = 0;
-				}
-
-				// normalize indentation according to editor preferences
-				value = this.normalize(value);
-
-				// indent new value
-				if (!noIndent) {
-					value = emmet.utils.common.padString(value, emmet.utils.common.getLinePaddingFromPosition(this.getContent(), start));
-				}
-
-				// find new caret position
-				var tabstopData = emmet.tabStops.extract(value, { escape: function (ch) {
-						return ch;
-					} });
-				value = tabstopData.text;
-
-				var firstTabStop = tabstopData.tabstops[0] || { start: value.length, end: value.length };
-				firstTabStop.start += start;
-				firstTabStop.end += start;
-
-				this.context.replaceRange(value, indexToPos(this.context, start), indexToPos(this.context, end));
-				this.createSelection(firstTabStop.start, firstTabStop.end);
-			}
-		},
-		normalize: {
-
-			/**
-    * Normalizes string indentation in given string
-    * according to editor preferences
-    * @param  {String} str
-    * @return {String}
-    */
-
-			value: function normalize(str) {
-				var indent = "\t";
-				var ctx = this.context;
-				if (!ctx.getOption("indentWithTabs")) {
-					indent = emmet.utils.common.repeatString(" ", ctx.getOption("indentUnit"));
-				}
-
-				return emmet.utils.editor.normalize(str, {
-					indentation: indent
-				});
-			}
-		},
-		getContent: {
-			value: function getContent() {
-				return this.context.getValue();
-			}
-		},
-		getSyntax: {
-			value: function getSyntax() {
-				var editor = this.context;
-				var pos = editor.posFromIndex(this.getCaretPos());
-				var mode = editor.getModeAt(editor.getCursor());
-				var syntax = mode.name;
-				if (syntax === "xml" && mode.configuration) {
-					syntax = mode.configuration;
-				}
-
-				return syntax || emmet.utils.action.detectSyntax(this, syntax);
-			}
-		},
-		getProfileName: {
-
-			/**
-    * Returns current output profile name (@see emmet#setupProfile)
-    * @return {String}
-    */
-
-			value: function getProfileName() {
-				if (this.context.getOption("profile")) {
-					return this.context.getOption("profile");
-				}
-
-				return emmet.utils.action.detectProfile(this);
-			}
-		},
-		prompt: {
-
-			/**
-    * Ask user to enter something
-    * @param {String} title Dialog title
-    * @return {String} Entered data
-    */
-
-			value: (function (_prompt) {
-				var _promptWrapper = function prompt(_x) {
-					return _prompt.apply(this, arguments);
-				};
-
-				_promptWrapper.toString = function () {
-					return _prompt.toString();
-				};
-
-				return _promptWrapper;
-			})(function (title) {
-				return prompt(title);
-			})
-		},
-		getFilePath: {
-
-			/**
-    * Returns current editor's file path
-    * @return {String}
-    */
-
-			value: function getFilePath() {
-				return location.href;
-			}
-		},
-		isValidSyntax: {
-
-			/**
-    * Check if current editor syntax is valid, e.g. is supported by Emmet
-    * @return {Boolean}
-    */
-
-			value: function isValidSyntax() {
-				return emmet.resources.hasSyntax(this.getSyntax());
-			}
-		}
-	});
-
-	return EmmetEditor;
-})();
-
-exports["default"] = EmmetEditor;
-
-/**
- * Converts CM’s inner representation of character
- * position (line, ch) to character index in text
- * @param  {CodeMirror} cm  CodeMirror instance
- * @param  {Object}     pos Position object
- * @return {Number}
- */
-function posToIndex(cm, pos) {
-	if (arguments.length > 2 && typeof pos !== "object") {
-		pos = { line: arguments[1], ch: arguments[2] };
-	}
-	return cm.indexFromPos(pos);
-}
-
-/**
- * Converts charater index in text to CM’s internal object representation
- * @param  {CodeMirror} cm CodeMirror instance
- * @param  {Number}     ix Character index in CM document
- * @return {Object}
- */
-function indexToPos(cm, ix) {
-	return cm.posFromIndex(ix);
-}
-},{"./emmet":2}],2:[function(require,module,exports){
-"use strict";
-
-var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
-
-var emmet = _interopRequire(require("emmet"));
-
-require("emmet/bundles/snippets");
-
-require("emmet/bundles/caniuse");
-
-module.exports = emmet;
-},{"emmet":39,"emmet/bundles/caniuse":3,"emmet/bundles/snippets":4}],3:[function(require,module,exports){
-/**
- * Bundler, used in builder script to statically
- * include optimized caniuse.json into bundle
- */
-var ciu = require('../lib/assets/caniuse');
-var db = require('../lib/caniuse.json');
-ciu.load(db, true);
-},{"../lib/assets/caniuse":23,"../lib/caniuse.json":35}],4:[function(require,module,exports){
-/**
- * Bundler, used in builder script to statically
- * include snippets.json into bundle
- */
-var res = require('../lib/assets/resources');
-var snippets = require('../lib/snippets.json');
-res.setVocabulary(snippets, 'system');
-
-},{"../lib/assets/resources":31,"../lib/snippets.json":68}],5:[function(require,module,exports){
-/**
- * HTML pair matching (balancing) actions
- * @constructor
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var htmlMatcher = require('../assets/htmlMatcher');
-	var utils = require('../utils/common');
-	var editorUtils = require('../utils/editor');
-	var actionUtils = require('../utils/action');
-	var range = require('../assets/range');
-	var cssEditTree = require('../editTree/css');
-	var cssSections = require('../utils/cssSections');
-	var lastMatch = null;
-
-	function last(arr) {
-		return arr[arr.length - 1];
-	}
-
-	function balanceHTML(editor, direction) {
-		var info = editorUtils.outputInfo(editor);
-		var content = info.content;
-		var sel = range(editor.getSelectionRange());
-		
-		// validate previous match
-		if (lastMatch && !lastMatch.range.equal(sel)) {
-			lastMatch = null;
-		}
-		
-		if (lastMatch && sel.length()) {
-			if (direction == 'in') {
-				// user has previously selected tag and wants to move inward
-				if (lastMatch.type == 'tag' && !lastMatch.close) {
-					// unary tag was selected, can't move inward
-					return false;
-				} else {
-					if (lastMatch.range.equal(lastMatch.outerRange)) {
-						lastMatch.range = lastMatch.innerRange;
-					} else {
-						var narrowed = utils.narrowToNonSpace(content, lastMatch.innerRange);
-						lastMatch = htmlMatcher.find(content, narrowed.start + 1);
-						if (lastMatch && lastMatch.range.equal(sel) && lastMatch.outerRange.equal(sel)) {
-							lastMatch.range = lastMatch.innerRange;
-						}
-					}
-				}
-			} else {
-				if (
-					!lastMatch.innerRange.equal(lastMatch.outerRange) 
-					&& lastMatch.range.equal(lastMatch.innerRange) 
-					&& sel.equal(lastMatch.range)) {
-					lastMatch.range = lastMatch.outerRange;
-				} else {
-					lastMatch = htmlMatcher.find(content, sel.start);
-					if (lastMatch && lastMatch.range.equal(sel) && lastMatch.innerRange.equal(sel)) {
-						lastMatch.range = lastMatch.outerRange;
-					}
-				}
-			}
-		} else {
-			lastMatch = htmlMatcher.find(content, sel.start);
-		}
-
-		if (lastMatch) {
-			if (lastMatch.innerRange.equal(sel)) {
-				lastMatch.range = lastMatch.outerRange;
-			}
-
-			if (!lastMatch.range.equal(sel)) {
-				editor.createSelection(lastMatch.range.start, lastMatch.range.end);
-				return true;
-			}
-		}
-		
-		lastMatch = null;
-		return false;
-	}
-
-	function rangesForCSSRule(rule, pos) {
-		// find all possible ranges
-		var ranges = [rule.range(true)];
-
-		// braces content
-		ranges.push(rule.valueRange(true));
-
-		// find nested sections
-		var nestedSections = cssSections.nestedSectionsInRule(rule);
-
-		// real content, e.g. from first property name to
-		// last property value
-		var items = rule.list();
-		if (items.length || nestedSections.length) {
-			var start = Number.POSITIVE_INFINITY, end = -1;
-			if (items.length) {
-				start = items[0].namePosition(true);
-				end = last(items).range(true).end;
-			}
-
-			if (nestedSections.length) {
-				if (nestedSections[0].start < start) {
-					start = nestedSections[0].start;
-				}
-
-				if (last(nestedSections).end > end) {
-					end = last(nestedSections).end;
-				}
-			}
-
-			ranges.push(range.create2(start, end));
-		}
-
-		ranges = ranges.concat(nestedSections);
-
-		var prop = cssEditTree.propertyFromPosition(rule, pos) || items[0];
-		if (prop) {
-			ranges.push(prop.range(true));
-			var valueRange = prop.valueRange(true);
-			if (!prop.end()) {
-				valueRange._unterminated = true;
-			}
-			ranges.push(valueRange);
-		}
-
-		return ranges;
-	}
-
-	/**
-	 * Returns all possible selection ranges for given caret position
-	 * @param  {String} content CSS content
-	 * @param  {Number} pos     Caret position(where to start searching)
-	 * @return {Array}
-	 */
-	function getCSSRanges(content, pos) {
-		var rule;
-		if (typeof content === 'string') {
-			var ruleRange = cssSections.matchEnclosingRule(content, pos);
-			if (ruleRange) {
-				rule = cssEditTree.parse(ruleRange.substring(content), {
-					offset: ruleRange.start
-				});
-			}
-		} else {
-			// passed parsed CSS rule
-			rule = content;
-		}
-
-		if (!rule) {
-			return null;
-		}
-
-		// find all possible ranges
-		var ranges = rangesForCSSRule(rule, pos);
-
-		// remove empty ranges
-		ranges = ranges.filter(function(item) {
-			return !!item.length;
-		});
-
-		return utils.unique(ranges, function(item) {
-			return item.valueOf();
-		});
-	}
-
-	function balanceCSS(editor, direction) {
-		var info = editorUtils.outputInfo(editor);
-		var content = info.content;
-		var sel = range(editor.getSelectionRange());
-
-		var ranges = getCSSRanges(info.content, sel.start);
-		if (!ranges && sel.length()) {
-			// possible reason: user has already selected
-			// CSS rule from last match
-			try {
-				var rule = cssEditTree.parse(sel.substring(info.content), {
-					offset: sel.start
-				});
-				ranges = getCSSRanges(rule, sel.start);
-			} catch(e) {}
-		}
-
-		if (!ranges) {
-			return false;
-		}
-
-		ranges = range.sort(ranges, true);
-
-		// edge case: find match that equals current selection,
-		// in case if user moves inward after selecting full CSS rule
-		var bestMatch = utils.find(ranges, function(r) {
-			return r.equal(sel);
-		});
-
-		if (!bestMatch) {
-			bestMatch = utils.find(ranges, function(r) {
-				// Check for edge case: caret right after CSS value
-				// but it doesn‘t contains terminating semicolon.
-				// In this case we have to check full value range
-				return r._unterminated ? r.include(sel.start) : r.inside(sel.start);
-			});
-		}
-
-		if (!bestMatch) {
-			return false;
-		}
-
-		// if best match equals to current selection, move index
-		// one position up or down, depending on direction
-		var bestMatchIx = ranges.indexOf(bestMatch);
-		if (bestMatch.equal(sel)) {
-			bestMatchIx += direction == 'out' ? 1 : -1;
-		}
-
-		if (bestMatchIx < 0 || bestMatchIx >= ranges.length) {
-			if (bestMatchIx >= ranges.length && direction == 'out') {
-				pos = bestMatch.start - 1;
-
-				var outerRanges = getCSSRanges(content, pos);
-				if (outerRanges) {
-					bestMatch = last(outerRanges.filter(function(r) {
-						return r.inside(pos);
-					}));
-				}
-			} else if (bestMatchIx < 0 && direction == 'in') {
-				bestMatch = null;
-			} else {
-				bestMatch = null;
-			}
-		} else {
-			bestMatch = ranges[bestMatchIx];	
-		}
-
-		if (bestMatch) {
-			editor.createSelection(bestMatch.start, bestMatch.end);
-			return true;
-		}
-		
-		return false;
-	}
-	
-	return {
-		/**
-		 * Find and select HTML tag pair
-		 * @param {IEmmetEditor} editor Editor instance
-		 * @param {String} direction Direction of pair matching: 'in' or 'out'. 
-		 * Default is 'out'
-		 */
-		balance: function(editor, direction) {
-			direction = String((direction || 'out').toLowerCase());
-			var info = editorUtils.outputInfo(editor);
-			if (actionUtils.isSupportedCSS(info.syntax)) {
-				return balanceCSS(editor, direction);
-			}
-			
-			return balanceHTML(editor, direction);
-		},
-
-		balanceInwardAction: function(editor) {
-			return this.balance(editor, 'in');
-		},
-
-		balanceOutwardAction: function(editor) {
-			return this.balance(editor, 'out');	
-		},
-
-		/**
-		 * Moves caret to matching opening or closing tag
-		 * @param {IEmmetEditor} editor
-		 */
-		goToMatchingPairAction: function(editor) {
-			var content = String(editor.getContent());
-			var caretPos = editor.getCaretPos();
-			
-			if (content.charAt(caretPos) == '<') 
-				// looks like caret is outside of tag pair  
-				caretPos++;
-				
-			var tag = htmlMatcher.tag(content, caretPos);
-			if (tag && tag.close) { // exclude unary tags
-				if (tag.open.range.inside(caretPos)) {
-					editor.setCaretPos(tag.close.range.start);
-				} else {
-					editor.setCaretPos(tag.open.range.start);
-				}
-				
-				return true;
-			}
-			
-			return false;
-		}
-	};
-});
-},{"../assets/htmlMatcher":26,"../assets/range":30,"../editTree/css":37,"../utils/action":70,"../utils/common":73,"../utils/cssSections":74,"../utils/editor":75}],6:[function(require,module,exports){
-/**
- * Encodes/decodes image under cursor to/from base64
- * @param {IEmmetEditor} editor
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var file = require('../plugin/file');
-	var base64 = require('../utils/base64');
-	var actionUtils = require('../utils/action');
-	var editorUtils = require('../utils/editor');
-	
-	/**
-	 * Test if <code>text</code> starts with <code>token</code> at <code>pos</code>
-	 * position. If <code>pos</code> is omitted, search from beginning of text 
-	 * @param {String} token Token to test
-	 * @param {String} text Where to search
-	 * @param {Number} pos Position where to start search
-	 * @return {Boolean}
-	 * @since 0.65
-	 */
-	function startsWith(token, text, pos) {
-		pos = pos || 0;
-		return text.charAt(pos) == token.charAt(0) && text.substr(pos, token.length) == token;
-	}
-	
-	/**
-	 * Encodes image to base64
-	 * 
-	 * @param {IEmmetEditor} editor
-	 * @param {String} imgPath Path to image
-	 * @param {Number} pos Caret position where image is located in the editor
-	 * @return {Boolean}
-	 */
-	function encodeToBase64(editor, imgPath, pos) {
-		var editorFile = editor.getFilePath();
-		var defaultMimeType = 'application/octet-stream';
-			
-		if (editorFile === null) {
-			throw "You should save your file before using this action";
-		}
-		
-		// locate real image path
-		var realImgPath = file.locateFile(editorFile, imgPath);
-		if (realImgPath === null) {
-			throw "Can't find " + imgPath + ' file';
-		}
-		
-		file.read(realImgPath, function(err, content) {
-			if (err) {
-				throw 'Unable to read ' + realImgPath + ': ' + err;
-			}
-			
-			var b64 = base64.encode(String(content));
-			if (!b64) {
-				throw "Can't encode file content to base64";
-			}
-			
-			b64 = 'data:' + (actionUtils.mimeTypes[String(file.getExt(realImgPath))] || defaultMimeType) +
-				';base64,' + b64;
-				
-			editor.replaceContent('$0' + b64, pos, pos + imgPath.length);
-		});
-		
-		return true;
-	}
-
-	/**
-	 * Decodes base64 string back to file.
-	 * @param {IEmmetEditor} editor
-	 * @param {String} data Base64-encoded file content
-	 * @param {Number} pos Caret position where image is located in the editor
-	 */
-	function decodeFromBase64(editor, data, pos) {
-		// ask user to enter path to file
-		var filePath = String(editor.prompt('Enter path to file (absolute or relative)'));
-		if (!filePath)
-			return false;
-			
-		var absPath = file.createPath(editor.getFilePath(), filePath);
-		if (!absPath) {
-			throw "Can't save file";
-		}
-		
-		file.save(absPath, base64.decode( data.replace(/^data\:.+?;.+?,/, '') ));
-		editor.replaceContent('$0' + filePath, pos, pos + data.length);
-		return true;
-	}
-
-	return {
-		/**
-		 * Action to encode or decode file to data:url
-		 * @param  {IEmmetEditor} editor  Editor instance
-		 * @param  {String} syntax  Current document syntax
-		 * @param  {String} profile Output profile name
-		 * @return {Boolean}
-		 */
-		encodeDecodeDataUrlAction: function(editor) {
-			var data = String(editor.getSelection());
-			var caretPos = editor.getCaretPos();
-			var info = editorUtils.outputInfo(editor);
-				
-			if (!data) {
-				// no selection, try to find image bounds from current caret position
-				var text = info.content, m;
-				while (caretPos-- >= 0) {
-					if (startsWith('src=', text, caretPos)) { // found <img src="">
-						if ((m = text.substr(caretPos).match(/^(src=(["'])?)([^'"<>\s]+)\1?/))) {
-							data = m[3];
-							caretPos += m[1].length;
-						}
-						break;
-					} else if (startsWith('url(', text, caretPos)) { // found CSS url() pattern
-						if ((m = text.substr(caretPos).match(/^(url\((['"])?)([^'"\)\s]+)\1?/))) {
-							data = m[3];
-							caretPos += m[1].length;
-						}
-						break;
-					}
-				}
-			}
-			
-			if (data) {
-				if (startsWith('data:', data)) {
-					return decodeFromBase64(editor, data, caretPos);
-				} else {
-					return encodeToBase64(editor, data, caretPos);
-				}
-			}
-			
-			return false;
-		}
-	};
-});
-
-},{"../plugin/file":63,"../utils/action":70,"../utils/base64":71,"../utils/editor":75}],7:[function(require,module,exports){
-/**
- * Move between next/prev edit points. 'Edit points' are places between tags 
- * and quotes of empty attributes in html
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	/**
-	 * Search for new caret insertion point
-	 * @param {IEmmetEditor} editor Editor instance
-	 * @param {Number} inc Search increment: -1 — search left, 1 — search right
-	 * @param {Number} offset Initial offset relative to current caret position
-	 * @return {Number} Returns -1 if insertion point wasn't found
-	 */
-	function findNewEditPoint(editor, inc, offset) {
-		inc = inc || 1;
-		offset = offset || 0;
-		
-		var curPoint = editor.getCaretPos() + offset;
-		var content = String(editor.getContent());
-		var maxLen = content.length;
-		var nextPoint = -1;
-		var reEmptyLine = /^\s+$/;
-		
-		function getLine(ix) {
-			var start = ix;
-			while (start >= 0) {
-				var c = content.charAt(start);
-				if (c == '\n' || c == '\r')
-					break;
-				start--;
-			}
-			
-			return content.substring(start, ix);
-		}
-			
-		while (curPoint <= maxLen && curPoint >= 0) {
-			curPoint += inc;
-			var curChar = content.charAt(curPoint);
-			var nextChar = content.charAt(curPoint + 1);
-			var prevChar = content.charAt(curPoint - 1);
-				
-			switch (curChar) {
-				case '"':
-				case '\'':
-					if (nextChar == curChar && prevChar == '=') {
-						// empty attribute
-						nextPoint = curPoint + 1;
-					}
-					break;
-				case '>':
-					if (nextChar == '<') {
-						// between tags
-						nextPoint = curPoint + 1;
-					}
-					break;
-				case '\n':
-				case '\r':
-					// empty line
-					if (reEmptyLine.test(getLine(curPoint - 1))) {
-						nextPoint = curPoint;
-					}
-					break;
-			}
-			
-			if (nextPoint != -1)
-				break;
-		}
-		
-		return nextPoint;
-	}
-	
-	return {
-		/**
-		 * Move to previous edit point
-		 * @param  {IEmmetEditor} editor  Editor instance
-		 * @param  {String} syntax  Current document syntax
-		 * @param  {String} profile Output profile name
-		 * @return {Boolean}
-		 */
-		previousEditPointAction: function(editor, syntax, profile) {
-			var curPos = editor.getCaretPos();
-			var newPoint = findNewEditPoint(editor, -1);
-				
-			if (newPoint == curPos)
-				// we're still in the same point, try searching from the other place
-				newPoint = findNewEditPoint(editor, -1, -2);
-			
-			if (newPoint != -1) {
-				editor.setCaretPos(newPoint);
-				return true;
-			}
-			
-			return false;
-		},
-
-		/**
-		 * Move to next edit point
-		 * @param  {IEmmetEditor} editor  Editor instance
-		 * @param  {String} syntax  Current document syntax
-		 * @param  {String} profile Output profile name
-		 * @return {Boolean}
-		 */
-		nextEditPointAction: function(editor, syntax, profile) {
-			var newPoint = findNewEditPoint(editor, 1);
-			if (newPoint != -1) {
-				editor.setCaretPos(newPoint);
-				return true;
-			}
-			
-			return false;
-		}
-	};
-});
-},{}],8:[function(require,module,exports){
-/**
- * Evaluates simple math expression under caret
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var actionUtils = require('../utils/action');
-	var utils = require('../utils/common');
-	var math = require('../utils/math');
-	var range = require('../assets/range');
-
-	return {
-		/**
-		 * Evaluates math expression under the caret
-		 * @param  {IEmmetEditor} editor
-		 * @return {Boolean}
-		 */
-		evaluateMathAction: function(editor) {
-			var content = editor.getContent();
-			var chars = '.+-*/\\';
-			
-			/** @type Range */
-			var sel = range(editor.getSelectionRange());
-			if (!sel.length()) {
-				sel = actionUtils.findExpressionBounds(editor, function(ch) {
-					return utils.isNumeric(ch) || chars.indexOf(ch) != -1;
-				});
-			}
-			
-			if (sel && sel.length()) {
-				var expr = sel.substring(content);
-				
-				// replace integral division: 11\2 => Math.round(11/2) 
-				expr = expr.replace(/([\d\.\-]+)\\([\d\.\-]+)/g, 'round($1/$2)');
-				
-				try {
-					var result = utils.prettifyNumber(math.evaluate(expr));
-					editor.replaceContent(result, sel.start, sel.end);
-					editor.setCaretPos(sel.start + result.length);
-					return true;
-				} catch (e) {}
-			}
-			
-			return false;
-		}
-	};
-});
-
-},{"../assets/range":30,"../utils/action":70,"../utils/common":73,"../utils/math":76}],9:[function(require,module,exports){
-/**
- * 'Expand abbreviation' editor action: extracts abbreviation from current caret 
- * position and replaces it with formatted output. 
- * <br><br>
- * This behavior can be overridden with custom handlers which can perform 
- * different actions when 'Expand Abbreviation' action is called.
- * For example, a CSS gradient handler that produces vendor-prefixed gradient
- * definitions registers its own expand abbreviation handler.  
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var handlerList = require('../assets/handlerList');
-	var range = require('../assets/range');
-	var prefs = require('../assets/preferences');
-	var utils = require('../utils/common');
-	var editorUtils = require('../utils/editor');
-	var actionUtils = require('../utils/action');
-	var cssGradient = require('../resolver/cssGradient');
-	var parser = require('../parser/abbreviation');
-
-	/**
-	 * Search for abbreviation in editor from current caret position
-	 * @param {IEmmetEditor} editor Editor instance
-	 * @return {String}
-	 */
-	function findAbbreviation(editor) {
-		var r = range(editor.getSelectionRange());
-		var content = String(editor.getContent());
-		if (r.length()) {
-			// abbreviation is selected by user
-			return r.substring(content);
-		}
-		
-		// search for new abbreviation from current caret position
-		var curLine = editor.getCurrentLineRange();
-		return actionUtils.extractAbbreviation(content.substring(curLine.start, r.start));
-	}
-
-	/**
-	 * @type HandlerList List of registered handlers
-	 */
-	var handlers = handlerList.create();
-
-	// XXX setup default expand handlers
-	
-	/**
-	 * Extracts abbreviation from current caret 
-	 * position and replaces it with formatted output 
-	 * @param {IEmmetEditor} editor Editor instance
-	 * @param {String} syntax Syntax type (html, css, etc.)
-	 * @param {String} profile Output profile name (html, xml, xhtml)
-	 * @return {Boolean} Returns <code>true</code> if abbreviation was expanded 
-	 * successfully
-	 */
-	handlers.add(function(editor, syntax, profile) {
-		var caretPos = editor.getSelectionRange().end;
-		var abbr = findAbbreviation(editor);
-			
-		if (abbr) {
-			var content = parser.expand(abbr, {
-				syntax: syntax, 
-				profile: profile, 
-				contextNode: actionUtils.captureContext(editor)
-			});
-
-			if (content) {
-				var replaceFrom = caretPos - abbr.length;
-				var replaceTo = caretPos;
-
-				// a special case for CSS: if editor already contains
-				// semicolon right after current caret position — replace it too
-				var cssSyntaxes = prefs.getArray('css.syntaxes');
-				if (cssSyntaxes && ~cssSyntaxes.indexOf(syntax)) {
-					var curContent = editor.getContent();
-					if (curContent.charAt(caretPos) == ';' && content.charAt(content.length - 1) == ';') {
-						replaceTo++;
-					}
-				}
-
-				editor.replaceContent(content, replaceFrom, replaceTo);
-				return true;
-			}
-		}
-		
-		return false;
-	}, {order: -1});
-	handlers.add(cssGradient.expandAbbreviationHandler.bind(cssGradient));
-		
-	return {
-		/**
-		 * The actual “Expand Abbreviation“ action routine
-		 * @param  {IEmmetEditor} editor  Editor instance
-		 * @param  {String} syntax  Current document syntax
-		 * @param  {String} profile Output profile name
-		 * @return {Boolean}
-		 */
-		expandAbbreviationAction: function(editor, syntax, profile) {
-			var args = utils.toArray(arguments);
-			
-			// normalize incoming arguments
-			var info = editorUtils.outputInfo(editor, syntax, profile);
-			args[1] = info.syntax;
-			args[2] = info.profile;
-			
-			return handlers.exec(false, args);
-		},
-
-		/**
-		 * A special case of “Expand Abbreviation“ action, invoked by Tab key.
-		 * In this case if abbreviation wasn’t expanded successfully or there’s a selecetion, 
-		 * the current line/selection will be indented. 
-		 * @param  {IEmmetEditor} editor  Editor instance
-		 * @param  {String} syntax  Current document syntax
-		 * @param  {String} profile Output profile name
-		 * @return {Boolean}
-		 */
-		expandAbbreviationWithTabAction: function(editor, syntax, profile) {
-			var sel = editor.getSelection();
-			var indent = '\t';
-
-			// if something is selected in editor,
-			// we should indent the selected content
-			if (sel) {
-				var selRange = range(editor.getSelectionRange());
-				var content = utils.padString(sel, indent);
-				
-				editor.replaceContent(indent + '${0}', editor.getCaretPos());
-				var replaceRange = range(editor.getCaretPos(), selRange.length());
-				editor.replaceContent(content, replaceRange.start, replaceRange.end, true);
-				editor.createSelection(replaceRange.start, replaceRange.start + content.length);
-				return true;
-			}
-	
-			// nothing selected, try to expand
-			if (!this.expandAbbreviationAction(editor, syntax, profile)) {
-				editor.replaceContent(indent, editor.getCaretPos());
-			}
-			
-			return true;
-		},
-
-		
-		_defaultHandler: function(editor, syntax, profile) {
-			var caretPos = editor.getSelectionRange().end;
-			var abbr = this.findAbbreviation(editor);
-				
-			if (abbr) {
-				var ctx = actionUtils.captureContext(editor);
-				var content = parser.expand(abbr, syntax, profile, ctx);
-				if (content) {
-					editor.replaceContent(content, caretPos - abbr.length, caretPos);
-					return true;
-				}
-			}
-			
-			return false;
-		},
-
-		/**
-		 * Adds custom expand abbreviation handler. The passed function should 
-		 * return <code>true</code> if it was performed successfully, 
-		 * <code>false</code> otherwise.
-		 * 
-		 * Added handlers will be called when 'Expand Abbreviation' is called
-		 * in order they were added
-		 * @memberOf expandAbbreviation
-		 * @param {Function} fn
-		 * @param {Object} options
-		 */
-		addHandler: function(fn, options) {
-			handlers.add(fn, options);
-		},
-		
-		/**
-		 * Removes registered handler
-		 * @returns
-		 */
-		removeHandler: function(fn) {
-			handlers.remove(fn);
-		},
-		
-		findAbbreviation: findAbbreviation
-	};
-});
-},{"../assets/handlerList":25,"../assets/preferences":28,"../assets/range":30,"../parser/abbreviation":55,"../resolver/cssGradient":65,"../utils/action":70,"../utils/common":73,"../utils/editor":75}],10:[function(require,module,exports){
-/**
- * Increment/decrement number under cursor
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('../utils/common');
-	var actionUtils = require('../utils/action');
-
-	/**
-	 * Returns length of integer part of number
-	 * @param {String} num
-	 */
-	function intLength(num) {
-		num = num.replace(/^\-/, '');
-		if (~num.indexOf('.')) {
-			return num.split('.')[0].length;
-		}
-		
-		return num.length;
-	}
-
-	return {
-		increment01Action: function(editor) {
-			return this.incrementNumber(editor, .1);
-		},
-
-		increment1Action: function(editor) {
-			return this.incrementNumber(editor, 1);
-		},
-
-		increment10Action: function(editor) {
-			return this.incrementNumber(editor, 10);
-		},
-
-		decrement01Action: function(editor) {
-			return this.incrementNumber(editor, -.1);
-		},
-
-		decrement1Action: function(editor) {
-			return this.incrementNumber(editor, -1);
-		},
-
-		decrement10Action: function(editor) {
-			return this.incrementNumber(editor, -10);
-		},
-
-		/**
-		 * Default method to increment/decrement number under
-		 * caret with given step
-		 * @param  {IEmmetEditor} editor
-		 * @param  {Number} step
-		 * @return {Boolean}
-		 */
-		incrementNumber: function(editor, step) {
-			var hasSign = false;
-			var hasDecimal = false;
-				
-			var r = actionUtils.findExpressionBounds(editor, function(ch, pos, content) {
-				if (utils.isNumeric(ch))
-					return true;
-				if (ch == '.') {
-					// make sure that next character is numeric too
-					if (!utils.isNumeric(content.charAt(pos + 1)))
-						return false;
-					
-					return hasDecimal ? false : hasDecimal = true;
-				}
-				if (ch == '-')
-					return hasSign ? false : hasSign = true;
-					
-				return false;
-			});
-				
-			if (r && r.length()) {
-				var strNum = r.substring(String(editor.getContent()));
-				var num = parseFloat(strNum);
-				if (!isNaN(num)) {
-					num = utils.prettifyNumber(num + step);
-					
-					// do we have zero-padded number?
-					if (/^(\-?)0+[1-9]/.test(strNum)) {
-						var minus = '';
-						if (RegExp.$1) {
-							minus = '-';
-							num = num.substring(1);
-						}
-							
-						var parts = num.split('.');
-						parts[0] = utils.zeroPadString(parts[0], intLength(strNum));
-						num = minus + parts.join('.');
-					}
-					
-					editor.replaceContent(num, r.start, r.end);
-					editor.createSelection(r.start, r.start + num.length);
-					return true;
-				}
-			}
-			
-			return false;
-		}
-	};
-});
-},{"../utils/action":70,"../utils/common":73}],11:[function(require,module,exports){
-/**
- * Actions to insert line breaks. Some simple editors (like browser's 
- * &lt;textarea&gt;, for example) do not provide such simple things
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var prefs = require('../assets/preferences');
-	var utils = require('../utils/common');
-	var resources = require('../assets/resources');
-	var htmlMatcher = require('../assets/htmlMatcher');
-	var editorUtils = require('../utils/editor');
-
-	var xmlSyntaxes = ['html', 'xml', 'xsl'];
-
-	// setup default preferences
-	prefs.define('css.closeBraceIndentation', '\n',
-			'Indentation before closing brace of CSS rule. Some users prefere ' 
-			+ 'indented closing brace of CSS rule for better readability. '
-			+ 'This preference’s value will be automatically inserted before '
-			+ 'closing brace when user adds newline in newly created CSS rule '
-			+ '(e.g. when “Insert formatted linebreak” action will be performed ' 
-			+ 'in CSS file). If you’re such user, you may want to write put a value ' 
-			+ 'like <code>\\n\\t</code> in this preference.');
-
-	return {
-		/**
-		 * Inserts newline character with proper indentation. This action is used in
-		 * editors that doesn't have indentation control (like textarea element) to 
-		 * provide proper indentation for inserted newlines
-		 * @param {IEmmetEditor} editor Editor instance
-		 */
-		insertLineBreakAction: function(editor) {
-			if (!this.insertLineBreakOnlyAction(editor)) {
-				var curPadding = editorUtils.getCurrentLinePadding(editor);
-				var content = String(editor.getContent());
-				var caretPos = editor.getCaretPos();
-				var len = content.length;
-				var nl = '\n';
-					
-				// check out next line padding
-				var lineRange = editor.getCurrentLineRange();
-				var nextPadding = '';
-					
-				for (var i = lineRange.end + 1, ch; i < len; i++) {
-					ch = content.charAt(i);
-					if (ch == ' ' || ch == '\t')
-						nextPadding += ch;
-					else
-						break;
-				}
-				
-				if (nextPadding.length > curPadding.length) {
-					editor.replaceContent(nl + nextPadding, caretPos, caretPos, true);
-				} else {
-					editor.replaceContent(nl, caretPos);
-				}
-			}
-			
-			return true;
-		},
-
-		/**
-		 * Inserts newline character with proper indentation in specific positions only.
-		 * @param {IEmmetEditor} editor
-		 * @return {Boolean} Returns <code>true</code> if line break was inserted 
-		 */
-		insertLineBreakOnlyAction: function(editor) {
-			var info = editorUtils.outputInfo(editor);
-			var caretPos = editor.getCaretPos();
-			var nl = '\n';
-			var pad = '\t';
-			
-			if (~xmlSyntaxes.indexOf(info.syntax)) {
-				// let's see if we're breaking newly created tag
-				var tag = htmlMatcher.tag(info.content, caretPos);
-				if (tag && !tag.innerRange.length()) {
-					editor.replaceContent(nl + pad + utils.getCaretPlaceholder() + nl, caretPos);
-					return true;
-				}
-			} else if (info.syntax == 'css') {
-				/** @type String */
-				var content = info.content;
-				if (caretPos && content.charAt(caretPos - 1) == '{') {
-					var append = prefs.get('css.closeBraceIndentation');
-					
-					var hasCloseBrace = content.charAt(caretPos) == '}';
-					if (!hasCloseBrace) {
-						// do we really need special formatting here?
-						// check if this is really a newly created rule,
-						// look ahead for a closing brace
-						for (var i = caretPos, il = content.length, ch; i < il; i++) {
-							ch = content.charAt(i);
-							if (ch == '{') {
-								// ok, this is a new rule without closing brace
-								break;
-							}
-							
-							if (ch == '}') {
-								// not a new rule, just add indentation
-								append = '';
-								hasCloseBrace = true;
-								break;
-							}
-						}
-					}
-					
-					if (!hasCloseBrace) {
-						append += '}';
-					}
-					
-					// defining rule set
-					var insValue = nl + pad + utils.getCaretPlaceholder() + append;
-					editor.replaceContent(insValue, caretPos);
-					return true;
-				}
-			}
-				
-			return false;
-		}
-	};
-});
-},{"../assets/htmlMatcher":26,"../assets/preferences":28,"../assets/resources":31,"../utils/common":73,"../utils/editor":75}],12:[function(require,module,exports){
-/**
- * Module describes and performs Emmet actions. The actions themselves are
- * defined in <i>actions</i> folder
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('../utils/common');
-
-	// all registered actions
-	var actions = {};
-
-	// load all default actions
-	var actionModules = {
-		base64: require('./base64'),
-		editPoints: require('./editPoints'),
-		evaluateMath: require('./evaluateMath'),
-		expandAbbreviation: require('./expandAbbreviation'),
-		incrementDecrement: require('./incrementDecrement'),
-		lineBreaks: require('./lineBreaks'),
-		balance: require('./balance'),
-		mergeLines: require('./mergeLines'),
-		reflectCSSValue: require('./reflectCSSValue'),
-		removeTag: require('./removeTag'),
-		selectItem: require('./selectItem'),
-		selectLine: require('./selectLine'),
-		splitJoinTag: require('./splitJoinTag'),
-		toggleComment: require('./toggleComment'),
-		updateImageSize: require('./updateImageSize'),
-		wrapWithAbbreviation: require('./wrapWithAbbreviation'),
-		updateTag: require('./updateTag')
-	};
-
-	function addAction(name, fn, options) {
-		name = name.toLowerCase();
-		options = options || {};
-		
-		if (typeof options === 'string') {
-			options = {label: options};
-		}
-
-		if (!options.label) {
-			options.label = humanizeActionName(name);
-		}
-		
-		actions[name] = {
-			name: name,
-			fn: fn,
-			options: options
-		};
-	}
-	
-	/**
-	 * “Humanizes” action name, makes it more readable for people
-	 * @param {String} name Action name (like 'expand_abbreviation')
-	 * @return Humanized name (like 'Expand Abbreviation')
-	 */
-	function humanizeActionName(name) {
-		return utils.trim(name.charAt(0).toUpperCase() 
-			+ name.substring(1).replace(/_[a-z]/g, function(str) {
-				return ' ' + str.charAt(1).toUpperCase();
-			}));
-	}
-
-	var bind = function(name, method) {
-		var m = actionModules[name];
-		return m[method].bind(m);
-	};
-
-	// XXX register default actions
-	addAction('encode_decode_data_url', bind('base64', 'encodeDecodeDataUrlAction'), 'Encode\\Decode data:URL image');
-	addAction('prev_edit_point', bind('editPoints', 'previousEditPointAction'), 'Previous Edit Point');
-	addAction('next_edit_point', bind('editPoints', 'nextEditPointAction'), 'Next Edit Point');
-	addAction('evaluate_math_expression', bind('evaluateMath', 'evaluateMathAction'), 'Numbers/Evaluate Math Expression');
-	addAction('expand_abbreviation_with_tab', bind('expandAbbreviation', 'expandAbbreviationWithTabAction'), {hidden: true});
-	addAction('expand_abbreviation', bind('expandAbbreviation', 'expandAbbreviationAction'), 'Expand Abbreviation');
-	addAction('insert_formatted_line_break_only', bind('lineBreaks', 'insertLineBreakOnlyAction'), {hidden: true});
-	addAction('insert_formatted_line_break', bind('lineBreaks', 'insertLineBreakAction'), {hidden: true});
-	addAction('balance_inward', bind('balance', 'balanceInwardAction'), 'Balance (inward)');
-	addAction('balance_outward', bind('balance', 'balanceOutwardAction'), 'Balance (outward)');
-	addAction('matching_pair', bind('balance', 'goToMatchingPairAction'), 'HTML/Go To Matching Tag Pair');
-	addAction('merge_lines', bind('mergeLines', 'mergeLinesAction'), 'Merge Lines');
-	addAction('reflect_css_value', bind('reflectCSSValue', 'reflectCSSValueAction'), 'CSS/Reflect Value');
-	addAction('remove_tag', bind('removeTag', 'removeTagAction'), 'HTML/Remove Tag');
-	addAction('select_next_item', bind('selectItem', 'selectNextItemAction'), 'Select Next Item');
-	addAction('select_previous_item', bind('selectItem', 'selectPreviousItemAction'), 'Select Previous Item');
-	addAction('split_join_tag', bind('splitJoinTag', 'splitJoinTagAction'), 'HTML/Split\\Join Tag Declaration');
-	addAction('toggle_comment', bind('toggleComment', 'toggleCommentAction'), 'Toggle Comment');
-	addAction('update_image_size', bind('updateImageSize', 'updateImageSizeAction'), 'Update Image Size');
-	addAction('wrap_with_abbreviation', bind('wrapWithAbbreviation', 'wrapWithAbbreviationAction'), 'Wrap With Abbreviation');
-	addAction('update_tag', bind('updateTag', 'updateTagAction'), 'HTML/Update Tag');
-
-	[1, -1, 10, -10, 0.1, -0.1].forEach(function(num) {
-		var prefix = num > 0 ? 'increment' : 'decrement';
-		var suffix = String(Math.abs(num)).replace('.', '').substring(0, 2);
-		var actionId = prefix + '_number_by_' + suffix;
-		var actionMethod = prefix + suffix + 'Action';
-		var actionLabel = 'Numbers/' + prefix.charAt(0).toUpperCase() + prefix.substring(1) + ' number by ' + Math.abs(num);
-		addAction(actionId, bind('incrementDecrement', actionMethod), actionLabel);
-	});
-	
-	return {
-		/**
-		 * Registers new action
-		 * @param {String} name Action name
-		 * @param {Function} fn Action function
-		 * @param {Object} options Custom action options:<br>
-		 * <b>label</b> : (<code>String</code>) – Human-readable action name. 
-		 * May contain '/' symbols as submenu separators<br>
-		 * <b>hidden</b> : (<code>Boolean</code>) – Indicates whether action
-		 * should be displayed in menu (<code>getMenu()</code> method)
-		 */
-		add: addAction,
-		
-		/**
-		 * Returns action object
-		 * @param {String} name Action name
-		 * @returns {Object}
-		 */
-		get: function(name) {
-			return actions[name.toLowerCase()];
-		},
-		
-		/**
-		 * Runs Emmet action. For list of available actions and their
-		 * arguments see <i>actions</i> folder.
-		 * @param {String} name Action name 
-		 * @param {Array} args Additional arguments. It may be array of arguments
-		 * or inline arguments. The first argument should be <code>IEmmetEditor</code> instance
-		 * @returns {Boolean} Status of performed operation, <code>true</code>
-		 * means action was performed successfully.
-		 * @example
-		 * require('action/main').run('expand_abbreviation', editor);  
-		 * require('action/main').run('wrap_with_abbreviation', [editor, 'div']);  
-		 */
-		run: function(name, args) {
-			if (!Array.isArray(args)) {
-				args = utils.toArray(arguments, 1);
-			}
-			
-			var action = this.get(name);
-			if (!action) {
-				throw new Error('Action "' + name + '" is not defined');
-			}
-
-			return action.fn.apply(action, args);
-		},
-		
-		/**
-		 * Returns all registered actions as object
-		 * @returns {Object}
-		 */
-		getAll: function() {
-			return actions;
-		},
-		
-		/**
-		 * Returns all registered actions as array
-		 * @returns {Array}
-		 */
-		getList: function() {
-			var all = this.getAll();
-			return Object.keys(all).map(function(key) {
-				return all[key];
-			});
-		},
-		
-		/**
-		 * Returns actions list as structured menu. If action has <i>label</i>,
-		 * it will be splitted by '/' symbol into submenus (for example: 
-		 * CSS/Reflect Value) and grouped with other items
-		 * @param {Array} skipActions List of action identifiers that should be 
-		 * skipped from menu
-		 * @returns {Array}
-		 */
-		getMenu: function(skipActions) {
-			var result = [];
-			skipActions = skipActions || [];
-			this.getList().forEach(function(action) {
-				if (action.options.hidden || ~skipActions.indexOf(action.name))
-					return;
-				
-				var actionName = humanizeActionName(action.name);
-				var ctx = result;
-				if (action.options.label) {
-					var parts = action.options.label.split('/');
-					actionName = parts.pop();
-					
-					// create submenus, if needed
-					var menuName, submenu;
-					while ((menuName = parts.shift())) {
-						submenu = utils.find(ctx, function(item) {
-							return item.type == 'submenu' && item.name == menuName;
-						});
-						
-						if (!submenu) {
-							submenu = {
-								name: menuName,
-								type: 'submenu',
-								items: []
-							};
-							ctx.push(submenu);
-						}
-						
-						ctx = submenu.items;
-					}
-				}
-				
-				ctx.push({
-					type: 'action',
-					name: action.name,
-					label: actionName
-				});
-			});
-			
-			return result;
-		},
-
-		/**
-		 * Returns action name associated with menu item title
-		 * @param {String} title
-		 * @returns {String}
-		 */
-		getActionNameForMenuTitle: function(title, menu) {
-			return utils.find(menu || this.getMenu(), function(val) {
-				if (val.type == 'action') {
-					if (val.label == title || val.name == title) {
-						return val.name;
-					}
-				} else {
-					return this.getActionNameForMenuTitle(title, val.items);
-				}
-			}, this);
-		}
-	};
-});
-},{"../utils/common":73,"./balance":5,"./base64":6,"./editPoints":7,"./evaluateMath":8,"./expandAbbreviation":9,"./incrementDecrement":10,"./lineBreaks":11,"./mergeLines":13,"./reflectCSSValue":14,"./removeTag":15,"./selectItem":16,"./selectLine":17,"./splitJoinTag":18,"./toggleComment":19,"./updateImageSize":20,"./updateTag":21,"./wrapWithAbbreviation":22}],13:[function(require,module,exports){
-/**
- * Merges selected lines or lines between XHTML tag pairs
- * @param {Function} require
- * @param {Underscore} _
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var htmlMatcher = require('../assets/htmlMatcher');
-	var utils = require('../utils/common');
-	var editorUtils = require('../utils/editor');
-	var range = require('../assets/range');
-
-	return {
-		mergeLinesAction: function(editor) {
-			var info = editorUtils.outputInfo(editor);
-		
-			var selection = range(editor.getSelectionRange());
-			if (!selection.length()) {
-				// find matching tag
-				var pair = htmlMatcher.find(info.content, editor.getCaretPos());
-				if (pair) {
-					selection = pair.outerRange;
-				}
-			}
-			
-			if (selection.length()) {
-				// got range, merge lines
-				var text =  selection.substring(info.content);
-				var lines = utils.splitByLines(text);
-				
-				for (var i = 1; i < lines.length; i++) {
-					lines[i] = lines[i].replace(/^\s+/, '');
-				}
-				
-				text = lines.join('').replace(/\s{2,}/, ' ');
-				var textLen = text.length;
-				text = utils.escapeText(text);
-				editor.replaceContent(text, selection.start, selection.end);
-				editor.createSelection(selection.start, selection.start + textLen);
-				
-				return true;
-			}
-			
-			return false;
-		}
-	};
-});
-},{"../assets/htmlMatcher":26,"../assets/range":30,"../utils/common":73,"../utils/editor":75}],14:[function(require,module,exports){
-/**
- * Reflect CSS value: takes rule's value under caret and pastes it for the same 
- * rules with vendor prefixes
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var handlerList = require('../assets/handlerList');
-	var prefs = require('../assets/preferences');
-	var cssResolver = require('../resolver/css');
-	var cssEditTree = require('../editTree/css');
-	var utils = require('../utils/common');
-	var actionUtils = require('../utils/action');
-	var editorUtils = require('../utils/editor');
-	var cssGradient = require('../resolver/cssGradient');
-
-	prefs.define('css.reflect.oldIEOpacity', false, 'Support IE6/7/8 opacity notation, e.g. <code>filter:alpha(opacity=...)</code>.\
-		Note that CSS3 and SVG also provides <code>filter</code> property so this option is disabled by default.')
-
-	/**
-	 * @type HandlerList List of registered handlers
-	 */
-	var handlers = handlerList.create();
-	
-	function doCSSReflection(editor) {
-		var outputInfo = editorUtils.outputInfo(editor);
-		var caretPos = editor.getCaretPos();
-		
-		var cssRule = cssEditTree.parseFromPosition(outputInfo.content, caretPos);
-		if (!cssRule) return;
-		
-		var property = cssRule.itemFromPosition(caretPos, true);
-		// no property under cursor, nothing to reflect
-		if (!property) return;
-		
-		var oldRule = cssRule.source;
-		var offset = cssRule.options.offset;
-		var caretDelta = caretPos - offset - property.range().start;
-		
-		handlers.exec(false, [property]);
-		
-		if (oldRule !== cssRule.source) {
-			return {
-				data:  cssRule.source,
-				start: offset,
-				end:   offset + oldRule.length,
-				caret: offset + property.range().start + caretDelta
-			};
-		}
-	}
-	
-	/**
-	 * Returns regexp that should match reflected CSS property names
-	 * @param {String} name Current CSS property name
-	 * @return {RegExp}
-	 */
-	function getReflectedCSSName(name) {
-		name = cssEditTree.baseName(name);
-		var vendorPrefix = '^(?:\\-\\w+\\-)?', m;
-		
-		if ((name == 'opacity' || name == 'filter') && prefs.get('css.reflect.oldIEOpacity')) {
-			return new RegExp(vendorPrefix + '(?:opacity|filter)$');
-		} else if ((m = name.match(/^border-radius-(top|bottom)(left|right)/))) {
-			// Mozilla-style border radius
-			return new RegExp(vendorPrefix + '(?:' + name + '|border-' + m[1] + '-' + m[2] + '-radius)$');
-		} else if ((m = name.match(/^border-(top|bottom)-(left|right)-radius/))) { 
-			return new RegExp(vendorPrefix + '(?:' + name + '|border-radius-' + m[1] + m[2] + ')$');
-		}
-		
-		return new RegExp(vendorPrefix + name + '$');
-	}
-
-	/**
-	 * Reflects inner CSS properites in given value
-	 * agains name‘s vendor prefix. In other words, it tries
-	 * to modify `transform 0.2s linear` value for `-webkit-transition`
-	 * property
-	 * @param  {String} name  Reciever CSS property name
-	 * @param  {String} value New property value
-	 * @return {String}
-	 */
-	function reflectValueParts(name, value) {
-		// detects and updates vendor-specific properties in value,
-		// e.g. -webkit-transition: -webkit-transform
-		
-		var reVendor = /^\-(\w+)\-/;
-		var propPrefix = reVendor.test(name) ? RegExp.$1.toLowerCase() : '';
-		var parts = cssEditTree.findParts(value);
-
-		parts.reverse();
-		parts.forEach(function(part) {
-			var partValue = part.substring(value).replace(reVendor, '');
-			var prefixes = cssResolver.vendorPrefixes(partValue);
-			if (prefixes) {
-				// if prefixes are not null then given value can
-				// be resolved against Can I Use database and may or
-				// may not contain prefixed variant
-				if (propPrefix && ~prefixes.indexOf(propPrefix)) {
-					partValue = '-' + propPrefix + '-' + partValue;
-				}
-
-				value = utils.replaceSubstring(value, partValue, part);
-			}
-		});
-
-		return value;
-	}
-	
-	/**
-	 * Reflects value from <code>donor</code> into <code>receiver</code>
-	 * @param {CSSProperty} donor Donor CSS property from which value should
-	 * be reflected
-	 * @param {CSSProperty} receiver Property that should receive reflected 
-	 * value from donor
-	 */
-	function reflectValue(donor, receiver) {
-		var value = getReflectedValue(donor.name(), donor.value(), 
-				receiver.name(), receiver.value());
-		
-		value = reflectValueParts(receiver.name(), value);
-		receiver.value(value);
-	}
-	
-	/**
-	 * Returns value that should be reflected for <code>refName</code> CSS property
-	 * from <code>curName</code> property. This function is used for special cases,
-	 * when the same result must be achieved with different properties for different
-	 * browsers. For example: opаcity:0.5; → filter:alpha(opacity=50);<br><br>
-	 * 
-	 * This function does value conversion between different CSS properties
-	 * 
-	 * @param {String} curName Current CSS property name
-	 * @param {String} curValue Current CSS property value
-	 * @param {String} refName Receiver CSS property's name 
-	 * @param {String} refValue Receiver CSS property's value
-	 * @return {String} New value for receiver property
-	 */
-	function getReflectedValue(curName, curValue, refName, refValue) {
-		curName = cssEditTree.baseName(curName);
-		refName = cssEditTree.baseName(refName);
-		
-		if (curName == 'opacity' && refName == 'filter') {
-			return refValue.replace(/opacity=[^)]*/i, 'opacity=' + Math.floor(parseFloat(curValue) * 100));
-		} else if (curName == 'filter' && refName == 'opacity') {
-			var m = curValue.match(/opacity=([^)]*)/i);
-			return m ? utils.prettifyNumber(parseInt(m[1], 10) / 100) : refValue;
-		}
-		
-		return curValue;
-	}
-	
-	module = module || {};
-	module.exports = {
-		reflectCSSValueAction: function(editor) {
-			if (editor.getSyntax() != 'css') {
-				return false;
-			}
-
-			return actionUtils.compoundUpdate(editor, doCSSReflection(editor));
-		},
-
-		_defaultHandler: function(property) {
-			var reName = getReflectedCSSName(property.name());
-			property.parent.list().forEach(function(p) {
-				if (reName.test(p.name())) {
-					reflectValue(property, p);
-				}
-			});
-		},
-
-		/**
-		 * Adds custom reflect handler. The passed function will receive matched
-		 * CSS property (as <code>CSSEditElement</code> object) and should
-		 * return <code>true</code> if it was performed successfully (handled 
-		 * reflection), <code>false</code> otherwise.
-		 * @param {Function} fn
-		 * @param {Object} options
-		 */
-		addHandler: function(fn, options) {
-			handlers.add(fn, options);
-		},
-		
-		/**
-		 * Removes registered handler
-		 * @returns
-		 */
-		removeHandler: function(fn) {
-			handlers.remove(fn);
-		}
-	};
-
-	// XXX add default handlers
-	handlers.add(module.exports._defaultHandler.bind(module.exports), {order: -1});
-	handlers.add(cssGradient.reflectValueHandler.bind(cssGradient));
-
-	return module.exports;
-});
-},{"../assets/handlerList":25,"../assets/preferences":28,"../editTree/css":37,"../resolver/css":64,"../resolver/cssGradient":65,"../utils/action":70,"../utils/common":73,"../utils/editor":75}],15:[function(require,module,exports){
-/**
- * Gracefully removes tag under cursor
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('../utils/common');
-	var editorUtils = require('../utils/editor');
-	var htmlMatcher = require('../assets/htmlMatcher');
-
-	return {
-		removeTagAction: function(editor) {
-			var info = editorUtils.outputInfo(editor);
-			
-			// search for tag
-			var tag = htmlMatcher.tag(info.content, editor.getCaretPos());
-			if (tag) {
-				if (!tag.close) {
-					// simply remove unary tag
-					editor.replaceContent(utils.getCaretPlaceholder(), tag.range.start, tag.range.end);
-				} else {
-					// remove tag and its newlines
-					/** @type Range */
-					var tagContentRange = utils.narrowToNonSpace(info.content, tag.innerRange);
-					/** @type Range */
-					var startLineBounds = utils.findNewlineBounds(info.content, tagContentRange.start);
-					var startLinePad = utils.getLinePadding(startLineBounds.substring(info.content));
-					var tagContent = tagContentRange.substring(info.content);
-					
-					tagContent = utils.unindentString(tagContent, startLinePad);
-					editor.replaceContent(utils.getCaretPlaceholder() + utils.escapeText(tagContent), tag.outerRange.start, tag.outerRange.end);
-				}
-				
-				return true;
-			}
-			
-			return false;
-		}
-	};
-});
-
-},{"../assets/htmlMatcher":26,"../utils/common":73,"../utils/editor":75}],16:[function(require,module,exports){
-/**
- * Actions that use stream parsers and tokenizers for traversing:
- * -- Search for next/previous items in HTML
- * -- Search for next/previous items in CSS
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var range = require('../assets/range');
-	var utils = require('../utils/common');
-	var editorUtils = require('../utils/editor');
-	var actionUtils = require('../utils/action');
-	var stringStream = require('../assets/stringStream');
-	var xmlParser = require('../parser/xml');
-	var cssEditTree = require('../editTree/css');
-	var cssSections = require('../utils/cssSections');
-
-	var startTag = /^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/;
-
-	/**
-	 * Generic function for searching for items to select
-	 * @param {IEmmetEditor} editor
-	 * @param {Boolean} isBackward Search backward (search forward otherwise)
-	 * @param {Function} extractFn Function that extracts item content
-	 * @param {Function} rangeFn Function that search for next token range
-	 */
-	function findItem(editor, isBackward, extractFn, rangeFn) {
-		var content = editorUtils.outputInfo(editor).content;
-		
-		var contentLength = content.length;
-		var itemRange, rng;
-		/** @type Range */
-		var prevRange = range(-1, 0);
-		/** @type Range */
-		var sel = range(editor.getSelectionRange());
-		
-		var searchPos = sel.start, loop = 100000; // endless loop protection
-		while (searchPos >= 0 && searchPos < contentLength && --loop > 0) {
-			if ( (itemRange = extractFn(content, searchPos, isBackward)) ) {
-				if (prevRange.equal(itemRange)) {
-					break;
-				}
-				
-				prevRange = itemRange.clone();
-				rng = rangeFn(itemRange.substring(content), itemRange.start, sel.clone());
-				
-				if (rng) {
-					editor.createSelection(rng.start, rng.end);
-					return true;
-				} else {
-					searchPos = isBackward ? itemRange.start : itemRange.end - 1;
-				}
-			}
-			
-			searchPos += isBackward ? -1 : 1;
-		}
-		
-		return false;
-	}
-	
-	// XXX HTML section
-	
-	/**
-	 * Find next HTML item
-	 * @param {IEmmetEditor} editor
-	 */
-	function findNextHTMLItem(editor) {
-		var isFirst = true;
-		return findItem(editor, false, function(content, searchPos){
-			if (isFirst) {
-				isFirst = false;
-				return findOpeningTagFromPosition(content, searchPos);
-			} else {
-				return getOpeningTagFromPosition(content, searchPos);
-			}
-		}, function(tag, offset, selRange) {
-			return getRangeForHTMLItem(tag, offset, selRange, false);
-		});
-	}
-	
-	/**
-	 * Find previous HTML item
-	 * @param {IEmmetEditor} editor
-	 */
-	function findPrevHTMLItem(editor) {
-		return findItem(editor, true, getOpeningTagFromPosition, function (tag, offset, selRange) {
-			return getRangeForHTMLItem(tag, offset, selRange, true);
-		});
-	}
-	
-	/**
-	 * Creates possible selection ranges for HTML tag
-	 * @param {String} source Original HTML source for tokens
-	 * @param {Array} tokens List of HTML tokens
-	 * @returns {Array}
-	 */
-	function makePossibleRangesHTML(source, tokens, offset) {
-		offset = offset || 0;
-		var result = [];
-		var attrStart = -1, attrName = '', attrValue = '', attrValueRange, tagName;
-		tokens.forEach(function(tok) {
-			switch (tok.type) {
-				case 'tag':
-					tagName = source.substring(tok.start, tok.end);
-					if (/^<[\w\:\-]/.test(tagName)) {
-						// add tag name
-						result.push(range({
-							start: tok.start + 1, 
-							end: tok.end
-						}));
-					}
-					break;
-				case 'attribute':
-					attrStart = tok.start;
-					attrName = source.substring(tok.start, tok.end);
-					break;
-					
-				case 'string':
-					// attribute value
-					// push full attribute first
-					result.push(range(attrStart, tok.end - attrStart));
-					
-					attrValueRange = range(tok);
-					attrValue = attrValueRange.substring(source);
-					
-					// is this a quoted attribute?
-					if (isQuote(attrValue.charAt(0)))
-						attrValueRange.start++;
-					
-					if (isQuote(attrValue.charAt(attrValue.length - 1)))
-						attrValueRange.end--;
-					
-					result.push(attrValueRange);
-					
-					if (attrName == 'class') {
-						result = result.concat(classNameRanges(attrValueRange.substring(source), attrValueRange.start));
-					}
-					
-					break;
-			}
-		});
-		
-		// offset ranges
-		result = result.filter(function(item) {
-			if (item.length()) {
-				item.shift(offset);
-				return true;
-			}
-		});
-
-		// remove duplicates
-		return utils.unique(result, function(item) {
-			return item.toString();
-		});
-	}
-	
-	/**
-	 * Returns ranges of class names in "class" attribute value
-	 * @param {String} className
-	 * @returns {Array}
-	 */
-	function classNameRanges(className, offset) {
-		offset = offset || 0;
-		var result = [];
-		/** @type StringStream */
-		var stream = stringStream.create(className);
-		
-		// skip whitespace
-		stream.eatSpace();
-		stream.start = stream.pos;
-		
-		var ch;
-		while ((ch = stream.next())) {
-			if (/[\s\u00a0]/.test(ch)) {
-				result.push(range(stream.start + offset, stream.pos - stream.start - 1));
-				stream.eatSpace();
-				stream.start = stream.pos;
-			}
-		}
-		
-		result.push(range(stream.start + offset, stream.pos - stream.start));
-		return result;
-	}
-	
-	/**
-	 * Returns best HTML tag range match for current selection
-	 * @param {String} tag Tag declaration
-	 * @param {Number} offset Tag's position index inside content
-	 * @param {Range} selRange Selection range
-	 * @return {Range} Returns range if next item was found, <code>null</code> otherwise
-	 */
-	function getRangeForHTMLItem(tag, offset, selRange, isBackward) {
-		var ranges = makePossibleRangesHTML(tag, xmlParser.parse(tag), offset);
-		
-		if (isBackward)
-			ranges.reverse();
-		
-		// try to find selected range
-		var curRange = utils.find(ranges, function(r) {
-			return r.equal(selRange);
-		});
-		
-		if (curRange) {
-			var ix = ranges.indexOf(curRange);
-			if (ix < ranges.length - 1)
-				return ranges[ix + 1];
-			
-			return null;
-		}
-		
-		// no selected range, find nearest one
-		if (isBackward)
-			// search backward
-			return utils.find(ranges, function(r) {
-				return r.start < selRange.start;
-			});
-		
-		// search forward
-		// to deal with overlapping ranges (like full attribute definition
-		// and attribute value) let's find range under caret first
-		if (!curRange) {
-			var matchedRanges = ranges.filter(function(r) {
-				return r.inside(selRange.end);
-			});
-			
-			if (matchedRanges.length > 1)
-				return matchedRanges[1];
-		}
-		
-		
-		return utils.find(ranges, function(r) {
-			return r.end > selRange.end;
-		});
-	}
-	
-	/**
-	 * Search for opening tag in content, starting at specified position
-	 * @param {String} html Where to search tag
-	 * @param {Number} pos Character index where to start searching
-	 * @return {Range} Returns range if valid opening tag was found,
-	 * <code>null</code> otherwise
-	 */
-	function findOpeningTagFromPosition(html, pos) {
-		var tag;
-		while (pos >= 0) {
-			if ((tag = getOpeningTagFromPosition(html, pos)))
-				return tag;
-			pos--;
-		}
-		
-		return null;
-	}
-	
-	/**
-	 * @param {String} html Where to search tag
-	 * @param {Number} pos Character index where to start searching
-	 * @return {Range} Returns range if valid opening tag was found,
-	 * <code>null</code> otherwise
-	 */
-	function getOpeningTagFromPosition(html, pos) {
-		var m;
-		if (html.charAt(pos) == '<' && (m = html.substring(pos, html.length).match(startTag))) {
-			return range(pos, m[0]);
-		}
-	}
-	
-	function isQuote(ch) {
-		return ch == '"' || ch == "'";
-	}
-
-	/**
-	 * Returns all ranges inside given rule, available for selection
-	 * @param  {CSSEditContainer} rule
-	 * @return {Array}
-	 */
-	function findInnerRanges(rule) {
-		// rule selector
-		var ranges = [rule.nameRange(true)];
-
-		// find nested sections, keep selectors only
-		var nestedSections = cssSections.nestedSectionsInRule(rule);
-		nestedSections.forEach(function(section) {
-			ranges.push(range.create2(section.start, section._selectorEnd));
-		});
-
-		// add full property ranges and values
-		rule.list().forEach(function(property) {
-			ranges = ranges.concat(makePossibleRangesCSS(property));
-		});
-
-		ranges = range.sort(ranges);
-
-		// optimize result: remove empty ranges and duplicates
-		ranges = ranges.filter(function(item) {
-			return !!item.length();
-		});
-		return utils.unique(ranges, function(item) {
-			return item.toString();
-		});
-	}
-	
-	/**
-	 * Makes all possible selection ranges for specified CSS property
-	 * @param {CSSProperty} property
-	 * @returns {Array}
-	 */
-	function makePossibleRangesCSS(property) {
-		// find all possible ranges, sorted by position and size
-		var valueRange = property.valueRange(true);
-		var result = [property.range(true), valueRange];
-		
-		// locate parts of complex values.
-		// some examples:
-		// – 1px solid red: 3 parts
-		// – arial, sans-serif: enumeration, 2 parts
-		// – url(image.png): function value part
-		var value = property.value();
-		property.valueParts().forEach(function(r) {
-			// add absolute range
-			var clone = r.clone();
-			result.push(clone.shift(valueRange.start));
-			
-			/** @type StringStream */
-			var stream = stringStream.create(r.substring(value));
-			if (stream.match(/^[\w\-]+\(/, true)) {
-				// we have a function, find values in it.
-				// but first add function contents
-				stream.start = stream.pos;
-				stream.backUp(1);
-				stream.skipToPair('(', ')');
-				stream.backUp(1);
-				var fnBody = stream.current();
-				result.push(range(clone.start + stream.start, fnBody));
-				
-				// find parts
-				cssEditTree.findParts(fnBody).forEach(function(part) {
-					result.push(range(clone.start + stream.start + part.start, part.substring(fnBody)));
-				});
-			}
-		});
-
-		return result;
-	}
-	
-	/**
-	 * Tries to find matched CSS property and nearest range for selection
-	 * @param {CSSRule} rule
-	 * @param {Range} selRange
-	 * @param {Boolean} isBackward
-	 * @returns {Range}
-	 */
-	function matchedRangeForCSSProperty(rule, selRange, isBackward) {
-		var ranges = findInnerRanges(rule);
-		if (isBackward) {
-			ranges.reverse();
-		}
-		
-		// return next to selected range, if possible
-		var r = utils.find(ranges, function(item) {
-			return item.equal(selRange);
-		});
-
-		if (r) {
-			return ranges[ranges.indexOf(r) + 1];
-		}
-
-		// find matched and (possibly) overlapping ranges
-		var nested = ranges.filter(function(item) {
-			return item.inside(selRange.end);
-		});
-
-		if (nested.length) {
-			return nested.sort(function(a, b) {
-				return a.length() - b.length();
-			})[0];
-		}
-
-		// return range next to caret
-		var test = 
-		r = utils.find(ranges, isBackward 
-			? function(item) {return item.end < selRange.start;}
-			: function(item) {return item.end > selRange.start;}
-		);
-
-		if (!r) {
-			// can’t find anything, just pick first one
-			r = ranges[0];
-		}
-
-		return r;
-	}
-	
-	function findNextCSSItem(editor) {
-		return findItem(editor, false, cssSections.locateRule.bind(cssSections), getRangeForNextItemInCSS);
-	}
-	
-	function findPrevCSSItem(editor) {
-		return findItem(editor, true, cssSections.locateRule.bind(cssSections), getRangeForPrevItemInCSS);
-	}
-	
-	/**
-	 * Returns range for item to be selected in CSS after current caret 
-	 * (selection) position
-	 * @param {String} rule CSS rule declaration
-	 * @param {Number} offset Rule's position index inside content
-	 * @param {Range} selRange Selection range
-	 * @return {Range} Returns range if next item was found, <code>null</code> otherwise
-	 */
-	function getRangeForNextItemInCSS(rule, offset, selRange) {
-		var tree = cssEditTree.parse(rule, {
-			offset: offset
-		});
-
-		return matchedRangeForCSSProperty(tree, selRange, false);
-	}
-	
-	/**
-	 * Returns range for item to be selected in CSS before current caret 
-	 * (selection) position
-	 * @param {String} rule CSS rule declaration
-	 * @param {Number} offset Rule's position index inside content
-	 * @param {Range} selRange Selection range
-	 * @return {Range} Returns range if previous item was found, <code>null</code> otherwise
-	 */
-	function getRangeForPrevItemInCSS(rule, offset, selRange) {
-		var tree = cssEditTree.parse(rule, {
-			offset: offset
-		});
-
-		return matchedRangeForCSSProperty(tree, selRange, true);
-	}
-
-	return {
-		selectNextItemAction: function(editor) {
-			if (actionUtils.isSupportedCSS(editor.getSyntax())) {
-				return findNextCSSItem(editor);
-			} else {
-				return findNextHTMLItem(editor);
-			}
-		},
-
-		selectPreviousItemAction: function(editor) {
-			if (actionUtils.isSupportedCSS(editor.getSyntax())) {
-				return findPrevCSSItem(editor);
-			} else {
-				return findPrevHTMLItem(editor);
-			}
-		}
-	};
-});
-},{"../assets/range":30,"../assets/stringStream":32,"../editTree/css":37,"../parser/xml":62,"../utils/action":70,"../utils/common":73,"../utils/cssSections":74,"../utils/editor":75}],17:[function(require,module,exports){
-/**
- * Select current line (for simple editors like browser's &lt;textarea&gt;)
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	return {
-		selectLineAction: function(editor) {
-			var range = editor.getCurrentLineRange();
-			editor.createSelection(range.start, range.end);
-			return true;
-		}
-	};
-});
-},{}],18:[function(require,module,exports){
-/**
- * Splits or joins tag, e.g. transforms it into a short notation and vice versa:<br>
- * &lt;div&gt;&lt;/div&gt; → &lt;div /&gt; : join<br>
- * &lt;div /&gt; → &lt;div&gt;&lt;/div&gt; : split
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('../utils/common');
-	var resources = require('../assets/resources');
-	var matcher = require('../assets/htmlMatcher');
-	var editorUtils = require('../utils/editor');
-	var profile = require('../assets/profile');
-
-	/**
-	 * @param {IEmmetEditor} editor
-	 * @param {Object} profile
-	 * @param {Object} tag
-	 */
-	function joinTag(editor, profile, tag) {
-		// empty closing slash is a nonsense for this action
-		var slash = profile.selfClosing() || ' /';
-		var content = tag.open.range.substring(tag.source).replace(/\s*>$/, slash + '>');
-		
-		var caretPos = editor.getCaretPos();
-		
-		// update caret position
-		if (content.length + tag.outerRange.start < caretPos) {
-			caretPos = content.length + tag.outerRange.start;
-		}
-		
-		content = utils.escapeText(content);
-		editor.replaceContent(content, tag.outerRange.start, tag.outerRange.end);
-		editor.setCaretPos(caretPos);
-		return true;
-	}
-	
-	function splitTag(editor, profile, tag) {
-		var caretPos = editor.getCaretPos();
-		
-		// define tag content depending on profile
-		var tagContent = (profile.tag_nl === true) ? '\n\t\n' : '';
-		var content = tag.outerContent().replace(/\s*\/>$/, '>');
-		caretPos = tag.outerRange.start + content.length;
-		content += tagContent + '</' + tag.open.name + '>';
-		
-		content = utils.escapeText(content);
-		editor.replaceContent(content, tag.outerRange.start, tag.outerRange.end);
-		editor.setCaretPos(caretPos);
-		return true;
-	}
-
-	return {
-		splitJoinTagAction: function(editor, profileName) {
-			var info = editorUtils.outputInfo(editor, null, profileName);
-			var curProfile = profile.get(info.profile);
-			
-			// find tag at current position
-			var tag = matcher.tag(info.content, editor.getCaretPos());
-			if (tag) {
-				return tag.close 
-					? joinTag(editor, curProfile, tag) 
-					: splitTag(editor, curProfile, tag);
-			}
-			
-			return false;
-		}
-	};
-});
-},{"../assets/htmlMatcher":26,"../assets/profile":29,"../assets/resources":31,"../utils/common":73,"../utils/editor":75}],19:[function(require,module,exports){
-/**
- * Toggles HTML and CSS comments depending on current caret context. Unlike
- * the same action in most editors, this action toggles comment on currently
- * matched item—HTML tag or CSS selector—when nothing is selected.
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var prefs = require('../assets/preferences');
-	var range = require('../assets/range');
-	var utils = require('../utils/common');
-	var actionUtils = require('../utils/action');
-	var editorUtils = require('../utils/editor');
-	var htmlMatcher = require('../assets/htmlMatcher');
-	var cssEditTree = require('../editTree/css');
-
-	/**
-	 * Toggle HTML comment on current selection or tag
-	 * @param {IEmmetEditor} editor
-	 * @return {Boolean} Returns <code>true</code> if comment was toggled
-	 */
-	function toggleHTMLComment(editor) {
-		/** @type Range */
-		var r = range(editor.getSelectionRange());
-		var info = editorUtils.outputInfo(editor);
-			
-		if (!r.length()) {
-			// no selection, find matching tag
-			var tag = htmlMatcher.tag(info.content, editor.getCaretPos());
-			if (tag) { // found pair
-				r = tag.outerRange;
-			}
-		}
-		
-		return genericCommentToggle(editor, '<!--', '-->', r);
-	}
-
-	/**
-	 * Simple CSS commenting
-	 * @param {IEmmetEditor} editor
-	 * @return {Boolean} Returns <code>true</code> if comment was toggled
-	 */
-	function toggleCSSComment(editor) {
-		/** @type Range */
-		var rng = range(editor.getSelectionRange());
-		var info = editorUtils.outputInfo(editor);
-			
-		if (!rng.length()) {
-			// no selection, try to get current rule
-			/** @type CSSRule */
-			var rule = cssEditTree.parseFromPosition(info.content, editor.getCaretPos());
-			if (rule) {
-				var property = cssItemFromPosition(rule, editor.getCaretPos());
-				rng = property 
-					? property.range(true) 
-					: range(rule.nameRange(true).start, rule.source);
-			}
-		}
-		
-		if (!rng.length()) {
-			// still no selection, get current line
-			rng = range(editor.getCurrentLineRange());
-			utils.narrowToNonSpace(info.content, rng);
-		}
-		
-		return genericCommentToggle(editor, '/*', '*/', rng);
-	}
-	
-	/**
-	 * Returns CSS property from <code>rule</code> that matches passed position
-	 * @param {EditContainer} rule
-	 * @param {Number} absPos
-	 * @returns {EditElement}
-	 */
-	function cssItemFromPosition(rule, absPos) {
-		// do not use default EditContainer.itemFromPosition() here, because
-		// we need to make a few assumptions to make CSS commenting more reliable
-		var relPos = absPos - (rule.options.offset || 0);
-		var reSafeChar = /^[\s\n\r]/;
-		return utils.find(rule.list(), function(item) {
-			if (item.range().end === relPos) {
-				// at the end of property, but outside of it
-				// if there’s a space character at current position,
-				// use current property
-				return reSafeChar.test(rule.source.charAt(relPos));
-			}
-			
-			return item.range().inside(relPos);
-		});
-	}
-
-	/**
-	 * Search for nearest comment in <code>str</code>, starting from index <code>from</code>
-	 * @param {String} text Where to search
-	 * @param {Number} from Search start index
-	 * @param {String} start_token Comment start string
-	 * @param {String} end_token Comment end string
-	 * @return {Range} Returns null if comment wasn't found
-	 */
-	function searchComment(text, from, startToken, endToken) {
-		var commentStart = -1;
-		var commentEnd = -1;
-		
-		var hasMatch = function(str, start) {
-			return text.substr(start, str.length) == str;
-		};
-			
-		// search for comment start
-		while (from--) {
-			if (hasMatch(startToken, from)) {
-				commentStart = from;
-				break;
-			}
-		}
-		
-		if (commentStart != -1) {
-			// search for comment end
-			from = commentStart;
-			var contentLen = text.length;
-			while (contentLen >= from++) {
-				if (hasMatch(endToken, from)) {
-					commentEnd = from + endToken.length;
-					break;
-				}
-			}
-		}
-		
-		return (commentStart != -1 && commentEnd != -1) 
-			? range(commentStart, commentEnd - commentStart) 
-			: null;
-	}
-
-	/**
-	 * Generic comment toggling routine
-	 * @param {IEmmetEditor} editor
-	 * @param {String} commentStart Comment start token
-	 * @param {String} commentEnd Comment end token
-	 * @param {Range} range Selection range
-	 * @return {Boolean}
-	 */
-	function genericCommentToggle(editor, commentStart, commentEnd, range) {
-		var content = editorUtils.outputInfo(editor).content;
-		var caretPos = editor.getCaretPos();
-		var newContent = null;
-			
-		/**
-		 * Remove comment markers from string
-		 * @param {Sting} str
-		 * @return {String}
-		 */
-		function removeComment(str) {
-			return str
-				.replace(new RegExp('^' + utils.escapeForRegexp(commentStart) + '\\s*'), function(str){
-					caretPos -= str.length;
-					return '';
-				}).replace(new RegExp('\\s*' + utils.escapeForRegexp(commentEnd) + '$'), '');
-		}
-		
-		// first, we need to make sure that this substring is not inside 
-		// comment
-		var commentRange = searchComment(content, caretPos, commentStart, commentEnd);
-		if (commentRange && commentRange.overlap(range)) {
-			// we're inside comment, remove it
-			range = commentRange;
-			newContent = removeComment(range.substring(content));
-		} else {
-			// should add comment
-			// make sure that there's no comment inside selection
-			newContent = commentStart + ' ' +
-				range.substring(content)
-					.replace(new RegExp(utils.escapeForRegexp(commentStart) + '\\s*|\\s*' + utils.escapeForRegexp(commentEnd), 'g'), '') +
-				' ' + commentEnd;
-				
-			// adjust caret position
-			caretPos += commentStart.length + 1;
-		}
-
-		// replace editor content
-		if (newContent !== null) {
-			newContent = utils.escapeText(newContent);
-			editor.setCaretPos(range.start);
-			editor.replaceContent(editorUtils.unindent(editor, newContent), range.start, range.end);
-			editor.setCaretPos(caretPos);
-			return true;
-		}
-		
-		return false;
-	}
-	
-	return {
-		/**
-		 * Toggle comment on current editor's selection or HTML tag/CSS rule
-		 * @param {IEmmetEditor} editor
-		 */
-		toggleCommentAction: function(editor) {
-			var info = editorUtils.outputInfo(editor);
-			if (actionUtils.isSupportedCSS(info.syntax)) {
-				// in case our editor is good enough and can recognize syntax from 
-				// current token, we have to make sure that cursor is not inside
-				// 'style' attribute of html element
-				var caretPos = editor.getCaretPos();
-				var tag = htmlMatcher.tag(info.content, caretPos);
-				if (tag && tag.open.range.inside(caretPos)) {
-					info.syntax = 'html';
-				}
-			}
-			
-			var cssSyntaxes = prefs.getArray('css.syntaxes');
-			if (~cssSyntaxes.indexOf(info.syntax)) {
-				return toggleCSSComment(editor);
-			}
-			
-			return toggleHTMLComment(editor);
-		}
-	};
-});
-},{"../assets/htmlMatcher":26,"../assets/preferences":28,"../assets/range":30,"../editTree/css":37,"../utils/action":70,"../utils/common":73,"../utils/editor":75}],20:[function(require,module,exports){
-/**
- * Automatically updates image size attributes in HTML's &lt;img&gt; element or
- * CSS rule
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('../utils/common');
-	var editorUtils = require('../utils/editor');
-	var actionUtils = require('../utils/action');
-	var xmlEditTree = require('../editTree/xml');
-	var cssEditTree = require('../editTree/css');
-	var base64 = require('../utils/base64');
-	var file = require('../plugin/file');
-
-	/**
-	 * Updates image size of &lt;img src=""&gt; tag
-	 * @param {IEmmetEditor} editor
-	 */
-	function updateImageSizeHTML(editor) {
-		var offset = editor.getCaretPos();
-		
-		// find tag from current caret position
-		var info = editorUtils.outputInfo(editor);
-		var xmlElem = xmlEditTree.parseFromPosition(info.content, offset, true);
-		if (xmlElem && (xmlElem.name() || '').toLowerCase() == 'img') {
-			getImageSizeForSource(editor, xmlElem.value('src'), function(size) {
-				if (size) {
-					var compoundData = xmlElem.range(true);
-					xmlElem.value('width', size.width);
-					xmlElem.value('height', size.height, xmlElem.indexOf('width') + 1);
-					
-					actionUtils.compoundUpdate(editor, utils.extend(compoundData, {
-						data: xmlElem.toString(),
-						caret: offset
-					}));
-				}
-			});
-		}
-	}
-	
-	/**
-	 * Updates image size of CSS property
-	 * @param {IEmmetEditor} editor
-	 */
-	function updateImageSizeCSS(editor) {
-		var offset = editor.getCaretPos();
-		
-		// find tag from current caret position
-		var info = editorUtils.outputInfo(editor);
-		var cssRule = cssEditTree.parseFromPosition(info.content, offset, true);
-		if (cssRule) {
-			// check if there is property with image under caret
-			var prop = cssRule.itemFromPosition(offset, true), m;
-			if (prop && (m = /url\((["']?)(.+?)\1\)/i.exec(prop.value() || ''))) {
-				getImageSizeForSource(editor, m[2], function(size) {
-					if (size) {
-						var compoundData = cssRule.range(true);
-						cssRule.value('width', size.width + 'px');
-						cssRule.value('height', size.height + 'px', cssRule.indexOf('width') + 1);
-						
-						actionUtils.compoundUpdate(editor, utils.extend(compoundData, {
-							data: cssRule.toString(),
-							caret: offset
-						}));
-					}
-				});
-			}
-		}
-	}
-	
-	/**
-	 * Returns image dimensions for source
-	 * @param {IEmmetEditor} editor
-	 * @param {String} src Image source (path or data:url)
-	 */
-	function getImageSizeForSource(editor, src, callback) {
-		var fileContent;
-		if (src) {
-			// check if it is data:url
-			if (/^data:/.test(src)) {
-				fileContent = base64.decode( src.replace(/^data\:.+?;.+?,/, '') );
-				return callback(actionUtils.getImageSize(fileContent));
-			}
-			
-			var absPath = file.locateFile(editor.getFilePath(), src);
-			if (absPath === null) {
-				throw "Can't find " + src + ' file';
-			}
-			
-			file.read(absPath, function(err, content) {
-				if (err) {
-					throw 'Unable to read ' + absPath + ': ' + err;
-				}
-				
-				content = String(content);
-				callback(actionUtils.getImageSize(content));
-			});
-		}
-	}
-	
-	return {
-		updateImageSizeAction: function(editor) {
-			// this action will definitely won’t work in SASS dialect,
-			// but may work in SCSS or LESS
-			if (actionUtils.isSupportedCSS(editor.getSyntax())) {
-				updateImageSizeCSS(editor);
-			} else {
-				updateImageSizeHTML(editor);
-			}
-			
-			return true;
-		}
-	};
-});
-},{"../editTree/css":37,"../editTree/xml":38,"../plugin/file":63,"../utils/action":70,"../utils/base64":71,"../utils/common":73,"../utils/editor":75}],21:[function(require,module,exports){
-/**
- * Update Tag action: allows users to update existing HTML tags and add/remove
- * attributes or even tag name
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var xmlEditTree = require('../editTree/xml');
-	var editorUtils = require('../utils/editor');
-	var actionUtils = require('../utils/action');
-	var utils = require('../utils/common');
-	var parser = require('../parser/abbreviation');
-
-	function updateAttributes(tag, abbrNode, ix) {
-		var classNames = (abbrNode.attribute('class') || '').split(/\s+/g);
-		if (ix) {
-			classNames.push('+' + abbrNode.name());
-		}
-
-		var r = function(str) {
-			return utils.replaceCounter(str, abbrNode.counter);
-		};
-
-		// update class
-		classNames.forEach(function(className) {
-			if (!className) {
-				return;
-			}
-
-			className = r(className);
-			var ch = className.charAt(0);
-			if (ch == '+') {
-				tag.addClass(className.substr(1));
-			} else if (ch == '-') {
-				tag.removeClass(className.substr(1));
-			} else {
-				tag.value('class', className);
-			}
-		});
-
-		// update attributes
-		abbrNode.attributeList().forEach(function(attr) {
-			if (attr.name.toLowerCase() == 'class') {
-				return;
-			}
-
-			var ch = attr.name.charAt(0);
-			if (ch == '+') {
-				var attrName = attr.name.substr(1);
-				var tagAttr = tag.get(attrName);
-				if (tagAttr) {
-					tagAttr.value(tagAttr.value() + r(attr.value));
-				} else {
-					tag.value(attrName, r(attr.value));
-				}
-			} else if (ch == '-') {
-				tag.remove(attr.name.substr(1));
-			} else {
-				tag.value(attr.name, r(attr.value));
-			}
-		});
-	}
-	
-	return {
-		/**
-		 * Matches HTML tag under caret and updates its definition
-		 * according to given abbreviation
-		 * @param {IEmmetEditor} Editor instance
-		 * @param {String} abbr Abbreviation to update with
-		 */
-		updateTagAction: function(editor, abbr) {
-			abbr = abbr || editor.prompt("Enter abbreviation");
-
-			if (!abbr) {
-				return false;
-			}
-
-			var content = editor.getContent();
-			var ctx = actionUtils.captureContext(editor);
-			var tag = this.getUpdatedTag(abbr, ctx, content);
-
-			if (!tag) {
-				// nothing to update
-				return false;
-			}
-
-			// check if tag name was updated
-			if (tag.name() != ctx.name && ctx.match.close) {
-				editor.replaceContent('</' + tag.name() + '>', ctx.match.close.range.start, ctx.match.close.range.end, true);
-			}
-
-			editor.replaceContent(tag.source, ctx.match.open.range.start, ctx.match.open.range.end, true);
-			return true;
-		},
-
-		/**
-		 * Returns XMLEditContainer node with updated tag structure
-		 * of existing tag context.
-		 * This data can be used to modify existing tag
-		 * @param  {String} abbr    Abbreviation
-		 * @param  {Object} ctx     Tag to be updated (captured with `htmlMatcher`)
-		 * @param  {String} content Original editor content
-		 * @return {XMLEditContainer}
-		 */
-		getUpdatedTag: function(abbr, ctx, content, options) {
-			if (!ctx) {
-				// nothing to update
-				return null;
-			}
-
-			var tree = parser.parse(abbr, options || {});
-
-			// for this action some characters in abbreviation has special
-			// meaning. For example, `.-c2` means “remove `c2` class from
-			// element” and `.+c3` means “append class `c3` to exising one.
-			// 
-			// But `.+c3` abbreviation will actually produce two elements:
-			// <div class=""> and <c3>. Thus, we have to walk on each element
-			// of parsed tree and use their definitions to update current element
-			var tag = xmlEditTree.parse(ctx.match.open.range.substring(content), {
-				offset: ctx.match.outerRange.start
-			});
-
-			tree.children.forEach(function(node, i) {
-				updateAttributes(tag, node, i);
-			});
-
-			// if tag name was resolved by implicit tag name resolver,
-			// then user omitted it in abbreviation and wants to keep
-			// original tag name
-			var el = tree.children[0];
-			if (!el.data('nameResolved')) {
-				tag.name(el.name());
-			}
-
-			return tag;
-		}
-	};
-});
-},{"../editTree/xml":38,"../parser/abbreviation":55,"../utils/action":70,"../utils/common":73,"../utils/editor":75}],22:[function(require,module,exports){
-/**
- * Action that wraps content with abbreviation. For convenience, action is 
- * defined as reusable module
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var range = require('../assets/range');
-	var htmlMatcher = require('../assets/htmlMatcher');
-	var utils = require('../utils/common');
-	var editorUtils = require('../utils/editor');
-	var actionUtils = require('../utils/action');
-	var parser = require('../parser/abbreviation');
-	
-	return {
-		/**
-		 * Wraps content with abbreviation
-		 * @param {IEmmetEditor} Editor instance
-		 * @param {String} abbr Abbreviation to wrap with
-		 * @param {String} syntax Syntax type (html, css, etc.)
-		 * @param {String} profile Output profile name (html, xml, xhtml)
-		 */
-		wrapWithAbbreviationAction: function(editor, abbr, syntax, profile) {
-			var info = editorUtils.outputInfo(editor, syntax, profile);
-			abbr = abbr || editor.prompt("Enter abbreviation");
-			
-			if (!abbr) {
-				return null;
-			}
-			
-			abbr = String(abbr);
-			
-			var r = range(editor.getSelectionRange());
-			
-			if (!r.length()) {
-				// no selection, find tag pair
-				var match = htmlMatcher.tag(info.content, r.start);
-				if (!match) {  // nothing to wrap
-					return false;
-				}
-				
-				r = utils.narrowToNonSpace(info.content, match.range);
-			}
-			
-			var newContent = utils.escapeText(r.substring(info.content));
-			var result = parser.expand(abbr, {
-				pastedContent: editorUtils.unindent(editor, newContent),
-				syntax: info.syntax,
-				profile: info.profile,
-				contextNode: actionUtils.captureContext(editor)
-			});
-			
-			if (result) {
-				editor.replaceContent(result, r.start, r.end);
-				return true;
-			}
-			
-			return false;
-		}
-	};
-});
-},{"../assets/htmlMatcher":26,"../assets/range":30,"../parser/abbreviation":55,"../utils/action":70,"../utils/common":73,"../utils/editor":75}],23:[function(require,module,exports){
-/**
- * Parsed resources (snippets, abbreviations, variables, etc.) for Emmet.
- * Contains convenient method to get access for snippets with respect of 
- * inheritance. Also provides ability to store data in different vocabularies
- * ('system' and 'user') for fast and safe resource update
- * @author Sergey Chikuyonok (serge.che@gmail.com)
- * @link http://chikuyonok.ru
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var prefs = require('./preferences');
-	var utils = require('../utils/common');
-
-	prefs.define('caniuse.enabled', true, 'Enable support of Can I Use database. When enabled,\
-		CSS abbreviation resolver will look at Can I Use database first before detecting\
-		CSS properties that should be resolved');
-	
-	prefs.define('caniuse.vendors', 'all', 'A comma-separated list vendor identifiers\
-		(as described in Can I Use database) that should be supported\
-		when resolving vendor-prefixed properties. Set value to <code>all</code>\
-		to support all available properties');
-	
-	prefs.define('caniuse.era', 'e-2', 'Browser era, as defined in Can I Use database.\
-		Examples: <code>e0</code> (current version), <code>e1</code> (near future)\
-		<code>e-2</code> (2 versions back) and so on.');
-	
-	var cssSections = {
-		'border-image': ['border-image'],
-		'css-boxshadow': ['box-shadow'],
-		'css3-boxsizing': ['box-sizing'],
-		'multicolumn': ['column-width', 'column-count', 'columns', 'column-gap', 'column-rule-color', 'column-rule-style', 'column-rule-width', 'column-rule', 'column-span', 'column-fill'],
-		'border-radius': ['border-radius', 'border-top-left-radius', 'border-top-right-radius', 'border-bottom-right-radius', 'border-bottom-left-radius'],
-		'transforms2d': ['transform'],
-		'css-hyphens': ['hyphens'],
-		'css-transitions': ['transition', 'transition-property', 'transition-duration', 'transition-timing-function', 'transition-delay'],
-		'font-feature': ['font-feature-settings'],
-		'css-animation': ['animation', 'animation-name', 'animation-duration', 'animation-timing-function', 'animation-iteration-count', 'animation-direction', 'animation-play-state', 'animation-delay', 'animation-fill-mode', '@keyframes'],
-		'css-gradients': ['linear-gradient'],
-		'css-masks': ['mask-image', 'mask-source-type', 'mask-repeat', 'mask-position', 'mask-clip', 'mask-origin', 'mask-size', 'mask', 'mask-type', 'mask-box-image-source', 'mask-box-image-slice', 'mask-box-image-width', 'mask-box-image-outset', 'mask-box-image-repeat', 'mask-box-image', 'clip-path', 'clip-rule'],
-		'css-featurequeries': ['@supports'],
-		'flexbox': ['flex', 'inline-flex', 'flex-direction', 'flex-wrap', 'flex-flow', 'order', 'flex'],
-		'calc': ['calc'],
-		'object-fit': ['object-fit', 'object-position'],
-		'css-grid': ['grid', 'inline-grid', 'grid-template-rows', 'grid-template-columns', 'grid-template-areas', 'grid-template', 'grid-auto-rows', 'grid-auto-columns', ' grid-auto-flow', 'grid-auto-position', 'grid', ' grid-row-start', 'grid-column-start', 'grid-row-end', 'grid-column-end', 'grid-column', 'grid-row', 'grid-area', 'justify-self', 'justify-items', 'align-self', 'align-items'],
-		'css-repeating-gradients': ['repeating-linear-gradient'],
-		'css-filters': ['filter'],
-		'user-select-none': ['user-select'],
-		'intrinsic-width': ['min-content', 'max-content', 'fit-content', 'fill-available'],
-		'css3-tabsize': ['tab-size']
-	};
-
-	/** @type {Object} The Can I Use database for CSS */
-	var cssDB = null;
-	/** @type {Object} A list of available vendors (browsers) and their prefixes */
-	var vendorsDB = null;
-	var erasDB = null;
-
-	function intersection(arr1, arr2) {
-		var result = [];
-		var smaller = arr1, larger = arr2;
-		if (smaller.length > larger.length) {
-			smaller = arr2;
-			larger = arr1;
-		}
-		larger.forEach(function(item) {
-			if (~smaller.indexOf(item)) {
-				result.push(item);
-			}
-		});
-		return result;
-	}
-
-	/**
-	 * Parses raw Can I Use database for better lookups
-	 * @param  {String} data Raw database
-	 * @param  {Boolean} optimized Pass `true` if given `data` is already optimized
-	 * @return {Object}
-	 */
-	function parseDB(data, optimized) {
-		if (typeof data == 'string') {
-			data = JSON.parse(data);
-		}
-
-		if (!optimized) {
-			data = optimize(data);
-		}
-
-		vendorsDB = data.vendors;
-		cssDB = data.css;
-		erasDB = data.era;
-	}
-
-	/**
-	 * Extract required data only from CIU database 
-	 * @param  {Object} data Raw Can I Use database
-	 * @return {Object}      Optimized database
-	 */
-	function optimize(data) {
-		if (typeof data == 'string') {
-			data = JSON.parse(data);
-		}
-
-		return {
-			vendors: parseVendors(data),
-			css: parseCSS(data),
-			era: parseEra(data)
-		};
-	}
-
-	/**
-	 * Parses vendor data
-	 * @param  {Object} data
-	 * @return {Object}
-	 */
-	function parseVendors(data) {
-		var out = {};
-		Object.keys(data.agents).forEach(function(name) {
-			var agent = data.agents[name];
-			out[name] = {
-				prefix: agent.prefix,
-				versions: agent.versions
-			};
-		});
-		return out;
-	}
-
-	/**
-	 * Parses CSS data from Can I Use raw database
-	 * @param  {Object} data
-	 * @return {Object}
-	 */
-	function parseCSS(data) {
-		var out = {};
-		var cssCategories = data.cats.CSS;
-		Object.keys(data.data).forEach(function(name) {
-			var section = data.data[name];
-			if (name in cssSections) {
-				cssSections[name].forEach(function(kw) {
-					out[kw] = section.stats;
-				});
-			}
-		});
-
-		return out;
-	}
-
-	/**
-	 * Parses era data from Can I Use raw database
-	 * @param  {Object} data
-	 * @return {Array}
-	 */
-	function parseEra(data) {
-		// some runtimes (like Mozilla Rhino) does not preserves
-		// key order so we have to sort values manually
-		return Object.keys(data.eras).sort(function(a, b) {
-			return parseInt(a.substr(1)) - parseInt(b.substr(1));
-		});
-	}
-	
-	/**
-	 * Returs list of supported vendors, depending on user preferences
-	 * @return {Array}
-	 */
-	function getVendorsList() {
-		var allVendors = Object.keys(vendorsDB);
-		var vendors = prefs.getArray('caniuse.vendors');
-		if (!vendors || vendors[0] == 'all') {
-			return allVendors;
-		}
-
-		return intersection(allVendors, vendors);
-	}
-
-	/**
-	 * Returns size of version slice as defined by era identifier
-	 * @return {Number}
-	 */
-	function getVersionSlice() {
-		var era = prefs.get('caniuse.era');
-		var ix = erasDB.indexOf(era);
-		if (!~ix) {
-			ix = erasDB.indexOf('e-2');
-		}
-
-		return ix;
-	}
-
-	// try to load caniuse database
-	// hide it from Require.JS parser
-	var db = null;
-	(function(r) {
-		if (typeof define === 'undefined' || !define.amd) {
-			try {
-				var fs = r('fs');
-				var path = r('path');
-				db = fs.readFileSync(path.join(__dirname, '../caniuse.json'), {encoding: 'utf8'});
-			} catch(e) {}
-		}
-	})(require);
-	
-	if (db) {
-		parseDB(db);
-	}
-
-	return {
-		load: parseDB,
-		optimize: optimize,
-		
-		/**
-		 * Resolves prefixes for given property
-		 * @param {String} property A property to resolve. It can start with `@` symbol
-		 * (CSS section, like `@keyframes`) or `:` (CSS value, like `flex`)
-		 * @return {Array} Array of resolved prefixes or <code>null</code>
-		 * if prefixes can't be resolved. Empty array means property has no vendor
-		 * prefixes
-		 */
-		resolvePrefixes: function(property) {
-			if (!prefs.get('caniuse.enabled') || !cssDB || !(property in cssDB)) {
-				return null;
-			}
-
-			var prefixes = [];
-			var propStats = cssDB[property];
-			var versions = getVersionSlice();
-
-			getVendorsList().forEach(function(vendor) {
-				var vendorVesions = vendorsDB[vendor].versions.slice(versions);
-				for (var i = 0, v; i < vendorVesions.length; i++) {
-					v = vendorVesions[i];
-					if (!v) {
-						continue;
-					}
-
-					if (~propStats[vendor][v].indexOf('x')) {
-						prefixes.push(vendorsDB[vendor].prefix);
-						break;
-					}
-				}
-			});
-
-			return utils.unique(prefixes).sort(function(a, b) {
-				return b.length - a.length;
-			});
-		}
-	};
-});
-},{"../utils/common":73,"./preferences":28}],24:[function(require,module,exports){
-/**
- * Module that contains factories for element types used by Emmet
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var factories = {};
-	var reAttrs = /([@\!]?)([\w\-:]+)\s*=\s*(['"])(.*?)\3/g;
-
-	// register resource references
-	function commonFactory(value) {
-		return {data: value};
-	}
-
-	module = module || {};
-	module.exports = {
-		/**
-		 * Create new element factory
-		 * @param {String} name Element identifier
-		 * @param {Function} factory Function that produces element of specified 
-		 * type. The object generated by this factory is automatically 
-		 * augmented with <code>type</code> property pointing to element
-		 * <code>name</code>
-		 * @memberOf elements
-		 */
-		add: function(name, factory) {
-			var that = this;
-			factories[name] = function() {
-				var elem = factory.apply(that, arguments);
-				if (elem)
-					elem.type = name;
-				
-				return elem;
-			};
-		},
-		
-		/**
-		 * Returns factory for specified name
-		 * @param {String} name
-		 * @returns {Function}
-		 */
-		get: function(name) {
-			return factories[name];
-		},
-		
-		/**
-		 * Creates new element with specified type
-		 * @param {String} name
-		 * @returns {Object}
-		 */
-		create: function(name) {
-			var args = [].slice.call(arguments, 1);
-			var factory = this.get(name);
-			return factory ? factory.apply(this, args) : null;
-		},
-		
-		/**
-		 * Check if passed element is of specified type
-		 * @param {Object} elem
-		 * @param {String} type
-		 * @returns {Boolean}
-		 */
-		is: function(elem, type) {
-			return this.type(elem) === type;
-		},
-
-		/**
-		 * Returns type of element
-		 * @param  {Object} elem
-		 * @return {String}
-		 */
-		type: function(elem) {
-			return elem && elem.type;
-		}
-	};
-	
-	/**
-	 * Element factory
-	 * @param {String} elementName Name of output element
-	 * @param {String} attrs Attributes definition. You may also pass
-	 * <code>Array</code> where each contains object with <code>name</code> 
-	 * and <code>value</code> properties, or <code>Object</code>
-	 * @param {Boolean} isEmpty Is expanded element should be empty
-	 */
-	module.exports.add('element', function(elementName, attrs, isEmpty) {
-		var ret = {
-			name: elementName,
-			is_empty: !!isEmpty
-		};
-
-		if (attrs) {
-			ret.attributes = [];
-			if (Array.isArray(attrs)) {
-				ret.attributes = attrs;
-			} else if (typeof attrs === 'string') {
-				var m;
-				while ((m = reAttrs.exec(attrs))) {
-					ret.attributes.push({
-						name: m[2],
-						value: m[4],
-						isDefault: m[1] == '@',
-						isImplied: m[1] == '!'
-					});
-				}
-			} else {
-				ret.attributes = Object.keys(attrs).map(function(name) {
-					return {
-						name: name, 
-						value: attrs[name]
-					};
-				});
-			}
-		}
-		
-		return ret;
-	});
-	
-	module.exports.add('snippet', commonFactory);
-	module.exports.add('reference', commonFactory);
-	module.exports.add('empty', function() {
-		return {};
-	});
-	
-	return module.exports;
-});
-},{}],25:[function(require,module,exports){
-/**
- * Utility module that provides ordered storage of function handlers. 
- * Many Emmet modules' functionality can be extended/overridden by custom
- * function. This modules provides unified storage of handler functions, their 
- * management and execution
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('../utils/common');
-	
-	/**
-	 * @type HandlerList
-	 * @constructor
-	 */
-	function HandlerList() {
-		this._list = [];
-	}
-	
-	HandlerList.prototype = {
-		/**
-		 * Adds function handler
-		 * @param {Function} fn Handler
-		 * @param {Object} options Handler options. Possible values are:<br><br>
-		 * <b>order</b> : (<code>Number</code>) – order in handler list. Handlers
-		 * with higher order value will be executed earlier.
-		 */
-		add: function(fn, options) {
-			// TODO hack for stable sort, remove after fixing `list()`
-			var order = this._list.length;
-			if (options && 'order' in options) {
-				order = options.order * 10000;
-			}
-			this._list.push(utils.extend({}, options, {order: order, fn: fn}));
-		},
-		
-		/**
-		 * Removes handler from list
-		 * @param {Function} fn
-		 */
-		remove: function(fn) {
-			var item = utils.find(this._list, function(item) {
-				return item.fn === fn;
-			});
-			if (item) {
-				this._list.splice(this._list.indexOf(item), 1);
-			}
-		},
-		
-		/**
-		 * Returns ordered list of handlers. By default, handlers 
-		 * with the same <code>order</code> option returned in reverse order, 
-		 * i.e. the latter function was added into the handlers list, the higher 
-		 * it will be in the returned array 
-		 * @returns {Array}
-		 */
-		list: function() {
-			// TODO make stable sort
-			return this._list.sort(function(a, b) {
-				return b.order - a.order;
-			});
-		},
-		
-		/**
-		 * Returns ordered list of handler functions
-		 * @returns {Array}
-		 */
-		listFn: function() {
-			return this.list().map(function(item) {
-				return item.fn;
-			});
-		},
-		
-		/**
-		 * Executes handler functions in their designated order. If function
-		 * returns <code>skipVal</code>, meaning that function was unable to 
-		 * handle passed <code>args</code>, the next function will be executed
-		 * and so on.
-		 * @param {Object} skipValue If function returns this value, execute 
-		 * next handler.
-		 * @param {Array} args Arguments to pass to handler function
-		 * @returns {Boolean} Whether any of registered handlers performed
-		 * successfully  
-		 */
-		exec: function(skipValue, args) {
-			args = args || [];
-			var result = null;
-			utils.find(this.list(), function(h) {
-				result = h.fn.apply(h, args);
-				if (result !== skipValue) {
-					return true;
-				}
-			});
-			
-			return result;
-		}
-	};
-	
-	return {
-		/**
-		 * Factory method that produces <code>HandlerList</code> instance
-		 * @returns {HandlerList}
-		 * @memberOf handlerList
-		 */
-		create: function() {
-			return new HandlerList();
-		}
-	};
-});
-},{"../utils/common":73}],26:[function(require,module,exports){
-/**
- * HTML matcher: takes string and searches for HTML tag pairs for given position 
- * 
- * Unlike “classic” matchers, it parses content from the specified 
- * position, not from the start, so it may work even outside HTML documents
- * (for example, inside strings of programming languages like JavaScript, Python 
- * etc.)
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var range = require('./range');
-
-	// Regular Expressions for parsing tags and attributes
-	var reOpenTag = /^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/;
-	var reCloseTag = /^<\/([\w\:\-]+)[^>]*>/;
-
-	function openTag(i, match) {
-		return {
-			name: match[1],
-			selfClose: !!match[3],
-			/** @type Range */
-			range: range(i, match[0]),
-			type: 'open'
-		};
-	}
-	
-	function closeTag(i, match) {
-		return {
-			name: match[1],
-			/** @type Range */
-			range: range(i, match[0]),
-			type: 'close'
-		};
-	}
-	
-	function comment(i, match) {
-		return {
-			/** @type Range */
-			range: range(i, typeof match == 'number' ? match - i : match[0]),
-			type: 'comment'
-		};
-	}
-	
-	/**
-	 * Creates new tag matcher session
-	 * @param {String} text
-	 */
-	function createMatcher(text) {
-		var memo = {}, m;
-		return {
-			/**
-			 * Test if given position matches opening tag
-			 * @param {Number} i
-			 * @returns {Object} Matched tag object
-			 */
-			open: function(i) {
-				var m = this.matches(i);
-				return m && m.type == 'open' ? m : null;
-			},
-			
-			/**
-			 * Test if given position matches closing tag
-			 * @param {Number} i
-			 * @returns {Object} Matched tag object
-			 */
-			close: function(i) {
-				var m = this.matches(i);
-				return m && m.type == 'close' ? m : null;
-			},
-			
-			/**
-			 * Matches either opening or closing tag for given position
-			 * @param i
-			 * @returns
-			 */
-			matches: function(i) {
-				var key = 'p' + i;
-				
-				if (!(key in memo)) {
-					memo[key] = false;
-					if (text.charAt(i) == '<') {
-						var substr = text.slice(i);
-						if ((m = substr.match(reOpenTag))) {
-							memo[key] = openTag(i, m);
-						} else if ((m = substr.match(reCloseTag))) {
-							memo[key] = closeTag(i, m);
-						}
-					}
-				}
-				
-				return memo[key];
-			},
-			
-			/**
-			 * Returns original text
-			 * @returns {String}
-			 */
-			text: function() {
-				return text;
-			},
-
-			clean: function() {
-				memo = text = m = null;
-			}
-		};
-	}
-	
-	function matches(text, pos, pattern) {
-		return text.substring(pos, pos + pattern.length) == pattern;
-	}
-	
-	/**
-	 * Search for closing pair of opening tag
-	 * @param {Object} open Open tag instance
-	 * @param {Object} matcher Matcher instance
-	 */
-	function findClosingPair(open, matcher) {
-		var stack = [], tag = null;
-		var text = matcher.text();
-		
-		for (var pos = open.range.end, len = text.length; pos < len; pos++) {
-			if (matches(text, pos, '<!--')) {
-				// skip to end of comment
-				for (var j = pos; j < len; j++) {
-					if (matches(text, j, '-->')) {
-						pos = j + 3;
-						break;
-					}
-				}
-			}
-			
-			if ((tag = matcher.matches(pos))) {
-				if (tag.type == 'open' && !tag.selfClose) {
-					stack.push(tag.name);
-				} else if (tag.type == 'close') {
-					if (!stack.length) { // found valid pair?
-						return tag.name == open.name ? tag : null;
-					}
-					
-					// check if current closing tag matches previously opened one
-					if (stack[stack.length - 1] == tag.name) {
-						stack.pop();
-					} else {
-						var found = false;
-						while (stack.length && !found) {
-							var last = stack.pop();
-							if (last == tag.name) {
-								found = true;
-							}
-						}
-						
-						if (!stack.length && !found) {
-							return tag.name == open.name ? tag : null;
-						}
-					}
-				}
-
-				pos = tag.range.end - 1;
-			}
-		}
-	}
-	
-	return {
-		/**
-		 * Main function: search for tag pair in <code>text</code> for given 
-		 * position
-		 * @memberOf htmlMatcher
-		 * @param {String} text 
-		 * @param {Number} pos
-		 * @returns {Object}
-		 */
-		find: function(text, pos) {
-			var matcher = createMatcher(text); 
-			var open = null, close = null;
-			var j, jl;
-			
-			for (var i = pos; i >= 0; i--) {
-				if ((open = matcher.open(i))) {
-					// found opening tag
-					if (open.selfClose) {
-						if (open.range.cmp(pos, 'lt', 'gt')) {
-							// inside self-closing tag, found match
-							break;
-						}
-						
-						// outside self-closing tag, continue
-						continue;
-					}
-					
-					close = findClosingPair(open, matcher);
-					if (close) {
-						// found closing tag.
-						var r = range.create2(open.range.start, close.range.end);
-						if (r.contains(pos)) {
-							break;
-						}
-					} else if (open.range.contains(pos)) {
-						// we inside empty HTML tag like <br>
-						break;
-					}
-					
-					open = null;
-				} else if (matches(text, i, '-->')) {
-					// skip back to comment start
-					for (j = i - 1; j >= 0; j--) {
-						if (matches(text, j, '-->')) {
-							// found another comment end, do nothing
-							break;
-						} else if (matches(text, j, '<!--')) {
-							i = j;
-							break;
-						}
-					}
-				} else if (matches(text, i, '<!--')) {
-					// we're inside comment, match it
-					for (j = i + 4, jl = text.length; j < jl; j++) {
-						if (matches(text, j, '-->')) {
-							j += 3;
-							break;
-						}
-					}
-					
-					open = comment(i, j);
-					break;
-				}
-			}
-			
-			matcher.clean();
-
-			if (open) {
-				var outerRange = null;
-				var innerRange = null;
-				
-				if (close) {
-					outerRange = range.create2(open.range.start, close.range.end);
-					innerRange = range.create2(open.range.end, close.range.start);
-				} else {
-					outerRange = innerRange = range.create2(open.range.start, open.range.end);
-				}
-				
-				if (open.type == 'comment') {
-					// adjust positions of inner range for comment
-					var _c = outerRange.substring(text);
-					innerRange.start += _c.length - _c.replace(/^<\!--\s*/, '').length;
-					innerRange.end -= _c.length - _c.replace(/\s*-->$/, '').length;
-				}
-				
-				return {
-					open: open,
-					close: close,
-					type: open.type == 'comment' ? 'comment' : 'tag',
-					innerRange: innerRange,
-					innerContent: function() {
-						return this.innerRange.substring(text);
-					},
-					outerRange: outerRange,
-					outerContent: function() {
-						return this.outerRange.substring(text);
-					},
-					range: !innerRange.length() || !innerRange.cmp(pos, 'lte', 'gte') ? outerRange : innerRange,
-					content: function() {
-						return this.range.substring(text);
-					},
-					source: text
-				};
-			}
-		},
-		
-		/**
-		 * The same as <code>find()</code> method, but restricts matched result 
-		 * to <code>tag</code> type
-		 * @param {String} text 
-		 * @param {Number} pos
-		 * @returns {Object}
-		 */
-		tag: function(text, pos) {
-			var result = this.find(text, pos);
-			if (result && result.type == 'tag') {
-				return result;
-			}
-		}
-	};
-});
-},{"./range":30}],27:[function(require,module,exports){
-/**
- * Simple logger for Emmet
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	return {
-		log: function() {
-			if (typeof console != 'undefined' && console.log) {
-				console.log.apply(console, arguments);
-			}
-		}
-	}
-})
-},{}],28:[function(require,module,exports){
-/**
- * Common module's preferences storage. This module 
- * provides general storage for all module preferences, their description and
- * default values.<br><br>
- * 
- * This module can also be used to list all available properties to create 
- * UI for updating properties
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('../utils/common');
-
-	var preferences = {};
-	var defaults = {};
-	var _dbgDefaults = null;
-	var _dbgPreferences = null;
-
-	function toBoolean(val) {
-		if (typeof val === 'string') {
-			val = val.toLowerCase();
-			return val == 'yes' || val == 'true' || val == '1';
-		}
-
-		return !!val;
-	}
-	
-	function isValueObj(obj) {
-		return typeof obj === 'object'
-			&& !Array.isArray(obj) 
-			&& 'value' in obj 
-			&& Object.keys(obj).length < 3;
-	}
-	
-	return {
-		/**
-		 * Creates new preference item with default value
-		 * @param {String} name Preference name. You can also pass object
-		 * with many options
-		 * @param {Object} value Preference default value
-		 * @param {String} description Item textual description
-		 * @memberOf preferences
-		 */
-		define: function(name, value, description) {
-			var prefs = name;
-			if (typeof name === 'string') {
-				prefs = {};
-				prefs[name] = {
-					value: value,
-					description: description
-				};
-			}
-			
-			Object.keys(prefs).forEach(function(k) {
-				var v = prefs[k];
-				defaults[k] = isValueObj(v) ? v : {value: v};
-			});
-		},
-		
-		/**
-		 * Updates preference item value. Preference value should be defined
-		 * first with <code>define</code> method.
-		 * @param {String} name Preference name. You can also pass object
-		 * with many options
-		 * @param {Object} value Preference default value
-		 * @memberOf preferences
-		 */
-		set: function(name, value) {
-			var prefs = name;
-			if (typeof name === 'string') {
-				prefs = {};
-				prefs[name] = value;
-			}
-			
-			Object.keys(prefs).forEach(function(k) {
-				var v = prefs[k];
-				if (!(k in defaults)) {
-					throw new Error('Property "' + k + '" is not defined. You should define it first with `define` method of current module');
-				}
-				
-				// do not set value if it equals to default value
-				if (v !== defaults[k].value) {
-					// make sure we have value of correct type
-					switch (typeof defaults[k].value) {
-						case 'boolean':
-							v = toBoolean(v);
-							break;
-						case 'number':
-							v = parseInt(v + '', 10) || 0;
-							break;
-						default: // convert to string
-							if (v !== null) {
-								v += '';
-							}
-					}
-
-					preferences[k] = v;
-				} else if (k in preferences) {
-					delete preferences[k];
-				}
-			});
-		},
-		
-		/**
-		 * Returns preference value
-		 * @param {String} name
-		 * @returns {String} Returns <code>undefined</code> if preference is 
-		 * not defined
-		 */
-		get: function(name) {
-			if (name in preferences) {
-				return preferences[name];
-			}
-			
-			if (name in defaults) {
-				return defaults[name].value;
-			}
-			
-			return void 0;
-		},
-		
-		/**
-		 * Returns comma-separated preference value as array of values
-		 * @param {String} name
-		 * @returns {Array} Returns <code>undefined</code> if preference is 
-		 * not defined, <code>null</code> if string cannot be converted to array
-		 */
-		getArray: function(name) {
-			var val = this.get(name);
-			if (typeof val === 'undefined' || val === null || val === '')  {
-				return null;
-			}
-
-			val = val.split(',').map(utils.trim);
-			if (!val.length) {
-				return null;
-			}
-			
-			return val;
-		},
-		
-		/**
-		 * Returns comma and colon-separated preference value as dictionary
-		 * @param {String} name
-		 * @returns {Object}
-		 */
-		getDict: function(name) {
-			var result = {};
-			this.getArray(name).forEach(function(val) {
-				var parts = val.split(':');
-				result[parts[0]] = parts[1];
-			});
-			
-			return result;
-		},
-		
-		/**
-		 * Returns description of preference item
-		 * @param {String} name Preference name
-		 * @returns {Object}
-		 */
-		description: function(name) {
-			return name in defaults ? defaults[name].description : void 0;
-		},
-		
-		/**
-		 * Completely removes specified preference(s)
-		 * @param {String} name Preference name (or array of names)
-		 */
-		remove: function(name) {
-			if (!Array.isArray(name)) {
-				name = [name];
-			}
-			
-			name.forEach(function(key) {
-				if (key in preferences) {
-					delete preferences[key];
-				}
-				
-				if (key in defaults) {
-					delete defaults[key];
-				}
-			});
-		},
-		
-		/**
-		 * Returns sorted list of all available properties
-		 * @returns {Array}
-		 */
-		list: function() {
-			return Object.keys(defaults).sort().map(function(key) {
-				return {
-					name: key,
-					value: this.get(key),
-					type: typeof defaults[key].value,
-					description: defaults[key].description
-				};
-			}, this);
-		},
-		
-		/**
-		 * Loads user-defined preferences from JSON
-		 * @param {Object} json
-		 * @returns
-		 */
-		load: function(json) {
-			Object.keys(json).forEach(function(key) {
-				this.set(key, json[key]);
-			}, this);
-		},
-
-		/**
-		 * Returns hash of user-modified preferences
-		 * @returns {Object}
-		 */
-		exportModified: function() {
-			return utils.extend({}, preferences);
-		},
-		
-		/**
-		 * Reset to defaults
-		 * @returns
-		 */
-		reset: function() {
-			preferences = {};
-		},
-		
-		/**
-		 * For unit testing: use empty storage
-		 */
-		_startTest: function() {
-			_dbgDefaults = defaults;
-			_dbgPreferences = preferences;
-			defaults = {};
-			preferences = {};
-		},
-		
-		/**
-		 * For unit testing: restore original storage
-		 */
-		_stopTest: function() {
-			defaults = _dbgDefaults;
-			preferences = _dbgPreferences;
-		}
-	};
-});
-},{"../utils/common":73}],29:[function(require,module,exports){
-/**
- * Output profile module.
- * Profile defines how XHTML output data should look like
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('../utils/common');
-	var resources = require('./resources');
-	var prefs = require('./preferences');
-
-	prefs.define('profile.allowCompactBoolean', true, 
-		'This option can be used to globally disable compact form of boolean ' + 
-		'attribues (attributes where name and value are equal). With compact' +
-		'form enabled, HTML tags can be outputted as <code>&lt;div contenteditable&gt;</code> ' +
-		'instead of <code>&lt;div contenteditable="contenteditable"&gt;</code>');
-
-	prefs.define('profile.booleanAttributes', '^contenteditable|seamless$', 
-		'A regular expression for attributes that should be boolean by default.' + 
-		'If attribute name matches this expression, you don’t have to write dot ' +
-		'after attribute name in Emmet abbreviation to mark it as boolean.');
-
-	var profiles = {};
-	
-	var defaultProfile = {
-		tag_case: 'asis',
-		attr_case: 'asis',
-		attr_quotes: 'double',
-		
-		// Each tag on new line
-		tag_nl: 'decide',
-		
-		// With tag_nl === true, defines if leaf node (e.g. node with no children)
-		// should have formatted line breaks
-		tag_nl_leaf: false,
-		
-		place_cursor: true,
-		
-		// Indent tags
-		indent: true,
-		
-		// How many inline elements should be to force line break 
-		// (set to 0 to disable)
-		inline_break: 3,
-
-		// Produce compact notation of boolean attribues:
-		// attributes where name and value are equal.
-		// With this option enabled, HTML filter will
-		// produce <div contenteditable> instead of <div contenteditable="contenteditable">
-		compact_bool: false,
-		
-		// Use self-closing style for writing empty elements, e.g. <br /> or <br>
-		self_closing_tag: 'xhtml',
-		
-		// Profile-level output filters, re-defines syntax filters 
-		filters: '',
-		
-		// Additional filters applied to abbreviation.
-		// Unlike "filters", this preference doesn't override default filters
-		// but add the instead every time given profile is chosen
-		extraFilters: ''
-	};
-	
-	/**
-	 * @constructor
-	 * @type OutputProfile
-	 * @param {Object} options
-	 */
-	function OutputProfile(options) {
-		utils.extend(this, defaultProfile, options);
-	}
-	
-	OutputProfile.prototype = {
-		/**
-		 * Transforms tag name case depending on current profile settings
-		 * @param {String} name String to transform
-		 * @returns {String}
-		 */
-		tagName: function(name) {
-			return stringCase(name, this.tag_case);
-		},
-		
-		/**
-		 * Transforms attribute name case depending on current profile settings 
-		 * @param {String} name String to transform
-		 * @returns {String}
-		 */
-		attributeName: function(name) {
-			return stringCase(name, this.attr_case);
-		},
-		
-		/**
-		 * Returns quote character for current profile
-		 * @returns {String}
-		 */
-		attributeQuote: function() {
-			return this.attr_quotes == 'single' ? "'" : '"';
-		},
-
-		/**
-		 * Returns self-closing tag symbol for current profile
-		 * @returns {String}
-		 */
-		selfClosing: function() {
-			if (this.self_closing_tag == 'xhtml')
-				return ' /';
-			
-			if (this.self_closing_tag === true)
-				return '/';
-			
-			return '';
-		},
-		
-		/**
-		 * Returns cursor token based on current profile settings
-		 * @returns {String}
-		 */
-		cursor: function() {
-			return this.place_cursor ? utils.getCaretPlaceholder() : '';
-		},
-
-		/**
-		 * Check if attribute with given name is boolean,
-		 * e.g. written as `contenteditable` instead of 
-		 * `contenteditable="contenteditable"`
-		 * @param  {String}  name Attribute name
-		 * @return {Boolean}
-		 */
-		isBoolean: function(name, value) {
-			if (name == value) {
-				return true;
-			}
-
-			var boolAttrs = prefs.get('profile.booleanAttributes');
-			if (!value && boolAttrs) {
-				boolAttrs = new RegExp(boolAttrs, 'i');
-				return boolAttrs.test(name);
-			}
-
-			return false;
-		},
-
-		/**
-		 * Check if compact boolean attribute record is 
-		 * allowed for current profile
-		 * @return {Boolean}
-		 */
-		allowCompactBoolean: function() {
-			return this.compact_bool && prefs.get('profile.allowCompactBoolean');
-		}
-	};
-	
-	/**
-	 * Helper function that converts string case depending on 
-	 * <code>caseValue</code> 
-	 * @param {String} str String to transform
-	 * @param {String} caseValue Case value: can be <i>lower</i>, 
-	 * <i>upper</i> and <i>leave</i>
-	 * @returns {String}
-	 */
-	function stringCase(str, caseValue) {
-		switch (String(caseValue || '').toLowerCase()) {
-			case 'lower':
-				return str.toLowerCase();
-			case 'upper':
-				return str.toUpperCase();
-		}
-		
-		return str;
-	}
-	
-	/**
-	 * Creates new output profile
-	 * @param {String} name Profile name
-	 * @param {Object} options Profile options
-	 */
-	function createProfile(name, options) {
-		return profiles[name.toLowerCase()] = new OutputProfile(options);
-	}
-	
-	function createDefaultProfiles() {
-		createProfile('xhtml');
-		createProfile('html', {self_closing_tag: false, compact_bool: true});
-		createProfile('xml', {self_closing_tag: true, tag_nl: true});
-		createProfile('plain', {tag_nl: false, indent: false, place_cursor: false});
-		createProfile('line', {tag_nl: false, indent: false, extraFilters: 's'});
-		createProfile('css', {tag_nl: true});
-		createProfile('css_line', {tag_nl: false});
-	}
-	
-	createDefaultProfiles();
-	
-	return  {
-		/**
-		 * Creates new output profile and adds it into internal dictionary
-		 * @param {String} name Profile name
-		 * @param {Object} options Profile options
-		 * @memberOf emmet.profile
-		 * @returns {Object} New profile
-		 */
-		create: function(name, options) {
-			if (arguments.length == 2)
-				return createProfile(name, options);
-			else
-				// create profile object only
-				return new OutputProfile(utils.defaults(name || {}, defaultProfile));
-		},
-		
-		/**
-		 * Returns profile by its name. If profile wasn't found, returns
-		 * 'plain' profile
-		 * @param {String} name Profile name. Might be profile itself
-		 * @param {String} syntax. Optional. Current editor syntax. If defined,
-		 * profile is searched in resources first, then in predefined profiles
-		 * @returns {Object}
-		 */
-		get: function(name, syntax) {
-			if (!name && syntax) {
-				// search in user resources first
-				var profile = resources.findItem(syntax, 'profile');
-				if (profile) {
-					name = profile;
-				}
-			}
-			
-			if (!name) {
-				return profiles.plain;
-			}
-			
-			if (name instanceof OutputProfile) {
-				return name;
-			}
-			
-			if (typeof name === 'string' && name.toLowerCase() in profiles) {
-				return profiles[name.toLowerCase()];
-			}
-			
-			return this.create(name);
-		},
-		
-		/**
-		 * Deletes profile with specified name
-		 * @param {String} name Profile name
-		 */
-		remove: function(name) {
-			name = (name || '').toLowerCase();
-			if (name in profiles)
-				delete profiles[name];
-		},
-		
-		/**
-		 * Resets all user-defined profiles
-		 */
-		reset: function() {
-			profiles = {};
-			createDefaultProfiles();
-		},
-		
-		/**
-		 * Helper function that converts string case depending on 
-		 * <code>caseValue</code> 
-		 * @param {String} str String to transform
-		 * @param {String} caseValue Case value: can be <i>lower</i>, 
-		 * <i>upper</i> and <i>leave</i>
-		 * @returns {String}
-		 */
-		stringCase: stringCase
-	};
-});
-},{"../utils/common":73,"./preferences":28,"./resources":31}],30:[function(require,module,exports){
-/**
- * Helper module to work with ranges
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	function cmp(a, b, op) {
-		switch (op) {
-			case 'eq':
-			case '==':
-				return a === b;
-			case 'lt':
-			case '<':
-				return a < b;
-			case 'lte':
-			case '<=':
-				return a <= b;
-			case 'gt':
-			case '>':
-				return a > b;
-			case 'gte':
-			case '>=':
-				return a >= b;
-		}
-	}
-	
-	
-	/**
-	 * @type Range
-	 * @constructor
-	 * @param {Object} start
-	 * @param {Number} len
-	 */
-	function Range(start, len) {
-		if (typeof start === 'object' && 'start' in start) {
-			// create range from object stub
-			this.start = Math.min(start.start, start.end);
-			this.end = Math.max(start.start, start.end);
-		} else if (Array.isArray(start)) {
-			this.start = start[0];
-			this.end = start[1];
-		} else {
-			len = typeof len === 'string' ? len.length : +len;
-			this.start = start;
-			this.end = start + len;
-		}
-	}
-	
-	Range.prototype = {
-		length: function() {
-			return Math.abs(this.end - this.start);
-		},
-		
-		/**
-		 * Returns <code>true</code> if passed range is equals to current one
-		 * @param {Range} range
-		 * @returns {Boolean}
-		 */
-		equal: function(range) {
-			return this.cmp(range, 'eq', 'eq');
-//			return this.start === range.start && this.end === range.end;
-		},
-		
-		/**
-		 * Shifts indexes position with passed <code>delta</code>
-		 * @param {Number} delta
-		 * @returns {Range} range itself
-		 */
-		shift: function(delta) {
-			this.start += delta;
-			this.end += delta;
-			return this;
-		},
-		
-		/**
-		 * Check if two ranges are overlapped
-		 * @param {Range} range
-		 * @returns {Boolean}
-		 */
-		overlap: function(range) {
-			return range.start <= this.end && range.end >= this.start;
-		},
-		
-		/**
-		 * Finds intersection of two ranges
-		 * @param {Range} range
-		 * @returns {Range} <code>null</code> if ranges does not overlap
-		 */
-		intersection: function(range) {
-			if (this.overlap(range)) {
-				var start = Math.max(range.start, this.start);
-				var end = Math.min(range.end, this.end);
-				return new Range(start, end - start);
-			}
-			
-			return null;
-		},
-		
-		/**
-		 * Returns the union of the thow ranges.
-		 * @param {Range} range
-		 * @returns {Range} <code>null</code> if ranges are not overlapped
-		 */
-		union: function(range) {
-			if (this.overlap(range)) {
-				var start = Math.min(range.start, this.start);
-				var end = Math.max(range.end, this.end);
-				return new Range(start, end - start);
-			}
-			
-			return null;
-		},
-		
-		/**
-		 * Returns a Boolean value that indicates whether a specified position 
-		 * is in a given range.
-		 * @param {Number} loc
-		 */
-		inside: function(loc) {
-			return this.cmp(loc, 'lte', 'gt');
-//			return this.start <= loc && this.end > loc;
-		},
-		
-		/**
-		 * Returns a Boolean value that indicates whether a specified position 
-		 * is in a given range, but not equals bounds.
-		 * @param {Number} loc
-		 */
-		contains: function(loc) {
-			return this.cmp(loc, 'lt', 'gt');
-		},
-		
-		/**
-		 * Check if current range completely includes specified one
-		 * @param {Range} r
-		 * @returns {Boolean} 
-		 */
-		include: function(r) {
-			return this.cmp(r, 'lte', 'gte');
-//			return this.start <= r.start && this.end >= r.end;
-		},
-		
-		/**
-		 * Low-level comparision method
-		 * @param {Number} loc
-		 * @param {String} left Left comparison operator
-		 * @param {String} right Right comaprison operator
-		 */
-		cmp: function(loc, left, right) {
-			var a, b;
-			if (loc instanceof Range) {
-				a = loc.start;
-				b = loc.end;
-			} else {
-				a = b = loc;
-			}
-			
-			return cmp(this.start, a, left || '<=') && cmp(this.end, b, right || '>');
-		},
-		
-		/**
-		 * Returns substring of specified <code>str</code> for current range
-		 * @param {String} str
-		 * @returns {String}
-		 */
-		substring: function(str) {
-			return this.length() > 0 
-				? str.substring(this.start, this.end) 
-				: '';
-		},
-		
-		/**
-		 * Creates copy of current range
-		 * @returns {Range}
-		 */
-		clone: function() {
-			return new Range(this.start, this.length());
-		},
-		
-		/**
-		 * @returns {Array}
-		 */
-		toArray: function() {
-			return [this.start, this.end];
-		},
-		
-		toString: function() {
-			return this.valueOf();
-		},
-
-		valueOf: function() {
-			return '{' + this.start + ', ' + this.length() + '}';
-		}
-	};
-
-	/**
-	 * Creates new range object instance
-	 * @param {Object} start Range start or array with 'start' and 'end'
-	 * as two first indexes or object with 'start' and 'end' properties
-	 * @param {Number} len Range length or string to produce range from
-	 * @returns {Range}
-	 */
-	module.exports = function(start, len) {
-		if (typeof start == 'undefined' || start === null)
-			return null;
-			
-		if (start instanceof Range)
-			return start;
-		
-		if (typeof start == 'object' && 'start' in start && 'end' in start) {
-			len = start.end - start.start;
-			start = start.start;
-		}
-			
-		return new Range(start, len);
-	};
-
-	module.exports.create = module.exports;
-
-	module.exports.isRange = function(val) {
-		return val instanceof Range;
-	};
-
-	/**
-	 * <code>Range</code> object factory, the same as <code>this.create()</code>
-	 * but last argument represents end of range, not length
-	 * @returns {Range}
-	 */
-	module.exports.create2 = function(start, end) {
-		if (typeof start === 'number' && typeof end === 'number') {
-			end -= start;
-		}
-		
-		return this.create(start, end);
-	};
-
-	/**
-	 * Helper function that sorts ranges in order as they
-	 * appear in text
-	 * @param  {Array} ranges
-	 * @return {Array}
-	 */
-	module.exports.sort = function(ranges, reverse) {
-		ranges = ranges.sort(function(a, b) {
-			if (a.start === b.start) {
-				return b.end - a.end;
-			}
-
-			return a.start - b.start;
-		});
-
-		reverse && ranges.reverse();
-		return ranges;
-	};
-
-	return module.exports;
-});
-},{}],31:[function(require,module,exports){
-/**
- * Parsed resources (snippets, abbreviations, variables, etc.) for Emmet.
- * Contains convenient method to get access for snippets with respect of 
- * inheritance. Also provides ability to store data in different vocabularies
- * ('system' and 'user') for fast and safe resource update
- * @author Sergey Chikuyonok (serge.che@gmail.com)
- * @link http://chikuyonok.ru
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var handlerList = require('./handlerList');
-	var utils = require('../utils/common');
-	var elements = require('./elements');
-	var logger = require('../assets/logger');
-	var stringScore = require('../vendor/stringScore');
-	var cssResolver = require('../resolver/css');
-
-	var VOC_SYSTEM = 'system';
-	var VOC_USER = 'user';
-	
-	var cache = {};
-		
-	/** Regular expression for XML tag matching */
-	var reTag = /^<(\w+\:?[\w\-]*)((?:\s+[@\!]?[\w\:\-]+\s*=\s*(['"]).*?\3)*)\s*(\/?)>/;
-		
-	var systemSettings = {};
-	var userSettings = {};
-	
-	/** @type HandlerList List of registered abbreviation resolvers */
-	var resolvers = handlerList.create();
-
-	function each(obj, fn) {
-		if (!obj) {
-			return;
-		}
-
-		Object.keys(obj).forEach(function(key) {
-			fn(obj[key], key);
-		});
-	}
-	
-	/**
-	 * Normalizes caret plceholder in passed text: replaces | character with
-	 * default caret placeholder
-	 * @param {String} text
-	 * @returns {String}
-	 */
-	function normalizeCaretPlaceholder(text) {
-		return utils.replaceUnescapedSymbol(text, '|', utils.getCaretPlaceholder());
-	}
-	
-	function parseItem(name, value, type) {
-		value = normalizeCaretPlaceholder(value);
-		
-		if (type == 'snippets') {
-			return elements.create('snippet', value);
-		}
-		
-		if (type == 'abbreviations') {
-			return parseAbbreviation(name, value);
-		}
-	}
-	
-	/**
-	 * Parses single abbreviation
-	 * @param {String} key Abbreviation name
-	 * @param {String} value Abbreviation value
-	 * @return {Object}
-	 */
-	function parseAbbreviation(key, value) {
-		key = utils.trim(key);
-		var m;
-		if ((m = reTag.exec(value))) {
-			return elements.create('element', m[1], m[2], m[4] == '/');
-		} else {
-			// assume it's reference to another abbreviation
-			return elements.create('reference', value);
-		}
-	}
-	
-	/**
-	 * Normalizes snippet key name for better fuzzy search
-	 * @param {String} str
-	 * @returns {String}
-	 */
-	function normalizeName(str) {
-		return str.replace(/:$/, '').replace(/:/g, '-');
-	}
-
-	function expandSnippetsDefinition(snippets) {
-		var out = {};
-		each(snippets, function(val, key) {
-			var items = key.split('|');
-			// do not use iterators for better performance
-			for (var i = items.length - 1; i >= 0; i--) {
-				out[items[i]] = val;
-			}
-		});
-
-		return out;
-	}
-
-	utils.extend(exports, {
-		/**
-		 * Sets new unparsed data for specified settings vocabulary
-		 * @param {Object} data
-		 * @param {String} type Vocabulary type ('system' or 'user')
-		 * @memberOf resources
-		 */
-		setVocabulary: function(data, type) {
-			cache = {};
-
-			// sections like "snippets" and "abbreviations" could have
-			// definitions like `"f|fs": "fieldset"` which is the same as distinct
-			// "f" and "fs" keys both equals to "fieldset".
-			// We should parse these definitions first
-			var voc = {};
-			each(data, function(section, syntax) {
-				var _section = {};
-				each(section, function(subsection, name) {
-					if (name == 'abbreviations' || name == 'snippets') {
-						subsection = expandSnippetsDefinition(subsection);
-					}
-					_section[name] = subsection;
-				});
-
-				voc[syntax] = _section;
-			});
-			 
-
-			if (type == VOC_SYSTEM) {
-				systemSettings = voc;
-			} else {
-				userSettings = voc;
-			}
-		},
-		
-		/**
-		 * Returns resource vocabulary by its name
-		 * @param {String} name Vocabulary name ('system' or 'user')
-		 * @return {Object}
-		 */
-		getVocabulary: function(name) {
-			return name == VOC_SYSTEM ? systemSettings : userSettings;
-		},
-		
-		/**
-		 * Returns resource (abbreviation, snippet, etc.) matched for passed 
-		 * abbreviation
-		 * @param {AbbreviationNode} node
-		 * @param {String} syntax
-		 * @returns {Object}
-		 */
-		getMatchedResource: function(node, syntax) {
-			return resolvers.exec(null, utils.toArray(arguments)) 
-				|| this.findSnippet(syntax, node.name());
-		},
-		
-		/**
-		 * Returns variable value
-		 * @return {String}
-		 */
-		getVariable: function(name) {
-			return (this.getSection('variables') || {})[name];
-		},
-		
-		/**
-		 * Store runtime variable in user storage
-		 * @param {String} name Variable name
-		 * @param {String} value Variable value
-		 */
-		setVariable: function(name, value){
-			var voc = this.getVocabulary('user') || {};
-			if (!('variables' in voc))
-				voc.variables = {};
-				
-			voc.variables[name] = value;
-			this.setVocabulary(voc, 'user');
-		},
-		
-		/**
-		 * Check if there are resources for specified syntax
-		 * @param {String} syntax
-		 * @return {Boolean}
-		 */
-		hasSyntax: function(syntax) {
-			return syntax in this.getVocabulary(VOC_USER) 
-				|| syntax in this.getVocabulary(VOC_SYSTEM);
-		},
-		
-		/**
-		 * Registers new abbreviation resolver.
-		 * @param {Function} fn Abbreviation resolver which will receive 
-		 * abbreviation as first argument and should return parsed abbreviation
-		 * object if abbreviation has handled successfully, <code>null</code>
-		 * otherwise
-		 * @param {Object} options Options list as described in 
-		 * {@link HandlerList#add()} method
-		 */
-		addResolver: function(fn, options) {
-			resolvers.add(fn, options);
-		},
-		
-		removeResolver: function(fn) {
-			resolvers.remove(fn);
-		},
-		
-		/**
-		 * Returns actual section data, merged from both
-		 * system and user data
-		 * @param {String} name Section name (syntax)
-		 * @param {String} ...args Subsections
-		 * @returns
-		 */
-		getSection: function(name) {
-			if (!name)
-				return null;
-			
-			if (!(name in cache)) {
-				cache[name] = utils.deepMerge({}, systemSettings[name], userSettings[name]);
-			}
-			
-			var data = cache[name], subsections = utils.toArray(arguments, 1), key;
-			while (data && (key = subsections.shift())) {
-				if (key in data) {
-					data = data[key];
-				} else {
-					return null;
-				}
-			}
-			
-			return data;
-		},
-		
-		/**
-		 * Recursively searches for a item inside top level sections (syntaxes)
-		 * with respect of `extends` attribute
-		 * @param {String} topSection Top section name (syntax)
-		 * @param {String} subsection Inner section name
-		 * @returns {Object}
-		 */
-		findItem: function(topSection, subsection) {
-			var data = this.getSection(topSection);
-			while (data) {
-				if (subsection in data)
-					return data[subsection];
-				
-				data = this.getSection(data['extends']);
-			}
-		},
-		
-		/**
-		 * Recursively searches for a snippet definition inside syntax section.
-		 * Definition is searched inside `snippets` and `abbreviations` 
-		 * subsections  
-		 * @param {String} syntax Top-level section name (syntax)
-		 * @param {String} name Snippet name
-		 * @returns {Object}
-		 */
-		findSnippet: function(syntax, name, memo) {
-			if (!syntax || !name)
-				return null;
-			
-			memo = memo || [];
-			
-			var names = [name];
-			// create automatic aliases to properties with colons,
-			// e.g. pos-a == pos:a
-			if (~name.indexOf('-')) {
-				names.push(name.replace(/\-/g, ':'));
-			}
-			
-			var data = this.getSection(syntax), matchedItem = null;
-			['snippets', 'abbreviations'].some(function(sectionName) {
-				var data = this.getSection(syntax, sectionName);
-				if (data) {
-					return names.some(function(n) {
-						if (data[n]) {
-							return matchedItem = parseItem(n, data[n], sectionName);
-						}
-					});
-				}
-			}, this);
-			
-			memo.push(syntax);
-			if (!matchedItem && data['extends'] && !~memo.indexOf(data['extends'])) {
-				// try to find item in parent syntax section
-				return this.findSnippet(data['extends'], name, memo);
-			}
-			
-			return matchedItem;
-		},
-		
-		/**
-		 * Performs fuzzy search of snippet definition
-		 * @param {String} syntax Top-level section name (syntax)
-		 * @param {String} name Snippet name
-		 * @returns
-		 */
-		fuzzyFindSnippet: function(syntax, name, minScore) {
-			var result = this.fuzzyFindMatches(syntax, name, minScore)[0];
-			if (result) {
-				return result.value.parsedValue;
-			}
-		},
-
-		fuzzyFindMatches: function(syntax, name, minScore) {
-			minScore = minScore || 0.3;
-			name = normalizeName(name);
-			var snippets = this.getAllSnippets(syntax);
-			
-			return Object.keys(snippets)
-				.map(function(key) {
-					var value = snippets[key];
-					return {
-						key: key,
-						score: stringScore.score(value.nk, name, 0.1),
-						value: value
-					};
-				})
-				.filter(function(item) {
-					return item.score >= minScore;
-				})
-				.sort(function(a, b) {
-					return a.score - b.score;
-				})
-				.reverse();
-		},
-		
-		/**
-		 * Returns plain dictionary of all available abbreviations and snippets
-		 * for specified syntax with respect of inheritance
-		 * @param {String} syntax
-		 * @returns {Object}
-		 */
-		getAllSnippets: function(syntax) {
-			var cacheKey = 'all-' + syntax;
-			if (!cache[cacheKey]) {
-				var stack = [], sectionKey = syntax;
-				var memo = [];
-				
-				do {
-					var section = this.getSection(sectionKey);
-					if (!section)
-						break;
-					
-					['snippets', 'abbreviations'].forEach(function(sectionName) {
-						var stackItem = {};
-						each(section[sectionName] || null, function(v, k) {
-							stackItem[k] = {
-								nk: normalizeName(k),
-								value: v,
-								parsedValue: parseItem(k, v, sectionName),
-								type: sectionName
-							};
-						});
-						
-						stack.push(stackItem);
-					});
-					
-					memo.push(sectionKey);
-					sectionKey = section['extends'];
-				} while (sectionKey && !~memo.indexOf(sectionKey));
-				
-				
-				cache[cacheKey] = utils.extend.apply(utils, stack.reverse());
-			}
-			
-			return cache[cacheKey];
-		},
-
-		/**
-		 * Returns newline character
-		 * @returns {String}
-		 */
-		getNewline: function() {
-			var nl = this.getVariable('newline');
-			return typeof nl === 'string' ? nl : '\n';
-		},
-		
-		/**
-		 * Sets new newline character that will be used in output
-		 * @param {String} str
-		 */
-		setNewline: function(str) {
-			this.setVariable('newline', str);
-			this.setVariable('nl', str);
-		}
-	});
-
-	// XXX add default resolvers
-	exports.addResolver(cssResolver.resolve.bind(cssResolver));
-
-	// try to load snippets
-	// hide it from Require.JS parser
-	(function(r) {
-		if (typeof define === 'undefined' || !define.amd) {
-			try {
-				var fs = r('fs');
-				var path = r('path');
-				
-				var defaultSnippets = fs.readFileSync(path.join(__dirname, '../snippets.json'), {encoding: 'utf8'});
-				exports.setVocabulary(JSON.parse(defaultSnippets), VOC_SYSTEM);
-			} catch (e) {}
-		}
-	})(require);
-	
-
-	return exports;
-});
-},{"../assets/logger":27,"../resolver/css":64,"../utils/common":73,"../vendor/stringScore":79,"./elements":24,"./handlerList":25}],32:[function(require,module,exports){
-/**
- * A trimmed version of CodeMirror's StringStream module for string parsing
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	/**
-	 * @type StringStream
-	 * @constructor
-	 * @param {String} string Assuming that bound string should be
-	 * immutable
-	 */
-	function StringStream(string) {
-		this.pos = this.start = 0;
-		this.string = string;
-		this._length = string.length;
-	}
-	
-	StringStream.prototype = {
-		/**
-		 * Returns true only if the stream is at the end of the line.
-		 * @returns {Boolean}
-		 */
-		eol: function() {
-			return this.pos >= this._length;
-		},
-		
-		/**
-		 * Returns true only if the stream is at the start of the line
-		 * @returns {Boolean}
-		 */
-		sol: function() {
-			return this.pos === 0;
-		},
-		
-		/**
-		 * Returns the next character in the stream without advancing it. 
-		 * Will return <code>undefined</code> at the end of the line.
-		 * @returns {String}
-		 */
-		peek: function() {
-			return this.string.charAt(this.pos);
-		},
-		
-		/**
-		 * Returns the next character in the stream and advances it.
-		 * Also returns <code>undefined</code> when no more characters are available.
-		 * @returns {String}
-		 */
-		next: function() {
-			if (this.pos < this._length)
-				return this.string.charAt(this.pos++);
-		},
-		
-		/**
-		 * match can be a character, a regular expression, or a function that
-		 * takes a character and returns a boolean. If the next character in the
-		 * stream 'matches' the given argument, it is consumed and returned.
-		 * Otherwise, undefined is returned.
-		 * @param {Object} match
-		 * @returns {String}
-		 */
-		eat: function(match) {
-			var ch = this.string.charAt(this.pos), ok;
-			if (typeof match == "string")
-				ok = ch == match;
-			else
-				ok = ch && (match.test ? match.test(ch) : match(ch));
-			
-			if (ok) {
-				++this.pos;
-				return ch;
-			}
-		},
-		
-		/**
-		 * Repeatedly calls <code>eat</code> with the given argument, until it
-		 * fails. Returns <code>true</code> if any characters were eaten.
-		 * @param {Object} match
-		 * @returns {Boolean}
-		 */
-		eatWhile: function(match) {
-			var start = this.pos;
-			while (this.eat(match)) {}
-			return this.pos > start;
-		},
-		
-		/**
-		 * Shortcut for <code>eatWhile</code> when matching white-space.
-		 * @returns {Boolean}
-		 */
-		eatSpace: function() {
-			var start = this.pos;
-			while (/[\s\u00a0]/.test(this.string.charAt(this.pos)))
-				++this.pos;
-			return this.pos > start;
-		},
-		
-		/**
-		 * Moves the position to the end of the line.
-		 */
-		skipToEnd: function() {
-			this.pos = this._length;
-		},
-		
-		/**
-		 * Skips to the next occurrence of the given character, if found on the
-		 * current line (doesn't advance the stream if the character does not
-		 * occur on the line). Returns true if the character was found.
-		 * @param {String} ch
-		 * @returns {Boolean}
-		 */
-		skipTo: function(ch) {
-			var found = this.string.indexOf(ch, this.pos);
-			if (found > -1) {
-				this.pos = found;
-				return true;
-			}
-		},
-		
-		/**
-		 * Skips to <code>close</code> character which is pair to <code>open</code>
-		 * character, considering possible pair nesting. This function is used
-		 * to consume pair of characters, like opening and closing braces
-		 * @param {String} open
-		 * @param {String} close
-		 * @returns {Boolean} Returns <code>true</code> if pair was successfully
-		 * consumed
-		 */
-		skipToPair: function(open, close, skipString) {
-			var braceCount = 0, ch;
-			var pos = this.pos, len = this._length;
-			while (pos < len) {
-				ch = this.string.charAt(pos++);
-				if (ch == open) {
-					braceCount++;
-				} else if (ch == close) {
-					braceCount--;
-					if (braceCount < 1) {
-						this.pos = pos;
-						return true;
-					}
-				} else if (skipString && (ch == '"' || ch == "'")) {
-					this.skipString(ch);
-				}
-			}
-			
-			return false;
-		},
-
-		/**
-		 * A helper function which, in case of either single or
-		 * double quote was found in current position, skips entire
-		 * string (quoted value)
-		 * @return {Boolean} Wether quoted string was skipped
-		 */
-		skipQuoted: function(noBackup) {
-			var ch = this.string.charAt(noBackup ? this.pos : this.pos - 1);
-			if (ch === '"' || ch === "'") {
-				if (noBackup) {
-					this.pos++;
-				}
-				return this.skipString(ch);
-			}
-		},
-
-		/**
-		 * A custom function to skip string literal, e.g. a "double-quoted"
-		 * or 'single-quoted' value
-		 * @param  {String} quote An opening quote
-		 * @return {Boolean}
-		 */
-		skipString: function(quote) {
-			var pos = this.pos, len = this._length, ch;
-			while (pos < len) {
-				ch = this.string.charAt(pos++);
-				if (ch == '\\') {
-					continue;
-				} else if (ch == quote) {
-					this.pos = pos;
-					return true;
-				}
-			}
-
-			return false;
-		},
-		
-		/**
-		 * Backs up the stream n characters. Backing it up further than the
-		 * start of the current token will cause things to break, so be careful.
-		 * @param {Number} n
-		 */
-		backUp : function(n) {
-			this.pos -= n;
-		},
-		
-		/**
-		 * Act like a multi-character <code>eat</code>—if <code>consume</code> is true or
-		 * not given—or a look-ahead that doesn't update the stream position—if
-		 * it is false. <code>pattern</code> can be either a string or a
-		 * regular expression starting with ^. When it is a string,
-		 * <code>caseInsensitive</code> can be set to true to make the match
-		 * case-insensitive. When successfully matching a regular expression,
-		 * the returned value will be the array returned by <code>match</code>,
-		 * in case you need to extract matched groups.
-		 * 
-		 * @param {RegExp} pattern
-		 * @param {Boolean} consume
-		 * @param {Boolean} caseInsensitive
-		 * @returns
-		 */
-		match: function(pattern, consume, caseInsensitive) {
-			if (typeof pattern == "string") {
-				var cased = caseInsensitive
-					? function(str) {return str.toLowerCase();}
-					: function(str) {return str;};
-				
-				if (cased(this.string).indexOf(cased(pattern), this.pos) == this.pos) {
-					if (consume !== false)
-						this.pos += pattern.length;
-					return true;
-				}
-			} else {
-				var match = this.string.slice(this.pos).match(pattern);
-				if (match && consume !== false)
-					this.pos += match[0].length;
-				return match;
-			}
-		},
-		
-		/**
-		 * Get the string between the start of the current token and the 
-		 * current stream position.
-		 * @returns {String}
-		 */
-		current: function(backUp) {
-			return this.string.slice(this.start, this.pos - (backUp ? 1 : 0));
-		}
-	};
-
-	module.exports = function(string) {
-		return new StringStream(string);
-	};
-
-	/** @deprecated */
-	module.exports.create = module.exports;
-	return module.exports;
-});
-},{}],33:[function(require,module,exports){
-/**
- * Utility module for handling tabstops tokens generated by Emmet's 
- * "Expand Abbreviation" action. The main <code>extract</code> method will take
- * raw text (for example: <i>${0} some ${1:text}</i>), find all tabstops 
- * occurrences, replace them with tokens suitable for your editor of choice and 
- * return object with processed text and list of found tabstops and their ranges.
- * For sake of portability (Objective-C/Java) the tabstops list is a plain 
- * sorted array with plain objects.
- * 
- * Placeholders with the same are meant to be <i>linked</i> in your editor.
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('../utils/common');
-	var stringStream = require('./stringStream');
-	var resources = require('./resources');
-
-	/**
-	 * Global placeholder value, automatically incremented by 
-	 * <code>variablesResolver()</code> function
-	 */
-	var startPlaceholderNum = 100;
-	var tabstopIndex = 0;
-	
-	var defaultOptions = {
-		replaceCarets: false,
-		escape: function(ch) {
-			return '\\' + ch;
-		},
-		tabstop: function(data) {
-			return data.token;
-		},
-		variable: function(data) {
-			return data.token;
-		}
-	};
-	
-	return {
-		/**
-		 * Main function that looks for a tabstops in provided <code>text</code>
-		 * and returns a processed version of <code>text</code> with expanded 
-		 * placeholders and list of tabstops found.
-		 * @param {String} text Text to process
-		 * @param {Object} options List of processor options:<br>
-		 * 
-		 * <b>replaceCarets</b> : <code>Boolean</code> — replace all default
-		 * caret placeholders (like <i>{%::emmet-caret::%}</i>) with <i>${0:caret}</i><br>
-		 * 
-		 * <b>escape</b> : <code>Function</code> — function that handle escaped
-		 * characters (mostly '$'). By default, it returns the character itself 
-		 * to be displayed as is in output, but sometimes you will use 
-		 * <code>extract</code> method as intermediate solution for further 
-		 * processing and want to keep character escaped. Thus, you should override
-		 * <code>escape</code> method to return escaped symbol (e.g. '\\$')<br>
-		 * 
-		 * <b>tabstop</b> : <code>Function</code> – a tabstop handler. Receives 
-		 * a single argument – an object describing token: its position, number 
-		 * group, placeholder and token itself. Should return a replacement 
-		 * string that will appear in final output
-		 * 
-		 * <b>variable</b> : <code>Function</code> – variable handler. Receives 
-		 * a single argument – an object describing token: its position, name 
-		 * and original token itself. Should return a replacement 
-		 * string that will appear in final output
-		 * 
-		 * @returns {Object} Object with processed <code>text</code> property
-		 * and array of <code>tabstops</code> found
-		 * @memberOf tabStops
-		 */
-		extract: function(text, options) {
-			// prepare defaults
-			var placeholders = {carets: ''};
-			var marks = [];
-			
-			options = utils.extend({}, defaultOptions, options, {
-				tabstop: function(data) {
-					var token = data.token;
-					var ret = '';
-					if (data.placeholder == 'cursor') {
-						marks.push({
-							start: data.start,
-							end: data.start + token.length,
-							group: 'carets',
-							value: ''
-						});
-					} else {
-						// unify placeholder value for single group
-						if ('placeholder' in data)
-							placeholders[data.group] = data.placeholder;
-						
-						if (data.group in placeholders)
-							ret = placeholders[data.group];
-						
-						marks.push({
-							start: data.start,
-							end: data.start + token.length,
-							group: data.group,
-							value: ret
-						});
-					}
-					
-					return token;
-				}
-			});
-			
-			if (options.replaceCarets) {
-				text = text.replace(new RegExp( utils.escapeForRegexp( utils.getCaretPlaceholder() ), 'g'), '${0:cursor}');
-			}
-			
-			// locate tabstops and unify group's placeholders
-			text = this.processText(text, options);
-			
-			// now, replace all tabstops with placeholders
-			var buf = '', lastIx = 0;
-			var tabStops = marks.map(function(mark) {
-				buf += text.substring(lastIx, mark.start);
-				
-				var pos = buf.length;
-				var ph = placeholders[mark.group] || '';
-				
-				buf += ph;
-				lastIx = mark.end;
-				
-				return {
-					group: mark.group,
-					start: pos,
-					end:  pos + ph.length
-				};
-			});
-			
-			buf += text.substring(lastIx);
-			
-			return {
-				text: buf,
-				tabstops: tabStops.sort(function(a, b) {
-					return a.start - b.start;
-				})
-			};
-		},
-		
-		/**
-		 * Text processing routine. Locates escaped characters and tabstops and
-		 * replaces them with values returned by handlers defined in 
-		 * <code>options</code>
-		 * @param {String} text
-		 * @param {Object} options See <code>extract</code> method options 
-		 * description
-		 * @returns {String}
-		 */
-		processText: function(text, options) {
-			options = utils.extend({}, defaultOptions, options);
-			
-			var buf = '';
-			/** @type StringStream */
-			var stream = stringStream.create(text);
-			var ch, m, a;
-			
-			while ((ch = stream.next())) {
-				if (ch == '\\' && !stream.eol()) {
-					// handle escaped character
-					buf += options.escape(stream.next());
-					continue;
-				}
-				
-				a = ch;
-				
-				if (ch == '$') {
-					// looks like a tabstop
-					stream.start = stream.pos - 1;
-					
-					if ((m = stream.match(/^[0-9]+/))) {
-						// it's $N
-						a = options.tabstop({
-							start: buf.length, 
-							group: stream.current().substr(1),
-							token: stream.current()
-						});
-					} else if ((m = stream.match(/^\{([a-z_\-][\w\-]*)\}/))) {
-						// ${variable}
-						a = options.variable({
-							start: buf.length, 
-							name: m[1],
-							token: stream.current()
-						});
-					} else if ((m = stream.match(/^\{([0-9]+)(:.+?)?\}/, false))) {
-						// ${N:value} or ${N} placeholder
-						// parse placeholder, including nested ones
-						stream.skipToPair('{', '}');
-						
-						var obj = {
-							start: buf.length, 
-							group: m[1],
-							token: stream.current()
-						};
-						
-						var placeholder = obj.token.substring(obj.group.length + 2, obj.token.length - 1);
-						
-						if (placeholder) {
-							obj.placeholder = placeholder.substr(1);
-						}
-						
-						a = options.tabstop(obj);
-					}
-				}
-				
-				buf += a;
-			}
-			
-			return buf;
-		},
-		
-		/**
-		 * Upgrades tabstops in output node in order to prevent naming conflicts
-		 * @param {AbbreviationNode} node
-		 * @param {Number} offset Tab index offset
-		 * @returns {Number} Maximum tabstop index in element
-		 */
-		upgrade: function(node, offset) {
-			var maxNum = 0;
-			var options = {
-				tabstop: function(data) {
-					var group = parseInt(data.group, 10);
-					if (group > maxNum) maxNum = group;
-						
-					if (data.placeholder)
-						return '${' + (group + offset) + ':' + data.placeholder + '}';
-					else
-						return '${' + (group + offset) + '}';
-				}
-			};
-			
-			['start', 'end', 'content'].forEach(function(p) {
-				node[p] = this.processText(node[p], options);
-			}, this);
-			
-			return maxNum;
-		},
-		
-		/**
-		 * Helper function that produces a callback function for 
-		 * <code>replaceVariables()</code> method from {@link utils}
-		 * module. This callback will replace variable definitions (like 
-		 * ${var_name}) with their value defined in <i>resource</i> module,
-		 * or outputs tabstop with variable name otherwise.
-		 * @param {AbbreviationNode} node Context node
-		 * @returns {Function}
-		 */
-		variablesResolver: function(node) {
-			var placeholderMemo = {};
-			return function(str, varName) {
-				// do not mark `child` variable as placeholder – it‘s a reserved
-				// variable name
-				if (varName == 'child') {
-					return str;
-				}
-				
-				if (varName == 'cursor') {
-					return utils.getCaretPlaceholder();
-				}
-				
-				var attr = node.attribute(varName);
-				if (typeof attr !== 'undefined' && attr !== str) {
-					return attr;
-				}
-				
-				var varValue = resources.getVariable(varName);
-				if (varValue) {
-					return varValue;
-				}
-				
-				// output as placeholder
-				if (!placeholderMemo[varName]) {
-					placeholderMemo[varName] = startPlaceholderNum++;
-				}
-					
-				return '${' + placeholderMemo[varName] + ':' + varName + '}';
-			};
-		},
-
-		/**
-		 * Replace variables like ${var} in string
-		 * @param {String} str
-		 * @param {Object} vars Variable set (defaults to variables defined in 
-		 * <code>snippets.json</code>) or variable resolver (<code>Function</code>)
-		 * @return {String}
-		 */
-		replaceVariables: function(str, vars) {
-			vars = vars || {};
-			var resolver = typeof vars === 'function' ? vars : function(str, p1) {
-				return p1 in vars ? vars[p1] : null;
-			};
-			
-			return this.processText(str, {
-				variable: function(data) {
-					var newValue = resolver(data.token, data.name, data);
-					if (newValue === null) {
-						// try to find variable in resources
-						newValue = resources.getVariable(data.name);
-					}
-					
-					if (newValue === null || typeof newValue === 'undefined')
-						// nothing found, return token itself
-						newValue = data.token;
-					return newValue;
-				}
-			});
-		},
-		
-		/**
-		 * Resets global tabstop index. When parsed tree is converted to output
-		 * string (<code>AbbreviationNode.toString()</code>), all tabstops 
-		 * defined in snippets and elements are upgraded in order to prevent
-		 * naming conflicts of nested. For example, <code>${1}</code> of a node
-		 * should not be linked with the same placehilder of the child node.
-		 * By default, <code>AbbreviationNode.toString()</code> automatically
-		 * upgrades tabstops of the same index for each node and writes maximum
-		 * tabstop index into the <code>tabstopIndex</code> variable. To keep
-		 * this variable at reasonable value, it is recommended to call 
-		 * <code>resetTabstopIndex()</code> method each time you expand variable 
-		 * @returns
-		 */
-		resetTabstopIndex: function() {
-			tabstopIndex = 0;
-			startPlaceholderNum = 100;
-		},
-
-		/**
-		 * Output processor for abbreviation parser that will upgrade tabstops 
-		 * of parsed node in order to prevent tabstop index conflicts
-		 */
-		abbrOutputProcessor: function(text, node, type) {
-			var maxNum = 0;
-			var that = this;
-			
-			var tsOptions = {
-				tabstop: function(data) {
-					var group = parseInt(data.group, 10);
-					if (group === 0)
-						return '${0}';
-					
-					if (group > maxNum) maxNum = group;
-					if (data.placeholder) {
-						// respect nested placeholders
-						var ix = group + tabstopIndex;
-						var placeholder = that.processText(data.placeholder, tsOptions);
-						return '${' + ix + ':' + placeholder + '}';
-					} else {
-						return '${' + (group + tabstopIndex) + '}';
-					}
-				}
-			};
-			
-			// upgrade tabstops
-			text = this.processText(text, tsOptions);
-			
-			// resolve variables
-			text = this.replaceVariables(text, this.variablesResolver(node));
-			
-			tabstopIndex += maxNum + 1;
-			return text;
-		}
-	};
-});
-},{"../utils/common":73,"./resources":31,"./stringStream":32}],34:[function(require,module,exports){
-/**
- * Helper class for convenient token iteration
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	/**
-	 * @type TokenIterator
-	 * @param {Array} tokens
-	 * @type TokenIterator
-	 * @constructor
-	 */
-	function TokenIterator(tokens) {
-		/** @type Array */
-		this.tokens = tokens;
-		this._position = 0;
-		this.reset();
-	}
-	
-	TokenIterator.prototype = {
-		next: function() {
-			if (this.hasNext()) {
-				var token = this.tokens[++this._i];
-				this._position = token.start;
-				return token;
-			} else {
-				this._i = this._il;
-			}
-			
-			return null;
-		},
-		
-		current: function() {
-			return this.tokens[this._i];
-		},
-
-		peek: function() {
-			return this.tokens[this._i + i];
-		},
-		
-		position: function() {
-			return this._position;
-		},
-		
-		hasNext: function() {
-			return this._i < this._il - 1;
-		},
-		
-		reset: function() {
-			this._i = 0;
-			this._il = this.tokens.length;
-		},
-		
-		item: function() {
-			return this.tokens[this._i];
-		},
-		
-		itemNext: function() {
-			return this.tokens[this._i + 1];
-		},
-		
-		itemPrev: function() {
-			return this.tokens[this._i - 1];
-		},
-		
-		nextUntil: function(type, callback) {
-			var token;
-			var test = typeof type == 'string' 
-				? function(t){return t.type == type;} 
-				: type;
-			
-			while ((token = this.next())) {
-				if (callback)
-					callback.call(this, token);
-				if (test.call(this, token))
-					break;
-			}
-		}
-	};
-	
-	return {
-		create: function(tokens) {
-			return new TokenIterator(tokens);
-		}
-	};
-});
-},{}],35:[function(require,module,exports){
-module.exports={
-	"eras": {
-		"e-26": "26 versions back",
-		"e-25": "25 versions back",
-		"e-24": "24 versions back",
-		"e-23": "23 versions back",
-		"e-22": "22 versions back",
-		"e-21": "21 versions back",
-		"e-20": "20 versions back",
-		"e-19": "19 versions back",
-		"e-18": "18 versions back",
-		"e-17": "17 versions back",
-		"e-16": "16 versions back",
-		"e-15": "15 versions back",
-		"e-14": "14 versions back",
-		"e-13": "13 versions back",
-		"e-12": "12 versions back",
-		"e-11": "11 versions back",
-		"e-10": "10 versions back",
-		"e-9": "9 versions back",
-		"e-8": "8 versions back",
-		"e-7": "7 versions back",
-		"e-6": "6 versions back",
-		"e-5": "5 versions back",
-		"e-4": "4 versions back",
-		"e-3": "3 versions back",
-		"e-2": "2 versions back",
-		"e-1": "Previous version",
-		"e0": "Current",
-		"e1": "Near future",
-		"e2": "Farther future"
-	},
-	"agents": {
-		"ie": {
-			"browser": "IE",
-			"abbr": "IE",
-			"prefix": "ms",
-			"type": "desktop",
-			"usage_global": {
-				"10": 10.7866,
-				"11": 0.114751,
-				"5.5": 0.009298,
-				"6": 0.204912,
-				"7": 0.508182,
-				"8": 8.31124,
-				"9": 5.21297
-			},
-			"versions": [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "5.5", "6", "7", "8", "9", "10", "11", null, null],
-			"current_version": ""
-		},
-		"firefox": {
-			"browser": "Firefox",
-			"abbr": "FF",
-			"prefix": "moz",
-			"type": "desktop",
-			"usage_global": {
-				"10": 0.112406,
-				"11": 0.088319,
-				"12": 0.208754,
-				"13": 0.096348,
-				"14": 0.096348,
-				"15": 0.136493,
-				"16": 0.264957,
-				"17": 0.192696,
-				"18": 0.112406,
-				"19": 0.128464,
-				"2": 0.016058,
-				"20": 0.16058,
-				"21": 0.216783,
-				"22": 0.256928,
-				"23": 0.907277,
-				"24": 11.0318,
-				"25": 0.529914,
-				"26": 0.016058,
-				"27": 0.016058,
-				"3": 0.088319,
-				"3.5": 0.040145,
-				"3.6": 0.305102,
-				"4": 0.072261,
-				"5": 0.048174,
-				"6": 0.048174,
-				"7": 0.040145,
-				"8": 0.072261,
-				"9": 0.056203
-			},
-			"versions": [null, "2", "3", "3.5", "3.6", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27"],
-			"current_version": ""
-		},
-		"chrome": {
-			"browser": "Chrome",
-			"abbr": "Chr.",
-			"prefix": "webkit",
-			"type": "desktop",
-			"usage_global": {
-				"10": 0.048174,
-				"11": 0.112406,
-				"12": 0.064232,
-				"13": 0.056203,
-				"14": 0.056203,
-				"15": 0.072261,
-				"16": 0.048174,
-				"17": 0.040145,
-				"18": 0.08029,
-				"19": 0.040145,
-				"20": 0.040145,
-				"21": 0.48174,
-				"22": 0.248899,
-				"23": 0.216783,
-				"24": 0.200725,
-				"25": 0.361305,
-				"26": 0.353276,
-				"27": 0.369334,
-				"28": 0.610204,
-				"29": 5.08236,
-				"30": 24.6089,
-				"31": 0.16058,
-				"32": 0.064232,
-				"4": 0.024087,
-				"5": 0.024087,
-				"6": 0.032116,
-				"7": 0.024087,
-				"8": 0.032116,
-				"9": 0.024087
-			},
-			"versions": ["4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32"],
-			"current_version": ""
-		},
-		"safari": {
-			"browser": "Safari",
-			"abbr": "Saf.",
-			"prefix": "webkit",
-			"type": "desktop",
-			"usage_global": {
-				"3.1": 0,
-				"3.2": 0.008692,
-				"4": 0.104377,
-				"5": 0.305102,
-				"5.1": 1.28464,
-				"6": 2.04739,
-				"6.1": 0.064232,
-				"7": 0.16058
-			},
-			"versions": [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "3.1", "3.2", "4", "5", "5.1", "6", "6.1", "7", null, null],
-			"current_version": ""
-		},
-		"opera": {
-			"browser": "Opera",
-			"abbr": "Op.",
-			"prefix": "o",
-			"type": "desktop",
-			"usage_global": {
-				"10.0-10.1": 0.016058,
-				"10.5": 0.008392,
-				"10.6": 0.008029,
-				"11": 0.008219,
-				"11.1": 0.008219,
-				"11.5": 0.016058,
-				"11.6": 0.032116,
-				"12": 0.040145,
-				"12.1": 0.48174,
-				"15": 0.032116,
-				"16": 0.104377,
-				"17": 0.16058,
-				"18": 0,
-				"9.5-9.6": 0.008219
-			},
-			"versions": [null, null, null, null, null, null, null, null, null, null, null, null, null, null, "9.5-9.6", "10.0-10.1", "10.5", "10.6", "11", "11.1", "11.5", "11.6", "12", "12.1", "15", "16", "17", "18", null],
-			"current_version": "",
-			"prefix_exceptions": {
-				"15": "webkit",
-				"16": "webkit",
-				"17": "webkit",
-				"18": "webkit"
-			}
-		},
-		"ios_saf": {
-			"browser": "iOS Safari",
-			"abbr": "iOS",
-			"prefix": "webkit",
-			"type": "mobile",
-			"usage_global": {
-				"3.2": 0.00400113,
-				"4.0-4.1": 0.00800226,
-				"4.2-4.3": 0.0280079,
-				"5.0-5.1": 0.28408,
-				"6.0-6.1": 1.15633,
-				"7.0": 2.52071
-			},
-			"versions": [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "3.2", "4.0-4.1", "4.2-4.3", "5.0-5.1", "6.0-6.1", "7.0", null, null],
-			"current_version": ""
-		},
-		"op_mini": {
-			"browser": "Opera Mini",
-			"abbr": "O.Mini",
-			"prefix": "o",
-			"type": "mobile",
-			"usage_global": {
-				"5.0-7.0": 4.58374
-			},
-			"versions": [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "5.0-7.0", null, null],
-			"current_version": ""
-		},
-		"android": {
-			"browser": "Android Browser",
-			"abbr": "And.",
-			"prefix": "webkit",
-			"type": "mobile",
-			"usage_global": {
-				"2.1": 0.0251229,
-				"2.2": 0.0854178,
-				"2.3": 1.32146,
-				"3": 0.00502458,
-				"4": 0.994867,
-				"4.1": 1.87417,
-				"4.2-4.3": 0.743638,
-				"4.4": 0
-			},
-			"versions": [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "2.1", "2.2", "2.3", "3", "4", "4.1", "4.2-4.3", "4.4", null],
-			"current_version": ""
-		},
-		"op_mob": {
-			"browser": "Opera Mobile",
-			"abbr": "O.Mob",
-			"prefix": "o",
-			"type": "mobile",
-			"usage_global": {
-				"0": 0,
-				"10": 0,
-				"11.5": 0.00726525,
-				"12": 0.0363263,
-				"12.1": 0.101714
-			},
-			"versions": [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "10", null, null, "11.5", "12", "12.1", "0", null, null],
-			"current_version": "16",
-			"prefix_exceptions": {
-				"0": "webkit"
-			}
-		},
-		"bb": {
-			"browser": "Blackberry Browser",
-			"abbr": "BB",
-			"prefix": "webkit",
-			"type": "mobile",
-			"usage_global": {
-				"10": 0,
-				"7": 0.141419
-			},
-			"versions": [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "7", "10", null, null],
-			"current_version": ""
-		},
-		"and_chr": {
-			"browser": "Chrome for Android",
-			"abbr": "Chr/And.",
-			"prefix": "webkit",
-			"type": "mobile",
-			"usage_global": {
-				"0": 1.38176
-			},
-			"versions": [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "0", null, null],
-			"current_version": "30"
-		},
-		"and_ff": {
-			"browser": "Firefox for Android",
-			"abbr": "FF/And.",
-			"prefix": "moz",
-			"type": "mobile",
-			"usage_global": {
-				"0": 0.070956
-			},
-			"versions": [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "0", null, null],
-			"current_version": "25"
-		},
-		"ie_mob": {
-			"browser": "IE Mobile",
-			"abbr": "IE.Mob",
-			"prefix": "ms",
-			"type": "mobile",
-			"usage_global": {
-				"10": 0.205595
-			},
-			"versions": [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "10", null, null],
-			"current_version": ""
-		}
-	},
-	"statuses": {
-		"rec": "Recommendation",
-		"pr": "Proposed Recommendation",
-		"cr": "Candidate Recommendation",
-		"wd": "Working Draft",
-		"other": "Other",
-		"unoff": "Unofficial / Note"
-	},
-	"cats": {
-		"CSS": ["CSS", "CSS2", "CSS3"],
-		"HTML5": ["Canvas", "HTML5"],
-		"JS API": ["JS API"],
-		"Other": ["PNG", "Other", "DOM"],
-		"SVG": ["SVG"]
-	},
-	"updated": 1383587152,
-	"data": {
-		"png-alpha": {
-			"title": "PNG alpha transparency",
-			"description": "Semi-transparent areas in PNG files",
-			"spec": "http://www.w3.org/TR/PNG/",
-			"status": "rec",
-			"links": [{
-				"url": "http://dillerdesign.com/experiment/DD_belatedPNG/",
-				"title": "Workaround for IE6"
-			}, {
-				"url": "http://en.wikipedia.org/wiki/Portable_Network_Graphics",
-				"title": "Wikipedia"
-			}],
-			"categories": ["PNG"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "y",
-					"3": "y",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "y"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "IE6 does support full transparency in 8-bit PNGs, which can sometimes be an alternative to 24-bit PNGs.",
-			"usage_perc_y": 94.36,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"apng": {
-			"title": "Animated PNG (APNG)",
-			"description": "Like animated GIFs, but allowing 24-bit colors and alpha transparency",
-			"spec": "https://wiki.mozilla.org/APNG_Specification",
-			"status": "unoff",
-			"links": [{
-				"url": "http://en.wikipedia.org/wiki/APNG",
-				"title": "Wikipedia"
-			}, {
-				"url": "https://github.com/davidmz/apng-canvas",
-				"title": "Polyfill using canvas"
-			}, {
-				"url": "https://chrome.google.com/webstore/detail/ehkepjiconegkhpodgoaeamnpckdbblp",
-				"title": "Chrome extension providing support"
-			}, {
-				"url": "http://www.truekolor.net/learn-how-to-create-an-animated-png/",
-				"title": "APNG tutorial"
-			}],
-			"categories": ["PNG"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "y",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n",
-					"28": "n",
-					"29": "n",
-					"30": "n",
-					"31": "n",
-					"32": "n"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "n",
-					"7": "n"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "n"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "n"
-				},
-				"and_chr": {
-					"0": "n"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Where support for APNG is missing, only the first frame is displayed",
-			"usage_perc_y": 16.19,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"video": {
-			"title": "Video element",
-			"description": "Method of playing videos on webpages (without requiring a plug-in)",
-			"spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#video",
-			"status": "wd",
-			"links": [{
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/video.js#video",
-				"title": "has.js test"
-			}, {
-				"url": "http://webmproject.org",
-				"title": "WebM format information"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/html/elements/video",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://camendesign.co.uk/code/video_for_everybody",
-				"title": "Video for Everybody"
-			}, {
-				"url": "http://diveinto.org/html5/video.html",
-				"title": "Video on the Web - includes info on Android support"
-			}, {
-				"url": "http://dev.opera.com/articles/view/everything-you-need-to-know-about-html5-video-and-audio/",
-				"title": "Detailed article on video/audio elements"
-			}],
-			"categories": ["HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "a",
-					"2.2": "a",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Different browsers have support for different video formats, see sub-features for details. \r\n\r\nThe Android browser (before 2.3) requires <a href=\"http://www.broken-links.com/2010/07/08/making-html5-video-work-on-android-phones/\">specific handling</a> to run the video element.",
-			"usage_perc_y": 80.71,
-			"usage_perc_a": 0.11,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "<video>"
-		},
-		"audio": {
-			"title": "Audio element",
-			"description": "Method of playing sound on webpages (without requiring a plug-in)",
-			"spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#audio",
-			"status": "wd",
-			"links": [{
-				"url": "http://html5doctor.com/native-audio-in-the-browser/",
-				"title": "HTML5 Doctor article"
-			}, {
-				"url": "http://textopia.org/androidsoundformats.html",
-				"title": "File format test page"
-			}, {
-				"url": "http://www.jplayer.org/latest/demos/",
-				"title": "Demos of audio player that uses &lt;audio>"
-			}, {
-				"url": "http://www.phoboslab.org/log/2011/03/the-state-of-html5-audio",
-				"title": "The State of HTML5 Audio"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/audio.js#audio",
-				"title": "has.js test"
-			}, {
-				"url": "http://dev.opera.com/articles/view/everything-you-need-to-know-about-html5-video-and-audio/",
-				"title": "Detailed article on video/audio elements"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/html/elements/audio",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://24ways.org/2010/the-state-of-html5-audio",
-				"title": "Detailed article on support"
-			}],
-			"categories": ["HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "a",
-					"10.0-10.1": "a",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 80.7,
-			"usage_perc_a": 0.02,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"contenteditable": {
-			"title": "contenteditable attribute (basic support)",
-			"description": "Method of making any HTML element editable",
-			"spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#contenteditable",
-			"status": "wd",
-			"links": [{
-				"url": "http://accessgarage.wordpress.com/2009/05/08/how-to-hack-your-app-to-make-contenteditable-work/",
-				"title": "Blog post on usage problems"
-			}, {
-				"url": "http://html5demos.com/contenteditable",
-				"title": "Demo page"
-			}, {
-				"url": "http://blog.whatwg.org/the-road-to-html-5-contenteditable",
-				"title": "WHATWG blog post"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/html/attributes/contentEditable",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "a",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "This support only refers to very basic editing capability, implementations vary significantly on how certain elements can be edited.",
-			"usage_perc_y": 88.37,
-			"usage_perc_a": 0.09,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"dragndrop": {
-			"title": "Drag and Drop",
-			"description": "Method of easily dragging and dropping elements on a page, requiring minimal JavaScript.",
-			"spec": "http://www.w3.org/TR/html5/editing.html#dnd",
-			"status": "wd",
-			"links": [{
-				"url": "http://html5demos.com/drag",
-				"title": "Demo with link blocks"
-			}, {
-				"url": "http://html5doctor.com/native-drag-and-drop/",
-				"title": "HTML5 Doctor article"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/dom/events/drag",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://nettutsplus.s3.amazonaws.com/64_html5dragdrop/demo/index.html",
-				"title": "Shopping cart demo"
-			}],
-			"categories": ["HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "a",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "a",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "p",
-					"3": "p",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "p",
-					"9.5-9.6": "p",
-					"10.0-10.1": "p",
-					"10.5": "p",
-					"10.6": "p",
-					"11": "p",
-					"11.1": "p",
-					"11.5": "p",
-					"11.6": "p",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "n"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "p",
-					"11": "p",
-					"11.1": "p",
-					"11.5": "p",
-					"12": "p",
-					"12.1": "y",
-					"0": "n"
-				},
-				"and_chr": {
-					"0": "n"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Partial support in older IE refers to no support for the dataTransfer.files or .types objects and limited supported formats for dataTransfer.setData/getData.",
-			"usage_perc_y": 64.83,
-			"usage_perc_a": 14.25,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "draganddrop"
-		},
-		"queryselector": {
-			"title": "querySelector/querySelectorAll",
-			"description": "Method of accessing DOM elements using CSS selectors",
-			"spec": "http://www.w3.org/TR/selectors-api/",
-			"status": "rec",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/css/selectors_api/querySelector",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://cjihrig.com/blog/javascripts-selectors-api/",
-				"title": "Blog post"
-			}, {
-				"url": "https://developer.mozilla.org/En/DOM/Element.querySelectorAll",
-				"title": "MDN article on querySelectorAll"
-			}, {
-				"url": "https://developer.mozilla.org/en/DOM/element.querySelector",
-				"title": "MDN article on querySelector"
-			}],
-			"categories": ["DOM"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "p",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "p",
-					"3": "p",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "p",
-					"9.5-9.6": "p",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "y"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Only works for the CSS selectors available. Thus the IE8 implementation is limited to the CSS 2.1 selectors",
-			"usage_perc_y": 93.74,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "query,selectors,selectors api"
-		},
-		"getelementsbyclassname": {
-			"title": "getElementsByClassName",
-			"description": "Method of accessing DOM elements by class name",
-			"spec": "http://www.w3.org/TR/dom/#dom-document-getelementsbyclassname",
-			"status": "wd",
-			"links": [{
-				"url": "http://www.quirksmode.org/dom/tests/basics.html#getElementsByClassName",
-				"title": "Test page"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/dom/methods/getElementsByClassName",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["DOM", "HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "p",
-					"3": "y",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "y"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 85.52,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "byclassname"
-		},
-		"forms": {
-			"title": "HTML5 form features",
-			"description": "Expanded form options, including things like date pickers, sliders, validation, placeholders and multiple file uploads. Previously known as \"Web forms 2.0\".",
-			"spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html",
-			"status": "wd",
-			"links": [{
-				"url": "https://github.com/westonruter/webforms2",
-				"title": "Cross-browser JS implementation (based on original spec)"
-			}, {
-				"url": "http://www.miketaylr.com/code/input-type-attr.html",
-				"title": "HTML5 inputs and attribute support page"
-			}],
-			"categories": ["HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "p",
-					"10": "a",
-					"11": "a"
-				},
-				"firefox": {
-					"2": "p",
-					"3": "p",
-					"3.5": "p",
-					"3.6": "p",
-					"4": "a",
-					"5": "a",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "a",
-					"12": "a",
-					"13": "a",
-					"14": "a",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a",
-					"19": "a",
-					"20": "a",
-					"21": "a",
-					"22": "a",
-					"23": "a",
-					"24": "a",
-					"25": "a",
-					"26": "a",
-					"27": "a"
-				},
-				"chrome": {
-					"4": "a",
-					"5": "a",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "a",
-					"12": "a",
-					"13": "a",
-					"14": "a",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a",
-					"19": "a",
-					"20": "a",
-					"21": "a",
-					"22": "a",
-					"23": "a",
-					"24": "a",
-					"25": "a",
-					"26": "a",
-					"27": "a",
-					"28": "a",
-					"29": "a",
-					"30": "a",
-					"31": "a",
-					"32": "a"
-				},
-				"safari": {
-					"3.1": "p",
-					"3.2": "p",
-					"4": "a",
-					"5": "a",
-					"5.1": "a",
-					"6": "a",
-					"6.1": "a",
-					"7": "a"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "a",
-					"4.2-4.3": "a",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "a"
-				},
-				"bb": {
-					"7": "n",
-					"10": "a"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "a"
-				},
-				"and_chr": {
-					"0": "a"
-				},
-				"and_ff": {
-					"0": "a"
-				},
-				"ie_mob": {
-					"10": "a"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 4.75,
-			"usage_perc_a": 65.35,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "input,datepicker"
-		},
-		"html5semantic": {
-			"title": "New semantic elements",
-			"description": "HTML5 offers some new elements, primarily for semantic purposes. The elements include: section, article, aside, header, footer, nav, figure, figcaption, time, mark.",
-			"spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#sections",
-			"status": "wd",
-			"links": [{
-				"url": "http://oli.jp/2009/html5-structure3/",
-				"title": "Article on structural elements"
-			}, {
-				"url": "http://blog.whatwg.org/supporting-new-elements-in-ie",
-				"title": "Workaround for IE"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/dom.js#dom-html5-elements",
-				"title": "has.js test"
-			}, {
-				"url": "http://blog.whatwg.org/styling-ie-noscript",
-				"title": "Alternate workaround"
-			}],
-			"categories": ["HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "a",
-					"3.5": "a",
-					"3.6": "a",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "a",
-					"5": "a",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "a",
-					"3.2": "a",
-					"4": "a",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "a",
-					"9.5-9.6": "a",
-					"10.0-10.1": "a",
-					"10.5": "a",
-					"10.6": "a",
-					"11": "a",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "a",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "a"
-				},
-				"android": {
-					"2.1": "a",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "a",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Partial support refers to missing the default styling. This is easily taken care of by using display:block for all new elements (except time and mark, these should be display:inline anyway).",
-			"usage_perc_y": 80.26,
-			"usage_perc_a": 5.26,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"offline-apps": {
-			"title": "Offline web applications",
-			"description": "Method of defining web page files to be cached using a cache manifest file, allowing them to work offline on subsequent visits to the page",
-			"spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html",
-			"status": "wd",
-			"links": [{
-				"url": "http://www.sitepoint.com/offline-web-application-tutorial/",
-				"title": "Sitepoint tutorial"
-			}, {
-				"url": "http://diveinto.org/html5/offline.html",
-				"title": "Dive Into HTML5 article"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/apis/appcache/ApplicationCache",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://hacks.mozilla.org/2010/01/offline-web-applications/",
-				"title": "Mozilla Hacks article/demo"
-			}],
-			"categories": ["HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "p",
-					"3": "a",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "p",
-					"3.2": "p",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "p",
-					"10.5": "p",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 75.59,
-			"usage_perc_a": 0.09,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "appcache,app cache,application cache,online"
-		},
-		"webworkers": {
-			"title": "Web Workers",
-			"description": "Method of running scripts in the background, isolated from the web page",
-			"spec": "http://www.w3.org/TR/workers/",
-			"status": "cr",
-			"links": [{
-				"url": "http://code.google.com/p/ie-web-worker/",
-				"title": "Polyfill for IE (single threaded)"
-			}, {
-				"url": "http://net.tutsplus.com/tutorials/javascript-ajax/getting-started-with-web-workers/",
-				"title": "Tutorial"
-			}, {
-				"url": "https://developer.mozilla.org/En/Using_web_workers",
-				"title": "MDN article"
-			}, {
-				"url": "http://nerget.com/rayjs-mt/rayjs.html",
-				"title": "Web Worker demo"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "p",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "p",
-					"3": "p",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "p",
-					"3.2": "p",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "p",
-					"10.5": "p",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "p",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 70.53,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"fontface": {
-			"title": "@font-face Web fonts",
-			"description": "Method of displaying fonts downloaded from websites",
-			"spec": "http://www.w3.org/TR/css3-webfonts/",
-			"status": "wd",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/css/atrules/@font-face",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://www.css3files.com/font/",
-				"title": "Information page"
-			}, {
-				"url": "http://webfonts.info",
-				"title": "News and information site"
-			}, {
-				"url": "http://en.wikipedia.org/wiki/Web_typography",
-				"title": "Wikipedia"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "a",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "a",
-					"4.0-4.1": "a",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "a",
-					"2.3": "a",
-					"3": "a",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "a",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Partial support before IE8 refers to only supporting EOT fonts. Safari for iOS 4.1 and below only supports SVG fonts.",
-			"usage_perc_y": 79.25,
-			"usage_perc_a": 10.6,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "font face"
-		},
-		"eot": {
-			"title": "EOT - Embedded OpenType fonts",
-			"description": "Type of font that can be derived from a regular font, allowing small files and legal use of high-quality fonts. Usage is restricted by the file being tied to the website",
-			"spec": "http://www.w3.org/Submission/EOT/",
-			"status": "unoff",
-			"links": [{
-				"url": "http://www.microsoft.com/typography/web/embedding/default.aspx",
-				"title": "Example pages"
-			}, {
-				"url": "http://en.wikipedia.org/wiki/Embedded_OpenType",
-				"title": "Wikipedia"
-			}],
-			"categories": ["Other"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n",
-					"28": "n",
-					"29": "n",
-					"30": "n",
-					"31": "n",
-					"32": "n"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "n",
-					"7": "n"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "n"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "n"
-				},
-				"and_chr": {
-					"0": "n"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Proposal by Microsoft, being considered for W3C standardization.",
-			"usage_perc_y": 25.14,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "fontface",
-			"keywords": ""
-		},
-		"woff": {
-			"title": "WOFF - Web Open Font Format",
-			"description": "Compressed TrueType/OpenType font that contains information about the font's source.",
-			"spec": "http://www.w3.org/TR/WOFF/",
-			"status": "rec",
-			"links": [{
-				"url": "http://hacks.mozilla.org/2009/10/woff/",
-				"title": "Mozilla hacks blog post"
-			}],
-			"categories": ["Other"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Reported to be supported in some modified versions of the Android 4.0 browser.",
-			"usage_perc_y": 75.23,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "fontface",
-			"keywords": ""
-		},
-		"multibackgrounds": {
-			"title": "CSS3 Multiple backgrounds",
-			"description": "Method of using multiple images as a background",
-			"spec": "http://www.w3.org/TR/css3-background/",
-			"status": "cr",
-			"links": [{
-				"url": "http://www.css3.info/preview/multiple-backgrounds/",
-				"title": "Demo & information page"
-			}, {
-				"url": "http://www.css3files.com/background/",
-				"title": "Information page"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/css/properties/background-image",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "y"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 85.37,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"border-image": {
-			"title": "CSS3 Border images",
-			"description": "Method of using images for borders",
-			"spec": "http://www.w3.org/TR/css3-background/#the-border-image",
-			"status": "cr",
-			"links": [{
-				"url": "http://www.css3files.com/border/",
-				"title": "Information page"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/css/properties/border-image",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "a x",
-					"3.6": "a x",
-					"4": "a x",
-					"5": "a x",
-					"6": "a x",
-					"7": "a x",
-					"8": "a x",
-					"9": "a x",
-					"10": "a x",
-					"11": "a x",
-					"12": "a x",
-					"13": "a x",
-					"14": "a x",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "a x",
-					"5": "a x",
-					"6": "a x",
-					"7": "a x",
-					"8": "a x",
-					"9": "a x",
-					"10": "a x",
-					"11": "a x",
-					"12": "a x",
-					"13": "a x",
-					"14": "a x",
-					"15": "y x",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "a x",
-					"3.2": "a x",
-					"4": "a x",
-					"5": "a x",
-					"5.1": "a x",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "a",
-					"10.6": "a",
-					"11": "a x",
-					"11.1": "a x",
-					"11.5": "a x",
-					"11.6": "a x",
-					"12": "a x",
-					"12.1": "a x",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "a x",
-					"4.0-4.1": "a x",
-					"4.2-4.3": "a x",
-					"5.0-5.1": "a x",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "a x",
-					"2.2": "a x",
-					"2.3": "a x",
-					"3": "a x",
-					"4": "a x",
-					"4.1": "a x",
-					"4.2-4.3": "a x",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "a x",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "a x",
-					"11.1": "a x",
-					"11.5": "a x",
-					"12": "a x",
-					"12.1": "a x",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "In Firefox both the border-style and border-width must be specified for border-images to work. Partial support refers to supporting the shorthand syntax, but not the individual properties (border-image-source, border-image-slice, etc).",
-			"usage_perc_y": 54.86,
-			"usage_perc_a": 9.76,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"background-img-opts": {
-			"title": "CSS3 Background-image options",
-			"description": "New properties to affect background images, including background-clip, background-origin and background-size",
-			"spec": "http://www.w3.org/TR/css3-background/#backgrounds",
-			"status": "cr",
-			"links": [{
-				"url": "https://github.com/louisremi/background-size-polyfill",
-				"title": "Polyfill for IE7-8"
-			}, {
-				"url": "http://www.standardista.com/css3/css3-background-properties",
-				"title": "Detailed compatibility tables and demos"
-			}, {
-				"url": "http://www.css3files.com/background/",
-				"title": "Information page"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "a x",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "a",
-					"3.2": "a",
-					"4": "a",
-					"5": "y",
-					"5.1": "y",
-					"6": "a",
-					"6.1": "a",
-					"7": "a"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "a x",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "a",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "a"
-				},
-				"android": {
-					"2.1": "a x",
-					"2.2": "y x",
-					"2.3": "y x",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Partial support in Opera Mini refers to not supporting background sizing or background attachments. Partial support in Safari 6 refers to not supporting background sizing offset from edges syntax.",
-			"usage_perc_y": 78.07,
-			"usage_perc_a": 7.32,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"css-table": {
-			"title": "CSS Table display",
-			"description": "Method of displaying elements as tables, rows, and cells",
-			"spec": "http://www.w3.org/TR/CSS21/tables.html",
-			"status": "rec",
-			"links": [{
-				"url": "http://blog.12spokes.com/web-design-development/when-to-choose-between-the-html-table-element-and-css-displaytable-property/",
-				"title": "Deciding on HTML or CSS tables"
-			}, {
-				"url": "http://www.onenaught.com/posts/201/use-css-displaytable-for-layout",
-				"title": "Blog post on usage"
-			}],
-			"categories": ["CSS2"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "y",
-					"3": "y",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "y"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 93.86,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "display:table, display: table,table-cell,table-row,table-layout"
-		},
-		"css-gencontent": {
-			"title": "CSS Generated content",
-			"description": "Method of displaying text or images before or after the given element's contents using the :before and :after pseudo-elements",
-			"spec": "http://www.w3.org/TR/CSS21/generate.html",
-			"status": "rec",
-			"links": [{
-				"url": "http://www.westciv.com/style_master/academy/css_tutorial/advanced/generated_content.html",
-				"title": "Guide on usage"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/css/generated_and_replaced_content",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://dev.opera.com/articles/view/css-generated-content-techniques/",
-				"title": "Dev.Opera article"
-			}],
-			"categories": ["CSS2", "CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "a",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "y",
-					"3": "y",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "y"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "IE8 only supports the single-colon CSS 2.1 syntax (i.e. pseudo-class). It does not support the double-colon CSS3 syntax (i.e. pseudo-element)",
-			"usage_perc_y": 85.55,
-			"usage_perc_a": 8.31,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "before,after"
-		},
-		"css-fixed": {
-			"title": "CSS position:fixed",
-			"description": "Method of keeping an element in a fixed location regardless of scroll position",
-			"spec": "http://www.w3.org/TR/CSS21/visuren.html#fixed-positioning",
-			"status": "rec",
-			"links": [{
-				"url": "http://www.css-101.org/fixed-positioning/05.php",
-				"title": "Workaround for IE6"
-			}, {
-				"url": "http://bradfrostweb.com/blog/mobile/fixed-position/",
-				"title": "Article on mobile support"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/css/properties/position",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["CSS"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "y",
-					"3": "y",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "a",
-					"6.0-6.1": "a",
-					"7.0": "a"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "a",
-					"2.2": "a",
-					"2.3": "a",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Only works in Android 2.2+ by using the following meta tag: &lt;meta name=\"viewport\" content=\"width=device-width, user-scalable=no\">. Partial support in iOS Safari refers to <a href=\"http://remysharp.com/2012/05/24/issues-with-position-fixed-scrolling-on-ios/\">buggy behavior</a>.",
-			"usage_perc_y": 84.35,
-			"usage_perc_a": 5.39,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"hashchange": {
-			"title": "Hashchange event",
-			"description": "Event triggered in JavaScript when the URL's hash has changed (for example: page.html#foo to page.html#bar) ",
-			"spec": "http://www.w3.org/TR/html5/history.html#event-hashchange",
-			"status": "cr",
-			"links": [{
-				"url": "http://www.quirksmode.org/dom/events/tests/hashchange.html",
-				"title": "Simple demo"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/dom/events/hashchange",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "https://developer.mozilla.org/en/DOM/window.onhashchange",
-				"title": "MDN article"
-			}, {
-				"url": "http://github.com/3nr1c/jUri.js",
-				"title": "Polyfill"
-			}, {
-				"url": "http://msdn.microsoft.com/en-us/library/cc288209(VS.85).aspx",
-				"title": "MSDN article"
-			}],
-			"categories": ["HTML5", "JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "p",
-					"6": "p",
-					"7": "p",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "p",
-					"3": "p",
-					"3.5": "p",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "p",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "p",
-					"3.2": "p",
-					"4": "p",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "p",
-					"9.5-9.6": "p",
-					"10.0-10.1": "p",
-					"10.5": "p",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "p",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 88.92,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "onhashchange,HashChangeEvent"
-		},
-		"css-sel2": {
-			"title": "CSS 2.1 selectors",
-			"description": "Allows more accurate element selecting, using >, +, [attr], :first-child, etc.",
-			"spec": "http://www.w3.org/TR/CSS21/selector.html",
-			"status": "rec",
-			"links": [{
-				"url": "http://www.quirksmode.org/css/contents.html",
-				"title": "Detailed support information"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/css/selectors",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://selectivizr.com",
-				"title": "Selectivizr: Polyfill for IE6-8"
-			}, {
-				"url": "http://www.yourhtmlsource.com/stylesheets/advancedselectors.html",
-				"title": "Examples of advanced selectors"
-			}],
-			"categories": ["CSS2"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "y",
-					"3": "y",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "y"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 94.36,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "child selector,:hover,adjacent,sibling,adjacent sibling"
-		},
-		"css-sel3": {
-			"title": "CSS3 selectors",
-			"description": "Advanced element selection using selectors like :nth-child(), :last-child, :first-of-type, etc.",
-			"spec": "http://www.w3.org/TR/css3-selectors/",
-			"status": "rec",
-			"links": [{
-				"url": "http://www.css3.info/selectors-test/",
-				"title": "Automated CSS3 selector test"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/css/selectors",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://www.quirksmode.org/css/contents.html",
-				"title": "Detailed support information"
-			}, {
-				"url": "http://selectivizr.com",
-				"title": "Selectivizr: Polyfill for IE6-8"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "y"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 85.43,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ":target,:not"
-		},
-		"css-textshadow": {
-			"title": "CSS3 Text-shadow",
-			"description": "Method of applying one or more shadow or blur effects to text",
-			"spec": "http://www.w3.org/TR/css-text-decor-3/#text-shadow-property",
-			"status": "wd",
-			"links": [{
-				"url": "http://ie.microsoft.com/testdrive/Graphics/hands-on-css3/hands-on_text-shadow.htm",
-				"title": "Live editor"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/css/properties/text-shadow",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://hacks.mozilla.org/2009/06/text-shadow/",
-				"title": "Mozilla hacks article"
-			}, {
-				"url": "http://www.css3files.com/shadow/#textshadow",
-				"title": "Information page"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "a",
-					"3.2": "a",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "a"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "a",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Opera Mini ignores the blur-radius set, so no blur effect is visible. Text-shadow behavior can be somewhat emulated in older IE versions using the non-standard \"dropshadow\" or \"glow\" filters. ",
-			"usage_perc_y": 75.49,
-			"usage_perc_a": 4.73,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"css-boxshadow": {
-			"title": "CSS3 Box-shadow",
-			"description": "Method of displaying an inner or outer shadow effect to elements",
-			"spec": "http://www.w3.org/TR/css3-background/#box-shadow",
-			"status": "cr",
-			"links": [{
-				"url": "http://www.css3files.com/shadow/",
-				"title": "Information page"
-			}, {
-				"url": "https://developer.mozilla.org/En/CSS/-moz-box-shadow",
-				"title": "MDN article"
-			}, {
-				"url": "http://westciv.com/tools/boxshadows/index.html",
-				"title": "Live editor"
-			}, {
-				"url": "http://tests.themasta.com/blogstuff/boxshadowdemo.html",
-				"title": "Demo of various effects"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/css/properties/box-shadow",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "y x",
-					"3.6": "y x",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y x",
-					"5": "y x",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "a x",
-					"3.2": "a x",
-					"4": "a x",
-					"5": "y x",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "a x",
-					"4.0-4.1": "y x",
-					"4.2-4.3": "y x",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "a x",
-					"2.2": "a x",
-					"2.3": "a x",
-					"3": "a x",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y x",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Can be partially emulated in older IE versions using the non-standard \"shadow\" filter. Partial support in Safari, iOS Safari and Android Browser refers to missing \"inset\" and blur radius value support.",
-			"usage_perc_y": 79.27,
-			"usage_perc_a": 1.55,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "box-shadows,boxshadows,box shadow,shaow"
-		},
-		"css3-colors": {
-			"title": "CSS3 Colors",
-			"description": "Method of describing colors using Hue, Saturation and Lightness (hsl()) rather than just RGB, as well as allowing alpha-transparency with rgba() and hsla().",
-			"spec": "http://www.w3.org/TR/css3-color/",
-			"status": "rec",
-			"links": [{
-				"url": "http://www.zenelements.com/blog/css3-rgb-rgba-color-opacity/",
-				"title": "Guide to RGB & RGBA"
-			}, {
-				"url": "http://www.css3files.com/color/",
-				"title": "Information page"
-			}, {
-				"url": "http://www.zenelements.com/blog/css3-hsl-hsla-color-opacity/",
-				"title": "Guide to HSL & HSLA"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/css/color#RGBA_Notation",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://dev.opera.com/articles/view/color-in-opera-10-hsl-rgb-and-alpha-transparency/",
-				"title": "Dev.Opera article"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "a",
-					"3": "y",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "a",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "y"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 85.51,
-			"usage_perc_a": 0.02,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "rgb,hsl,rgba,hsla"
-		},
-		"css3-boxsizing": {
-			"title": "CSS3 Box-sizing",
-			"description": "Method of specifying whether or not an element's borders and padding should be included in size units",
-			"spec": "http://www.w3.org/TR/css3-ui/#box-sizing",
-			"status": "wd",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/css/properties/box-sizing",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://css-tricks.com/box-sizing/",
-				"title": "CSS Tricks"
-			}, {
-				"url": "https://github.com/Schepp/box-sizing-polyfill",
-				"title": "Polyfill for IE"
-			}, {
-				"url": "https://developer.mozilla.org/En/CSS/Box-sizing",
-				"title": "MDN article"
-			}, {
-				"url": "http://www.456bereastreet.com/archive/201104/controlling_width_with_css3_box-sizing/",
-				"title": "Blog post"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "p",
-					"6": "p",
-					"7": "p",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "a"
-				},
-				"firefox": {
-					"2": "y x",
-					"3": "y x",
-					"3.5": "y x",
-					"3.6": "y x",
-					"4": "y x",
-					"5": "y x",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x"
-				},
-				"chrome": {
-					"4": "a x",
-					"5": "a x",
-					"6": "a x",
-					"7": "a x",
-					"8": "a x",
-					"9": "a x",
-					"10": "a",
-					"11": "a",
-					"12": "a",
-					"13": "a",
-					"14": "a",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a",
-					"19": "a",
-					"20": "a",
-					"21": "a",
-					"22": "a",
-					"23": "a",
-					"24": "a",
-					"25": "a",
-					"26": "a",
-					"27": "a",
-					"28": "a",
-					"29": "a",
-					"30": "a",
-					"31": "a",
-					"32": "a"
-				},
-				"safari": {
-					"3.1": "a x",
-					"3.2": "a x",
-					"4": "a x",
-					"5": "a x",
-					"5.1": "a",
-					"6": "a",
-					"6.1": "a",
-					"7": "a"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "a",
-					"10.0-10.1": "a",
-					"10.5": "a",
-					"10.6": "a",
-					"11": "a",
-					"11.1": "a",
-					"11.5": "a",
-					"11.6": "a",
-					"12": "a",
-					"12.1": "a",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a"
-				},
-				"ios_saf": {
-					"3.2": "a x",
-					"4.0-4.1": "a x",
-					"4.2-4.3": "a x",
-					"5.0-5.1": "a",
-					"6.0-6.1": "a",
-					"7.0": "a"
-				},
-				"op_mini": {
-					"5.0-7.0": "a"
-				},
-				"android": {
-					"2.1": "a x",
-					"2.2": "a x",
-					"2.3": "a x",
-					"3": "a x",
-					"4": "a",
-					"4.1": "a",
-					"4.2-4.3": "a",
-					"4.4": "a"
-				},
-				"bb": {
-					"7": "a x",
-					"10": "a"
-				},
-				"op_mob": {
-					"10": "a",
-					"11": "a",
-					"11.1": "a",
-					"11.5": "a",
-					"12": "a",
-					"12.1": "a",
-					"0": "a"
-				},
-				"and_chr": {
-					"0": "a"
-				},
-				"and_ff": {
-					"0": "y x"
-				},
-				"ie_mob": {
-					"10": "a"
-				}
-			},
-			"notes": "Partial support refers to supporting only the \"border-box\" value, not \"padding-box\" (which was added to the spec later).",
-			"usage_perc_y": 15.43,
-			"usage_perc_a": 78.42,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "border-box,content-box,padding-box"
-		},
-		"css-mediaqueries": {
-			"title": "CSS3 Media Queries",
-			"description": "Method of applying styles based on media information. Includes things like page and device dimensions",
-			"spec": "http://www.w3.org/TR/css3-mediaqueries/",
-			"status": "rec",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/css/atrules/@media",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://ie.microsoft.com/testdrive/HTML5/85CSS3_MediaQueries/",
-				"title": "IE demo page with information"
-			}, {
-				"url": "https://github.com/scottjehl/Respond",
-				"title": "Polyfill for IE"
-			}, {
-				"url": "http://webdesignerwall.com/tutorials/responsive-design-with-css3-media-queries",
-				"title": "Media Queries tutorial"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "p",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "a",
-					"3.2": "a",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "y"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Incomplete support by older webkit browsers refers to only acknowledging different media rules on page reload",
-			"usage_perc_y": 85.42,
-			"usage_perc_a": 0.01,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "@media"
-		},
-		"multicolumn": {
-			"title": "CSS3 Multiple column layout",
-			"description": "Method of flowing information in multiple columns",
-			"spec": "http://www.w3.org/TR/css3-multicol/",
-			"status": "cr",
-			"links": [{
-				"url": "http://dev.opera.com/articles/view/css3-multi-column-layout/",
-				"title": "Dev.Opera article"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/css/properties/column-width",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/an-introduction-to-the-css3-multiple-column-layout-module/",
-				"title": "Introduction page"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "a x",
-					"3": "a x",
-					"3.5": "a x",
-					"3.6": "a x",
-					"4": "a x",
-					"5": "a x",
-					"6": "a x",
-					"7": "a x",
-					"8": "a x",
-					"9": "a x",
-					"10": "a x",
-					"11": "a x",
-					"12": "a x",
-					"13": "a x",
-					"14": "a x",
-					"15": "a x",
-					"16": "a x",
-					"17": "a x",
-					"18": "a x",
-					"19": "a x",
-					"20": "a x",
-					"21": "a x",
-					"22": "a x",
-					"23": "a x",
-					"24": "a x",
-					"25": "a x",
-					"26": "a x",
-					"27": "a x"
-				},
-				"chrome": {
-					"4": "a x",
-					"5": "a x",
-					"6": "a x",
-					"7": "a x",
-					"8": "a x",
-					"9": "a x",
-					"10": "a x",
-					"11": "a x",
-					"12": "a x",
-					"13": "a x",
-					"14": "a x",
-					"15": "a x",
-					"16": "a x",
-					"17": "a x",
-					"18": "a x",
-					"19": "a x",
-					"20": "a x",
-					"21": "a x",
-					"22": "a x",
-					"23": "a x",
-					"24": "a x",
-					"25": "a x",
-					"26": "a x",
-					"27": "a x",
-					"28": "a x",
-					"29": "a x",
-					"30": "a x",
-					"31": "a x",
-					"32": "a x"
-				},
-				"safari": {
-					"3.1": "a x",
-					"3.2": "a x",
-					"4": "a x",
-					"5": "a x",
-					"5.1": "a x",
-					"6": "a x",
-					"6.1": "a x",
-					"7": "a x"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "a x",
-					"16": "a x",
-					"17": "a x",
-					"18": "a x"
-				},
-				"ios_saf": {
-					"3.2": "a x",
-					"4.0-4.1": "a x",
-					"4.2-4.3": "a x",
-					"5.0-5.1": "a x",
-					"6.0-6.1": "a x",
-					"7.0": "a x"
-				},
-				"op_mini": {
-					"5.0-7.0": "y"
-				},
-				"android": {
-					"2.1": "a x",
-					"2.2": "a x",
-					"2.3": "a x",
-					"3": "a x",
-					"4": "a x",
-					"4.1": "a x",
-					"4.2-4.3": "a x",
-					"4.4": "a x"
-				},
-				"bb": {
-					"7": "a x",
-					"10": "a x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "a x"
-				},
-				"and_chr": {
-					"0": "a x"
-				},
-				"and_ff": {
-					"0": "a x"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Partial support refers to not supporting the break-before, break-after, break-inside properties. Webkit browsers do have equivalent support for the non-standard -webkit-column-break-* properties.",
-			"usage_perc_y": 16.41,
-			"usage_perc_a": 63.85,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "column-count"
-		},
-		"border-radius": {
-			"title": "CSS3 Border-radius (rounded corners)",
-			"description": "Method of making the border corners round",
-			"spec": "http://www.w3.org/TR/css3-background/#the-border-radius",
-			"status": "cr",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/css/properties/border-radius",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://muddledramblings.com/table-of-css3-border-radius-compliance",
-				"title": "Detailed compliance table"
-			}, {
-				"url": "http://www.css3files.com/border/#borderradius",
-				"title": "Information page"
-			}, {
-				"url": "http://css3pie.com/",
-				"title": "Polyfill which includes border-radius"
-			}, {
-				"url": "http://border-radius.com",
-				"title": "Border-radius CSS Generator"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "a x",
-					"3": "y x",
-					"3.5": "y x",
-					"3.6": "y x",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y x",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y x",
-					"3.2": "y x",
-					"4": "y x",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y x",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "y x",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 80.91,
-			"usage_perc_a": 0.02,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "roundedcorners, border radius,-moz-border-radius"
-		},
-		"transforms2d": {
-			"title": "CSS3 Transforms",
-			"description": "Method of transforming an element including rotating, scaling, etc.",
-			"spec": "http://www.w3.org/TR/css3-2d-transforms/",
-			"status": "wd",
-			"links": [{
-				"url": "http://www.westciv.com/tools/transforms/",
-				"title": "Live editor"
-			}, {
-				"url": "http://www.useragentman.com/IETransformsTranslator/",
-				"title": "Converter for IE"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/css/transforms/transform",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/css.js#css-transform",
-				"title": "has.js test"
-			}, {
-				"url": "https://developer.mozilla.org/en/CSS/-moz-transform",
-				"title": "MDN article"
-			}, {
-				"url": "http://www.webresourcesdepot.com/cross-browser-css-transforms-csssandpaper/",
-				"title": "Workaround script for IE"
-			}, {
-				"url": "http://www.css3files.com/transform/",
-				"title": "Information page"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "y x",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "y x",
-					"3.6": "y x",
-					"4": "y x",
-					"5": "y x",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y x",
-					"5": "y x",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x",
-					"28": "y x",
-					"29": "y x",
-					"30": "y x",
-					"31": "y x",
-					"32": "y x"
-				},
-				"safari": {
-					"3.1": "y x",
-					"3.2": "y x",
-					"4": "y x",
-					"5": "y x",
-					"5.1": "y x",
-					"6": "y x",
-					"6.1": "y x",
-					"7": "y x"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "y x",
-					"10.6": "y x",
-					"11": "y x",
-					"11.1": "y x",
-					"11.5": "y x",
-					"11.6": "y x",
-					"12": "y x",
-					"12.1": "y",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x"
-				},
-				"ios_saf": {
-					"3.2": "y x",
-					"4.0-4.1": "y x",
-					"4.2-4.3": "y x",
-					"5.0-5.1": "y x",
-					"6.0-6.1": "y x",
-					"7.0": "y x"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "y x",
-					"2.2": "y x",
-					"2.3": "y x",
-					"3": "y x",
-					"4": "y x",
-					"4.1": "y x",
-					"4.2-4.3": "y x",
-					"4.4": "y x"
-				},
-				"bb": {
-					"7": "y x",
-					"10": "y x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y x"
-				},
-				"and_chr": {
-					"0": "y x"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "The scale transform can be emulated in IE < 9 using Microsoft's \"zoom\" extension, others are (not easily) possible using the MS Matrix filter",
-			"usage_perc_y": 80.82,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "transformation,translate,rotation,rotate,scale,css-transforms"
-		},
-		"use-strict": {
-			"title": "ECMAScript 5 Strict Mode",
-			"description": "Method of placing code in a \"strict\" operating context.",
-			"spec": "http://ecma-international.org/ecma-262/5.1/#sec-14.1",
-			"status": "other",
-			"links": [{
-				"url": "http://javascriptweblog.wordpress.com/2011/05/03/javascript-strict-mode/",
-				"title": "Article with test suite"
-			}, {
-				"url": "http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/",
-				"title": "Information page"
-			}],
-			"categories": ["Other"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "a",
-					"5.1": "a",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Partial support in older Safari refers to strict mode still accepting a lot of JS that should be considered invalid.",
-			"usage_perc_y": 71.65,
-			"usage_perc_a": 1.59,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"transforms3d": {
-			"title": "CSS3 3D Transforms",
-			"description": "Method of transforming an element in the third dimension",
-			"spec": "http://www.w3.org/TR/css3-3d-transforms/",
-			"status": "wd",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/css/transforms/transform",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://css3.bradshawenterprises.com/flip/",
-				"title": "Multi-browser demo"
-			}, {
-				"url": "http://thewebrocks.com/demos/3D-css-tester/",
-				"title": "3D CSS Tester"
-			}, {
-				"url": "http://hacks.mozilla.org/2011/10/css-3d-transformations-in-firefox-nightly/",
-				"title": "Mozilla hacks article"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/css.js#css-transform",
-				"title": "has.js test"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "a",
-					"11": "a"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x",
-					"28": "y x",
-					"29": "y x",
-					"30": "y x",
-					"31": "y x",
-					"32": "y x"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "y x",
-					"5": "y x",
-					"5.1": "y x",
-					"6": "y x",
-					"6.1": "y x",
-					"7": "y x"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x"
-				},
-				"ios_saf": {
-					"3.2": "y x",
-					"4.0-4.1": "y x",
-					"4.2-4.3": "y x",
-					"5.0-5.1": "y x",
-					"6.0-6.1": "y x",
-					"7.0": "y x"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "y x",
-					"4": "y x",
-					"4.1": "y x",
-					"4.2-4.3": "y x",
-					"4.4": "y x"
-				},
-				"bb": {
-					"7": "y x",
-					"10": "y x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y x"
-				},
-				"and_chr": {
-					"0": "y x"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "a"
-				}
-			},
-			"notes": "Partial support in IE10 refers to not supporting <a href=\"http://msdn.microsoft.com/en-us/library/ie/hh673529%28v=vs.85%29.aspx#the_ms_transform_style_property\">the transform-style: preserve-3d property</a>. This prevents nesting 3D transformed elements.",
-			"usage_perc_y": 61.31,
-			"usage_perc_a": 11.11,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "css 3d,3dtransforms,translate3d,transform3d"
-		},
-		"sharedworkers": {
-			"title": "Shared Web Workers",
-			"description": "Method of allowing multiple scripts to communicate with a single web worker.",
-			"spec": "http://www.w3.org/TR/workers/#shared-workers-introduction",
-			"status": "cr",
-			"links": [{
-				"url": "http://www.sitepoint.com/javascript-shared-web-workers-html5/",
-				"title": "Sitepoint article"
-			}, {
-				"url": "http://greenido.wordpress.com/2011/11/03/web-workers-part-3-out-of-3-shared-wrokers/",
-				"title": "Blog post"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "u",
-					"27": "u"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "n"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "u",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "n"
-				},
-				"and_chr": {
-					"0": "n"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Expected to be supported in Firefox 27.",
-			"usage_perc_y": 40.07,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "webworkers",
-			"keywords": "shared worker"
-		},
-		"css-hyphens": {
-			"title": "CSS Hyphenation",
-			"description": "Method of controlling when words at the end of lines should be hyphenated using the \"hyphens\" property.",
-			"spec": "http://www.w3.org/TR/css3-text/#hyphenation",
-			"status": "wd",
-			"links": [{
-				"url": "https://developer.mozilla.org/en/CSS/hyphens",
-				"title": "MDN article"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/css/properties/hyphens",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://blog.fontdeck.com/post/9037028497/hyphens",
-				"title": "Blog post"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y x",
-					"11": "y x"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n",
-					"28": "n",
-					"29": "n",
-					"30": "n",
-					"31": "n",
-					"32": "n"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "y x",
-					"6": "y x",
-					"6.1": "y x",
-					"7": "y x"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "y x",
-					"5.0-5.1": "y x",
-					"6.0-6.1": "y x",
-					"7.0": "y x"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "n"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "n"
-				},
-				"and_chr": {
-					"0": "n"
-				},
-				"and_ff": {
-					"0": "y x"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Chrome 29- and Android 4.0 Browser support \"-webkit-hyphens: none\", but not the \"auto\" property. Chrome 30+ doesn't support it either.",
-			"usage_perc_y": 33.31,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "hyphen,shy"
-		},
-		"css-transitions": {
-			"title": "CSS3 Transitions",
-			"description": "Simple method of animating certain properties of an element",
-			"spec": "http://www.w3.org/TR/css3-transitions/",
-			"status": "wd",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/css/properties/transition",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://www.webdesignerdepot.com/2010/01/css-transitions-101/",
-				"title": "Article on usage"
-			}, {
-				"url": "http://www.opera.com/docs/specs/presto2.12/css/transitions/#anima",
-				"title": "Animation of property types support in Opera"
-			}, {
-				"url": "http://www.css3files.com/transition/",
-				"title": "Information page"
-			}, {
-				"url": "http://www.the-art-of-web.com/css/timing-function/",
-				"title": "Examples on timing functions"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "y x",
-					"5": "y x",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y x",
-					"5": "y x",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y x",
-					"3.2": "y x",
-					"4": "y x",
-					"5": "y x",
-					"5.1": "y x",
-					"6": "y x",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "y x",
-					"10.6": "y x",
-					"11": "y x",
-					"11.1": "y x",
-					"11.5": "y x",
-					"11.6": "y x",
-					"12": "y x",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y x",
-					"4.0-4.1": "y x",
-					"4.2-4.3": "y x",
-					"5.0-5.1": "y x",
-					"6.0-6.1": "y x",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "y x",
-					"2.2": "y x",
-					"2.3": "y x",
-					"3": "y x",
-					"4": "y x",
-					"4.1": "y x",
-					"4.2-4.3": "y x",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y x",
-					"10": "y x"
-				},
-				"op_mob": {
-					"10": "y x",
-					"11": "y x",
-					"11.1": "y x",
-					"11.5": "y x",
-					"12": "y x",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 75.27,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "css transition"
-		},
-		"font-feature": {
-			"title": "Font feature settings",
-			"description": "Method of applying advanced typographic and language-specific font features to supported OpenType fonts.",
-			"spec": "http://w3.org/TR/css3-fonts/#font-rend-props",
-			"status": "wd",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/css/properties/font-feature-settings",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://hacks.mozilla.org/2010/11/firefox-4-font-feature-support/",
-				"title": "Mozilla hacks article"
-			}, {
-				"url": "http://html5accessibility.com/",
-				"title": "Detailed tables on accessability support"
-			}, {
-				"url": "http://ie.microsoft.com/testdrive/Graphics/opentype/",
-				"title": "Demo pages (IE/Firefox only)"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "a x",
-					"5": "a x",
-					"6": "a x",
-					"7": "a x",
-					"8": "a x",
-					"9": "a x",
-					"10": "a x",
-					"11": "a x",
-					"12": "a x",
-					"13": "a x",
-					"14": "a x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "a x",
-					"17": "a x",
-					"18": "a x",
-					"19": "a x",
-					"20": "a x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x",
-					"28": "y x",
-					"29": "y x",
-					"30": "y x",
-					"31": "y x",
-					"32": "y x"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "a",
-					"5": "a",
-					"5.1": "a",
-					"6": "a",
-					"6.1": "y x",
-					"7": "y x"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x"
-				},
-				"ios_saf": {
-					"3.2": "a",
-					"4.0-4.1": "a",
-					"4.2-4.3": "a",
-					"5.0-5.1": "a",
-					"6.0-6.1": "a",
-					"7.0": "y x"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y x"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y x"
-				},
-				"and_chr": {
-					"0": "y x"
-				},
-				"and_ff": {
-					"0": "y x"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Partial support in older Firefox versions refers to using an older syntax. Partial support in older Chrome versions refers to lacking support in Mac OS X. ",
-			"usage_perc_y": 62.13,
-			"usage_perc_a": 6.41,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "font-feature,font-feature-settings,kern,kerning,font-variant-alternates,ligatures,font-variant-ligatures"
-		},
-		"css-animation": {
-			"title": "CSS3 Animation",
-			"description": "Complex method of animating certain properties of an element",
-			"spec": "http://www.w3.org/TR/css3-animations/",
-			"status": "wd",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/css/properties/animations",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://www.css3files.com/animation/",
-				"title": "Information page"
-			}, {
-				"url": "http://robertnyman.com/2010/05/06/css3-animations/",
-				"title": "Blog post on usage"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "y x",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y x",
-					"5": "y x",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x",
-					"28": "y x",
-					"29": "y x",
-					"30": "y x",
-					"31": "y x",
-					"32": "y x"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "y x",
-					"5": "y x",
-					"5.1": "y x",
-					"6": "y x",
-					"6.1": "y x",
-					"7": "y x"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "y x",
-					"12.1": "y",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x"
-				},
-				"ios_saf": {
-					"3.2": "y x",
-					"4.0-4.1": "y x",
-					"4.2-4.3": "y x",
-					"5.0-5.1": "y x",
-					"6.0-6.1": "y x",
-					"7.0": "y x"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "a x",
-					"2.2": "a x",
-					"2.3": "a x",
-					"3": "a x",
-					"4": "y x",
-					"4.1": "y x",
-					"4.2-4.3": "y x",
-					"4.4": "y x"
-				},
-				"bb": {
-					"7": "y x",
-					"10": "y x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "y",
-					"0": "y x"
-				},
-				"and_chr": {
-					"0": "y x"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Partial support in Android browser refers to buggy behavior in different scenarios.",
-			"usage_perc_y": 73.62,
-			"usage_perc_a": 1.44,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "animations,css-animations,keyframe,keyframes"
-		},
-		"css-gradients": {
-			"title": "CSS Gradients",
-			"description": "Method of defining a linear or radial color gradient as a CSS image.",
-			"spec": "http://www.w3.org/TR/css3-images/",
-			"status": "cr",
-			"links": [{
-				"url": "http://www.colorzilla.com/gradient-editor/",
-				"title": "Cross-browser editor"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/css/functions/linear-gradient",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://www.css3files.com/gradient/",
-				"title": "Information page"
-			}, {
-				"url": "http://css3pie.com/",
-				"title": "Tool to emulate support in IE"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "y x",
-					"4": "y x",
-					"5": "y x",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "a x",
-					"5": "a x",
-					"6": "a x",
-					"7": "a x",
-					"8": "a x",
-					"9": "a x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "a x",
-					"5": "a x",
-					"5.1": "y x",
-					"6": "y x",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "a x",
-					"11.5": "a x",
-					"11.6": "y x",
-					"12": "y x",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "a x",
-					"4.0-4.1": "a x",
-					"4.2-4.3": "a x",
-					"5.0-5.1": "y x",
-					"6.0-6.1": "y x",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "a x",
-					"2.2": "a x",
-					"2.3": "a x",
-					"3": "a x",
-					"4": "y x",
-					"4.1": "y x",
-					"4.2-4.3": "y x",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "a x",
-					"10": "y x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "a x",
-					"11.5": "a x",
-					"12": "y x",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Partial support in Opera 11.10 and 11.50 also refers to only having support for linear gradients. Support can be somewhat emulated in older IE versions using the non-standard \"gradient\" filter. Firefox 10+, Opera 11.6+, Chrome 26+ and IE10 also support the new \"to (side)\" syntax.",
-			"usage_perc_y": 73.31,
-			"usage_perc_a": 2.22,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "linear,linear-gradient,gradiant"
-		},
-		"css-canvas": {
-			"title": "CSS Canvas Drawings",
-			"description": "Method of using HTML5 Canvas as a background image",
-			"spec": "http://webkit.org/blog/176/css-canvas-drawing/",
-			"status": "unoff",
-			"links": [{
-				"url": "http://webkit.org/blog/176/css-canvas-drawing/",
-				"title": "Webkit blog post"
-			}],
-			"categories": ["CSS"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "u",
-					"27": "u"
-				},
-				"chrome": {
-					"4": "y x",
-					"5": "y x",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x",
-					"28": "y x",
-					"29": "y x",
-					"30": "y x",
-					"31": "y x",
-					"32": "y x"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "y x",
-					"5": "y x",
-					"5.1": "y x",
-					"6": "y x",
-					"6.1": "y x",
-					"7": "y x"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x"
-				},
-				"ios_saf": {
-					"3.2": "y x",
-					"4.0-4.1": "y x",
-					"4.2-4.3": "y x",
-					"5.0-5.1": "y x",
-					"6.0-6.1": "y x",
-					"7.0": "y x"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "y x",
-					"2.2": "y x",
-					"2.3": "y x",
-					"3": "y x",
-					"4": "y x",
-					"4.1": "y x",
-					"4.2-4.3": "y x",
-					"4.4": "y x"
-				},
-				"bb": {
-					"7": "y x",
-					"10": "y x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y x"
-				},
-				"and_chr": {
-					"0": "y x"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Proposal by Webkit, being considered for W3C standardization. A similar effect can be achieved in Firefox 4+ using the -moz-element() background property",
-			"usage_perc_y": 48.41,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"css-reflections": {
-			"title": "CSS Reflections",
-			"description": "Method of displaying a reflection of an element",
-			"spec": "http://webkit.org/blog/182/css-reflections/",
-			"status": "unoff",
-			"links": [{
-				"url": "http://webkit.org/blog/182/css-reflections/",
-				"title": "Webkit blog post"
-			}],
-			"categories": ["CSS"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n"
-				},
-				"chrome": {
-					"4": "y x",
-					"5": "y x",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x",
-					"28": "y x",
-					"29": "y x",
-					"30": "y x",
-					"31": "y x",
-					"32": "y x"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "y x",
-					"5": "y x",
-					"5.1": "y x",
-					"6": "y x",
-					"6.1": "y x",
-					"7": "y x"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x"
-				},
-				"ios_saf": {
-					"3.2": "y x",
-					"4.0-4.1": "y x",
-					"4.2-4.3": "y x",
-					"5.0-5.1": "y x",
-					"6.0-6.1": "y x",
-					"7.0": "y x"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "y x",
-					"2.2": "y x",
-					"2.3": "y x",
-					"3": "y x",
-					"4": "y x",
-					"4.1": "y x",
-					"4.2-4.3": "y x",
-					"4.4": "y x"
-				},
-				"bb": {
-					"7": "y x",
-					"10": "y x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y x"
-				},
-				"and_chr": {
-					"0": "y x"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Similar effect can be achieved in Firefox 4+ using the -moz-element() background property",
-			"usage_perc_y": 48.41,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "box-reflect"
-		},
-		"css-masks": {
-			"title": "CSS Masks",
-			"description": "Method of displaying part of an element, using a selected image as a mask",
-			"spec": "http://www.w3.org/TR/css-masking/",
-			"status": "wd",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/css/properties/mask",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://www.html5rocks.com/en/tutorials/masking/adobe/",
-				"title": "HTML5 Rocks article"
-			}, {
-				"url": "http://thenittygritty.co/css-masking",
-				"title": "Detailed blog post"
-			}],
-			"categories": ["CSS"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "u",
-					"27": "u"
-				},
-				"chrome": {
-					"4": "a x",
-					"5": "a x",
-					"6": "a x",
-					"7": "a x",
-					"8": "a x",
-					"9": "a x",
-					"10": "a x",
-					"11": "a x",
-					"12": "a x",
-					"13": "a x",
-					"14": "a x",
-					"15": "a x",
-					"16": "a x",
-					"17": "a x",
-					"18": "a x",
-					"19": "a x",
-					"20": "a x",
-					"21": "a x",
-					"22": "a x",
-					"23": "a x",
-					"24": "a x",
-					"25": "a x",
-					"26": "a x",
-					"27": "a x",
-					"28": "a x",
-					"29": "a x",
-					"30": "a x",
-					"31": "a x",
-					"32": "a x"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "a x",
-					"5": "a x",
-					"5.1": "a x",
-					"6": "a x",
-					"6.1": "a x",
-					"7": "a x"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "a x",
-					"16": "a x",
-					"17": "a x",
-					"18": "a x"
-				},
-				"ios_saf": {
-					"3.2": "a x",
-					"4.0-4.1": "a x",
-					"4.2-4.3": "a x",
-					"5.0-5.1": "a x",
-					"6.0-6.1": "a x",
-					"7.0": "a x"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "a x",
-					"2.2": "a x",
-					"2.3": "a x",
-					"3": "a x",
-					"4": "a x",
-					"4.1": "a x",
-					"4.2-4.3": "a x",
-					"4.4": "a x"
-				},
-				"bb": {
-					"7": "a x",
-					"10": "a x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "a x"
-				},
-				"and_chr": {
-					"0": "a x"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Previously a WebKit-only property, now a W3C specification. Partial support refers to not yet fully supporting the new spec (details currently unknown).",
-			"usage_perc_y": 0,
-			"usage_perc_a": 48.41,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"svg": {
-			"title": "SVG (basic support)",
-			"description": "Method of displaying basic Vector Graphics features using the embed or object elements",
-			"spec": "http://www.w3.org/Graphics/SVG/",
-			"status": "rec",
-			"links": [{
-				"url": "http://en.wikipedia.org/wiki/Scalable_Vector_Graphics",
-				"title": "Wikipedia"
-			}, {
-				"url": "http://code.google.com/p/svgweb/",
-				"title": "SVG Web: Flash-based polyfill"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/graphics.js#svg",
-				"title": "has.js test"
-			}, {
-				"url": "http://svg-edit.googlecode.com",
-				"title": "Web-based SVG editor"
-			}, {
-				"url": "http://www.alistapart.com/articles/using-svg-for-flexible-scalable-and-fun-backgrounds-part-i",
-				"title": "A List Apart article"
-			}, {
-				"url": "http://svg-wow.org/",
-				"title": "SVG showcase site"
-			}],
-			"categories": ["SVG"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "a",
-					"3": "y",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "a",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "y"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 84.1,
-			"usage_perc_a": 0.02,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"svg-css": {
-			"title": "SVG in CSS backgrounds",
-			"description": "Method of using SVG images as CSS backgrounds",
-			"spec": "http://www.w3.org/TR/css3-background/#background-image",
-			"status": "cr",
-			"links": [{
-				"url": "http://designfestival.com/a-farewell-to-css3-gradients/",
-				"title": "Tutorial for advanced effects"
-			}],
-			"categories": ["SVG", "CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "a",
-					"5": "a",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "a",
-					"12": "a",
-					"13": "a",
-					"14": "a",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a",
-					"19": "a",
-					"20": "a",
-					"21": "a",
-					"22": "a",
-					"23": "a",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "a",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "a",
-					"4": "a",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "a",
-					"4.0-4.1": "a",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "a"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "a",
-					"11": "a",
-					"11.1": "a",
-					"11.5": "a",
-					"12": "a",
-					"12.1": "a",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Partial support in older Firefox and Opera Mini/Mobile refers to SVG images being blurry when scaled. Partial support in iOS Safari and older Safari versions refers to failing to support tiling or the background-position property.",
-			"usage_perc_y": 75.45,
-			"usage_perc_a": 8.2,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "svg-in-css,svgincss,css-svg"
-		},
-		"svg-smil": {
-			"title": "SVG SMIL animation",
-			"description": "Method of using animation elements to animate SVG images",
-			"spec": "http://www.w3.org/TR/SVG/animate.html",
-			"status": "rec",
-			"links": [{
-				"url": "https://github.com/madsgraphics/SVGEventListener",
-				"title": "Polyfill for SMIL animate events on SVG"
-			}, {
-				"url": "https://developer.mozilla.org/en/SVG/SVG_animation_with_SMIL",
-				"title": "MDN article"
-			}, {
-				"url": "http://svg-wow.org/blog/category/animation/",
-				"title": "Examples on SVG WOW"
-			}, {
-				"url": "http://leunen.me/fakesmile/",
-				"title": "JS library to support SMIL in SVG"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/graphics.js#svg-smil",
-				"title": "has.js test"
-			}],
-			"categories": ["SVG"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "p",
-					"10": "p",
-					"11": "p"
-				},
-				"firefox": {
-					"2": "p",
-					"3": "p",
-					"3.5": "p",
-					"3.6": "p",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "a",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "p",
-					"3.2": "p",
-					"4": "a",
-					"5": "a",
-					"5.1": "a",
-					"6": "a",
-					"6.1": "a",
-					"7": "a"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "a",
-					"4.0-4.1": "a",
-					"4.2-4.3": "a",
-					"5.0-5.1": "a",
-					"6.0-6.1": "a",
-					"7.0": "a"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "p"
-				}
-			},
-			"notes": "Partial support in Safari refers to not working in HTML files.",
-			"usage_perc_y": 54.76,
-			"usage_perc_a": 7.99,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"svg-fonts": {
-			"title": "SVG fonts",
-			"description": "Method of using fonts defined as SVG shapes",
-			"spec": "http://www.w3.org/TR/SVG/fonts.html",
-			"status": "rec",
-			"links": [{
-				"url": "http://opentype.info/blog/2010/04/13/the-ipad-and-svg-fonts-in-mobile-safari/",
-				"title": "Blog post on usage for iPad"
-			}, {
-				"url": "http://jeremie.patonnier.net/post/2011/02/07/Why-are-SVG-Fonts-so-different",
-				"title": "Blog post"
-			}],
-			"categories": ["SVG"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Supported in Opera Mini in SVG images only, not in HTML.",
-			"usage_perc_y": 47.78,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "fontface",
-			"keywords": ""
-		},
-		"svg-filters": {
-			"title": "SVG filters",
-			"description": "Method of using photoshop-like effects on SVG objects including blurring and color manipulation.",
-			"spec": "http://www.w3.org/TR/SVG/filters.html",
-			"status": "rec",
-			"links": [{
-				"url": "http://electricbeach.org/?p=950",
-				"title": "Experiments with filter effects"
-			}, {
-				"url": "http://svg-wow.org/blog/category/filters/",
-				"title": "SVG filter demos"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/svg/elements/filter",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["SVG"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "y",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "a",
-					"6": "a",
-					"7": "a",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "y"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 72.99,
-			"usage_perc_a": 0.08,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"svg-html": {
-			"title": "SVG effects for HTML",
-			"description": "Method of using SVG transforms, filters, etc on HTML elements using either CSS or the foreignObject element",
-			"spec": "http://www.w3.org/TR/SVG11/extend.html#ForeignObjectElement",
-			"status": "wd",
-			"links": [{
-				"url": "https://developer.mozilla.org/En/Applying_SVG_effects_to_HTML_content",
-				"title": "MDN Reference page"
-			}, {
-				"url": "https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html",
-				"title": "Filter Effects draft"
-			}, {
-				"url": "https://developer.mozilla.org/en/SVG/Tutorial/Other_content_in_SVG",
-				"title": "MDN Tutorial"
-			}],
-			"categories": ["SVG"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "a",
-					"10": "a",
-					"11": "a"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "a",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "a",
-					"5": "a",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "a",
-					"12": "a",
-					"13": "a",
-					"14": "a",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a",
-					"19": "a",
-					"20": "a",
-					"21": "a",
-					"22": "a",
-					"23": "a",
-					"24": "a",
-					"25": "a",
-					"26": "a",
-					"27": "a",
-					"28": "a",
-					"29": "a",
-					"30": "a",
-					"31": "a",
-					"32": "a"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "a",
-					"5": "a",
-					"5.1": "a",
-					"6": "a",
-					"6.1": "a",
-					"7": "a"
-				},
-				"opera": {
-					"9": "a",
-					"9.5-9.6": "a",
-					"10.0-10.1": "a",
-					"10.5": "a",
-					"10.6": "a",
-					"11": "a",
-					"11.1": "a",
-					"11.5": "a",
-					"11.6": "a",
-					"12": "a",
-					"12.1": "a",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a"
-				},
-				"ios_saf": {
-					"3.2": "a",
-					"4.0-4.1": "a",
-					"4.2-4.3": "a",
-					"5.0-5.1": "a",
-					"6.0-6.1": "a",
-					"7.0": "a"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "a"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "a",
-					"11": "a",
-					"11.1": "a",
-					"11.5": "a",
-					"12": "a",
-					"12.1": "a",
-					"0": "a"
-				},
-				"and_chr": {
-					"0": "a"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Partial support refers to lack of filter support or buggy result from effects. A <a href=\"https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html\">CSS Filter Effects</a> specification is in the works that would replace this method.",
-			"usage_perc_y": 15.33,
-			"usage_perc_a": 60.21,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"svg-html5": {
-			"title": "Inline SVG in HTML5",
-			"description": "Method of using SVG tags directly in HTML documents. Requires HTML5 parser.",
-			"spec": "http://www.w3.org/TR/html5/embedded-content-0.html#svg-0",
-			"status": "cr",
-			"links": [{
-				"url": "http://hacks.mozilla.org/2010/05/firefox-4-the-html5-parser-inline-svg-speed-and-more/",
-				"title": "Mozilla Hacks blog post"
-			}, {
-				"url": "http://samples.msdn.microsoft.com/ietestcenter/html5/svghtml_harness.htm?url=SVG_HTML_Elements_001",
-				"title": "Test suite"
-			}],
-			"categories": ["SVG", "HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "p",
-					"3": "p",
-					"3.5": "p",
-					"3.6": "p",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "p",
-					"5": "p",
-					"6": "p",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "p",
-					"3.2": "p",
-					"4": "p",
-					"5": "p",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "p",
-					"9.5-9.6": "p",
-					"10.0-10.1": "p",
-					"10.5": "p",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "p",
-					"4.0-4.1": "p",
-					"4.2-4.3": "p",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "p",
-					"11": "p",
-					"11.1": "p",
-					"11.5": "p",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 78.45,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"canvas": {
-			"title": "Canvas (basic support)",
-			"description": "Method of generating fast, dynamic graphics using JavaScript",
-			"spec": "http://www.w3.org/TR/html5/embedded-content-0.html#the-canvas-element",
-			"status": "cr",
-			"links": [{
-				"url": "https://developer.mozilla.org/en/Canvas_tutorial",
-				"title": "Tutorial by Mozilla"
-			}, {
-				"url": "http://explorercanvas.googlecode.com/",
-				"title": "Implementation for Internet Explorer"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/graphics.js#canvas",
-				"title": "has.js test"
-			}, {
-				"url": "http://www.diveinto.org/html5/canvas.html",
-				"title": "Another tutorial"
-			}, {
-				"url": "http://glimr.rubyforge.org/cake/canvas.html",
-				"title": "Animation kit "
-			}, {
-				"url": "http://www.canvasdemos.com/",
-				"title": "Showcase site"
-			}],
-			"categories": ["Canvas", "HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "y",
-					"3": "y",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "a"
-				},
-				"android": {
-					"2.1": "a",
-					"2.2": "a",
-					"2.3": "a",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Opera Mini supports the canvas element, but is unable to play animations or run other more complex applications. Android 2.x supports canvas except the toDataURL() function. See http://code.google.com/p/android/issues/detail?id=7901 Some (slow) workarounds are described here: http://stackoverflow.com/q/10488033/841830",
-			"usage_perc_y": 79.53,
-			"usage_perc_a": 6.02,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"canvas-text": {
-			"title": "Text API for Canvas",
-			"description": "Method of displaying text on Canvas elements",
-			"spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#text-0",
-			"status": "wd",
-			"links": [{
-				"url": "http://code.google.com/p/canvas-text/",
-				"title": "Support library"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/apis/canvas/CanvasRenderingContext2D/fillText",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/graphics.js#canvas-text",
-				"title": "has.js test"
-			}, {
-				"url": "https://developer.mozilla.org/en/Drawing_text_using_a_canvas#Additional_examples",
-				"title": "Examples by Mozilla"
-			}],
-			"categories": ["Canvas", "HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "p",
-					"3": "p",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "p",
-					"3.2": "p",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "p",
-					"9.5-9.6": "p",
-					"10.0-10.1": "p",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "p",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 80.82,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "canvas",
-			"keywords": ""
-		},
-		"namevalue-storage": {
-			"title": "Web Storage - name/value pairs",
-			"description": "Method of storing data locally like cookies, but for larger amounts of data (sessionStorage and localStorage, used to fall under HTML5).",
-			"spec": "http://www.w3.org/TR/webstorage/#storage",
-			"status": "rec",
-			"links": [{
-				"url": "http://html5demos.com/storage",
-				"title": "Simple demo"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/apis/web-storage/Storage/localStorage",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "https://developer.mozilla.org/En/DOM/Storage",
-				"title": "Gecko reference"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/features.js#native-localstorage;native-sessionstorage",
-				"title": "has.js test"
-			}, {
-				"url": "http://code.google.com/p/sessionstorage/",
-				"title": "Support library"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "p",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "a",
-					"3": "a",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "In private browsing mode Safari and iOS Safari don't support setting localStorage.",
-			"usage_perc_y": 89.13,
-			"usage_perc_a": 0.1,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "webstorage,local storage"
-		},
-		"sql-storage": {
-			"title": "Web SQL Database",
-			"description": "Method of storing data client-side, allows Sqlite database queries for access and manipulation",
-			"spec": "http://www.w3.org/TR/webdatabase/",
-			"status": "unoff",
-			"links": [{
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/features.js#native-sql-db",
-				"title": "has.js test"
-			}, {
-				"url": "http://html5doctor.com/introducing-web-sql-databases/",
-				"title": "HTML5 Doctor article"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "The Web SQL Database specification is no longer being maintained and support may be dropped in future versions.",
-			"usage_perc_y": 49.18,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "db-storage,websql"
-		},
-		"indexeddb": {
-			"title": "IndexedDB",
-			"description": "Method of storing data client-side, allows indexed database queries. Previously known as WebSimpleDB API.",
-			"spec": "http://www.w3.org/TR/IndexedDB/",
-			"status": "wd",
-			"links": [{
-				"url": "http://hacks.mozilla.org/2010/06/comparing-indexeddb-and-webdatabase/",
-				"title": "Mozilla Hacks article"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/features.js#native-indexeddb",
-				"title": "has.js test"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/apis/indexedDB",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "https://github.com/axemclion/IndexedDBShim",
-				"title": "Polyfill for browsers supporting WebSQL"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "a x",
-					"5": "a x",
-					"6": "a x",
-					"7": "a x",
-					"8": "a x",
-					"9": "a x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "a x",
-					"12": "a x",
-					"13": "a x",
-					"14": "a x",
-					"15": "a x",
-					"16": "a x",
-					"17": "a x",
-					"18": "a x",
-					"19": "a x",
-					"20": "a x",
-					"21": "a x",
-					"22": "a x",
-					"23": "y x",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "n",
-					"7": "n"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "a x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Partial support in BB10 refers to an <a href=\"http://www.w3.org/TR/2011/WD-IndexedDB-20110419/\">outdated specification</a> being implemented. Code targeting the <a href=\"http://www.w3.org/TR/IndexedDB/\">current state of the specification</a> might not work.",
-			"usage_perc_y": 59.46,
-			"usage_perc_a": 1.68,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "indexdb"
-		},
-		"eventsource": {
-			"title": "Server-sent DOM events",
-			"description": "Method of continuously sending data from a server to the browser, rather than repeatedly requesting it (EventSource interface, used to fall under HTML5)",
-			"spec": "http://www.w3.org/TR/eventsource/",
-			"status": "cr",
-			"links": [{
-				"url": "http://www.html5rocks.com/tutorials/eventsource/basics/",
-				"title": "HTML5 Rocks tutorial"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/features.js#native-eventsource",
-				"title": "has.js test"
-			}, {
-				"url": "http://samshull.blogspot.com/2010/10/ajax-push-in-ios-safari-and-chrome-with.html",
-				"title": "Blog post with demo"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "a",
-					"9.5-9.6": "a",
-					"10.0-10.1": "a",
-					"10.5": "a",
-					"10.6": "a",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "a",
-					"11": "a",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 58.8,
-			"usage_perc_a": 0.06,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "serversent,s-sent-events"
-		},
-		"x-doc-messaging": {
-			"title": "Cross-document messaging",
-			"description": "Method of sending information from a page on one domain to a page on a different one (using postMessage)",
-			"spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages",
-			"status": "wd",
-			"links": [{
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/features.js#native-crosswindowmessaging",
-				"title": "has.js test"
-			}, {
-				"url": "http://html5demos.com/postmessage2",
-				"title": "Simple demo"
-			}, {
-				"url": "https://developer.mozilla.org/en/DOM/window.postMessage",
-				"title": "MDN article"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/apis/web-messaging/methods/postMessage_%28window%29",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://72lions.com/2011/05/cross-origin-communication-with-html5",
-				"title": "Article and demo"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "y",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "y"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "a"
-				}
-			},
-			"notes": "Partial support in IE8-9 refers to only working in frames/iframes (not other tabs/windows). Also in IE 9 and below an object cannot be sent using postMessage. Partial support in IE10 refers to <a href=\"http://stackoverflow.com/questions/16226924/is-cross-origin-postmessage-broken-in-ie10\">limitations in certain conditions</a>",
-			"usage_perc_y": 69.31,
-			"usage_perc_a": 24.52,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"datauri": {
-			"title": "Data URIs",
-			"description": "Method of embedding images and other files in webpages as a string of text",
-			"spec": "http://www.ietf.org/rfc/rfc2397.txt",
-			"status": "other",
-			"links": [{
-				"url": "http://www.websiteoptimization.com/speed/tweak/inline-images/",
-				"title": "Data URL converter"
-			}, {
-				"url": "http://css-tricks.com/5970-data-uris/",
-				"title": "Information page"
-			}, {
-				"url": "http://en.wikipedia.org/wiki/data_URI_scheme",
-				"title": "Wikipedia"
-			}],
-			"categories": ["Other"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "a"
-				},
-				"firefox": {
-					"2": "y",
-					"3": "y",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "y"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "a"
-				}
-			},
-			"notes": "Support in Internet Explorer 8 is limited to images and linked resources like CSS files, not HTML files. Max URI length in IE8 is 32KB. In IE9+ JavaScript files are supported too and the maximum size limit set to 4GB.",
-			"usage_perc_y": 69.23,
-			"usage_perc_a": 24.63,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "data url,datauris,data uri,dataurl,dataurls"
-		},
-		"mathml": {
-			"title": "MathML",
-			"description": "An XML language that allows mathematical formulas and notations to be written on web pages.",
-			"spec": "http://www.w3.org/TR/MathML/",
-			"status": "rec",
-			"links": [{
-				"url": "http://www.mozilla.org/projects/mathml/demo/",
-				"title": "MathML demos"
-			}, {
-				"url": "http://en.wikipedia.org/wiki/MathML",
-				"title": "Wikipedia"
-			}, {
-				"url": "http://www.mathjax.org",
-				"title": "Cross-browser support script"
-			}, {
-				"url": "https://developer.mozilla.org/en/MathML/Element",
-				"title": "MDN element reference"
-			}],
-			"categories": ["Other"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "y",
-					"3": "y",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "p",
-					"5": "p",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "p",
-					"10": "p",
-					"11": "p",
-					"12": "p",
-					"13": "p",
-					"14": "p",
-					"15": "p",
-					"16": "p",
-					"17": "p",
-					"18": "p",
-					"19": "p",
-					"20": "p",
-					"21": "p",
-					"22": "p",
-					"23": "p",
-					"24": "y",
-					"25": "p",
-					"26": "p",
-					"27": "p",
-					"28": "p",
-					"29": "p",
-					"30": "p",
-					"31": "p",
-					"32": "p"
-				},
-				"safari": {
-					"3.1": "p",
-					"3.2": "p",
-					"4": "p",
-					"5": "p",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "a",
-					"10.0-10.1": "a",
-					"10.5": "a",
-					"10.6": "a",
-					"11": "a",
-					"11.1": "a",
-					"11.5": "a",
-					"11.6": "a",
-					"12": "a",
-					"12.1": "a",
-					"15": "p",
-					"16": "p",
-					"17": "p",
-					"18": "p"
-				},
-				"ios_saf": {
-					"3.2": "p",
-					"4.0-4.1": "p",
-					"4.2-4.3": "p",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "p"
-				},
-				"android": {
-					"2.1": "p",
-					"2.2": "p",
-					"2.3": "p",
-					"3": "p",
-					"4": "p",
-					"4.1": "p",
-					"4.2-4.3": "p",
-					"4.4": "p"
-				},
-				"bb": {
-					"7": "p",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "p",
-					"11": "p",
-					"11.1": "p",
-					"11.5": "p",
-					"12": "p",
-					"12.1": "p",
-					"0": "p"
-				},
-				"and_chr": {
-					"0": "p"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Opera's support is limited to a CSS profile of MathML. Support was added in Chrome 24, but removed afterwards due to instability.",
-			"usage_perc_y": 23.15,
-			"usage_perc_a": 0.63,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"css-featurequeries": {
-			"title": "CSS Feature Queries",
-			"description": "CSS Feature Queries allow authors to condition rules based on whether particular property declarations are supported in CSS using the @supports at rule.",
-			"spec": "http://www.w3.org/TR/css3-conditional/#at-supports",
-			"status": "cr",
-			"links": [{
-				"url": "http://dabblet.com/gist/3895764",
-				"title": "Test case"
-			}, {
-				"url": "http://mcc.id.au/blog/2012/08/supports",
-				"title": "@supports in Firefox"
-			}, {
-				"url": "https://developer.mozilla.org/en-US/docs/Web/CSS/@supports",
-				"title": "MDN Article"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/css/atrules/@supports",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "n",
-					"7": "n"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 45.52,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "supports,conditional"
-		},
-		"xhtml": {
-			"title": "XHTML served as application/xhtml+xml",
-			"description": "A strict form of HTML, and allows embedding of other XML languages",
-			"spec": "http://www.w3.org/TR/xhtml1/",
-			"status": "rec",
-			"links": [{
-				"url": "http://en.wikipedia.org/wiki/XHTML",
-				"title": "Wikipedia"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/concepts/internet_and_web/the_web_standards_model#What_is_XHTML.3F",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://www.xmlplease.com/xhtml/xhtml5polyglot/",
-				"title": "Information on XHTML5"
-			}],
-			"categories": ["Other"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "y",
-					"3": "y",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "y"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "The XHTML syntax is very close to HTML, and thus is almost always (<a href=\"https://developer.mozilla.org/en-US/docs/XHTML#MIME_type_versus_DOCTYPE\">incorrectly</a>) served as text/html on the web.",
-			"usage_perc_y": 85.55,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "xhtml+xml"
-		},
-		"xhtmlsmil": {
-			"title": "XHTML+SMIL animation",
-			"description": "Method of using SMIL animation in web pages",
-			"spec": "http://www.w3.org/TR/XHTMLplusSMIL/",
-			"status": "unoff",
-			"links": [{
-				"url": "http://en.wikipedia.org/wiki/XHTML%2BSMIL",
-				"title": "Wikipedia"
-			}, {
-				"url": "http://leunen.me/fakesmile/",
-				"title": "JS library to support XHTML+SMIL"
-			}],
-			"categories": ["Other"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "p",
-					"3": "p",
-					"3.5": "p",
-					"3.6": "p",
-					"4": "p",
-					"5": "p",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "p",
-					"10": "p",
-					"11": "p",
-					"12": "p",
-					"13": "p",
-					"14": "p",
-					"15": "p",
-					"16": "p",
-					"17": "p",
-					"18": "p",
-					"19": "p",
-					"20": "p",
-					"21": "p",
-					"22": "p",
-					"23": "p",
-					"24": "p",
-					"25": "p",
-					"26": "p",
-					"27": "p"
-				},
-				"chrome": {
-					"4": "p",
-					"5": "p",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "p",
-					"10": "p",
-					"11": "p",
-					"12": "p",
-					"13": "p",
-					"14": "p",
-					"15": "p",
-					"16": "p",
-					"17": "p",
-					"18": "p",
-					"19": "p",
-					"20": "p",
-					"21": "p",
-					"22": "p",
-					"23": "p",
-					"24": "p",
-					"25": "p",
-					"26": "p",
-					"27": "p",
-					"28": "p",
-					"29": "p",
-					"30": "p",
-					"31": "p",
-					"32": "p"
-				},
-				"safari": {
-					"3.1": "p",
-					"3.2": "p",
-					"4": "p",
-					"5": "p",
-					"5.1": "p",
-					"6": "p",
-					"6.1": "p",
-					"7": "p"
-				},
-				"opera": {
-					"9": "p",
-					"9.5-9.6": "p",
-					"10.0-10.1": "p",
-					"10.5": "p",
-					"10.6": "p",
-					"11": "p",
-					"11.1": "p",
-					"11.5": "p",
-					"11.6": "p",
-					"12": "p",
-					"12.1": "p",
-					"15": "p",
-					"16": "p",
-					"17": "p",
-					"18": "p"
-				},
-				"ios_saf": {
-					"3.2": "p",
-					"4.0-4.1": "p",
-					"4.2-4.3": "p",
-					"5.0-5.1": "p",
-					"6.0-6.1": "p",
-					"7.0": "p"
-				},
-				"op_mini": {
-					"5.0-7.0": "p"
-				},
-				"android": {
-					"2.1": "p",
-					"2.2": "p",
-					"2.3": "p",
-					"3": "p",
-					"4": "p",
-					"4.1": "p",
-					"4.2-4.3": "p",
-					"4.4": "p"
-				},
-				"bb": {
-					"7": "p",
-					"10": "p"
-				},
-				"op_mob": {
-					"10": "p",
-					"11": "p",
-					"11.1": "p",
-					"11.5": "p",
-					"12": "p",
-					"12.1": "p",
-					"0": "p"
-				},
-				"and_chr": {
-					"0": "p"
-				},
-				"and_ff": {
-					"0": "p"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Internet Explorer supports the W3C proposal HTML+TIME, which is largely the same as XHTML+SMIL",
-			"usage_perc_y": 0,
-			"usage_perc_a": 9.02,
-			"ucprefix": false,
-			"parent": "xhtml",
-			"keywords": ""
-		},
-		"wai-aria": {
-			"title": "WAI-ARIA Accessibility features",
-			"description": "Method of providing ways for people with disabilities to use dynamic web content and web applications.",
-			"spec": "http://www.w3.org/TR/wai-aria/",
-			"status": "cr",
-			"links": [{
-				"url": "http://www.alistapart.com/articles/the-accessibility-of-wai-aria/",
-				"title": "ALA Article"
-			}, {
-				"url": "http://en.wikipedia.org/wiki/WAI-ARIA",
-				"title": "Wikipedia"
-			}, {
-				"url": "http://zufelt.ca/blog/are-you-confused-html5-and-wai-aria-yet",
-				"title": "HTML5/WAI-ARIA information"
-			}, {
-				"url": "http://www.w3.org/WAI/intro/aria",
-				"title": "Information page"
-			}, {
-				"url": "http://www.paciellogroup.com/blog/2011/10/browser-assistive-technology-tests-redux/",
-				"title": "Links to various test results"
-			}],
-			"categories": ["Other"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "a",
-					"3": "y",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "a",
-					"5": "a",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "a",
-					"12": "a",
-					"13": "a",
-					"14": "a",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a",
-					"19": "a",
-					"20": "a",
-					"21": "a",
-					"22": "a",
-					"23": "a",
-					"24": "a",
-					"25": "a",
-					"26": "a",
-					"27": "a",
-					"28": "a",
-					"29": "a",
-					"30": "a",
-					"31": "a",
-					"32": "a"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "a",
-					"5": "a",
-					"5.1": "a",
-					"6": "a",
-					"6.1": "a",
-					"7": "a"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "a",
-					"10.0-10.1": "a",
-					"10.5": "a",
-					"10.6": "a",
-					"11": "a",
-					"11.1": "a",
-					"11.5": "a",
-					"11.6": "a",
-					"12": "a",
-					"12.1": "a",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a"
-				},
-				"ios_saf": {
-					"3.2": "a",
-					"4.0-4.1": "a",
-					"4.2-4.3": "a",
-					"5.0-5.1": "a",
-					"6.0-6.1": "a",
-					"7.0": "a"
-				},
-				"op_mini": {
-					"5.0-7.0": "a"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "a"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "a",
-					"11": "a",
-					"11.1": "a",
-					"11.5": "a",
-					"12": "a",
-					"12.1": "a",
-					"0": "a"
-				},
-				"and_chr": {
-					"0": "a"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 40.05,
-			"usage_perc_a": 48.6,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "wai,aria"
-		},
-		"geolocation": {
-			"title": "Geolocation",
-			"description": "Method of informing a website of the user's geographical location",
-			"spec": "http://www.w3.org/TR/geolocation-API/",
-			"status": "cr",
-			"links": [{
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/features.js#native-geolocation",
-				"title": "has.js test"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/apis/geolocation",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://html5demos.com/geo",
-				"title": "Simple demo"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "p",
-					"3": "p",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "a",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "p",
-					"3.2": "p",
-					"4": "p",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "p",
-					"10.5": "p",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "n",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "p",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 80.65,
-			"usage_perc_a": 0.02,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"flexbox": {
-			"title": "Flexible Box Layout Module",
-			"description": "Method of positioning elements in horizontal or vertical stacks.",
-			"spec": "http://www.w3.org/TR/css3-flexbox/",
-			"status": "cr",
-			"links": [{
-				"url": "http://css-tricks.com/snippets/css/a-guide-to-flexbox/",
-				"title": "A Complete Guide to Flexbox"
-			}, {
-				"url": "http://bennettfeely.com/flexplorer/",
-				"title": "Flexbox CSS generator"
-			}, {
-				"url": "http://www.adobe.com/devnet/html5/articles/working-with-flexbox-the-new-spec.html",
-				"title": "Article on using the latest spec"
-			}, {
-				"url": "http://philipwalton.github.io/solved-by-flexbox/",
-				"title": "Examples on how to solve common layout problems with flexbox"
-			}, {
-				"url": "http://dev.opera.com/articles/view/advanced-cross-browser-flexbox/",
-				"title": "Tutorial on cross-browser support"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "a x #2",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "a x #1",
-					"3": "a x #1",
-					"3.5": "a x #1",
-					"3.6": "a x #1",
-					"4": "a x #1",
-					"5": "a x #1",
-					"6": "a x #1",
-					"7": "a x #1",
-					"8": "a x #1",
-					"9": "a x #1",
-					"10": "a x #1",
-					"11": "a x #1",
-					"12": "a x #1",
-					"13": "a x #1",
-					"14": "a x #1",
-					"15": "a x #1",
-					"16": "a x #1",
-					"17": "a x #1",
-					"18": "a x #1",
-					"19": "a x #1",
-					"20": "a x #1",
-					"21": "a x #1",
-					"22": "a #3",
-					"23": "a #3",
-					"24": "a #3",
-					"25": "a #3",
-					"26": "a #3",
-					"27": "a #3"
-				},
-				"chrome": {
-					"4": "a x #1",
-					"5": "a x #1",
-					"6": "a x #1",
-					"7": "a x #1",
-					"8": "a x #1",
-					"9": "a x #1",
-					"10": "a x #1",
-					"11": "a x #1",
-					"12": "a x #1",
-					"13": "a x #1",
-					"14": "a x #1",
-					"15": "a x #1",
-					"16": "a x #1",
-					"17": "a x #1",
-					"18": "a x #1",
-					"19": "a x #1",
-					"20": "a x #1",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x",
-					"28": "y x",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "a x #1",
-					"3.2": "a x #1",
-					"4": "a x #1",
-					"5": "a x #1",
-					"5.1": "a x #1",
-					"6": "a x #1",
-					"6.1": "y x",
-					"7": "y x"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "y",
-					"15": "y x",
-					"16": "y x",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "a x #1",
-					"4.0-4.1": "a x #1",
-					"4.2-4.3": "a x #1",
-					"5.0-5.1": "a x #1",
-					"6.0-6.1": "a x #1",
-					"7.0": "y x"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "a x #1",
-					"2.2": "a x #1",
-					"2.3": "a x #1",
-					"3": "a x #1",
-					"4": "a x #1",
-					"4.1": "a x #1",
-					"4.2-4.3": "a x #1",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "a x #1",
-					"10": "y x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "a x #1"
-				},
-				"ie_mob": {
-					"10": "a x #2"
-				}
-			},
-			"notes": "Most partial support refers to supporting an <a href=\"http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/\">older version</a> of the specification or an <a href=\"http://www.w3.org/TR/2012/WD-css3-flexbox-20120322/\">older syntax</a>. For Firefox 21+ it refers to lack of flex-wrap & flex-flow support.",
-			"usage_perc_y": 37.88,
-			"usage_perc_a": 37.66,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "flex"
-		},
-		"webgl": {
-			"title": "WebGL - 3D Canvas graphics",
-			"description": "Method of generating dynamic 3D graphics using JavaScript, accelerated through hardware",
-			"spec": "https://www.khronos.org/registry/webgl/specs/1.0/",
-			"status": "other",
-			"links": [{
-				"url": "http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation",
-				"title": "Instructions on enabling WebGL"
-			}, {
-				"url": "http://webkit.org/blog/603/webgl-now-available-in-webkit-nightlies/",
-				"title": "Webkit blog post"
-			}, {
-				"url": "http://www.khronos.org/webgl/wiki/Tutorial",
-				"title": "Tutorial"
-			}, {
-				"url": "http://hacks.mozilla.org/2009/12/webgl-draft-released-today/",
-				"title": "Firefox blog post"
-			}, {
-				"url": "http://iewebgl.com/",
-				"title": "Polyfill for IE"
-			}],
-			"categories": ["Canvas"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "p",
-					"10": "p",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "a",
-					"5": "a",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "a",
-					"12": "a",
-					"13": "a",
-					"14": "a",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a",
-					"19": "a",
-					"20": "a",
-					"21": "a",
-					"22": "a",
-					"23": "a",
-					"24": "a",
-					"25": "a",
-					"26": "a",
-					"27": "a"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "a",
-					"12": "a",
-					"13": "a",
-					"14": "a",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "a",
-					"6": "a",
-					"6.1": "a",
-					"7": "a"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "a",
-					"12.1": "a",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "n"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "a",
-					"12.1": "a",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "n"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "p"
-				}
-			},
-			"notes": "Support listed as \"partial\" refers to the fact that not all users with these browsers have WebGL access. This is due to the additional requirement for users to have <a href=\"http://www.khronos.org/webgl/wiki/BlacklistsAndWhitelists\">up to date video drivers</a>. This problem was <a href=\"http://blog.chromium.org/2012/02/gpu-accelerating-2d-canvas-and-enabling.html\">solved in Chrome</a> as of version 18.\r\n\r\nNote that WebGL is part of the <a href=\"http://www.khronos.org/webgl/\">Khronos Group</a>, not the W3C. On Chrome for Android, WebGL is disabled by default, but can be enabled by enabling the \"Enable WebGL\" flag under chrome://flags",
-			"usage_perc_y": 33.4,
-			"usage_perc_a": 19.68,
-			"ucprefix": false,
-			"parent": "canvas",
-			"keywords": "web gl"
-		},
-		"fileapi": {
-			"title": "File API",
-			"description": "Method of manipulating file objects in web applications client-side, as well as programmatically selecting them and accessing their data.",
-			"spec": "http://www.w3.org/TR/FileAPI/",
-			"status": "wd",
-			"links": [{
-				"url": "https://developer.mozilla.org/en/Using_files_from_web_applications",
-				"title": "MDN article"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/apis/file",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "a",
-					"12": "a",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "a",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "a",
-					"4": "a",
-					"4.1": "a",
-					"4.2-4.3": "a",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "a",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Partial support in older Safari refers to lacking FileReader support. ",
-			"usage_perc_y": 67.73,
-			"usage_perc_a": 5.38,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "FileReader"
-		},
-		"shadowdom": {
-			"title": "Shadow DOM",
-			"description": "Method of establishing and maintaining functional boundaries between DOM trees and how these trees interact with each other within a document, thus enabling better functional encapsulation within the DOM.",
-			"spec": "http://www.w3.org/TR/shadow-dom/",
-			"status": "wd",
-			"links": [{
-				"url": "http://www.html5rocks.com/tutorials/webcomponents/shadowdom/",
-				"title": "HTML5Rocks - Shadow DOM 101 article"
-			}, {
-				"url": "http://html5-demos.appspot.com/static/shadowdom-visualizer/index.html",
-				"title": "Shadow DOM Visualizer"
-			}],
-			"categories": ["DOM", "HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "y x",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "u",
-					"7": "u"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y x"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y x"
-				},
-				"and_chr": {
-					"0": "y x"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 33.29,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "web components"
-		},
-		"websockets": {
-			"title": "Web Sockets",
-			"description": "Bidirectional communication technology for web apps",
-			"spec": "http://www.w3.org/TR/websockets/",
-			"status": "cr",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/apis/websocket",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/features.js#native-websockets",
-				"title": "has.js test"
-			}, {
-				"url": "http://websocket.org/aboutwebsocket.html",
-				"title": "WebSockets information"
-			}, {
-				"url": "http://en.wikipedia.org/wiki/WebSocket",
-				"title": "Wikipedia"
-			}, {
-				"url": "http://updates.html5rocks.com/2011/08/What-s-different-in-the-new-WebSocket-protocol",
-				"title": "Details on newer protocol"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "a",
-					"5": "a",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "a",
-					"5": "a",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "a",
-					"12": "a",
-					"13": "a",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "a",
-					"5.1": "a",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "a",
-					"11.1": "a",
-					"11.5": "a",
-					"11.6": "a",
-					"12": "a",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "a",
-					"5.0-5.1": "a",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "a",
-					"11.1": "a",
-					"11.5": "a",
-					"12": "a",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Partial support refers to the websockets implementation using an older version of the protocol and/or the implementation being disabled by default (due to security issues with the older protocol).",
-			"usage_perc_y": 67.46,
-			"usage_perc_a": 2.62,
-			"ucprefix": true,
-			"parent": "",
-			"keywords": ""
-		},
-		"script-async": {
-			"title": "async attribute for external scripts",
-			"description": "The boolean async attribute on script elements allows the external JavaScript file to run when it's available, without delaying page load first.",
-			"spec": "http://www.w3.org/TR/html5/scripting-1.html#attr-script-async",
-			"status": "cr",
-			"links": [{
-				"url": "https://developer.mozilla.org/en/HTML/Element/script#Attributes",
-				"title": "MDN article"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/script.js#script-async",
-				"title": "has.js test"
-			}, {
-				"url": "http://ie.microsoft.com/testdrive/Performance/AsyncScripts/Default.html",
-				"title": "Demo"
-			}],
-			"categories": ["HTML5", "DOM"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "a",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Using script.async = false; to maintain execution order for dynamically-added scripts isn't supported in Safari 5.0",
-			"usage_perc_y": 72.82,
-			"usage_perc_a": 0.31,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"cors": {
-			"title": "Cross-Origin Resource Sharing",
-			"description": "Method of performing XMLHttpRequests across domains",
-			"spec": "http://www.w3.org/TR/cors/",
-			"status": "cr",
-			"links": [{
-				"url": "http://saltybeagle.com/2009/09/cross-origin-resource-sharing-demo/",
-				"title": "Demo and script with cross-browser support"
-			}, {
-				"url": "http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/",
-				"title": "Mozilla Hacks blog post"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/features.js#native-cors-xhr",
-				"title": "has.js test"
-			}, {
-				"url": "http://msdn.microsoft.com/en-us/library/cc288060(VS.85).aspx",
-				"title": "Alternative implementation by IE8"
-			}, {
-				"url": "http://dev.opera.com/articles/view/dom-access-control-using-cross-origin-resource-sharing/",
-				"title": "DOM access using CORS"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "a",
-					"9": "a",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Supported somewhat in IE8 and IE9 using the XDomainRequest object (but has <a href=\" http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\">limitations</a>)",
-			"usage_perc_y": 75.51,
-			"usage_perc_a": 13.52,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"calc": {
-			"title": "calc() as CSS unit value",
-			"description": "Method of allowing calculated values for length units, i.e. width: calc(100% - 3em)",
-			"spec": "http://www.w3.org/TR/css3-values/#calc",
-			"status": "cr",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/css/functions/calc",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "https://developer.mozilla.org/en/CSS/-moz-calc",
-				"title": "MDN article"
-			}, {
-				"url": "http://hacks.mozilla.org/2010/06/css3-calc/",
-				"title": "Mozilla Hacks article"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "y x",
-					"5": "y x",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "y x",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "y x",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Support can be somewhat emulated in older versions of IE using the non-standard expression() syntax. ",
-			"usage_perc_y": 71.77,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"ruby": {
-			"title": "Ruby annotation",
-			"description": "Method of adding pronunciation or other annotations using ruby elements (primarily used in East Asian typography)",
-			"spec": "http://www.w3.org/TR/html-markup/ruby.html",
-			"status": "wd",
-			"links": [{
-				"url": "https://addons.mozilla.org/firefox/addon/6812/",
-				"title": "Addon \"HTML Ruby\" for Firefox support"
-			}, {
-				"url": "http://html5doctor.com/ruby-rt-rp-element/",
-				"title": "HTML5 Doctor article"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/html/elements/ruby",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "https://addons.mozilla.org/firefox/addon/1935/",
-				"title": "Add-on \"XHTML Ruby Support\" for Firefox"
-			}],
-			"categories": ["HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "a",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "a"
-				},
-				"firefox": {
-					"2": "p",
-					"3": "p",
-					"3.5": "p",
-					"3.6": "p",
-					"4": "p",
-					"5": "p",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "p",
-					"10": "p",
-					"11": "p",
-					"12": "p",
-					"13": "p",
-					"14": "p",
-					"15": "p",
-					"16": "p",
-					"17": "p",
-					"18": "p",
-					"19": "p",
-					"20": "p",
-					"21": "p",
-					"22": "p",
-					"23": "p",
-					"24": "p",
-					"25": "p",
-					"26": "p",
-					"27": "p"
-				},
-				"chrome": {
-					"4": "p",
-					"5": "a",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "a",
-					"12": "a",
-					"13": "a",
-					"14": "a",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a",
-					"19": "a",
-					"20": "a",
-					"21": "a",
-					"22": "a",
-					"23": "a",
-					"24": "a",
-					"25": "a",
-					"26": "a",
-					"27": "a",
-					"28": "a",
-					"29": "a",
-					"30": "a",
-					"31": "a",
-					"32": "a"
-				},
-				"safari": {
-					"3.1": "p",
-					"3.2": "p",
-					"4": "p",
-					"5": "a",
-					"5.1": "a",
-					"6": "a",
-					"6.1": "a",
-					"7": "a"
-				},
-				"opera": {
-					"9": "p",
-					"9.5-9.6": "p",
-					"10.0-10.1": "p",
-					"10.5": "p",
-					"10.6": "p",
-					"11": "p",
-					"11.1": "p",
-					"11.5": "p",
-					"11.6": "p",
-					"12": "p",
-					"12.1": "p",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a"
-				},
-				"ios_saf": {
-					"3.2": "p",
-					"4.0-4.1": "p",
-					"4.2-4.3": "p",
-					"5.0-5.1": "a",
-					"6.0-6.1": "a",
-					"7.0": "a"
-				},
-				"op_mini": {
-					"5.0-7.0": "p"
-				},
-				"android": {
-					"2.1": "p",
-					"2.2": "p",
-					"2.3": "p",
-					"3": "a",
-					"4": "a",
-					"4.1": "a",
-					"4.2-4.3": "a",
-					"4.4": "a"
-				},
-				"bb": {
-					"7": "p",
-					"10": "a"
-				},
-				"op_mob": {
-					"10": "p",
-					"11": "p",
-					"11.1": "p",
-					"11.5": "p",
-					"12": "p",
-					"12.1": "p",
-					"0": "a"
-				},
-				"and_chr": {
-					"0": "a"
-				},
-				"and_ff": {
-					"0": "p"
-				},
-				"ie_mob": {
-					"10": "a"
-				}
-			},
-			"notes": "Browsers without native support can still simulate support using CSS. Partial support refers to only supporting basic ruby, may still be missing writing-mode, Complex ruby and CSS3 Ruby",
-			"usage_perc_y": 0,
-			"usage_perc_a": 72.03,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"css-opacity": {
-			"title": "CSS3 Opacity",
-			"description": "Method of setting the transparency level of an element",
-			"spec": "http://www.w3.org/TR/css3-color/",
-			"status": "rec",
-			"links": [{
-				"url": "http://www.css3files.com/color/#opacity",
-				"title": "Information page"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/css/properties/opacity",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "a",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "y",
-					"3": "y",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "y"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Transparency for elements in IE8 and older can be achieved using the proprietary \"filter\" property and does not work well with PNG images using alpha transparency.",
-			"usage_perc_y": 85.55,
-			"usage_perc_a": 9.03,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "transparent,transparency,alpha"
-		},
-		"form-validation": {
-			"title": "Form validation",
-			"description": "Method of setting required fields and field types without requiring JavaScript",
-			"spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#client-side-form-validation",
-			"status": "wd",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/html/attributes/required",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "a",
-					"5.1": "a",
-					"6": "a",
-					"6.1": "a",
-					"7": "a"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "n"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "a"
-				}
-			},
-			"notes": "Partial support in Safari refers to lack of notice when form with required fields is attempted to be submitted. Partial support in IE10 mobile refers to lack of warning when blocking submission.",
-			"usage_perc_y": 61.75,
-			"usage_perc_a": 4.07,
-			"ucprefix": false,
-			"parent": "forms",
-			"keywords": ""
-		},
-		"history": {
-			"title": "Session history management",
-			"description": "Method of manipulating the user's browser's session history in JavaScript using history.pushState, history.replaceState and the popstate event",
-			"spec": "http://www.w3.org/TR/html5/browsers.html#history-1",
-			"status": "cr",
-			"links": [{
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/features.js#native-history-state",
-				"title": "has.js test"
-			}, {
-				"url": "https://github.com/browserstate/history.js",
-				"title": "History.js polyfill "
-			}, {
-				"url": "http://docs.webplatform.org/wiki/dom/history",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://html5demos.com/history",
-				"title": "Demo page"
-			}, {
-				"url": "http://www.adequatelygood.com/2010/7/Saner-HTML5-History-Management",
-				"title": "Introduction to history management"
-			}, {
-				"url": "https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history",
-				"title": "MDN article"
-			}],
-			"categories": ["HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "a",
-					"5.1": "a",
-					"6": "a",
-					"6.1": "a",
-					"7": "a"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "a",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Older iOS versions and Android 4.0.4 claim support, but implementation is too buggy to be useful. Partial support in other Safari browsers refers to other buggy behavior.",
-			"usage_perc_y": 68.29,
-			"usage_perc_a": 3.89,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "onpushstate,onreplacestate"
-		},
-		"json": {
-			"title": "JSON parsing",
-			"description": "Method of converting JavaScript objects to JSON strings and JSON back to objects using JSON.stringify() and JSON.parse()",
-			"spec": "http://es5.github.com/#x15.12",
-			"status": "other",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/apis/json",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/json.js#json",
-				"title": "has.js test"
-			}, {
-				"url": "http://www.json.org/js.html",
-				"title": "JSON in JS (includes script w/support)"
-			}, {
-				"url": "https://developer.mozilla.org/En/Using_native_JSON",
-				"title": "MDN article"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "y"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Requires document to be in IE8+ <a href=\"http://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx\">standards mode</a> to work in IE8.",
-			"usage_perc_y": 93.71,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"classlist": {
-			"title": "classList (DOMTokenList )",
-			"description": "Method of easily manipulating classes on elements, using the DOMTokenList object.",
-			"spec": "http://www.w3.org/TR/dom/#dom-element-classlist",
-			"status": "wd",
-			"links": [{
-				"url": "https://github.com/eligrey/classList.js",
-				"title": "Polyfill script"
-			}, {
-				"url": "http://hacks.mozilla.org/2010/01/classlist-in-firefox-3-6/",
-				"title": "Mozilla Hacks article"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/dom/properties/classList",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "https://github.com/eligrey/classList.js/pull/12",
-				"title": "Polyfill script for classList on SVG elements on WebKit"
-			}],
-			"categories": ["DOM", "HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "p",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "p",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "p",
-					"3": "p",
-					"3.5": "p",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "p",
-					"5": "p",
-					"6": "p",
-					"7": "p",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "p",
-					"3.2": "p",
-					"4": "p",
-					"5": "p",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "p",
-					"9.5-9.6": "p",
-					"10.0-10.1": "p",
-					"10.5": "p",
-					"10.6": "p",
-					"11": "p",
-					"11.1": "p",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "p",
-					"4.0-4.1": "p",
-					"4.2-4.3": "p",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "p"
-				},
-				"android": {
-					"2.1": "p",
-					"2.2": "p",
-					"2.3": "p",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "p",
-					"11": "p",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 73.54,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"text-overflow": {
-			"title": "CSS3 Text-overflow",
-			"description": "Append ellipsis when text overflows its containing element",
-			"spec": "http://www.w3.org/TR/css3-ui/#text-overflow0",
-			"status": "wd",
-			"links": [{
-				"url": "http://www.css3files.com/text/",
-				"title": "Information page"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/css.js#css-text-overflow",
-				"title": "has.js test"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/css/properties/text-overflow",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "https://developer.mozilla.org/En/CSS/Text-overflow",
-				"title": "MDN article"
-			}, {
-				"url": "https://github.com/rmorse/AutoEllipsis",
-				"title": "jQuery polyfill for Firefox"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "p",
-					"3": "p",
-					"3.5": "p",
-					"3.6": "p",
-					"4": "p",
-					"5": "p",
-					"6": "p",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "y x",
-					"9.5-9.6": "y x",
-					"10.0-10.1": "y x",
-					"10.5": "y x",
-					"10.6": "y x",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "y x"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y x",
-					"11": "y x",
-					"11.1": "y x",
-					"11.5": "y x",
-					"12": "y x",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 93.95,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "textoverflow,ellipsis"
-		},
-		"webm": {
-			"title": "WebM/VP8 video format",
-			"description": "Multimedia format designed to provide a royalty-free, high-quality open video compression format for use with HTML5 video.",
-			"spec": "http://www.webmproject.org/",
-			"status": "other",
-			"links": [{
-				"url": "http://perian.org/",
-				"title": "Perian :Mac OSX Webm Codec install"
-			}, {
-				"url": "https://tools.google.com/dlpage/webmmf",
-				"title": "Codec for IE9 support"
-			}, {
-				"url": "http://webmproject.org",
-				"title": "Officical website"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/video.js#video-webm",
-				"title": "has.js test"
-			}, {
-				"url": "http://www.broken-links.com/2010/09/01/playing-webm-in-safari-with-plugins/",
-				"title": "Info on supporting WebM in Safari"
-			}],
-			"categories": ["Other"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "p",
-					"10": "p",
-					"11": "p"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "p",
-					"4": "p",
-					"5": "p",
-					"5.1": "p",
-					"6": "p",
-					"6.1": "p",
-					"7": "p"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "p"
-				}
-			},
-			"notes": "Will work in IE9+ and Safari/MacOSX provided the user has the WebM codecs installed.",
-			"usage_perc_y": 55.72,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "video",
-			"keywords": "matroska"
-		},
-		"mpeg4": {
-			"title": "MPEG-4/H.264 video format",
-			"description": "Commonly used video compression format (not royalty-free)",
-			"spec": "http://ip.hhi.de/imagecom_G1/assets/pdfs/csvt_overview_0305.pdf",
-			"status": "other",
-			"links": [{
-				"url": "http://www.interoperabilitybridges.com/html5-extension-for-wmp-plugin",
-				"title": "Firefox extension allowing support in Win7"
-			}, {
-				"url": "http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC",
-				"title": "Wikipedia article"
-			}],
-			"categories": ["Other"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "a",
-					"22": "a",
-					"23": "a",
-					"24": "a",
-					"25": "a",
-					"26": "a",
-					"27": "a"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "a",
-					"2.2": "a",
-					"2.3": "a",
-					"3": "a",
-					"4": "a",
-					"4.1": "a",
-					"4.2-4.3": "a",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "a"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "The Android 2.3 browser currently requires <a href=\"http://www.broken-links.com/2010/07/08/making-html5-video-work-on-android-phones/\">specific handling</a> to play videos. Firefox <a href=\"http://blog.lizardwrangler.com/2012/03/18/video-user-experience-and-our-mission/\">will include support</a> on some platforms in upcoming versions. Firefox supports H.264 on Windows 7 and later since version 21. Partial support for Firefox refers to the lack of support in OSX & Linux platforms, for Android Firefox it refers to the inability of hardware acceleration.",
-			"usage_perc_y": 59.55,
-			"usage_perc_a": 18.1,
-			"ucprefix": false,
-			"parent": "video",
-			"keywords": "avc,mp4,mpv,mov,aac"
-		},
-		"ogv": {
-			"title": "Ogg/Theora video format",
-			"description": "Free lossy video compression format.",
-			"spec": "http://theora.org/doc/",
-			"status": "other",
-			"links": [{
-				"url": "http://en.wikipedia.org/wiki/Theora",
-				"title": "Wikipedia article"
-			}],
-			"categories": ["Other"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "p",
-					"10": "p",
-					"11": "p"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "n",
-					"7": "n"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "n"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "n"
-				},
-				"and_chr": {
-					"0": "n"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "p"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 49.8,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "video",
-			"keywords": "xiph"
-		},
-		"wordwrap": {
-			"title": "CSS3 Overflow-wrap",
-			"description": "Allows lines to be broken within words if an otherwise unbreakable string is too long to fit.",
-			"spec": "http://www.w3.org/TR/css3-text/#overflow-wrap",
-			"status": "wd",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/css/properties/word-wrap",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "https://developer.mozilla.org/En/CSS/Word-wrap",
-				"title": "MDN article"
-			}, {
-				"url": "http://www.css3files.com/text/#wordwrap",
-				"title": "Information page"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "a",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "a"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "a",
-					"3.6": "a",
-					"4": "a",
-					"5": "a",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "a",
-					"12": "a",
-					"13": "a",
-					"14": "a",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a",
-					"19": "a",
-					"20": "a",
-					"21": "a",
-					"22": "a",
-					"23": "a",
-					"24": "a",
-					"25": "a",
-					"26": "a",
-					"27": "a"
-				},
-				"chrome": {
-					"4": "a",
-					"5": "a",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "a",
-					"12": "a",
-					"13": "a",
-					"14": "a",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a",
-					"19": "a",
-					"20": "a",
-					"21": "a",
-					"22": "a",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "a",
-					"3.2": "a",
-					"4": "a",
-					"5": "a",
-					"5.1": "a",
-					"6": "a",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "a",
-					"10.6": "a",
-					"11": "a",
-					"11.1": "a",
-					"11.5": "a",
-					"11.6": "a",
-					"12": "a",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "a",
-					"4.0-4.1": "a",
-					"4.2-4.3": "a",
-					"5.0-5.1": "a",
-					"6.0-6.1": "a",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "a"
-				},
-				"android": {
-					"2.1": "a",
-					"2.2": "a",
-					"2.3": "a",
-					"3": "a",
-					"4": "a",
-					"4.1": "a",
-					"4.2-4.3": "a",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "a",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "a",
-					"11": "a",
-					"11.1": "a",
-					"11.5": "a",
-					"12": "a",
-					"12.1": "a",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "a"
-				},
-				"ie_mob": {
-					"10": "a"
-				}
-			},
-			"notes": "Partial support refers to requiring the legacy name \"word-wrap\" (rather than overflow-wrap) to work.",
-			"usage_perc_y": 36.93,
-			"usage_perc_a": 57.51,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "wordwrap,word-wrap"
-		},
-		"progressmeter": {
-			"title": "Progress & Meter",
-			"description": "Method of indicating a progress state (progress element) or the current level of a gauge (meter element).\r\n",
-			"spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-progress-element",
-			"status": "wd",
-			"links": [{
-				"url": "http://dev.opera.com/articles/view/new-form-features-in-HTML5/#newoutput",
-				"title": "Dev.Opera article"
-			}, {
-				"url": "http://peter.sh/examples/?/html/meter-progress.html",
-				"title": "Examples of progress and meter elements"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/html/elements/progress",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://html5doctor.com/measure-up-with-the-meter-tag/",
-				"title": "HTML5 Doctor on meter element "
-			}],
-			"categories": ["HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "a",
-					"11": "a"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "a",
-					"12": "a",
-					"13": "a",
-					"14": "a",
-					"15": "a",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "a"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "a"
-				}
-			},
-			"notes": "Partial support in Firefox 6-15, IE10 & iOS7 Safari refers to supporting the progress element, but not the meter element. iOS7 Safari also does not support \"indeterminate\" progress elements.",
-			"usage_perc_y": 52.21,
-			"usage_perc_a": 14.58,
-			"ucprefix": false,
-			"parent": "forms",
-			"keywords": ""
-		},
-		"object-fit": {
-			"title": "CSS3 object-fit/object-position",
-			"description": "Method of specifying how an object (image or video) should fit inside its box. object-fit options include \"contain\" (fit according to aspect ratio), \"fill\" (stretches object to fill) and \"cover\" (overflows box but maintains ratio), where object-position allows the object to be repositioned like background-image does.",
-			"spec": "http://www.w3.org/TR/css3-images/",
-			"status": "cr",
-			"links": [{
-				"url": "http://dev.opera.com/articles/view/css3-object-fit-object-position/",
-				"title": "Dev.Opera article"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/css/properties/object-fit",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "u",
-					"27": "u"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n",
-					"28": "n",
-					"29": "n",
-					"30": "n",
-					"31": "n",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "u",
-					"7": "u"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "y x",
-					"11": "y x",
-					"11.1": "y x",
-					"11.5": "y x",
-					"11.6": "y x",
-					"12": "y x",
-					"12.1": "y x",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "n"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "y x",
-					"11.1": "y x",
-					"11.5": "y x",
-					"12": "y x",
-					"12.1": "y x",
-					"0": "n"
-				},
-				"and_chr": {
-					"0": "n"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Can be enabled in Chrome 31+ and Opera 18+ by enabling experimental Web Platform features under chrome://flags/ or opera://flags/.",
-			"usage_perc_y": 0.81,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "objectfit,objectposition"
-		},
-		"xhr2": {
-			"title": "XMLHttpRequest 2",
-			"description": "Adds more functionality to AJAX requests like file uploads, transfer progress information and the ability to send form data.",
-			"spec": "http://www.w3.org/TR/XMLHttpRequest2/",
-			"status": "wd",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/apis/xhr/XMLHttpRequest",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://www.profilepicture.co.uk/tutorials/ajax-file-upload-xmlhttprequest-level-2/",
-				"title": "Article with file upload demo"
-			}, {
-				"url": "https://developer.mozilla.org/en/XMLHttpRequest/FormData",
-				"title": "MDN article on FormData"
-			}, {
-				"url": "https://github.com/3nr1c/jUri.js",
-				"title": "Polyfill for FormData object"
-			}],
-			"categories": ["DOM", "JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "a",
-					"3.6": "a",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "u",
-					"5": "u",
-					"6": "u",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 73.51,
-			"usage_perc_a": 0.35,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "formdata"
-		},
-		"minmaxwh": {
-			"title": "CSS min/max-width/height",
-			"description": "Method of setting a minimum or maximum width or height to an element. ",
-			"spec": "http://www.w3.org/TR/CSS21/visudet.html#min-max-widths",
-			"status": "rec",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/css/properties/min-width",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://code.google.com/p/ie7-js/",
-				"title": "JS library with support"
-			}, {
-				"url": "http://www.impressivewebs.com/min-max-width-height-css/",
-				"title": "CSS Basics post"
-			}],
-			"categories": ["CSS2"],
-			"stats": {
-				"ie": {
-					"5.5": "p",
-					"6": "p",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "y",
-					"3": "y",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "y"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "IE7 does not support \"inherit\" as a value on any of these properties. IE8 has some bugs with max-width/height combined with overflow: auto/scroll.",
-			"usage_perc_y": 94.36,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "min-width,min-height,max-width,max-height"
-		},
-		"details": {
-			"title": "Details & Summary elements",
-			"description": "The &lt;details> element generates a simple no-JavaScript widget to show/hide element contents, optionally by clicking on its child &lt;summary> element.",
-			"spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/interactive-elements.html#the-details-element",
-			"status": "wd",
-			"links": [{
-				"url": "http://html5doctor.com/summary-figcaption-element/",
-				"title": "HTML5 Doctor article"
-			}, {
-				"url": "http://mathiasbynens.be/notes/html5-details-jquery",
-				"title": "jQuery fallback script"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/html/elements/details",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/features.js#native-details",
-				"title": "has.js test"
-			}, {
-				"url": "https://gist.github.com/370590",
-				"title": "Fallback script"
-			}],
-			"categories": ["HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "p",
-					"3.5": "p",
-					"3.6": "p",
-					"4": "p",
-					"5": "p",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "p",
-					"10": "p",
-					"11": "p",
-					"12": "p",
-					"13": "p",
-					"14": "p",
-					"15": "p",
-					"16": "p",
-					"17": "p",
-					"18": "p",
-					"19": "p",
-					"20": "p",
-					"21": "p",
-					"22": "p",
-					"23": "p",
-					"24": "p",
-					"25": "p",
-					"26": "p",
-					"27": "p"
-				},
-				"chrome": {
-					"4": "p",
-					"5": "p",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "p",
-					"10": "p",
-					"11": "p",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "p",
-					"3.2": "p",
-					"4": "p",
-					"5": "p",
-					"5.1": "p",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "p",
-					"9.5-9.6": "p",
-					"10.0-10.1": "p",
-					"10.5": "p",
-					"10.6": "p",
-					"11": "p",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "p",
-					"4.0-4.1": "p",
-					"4.2-4.3": "p",
-					"5.0-5.1": "p",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "p"
-				},
-				"android": {
-					"2.1": "p",
-					"2.2": "p",
-					"2.3": "p",
-					"3": "p",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "p",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "p",
-					"11": "p",
-					"11.1": "p",
-					"11.5": "p",
-					"12": "p",
-					"12.1": "p",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 44.5,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"text-stroke": {
-			"title": "CSS text-stroke",
-			"description": "Method of declaring the outline (stroke) width and color for text.",
-			"spec": "http://developer.apple.com/library/safari/documentation/appleapplications/reference/SafariCSSRef/Articles/StandardCSSProperties.html#//apple_ref/doc/uid/TP30001266-_webkit_text_stroke",
-			"status": "unoff",
-			"links": [{
-				"url": "http://www.westciv.com/tools/textStroke/",
-				"title": "Live editor"
-			}, {
-				"url": "http://css-tricks.com/7405-adding-stroke-to-web-text/",
-				"title": "Information & workarounds"
-			}],
-			"categories": ["CSS"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "u",
-					"27": "u"
-				},
-				"chrome": {
-					"4": "y x",
-					"5": "y x",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x",
-					"28": "y x",
-					"29": "y x",
-					"30": "y x",
-					"31": "y x",
-					"32": "y x"
-				},
-				"safari": {
-					"3.1": "y x",
-					"3.2": "y x",
-					"4": "y x",
-					"5": "y x",
-					"5.1": "y x",
-					"6": "y x",
-					"6.1": "y x",
-					"7": "y x"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x"
-				},
-				"ios_saf": {
-					"3.2": "a x",
-					"4.0-4.1": "y x",
-					"4.2-4.3": "y x",
-					"5.0-5.1": "y x",
-					"6.0-6.1": "y x",
-					"7.0": "y x"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "y x",
-					"2.2": "y x",
-					"2.3": "y x",
-					"3": "n",
-					"4": "y x",
-					"4.1": "y x",
-					"4.2-4.3": "y x",
-					"4.4": "y x"
-				},
-				"bb": {
-					"7": "y x",
-					"10": "y x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y x"
-				},
-				"and_chr": {
-					"0": "y x"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Does not yet appear in any W3C specification. Was briefly included in a spec as the \"text-outline\" property, but this was removed.",
-			"usage_perc_y": 48.41,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "textstroke,stroke-color,stroke-width,fill-color"
-		},
-		"inline-block": {
-			"title": "CSS inline-block",
-			"description": "Method of displaying an element as a block while flowing it with text. ",
-			"spec": "http://www.w3.org/TR/CSS21/visuren.html#fixed-positioning",
-			"status": "rec",
-			"links": [{
-				"url": "http://robertnyman.com/2010/02/24/css-display-inline-block-why-it-rocks-and-why-it-sucks/",
-				"title": "Blog post w/info"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/css/properties/display",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block/",
-				"title": "Info on cross browser support"
-			}],
-			"categories": ["CSS2"],
-			"stats": {
-				"ie": {
-					"5.5": "a",
-					"6": "a",
-					"7": "a",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "a x",
-					"3": "y",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "y"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Only supported in IE6 and IE7 on elements with a display of \"inline\" by default. <a href=\"http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block/\">Alternative properties</a> are available to provide complete cross-browser support.",
-			"usage_perc_y": 93.84,
-			"usage_perc_a": 0.74,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "inlineblock"
-		},
-		"notifications": {
-			"title": "Web Notifications",
-			"description": "Method of alerting the user outside of a web page by displaying notifications (that do not require interaction by the user).",
-			"spec": "http://www.w3.org/TR/notifications/",
-			"status": "wd",
-			"links": [{
-				"url": "http://www.html5rocks.com/tutorials/notifications/quick/",
-				"title": "HTML5 Rocks tutorial"
-			}, {
-				"url": "http://www.chromium.org/developers/design-documents/desktop-notifications/api-specification",
-				"title": "Chromium API"
-			}, {
-				"url": "https://addons.mozilla.org/en-us/firefox/addon/221523/",
-				"title": "Add-on "
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "a x",
-					"6": "a x",
-					"7": "a x",
-					"8": "a x",
-					"9": "a x",
-					"10": "a x",
-					"11": "a x",
-					"12": "a x",
-					"13": "a x",
-					"14": "a x",
-					"15": "a x",
-					"16": "a x",
-					"17": "a x",
-					"18": "a x",
-					"19": "a x",
-					"20": "a x",
-					"21": "a x",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "n",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "a x"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "a x"
-				},
-				"and_chr": {
-					"0": "a x"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 45.27,
-			"usage_perc_a": 2.66,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"stream": {
-			"title": "getUserMedia/Stream API",
-			"description": "Method of accessing external device data (such as a webcam video stream). Formerly this was envisioned as the &lt;device> element.",
-			"spec": "http://www.w3.org/TR/mediacapture-streams/",
-			"status": "wd",
-			"links": [{
-				"url": "http://my.opera.com/core/blog/2011/03/23/webcam-orientation-preview",
-				"title": "Technology preview from Opera"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/dom/methods/getUserMedia",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["HTML5", "JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x",
-					"28": "y x",
-					"29": "y x",
-					"30": "y x",
-					"31": "y x",
-					"32": "y x"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "u",
-					"7": "u"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "y",
-					"12.1": "y",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "y x"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "y",
-					"12.1": "y",
-					"0": "y x"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y x"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 48.44,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "camera,device,getUserMedia,media stream,Media Capture API"
-		},
-		"svg-img": {
-			"title": "SVG in HTML img element",
-			"description": "Method of displaying SVG images in HTML using &lt;img>",
-			"spec": "http://www.w3.org/TR/html5/embedded-content-1.html#the-img-element",
-			"status": "cr",
-			"links": [{
-				"url": "http://www.codedread.com/blog/",
-				"title": "Blog with SVGs an images"
-			}, {
-				"url": "http://blog.dholbert.org/2010/10/svg-as-image.html",
-				"title": "Blog post with examples"
-			}],
-			"categories": ["SVG"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "a",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "a",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "y"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 83.65,
-			"usage_perc_a": 0.01,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "svg-as-img,svg-in-img"
-		},
-		"datalist": {
-			"title": "Datalist element",
-			"description": "Method of setting a list of options for a user to select in a text field, while leaving the ability to enter a custom value.",
-			"spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-datalist-element",
-			"status": "wd",
-			"links": [{
-				"url": "http://demo.agektmr.com/datalist/",
-				"title": "Eiji Kitamura's options demos & tests"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/html/elements/datalist",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "https://developer.mozilla.org/en/HTML/Element/datalist",
-				"title": "MDN reference"
-			}, {
-				"url": "http://afarkas.github.com/webshim/demos/",
-				"title": "HTML5 Library including datalist support"
-			}, {
-				"url": "http://hacks.mozilla.org/2010/11/firefox-4-html5-forms/",
-				"title": "Mozilla Hacks article"
-			}],
-			"categories": ["HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "p",
-					"10": "a",
-					"11": "a"
-				},
-				"firefox": {
-					"2": "p",
-					"3": "p",
-					"3.5": "p",
-					"3.6": "p",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "p",
-					"5": "p",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "p",
-					"10": "p",
-					"11": "p",
-					"12": "p",
-					"13": "p",
-					"14": "p",
-					"15": "p",
-					"16": "p",
-					"17": "p",
-					"18": "p",
-					"19": "n",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "p",
-					"3.2": "p",
-					"4": "p",
-					"5": "p",
-					"5.1": "p",
-					"6": "n",
-					"6.1": "n",
-					"7": "n"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "p",
-					"4.0-4.1": "p",
-					"4.2-4.3": "p",
-					"5.0-5.1": "p",
-					"6.0-6.1": "p",
-					"7.0": "p"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "p",
-					"2.2": "p",
-					"2.3": "p",
-					"3": "p",
-					"4": "p",
-					"4.1": "p",
-					"4.2-4.3": "p",
-					"4.4": "p"
-				},
-				"bb": {
-					"7": "p",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "p"
-				},
-				"and_chr": {
-					"0": "p"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "p"
-				}
-			},
-			"notes": "Partial support in IE10 refers to <a href=\"http://playground.onereason.eu/2013/04/ie10s-lousy-support-for-datalists/\">significantly buggy behavior</a>.",
-			"usage_perc_y": 48.86,
-			"usage_perc_a": 10.9,
-			"ucprefix": false,
-			"parent": "forms",
-			"keywords": "list attribute"
-		},
-		"dataset": {
-			"title": "dataset & data-* attributes",
-			"description": "Method of applying and accessing custom data to elements.",
-			"spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#embedding-custom-non-visible-data-with-the-data-*-attributes",
-			"status": "wd",
-			"links": [{
-				"url": "http://www.orangesoda.net/jquery.dataset.html",
-				"title": "jQuery polyfill for dataset support"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/dom.js#dom-dataset",
-				"title": "has.js test"
-			}, {
-				"url": "http://html5demos.com/dataset",
-				"title": "Demo using dataset"
-			}, {
-				"url": "http://html5doctor.com/html5-custom-data-attributes/",
-				"title": "HTML5 Doctor article"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/html/attributes/data-*",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "a",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "a",
-					"3": "a",
-					"3.5": "a",
-					"3.6": "a",
-					"4": "a",
-					"5": "a",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "a",
-					"5": "a",
-					"6": "a",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "a",
-					"3.2": "a",
-					"4": "a",
-					"5": "a",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "a",
-					"9.5-9.6": "a",
-					"10.0-10.1": "a",
-					"10.5": "a",
-					"10.6": "a",
-					"11": "a",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "a",
-					"4.0-4.1": "a",
-					"4.2-4.3": "a",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "a"
-				},
-				"android": {
-					"2.1": "a",
-					"2.2": "a",
-					"2.3": "a",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "a",
-					"11": "a",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "a"
-				}
-			},
-			"notes": "All browsers can already use data-* attributes and access them using getAttribute. \"Supported\" refers to accessing the values using the dataset property. Current spec only refers to support on HTML elements, only some browsers also have support for SVG/MathML elements.",
-			"usage_perc_y": 62.15,
-			"usage_perc_a": 32.43,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "DOMStringMap"
-		},
-		"css-grid": {
-			"title": "CSS Grid Layout",
-			"description": "Method of using a grid concept to lay out content, providing a mechanism for authors to divide available space for lay out into columns and rows using a set of predictable sizing behaviors",
-			"spec": "http://www.w3.org/TR/css3-grid-layout/",
-			"status": "wd",
-			"links": [{
-				"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=616605",
-				"title": "Mozilla (Firefox) feature request"
-			}, {
-				"url": "http://blogs.msdn.com/b/ie/archive/2011/04/14/ie10-platform-preview-and-css-features-for-adaptive-layouts.aspx",
-				"title": "IE Blog post"
-			}, {
-				"url": "https://github.com/codler/Grid-Layout-Polyfill",
-				"title": "Grid Layout Polyfill"
-			}, {
-				"url": "https://bugs.webkit.org/show_bug.cgi?id=60731",
-				"title": "Webkit (Chrome, Safari, etc.) feature request"
-			}],
-			"categories": ["CSS"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "p",
-					"10": "y x",
-					"11": "y x"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "p",
-					"20": "p",
-					"21": "p",
-					"22": "p",
-					"23": "p",
-					"24": "p",
-					"25": "p",
-					"26": "u",
-					"27": "u"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "p",
-					"26": "p",
-					"27": "p",
-					"28": "p",
-					"29": "p",
-					"30": "p",
-					"31": "u",
-					"32": "u"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "p",
-					"6.1": "p",
-					"7": "p"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "p",
-					"7.0": "p"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "p",
-					"4.4": "p"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "p"
-				},
-				"and_chr": {
-					"0": "p"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "y x"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 11.11,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "grids,grid-row,grid-column"
-		},
-		"menu": {
-			"title": "Toolbar/context menu",
-			"description": "Method of defining a toolbar menu, a context menu or a list of (interactive) options using the &lt;menu> element.",
-			"spec": "http://www.w3.org/TR/html5/interactive-elements.html#context-menus",
-			"status": "cr",
-			"links": [{
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/events.js#event-contextmenu",
-				"title": "has.js test"
-			}, {
-				"url": "https://bug617528.bugzilla.mozilla.org/attachment.cgi?id=554309",
-				"title": "Demo"
-			}, {
-				"url": "http://addyosmani.github.com/jQuery-contextMenu/",
-				"title": "jQuery polyfill"
-			}],
-			"categories": ["HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "a",
-					"12": "a",
-					"13": "a",
-					"14": "a",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a",
-					"19": "a",
-					"20": "a",
-					"21": "a",
-					"22": "a",
-					"23": "a",
-					"24": "a",
-					"25": "a",
-					"26": "a",
-					"27": "a"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n",
-					"28": "n",
-					"29": "n",
-					"30": "n",
-					"31": "u",
-					"32": "u"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "u",
-					"7": "u"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "n"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "n"
-				},
-				"and_chr": {
-					"0": "n"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Partial support in Firefox refers to using the non-standard \"menuitem\" child elements, where the current spec uses \"<a href=\"http://www.w3.org/TR/html5/interactive-elements.html#the-command-element\">command</a>\" child elements. It is also currently limited to context menus, not toolbar menus.",
-			"usage_perc_y": 0,
-			"usage_perc_a": 14.7,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "contextmenu,menuitem,command"
-		},
-		"rem": {
-			"title": "rem (root em) units",
-			"description": "Type of unit similar to \"em\", but relative only to the root element, not any parent element. Thus compounding does not occur as it does with \"em\" units.",
-			"spec": "http://www.w3.org/TR/css3-values/#font-relative-lengths",
-			"status": "cr",
-			"links": [{
-				"url": "http://snook.ca/archives/html_and_css/font-size-with-rem",
-				"title": "Article on usage"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "u",
-					"5": "u",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 80.56,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"ttf": {
-			"title": "TTF/OTF - TrueType and OpenType font support",
-			"description": "Support for the TrueType (.ttf)and OpenType (.otf) outline font formats in @font-face. ",
-			"spec": "http://developer.apple.com/fonts/TTRefMan/index.html",
-			"status": "other",
-			"links": [{
-				"url": "http://stackoverflow.com/questions/17694143/what-is-the-status-of-ttf-support-in-internet-explorer",
-				"title": "What is the status of TTF support in Internet Explorer?"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "a",
-					"10": "a",
-					"11": "a"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "u"
-				}
-			},
-			"notes": "Partial support in IE9 refers to the fonts only working <a href=\"http://blogs.msdn.com/b/ie/archive/2010/07/15/the-css-corner-better-web-typography-for-better-design.aspx\">when set to be \"installable\"</a>.",
-			"usage_perc_y": 64.48,
-			"usage_perc_a": 16.11,
-			"ucprefix": false,
-			"parent": "fontface",
-			"keywords": ""
-		},
-		"touch": {
-			"title": "Touch events",
-			"description": "Method of registering when, where and how the interface is touched, for devices with a touch screen. These DOM events are similar to mousedown, mousemove, etc.",
-			"spec": "http://www.w3.org/TR/touch-events/",
-			"status": "rec",
-			"links": [{
-				"url": "http://schepers.cc/getintouch",
-				"title": "Information on the spec development"
-			}, {
-				"url": "http://www.quirksmode.org/mobile/tableTouch.html",
-				"title": "Detailed support tables"
-			}, {
-				"url": "http://www.quirksmode.org/m/tests/drag2.html",
-				"title": "Multi-touch demo"
-			}, {
-				"url": "http://msdn.microsoft.com/en-us/library/ie/hh673557(v=vs.85).aspx",
-				"title": "Internet Explorer's gesture and touch implementation."
-			}],
-			"categories": ["DOM", "JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "p",
-					"11": "p"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "a",
-					"5": "a",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "u",
-					"7": "u"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "p"
-				}
-			},
-			"notes": "Internet Explorer implements Pointer Events specification which supports more input devices than Touch Events one.",
-			"usage_perc_y": 58.16,
-			"usage_perc_a": 0.12,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "touchstart,touchend,touchmove,touchenter,touchleave,touchcancel"
-		},
-		"matchesselector": {
-			"title": "matches() DOM method",
-			"description": "Method of testing whether or not a DOM element matches a given selector. Formerly known (and largely supported with prefix) as matchesSelector.",
-			"spec": "http://www.w3.org/TR/selectors-api2/",
-			"status": "wd",
-			"links": [{
-				"url": "https://developer.mozilla.org/en/DOM/Element.mozMatchesSelector",
-				"title": "MDN article"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/dom/methods/matchesSelector",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["DOM", "JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "a x",
-					"10": "a x",
-					"11": "a x"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "a x",
-					"4": "a x",
-					"5": "a x",
-					"6": "a x",
-					"7": "a x",
-					"8": "a x",
-					"9": "a x",
-					"10": "a x",
-					"11": "a x",
-					"12": "a x",
-					"13": "a x",
-					"14": "a x",
-					"15": "a x",
-					"16": "a x",
-					"17": "a x",
-					"18": "a x",
-					"19": "a x",
-					"20": "a x",
-					"21": "a x",
-					"22": "a x",
-					"23": "a x",
-					"24": "a x",
-					"25": "a x",
-					"26": "a x",
-					"27": "a x"
-				},
-				"chrome": {
-					"4": "a x",
-					"5": "a x",
-					"6": "a x",
-					"7": "a x",
-					"8": "a x",
-					"9": "a x",
-					"10": "a x",
-					"11": "a x",
-					"12": "a x",
-					"13": "a x",
-					"14": "a x",
-					"15": "a x",
-					"16": "a x",
-					"17": "a x",
-					"18": "a x",
-					"19": "a x",
-					"20": "a x",
-					"21": "a x",
-					"22": "a x",
-					"23": "a x",
-					"24": "a x",
-					"25": "a x",
-					"26": "a x",
-					"27": "a x",
-					"28": "a x",
-					"29": "a x",
-					"30": "a x",
-					"31": "a x",
-					"32": "a x"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "a x",
-					"5.1": "a x",
-					"6": "a x",
-					"6.1": "a x",
-					"7": "a x"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "a x",
-					"11.6": "a x",
-					"12": "a x",
-					"12.1": "a x",
-					"15": "a x",
-					"16": "a x",
-					"17": "a x",
-					"18": "a x"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "a x",
-					"4.2-4.3": "a x",
-					"5.0-5.1": "a x",
-					"6.0-6.1": "a x",
-					"7.0": "a x"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "a x",
-					"2.3": "a x",
-					"3": "a x",
-					"4": "a x",
-					"4.1": "a x",
-					"4.2-4.3": "a x",
-					"4.4": "a x"
-				},
-				"bb": {
-					"7": "a x",
-					"10": "a x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "a x",
-					"11.5": "a x",
-					"12": "a x",
-					"12.1": "a x",
-					"0": "a x"
-				},
-				"and_chr": {
-					"0": "a x"
-				},
-				"and_ff": {
-					"0": "a x"
-				},
-				"ie_mob": {
-					"10": "a x"
-				}
-			},
-			"notes": "Partial support refers to supporting the older specification's \"matchesSelector\" name rather than just \"matches\".",
-			"usage_perc_y": 0,
-			"usage_perc_a": 80.6,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": " matchesSelector"
-		},
-		"pointer-events": {
-			"title": "CSS pointer-events (for HTML)",
-			"description": "This CSS property, when set to \"none\" allows elements to not receive hover/click events, instead the event will occur on anything behind it. ",
-			"spec": "http://wiki.csswg.org/spec/css4-ui#pointer-events",
-			"status": "unoff",
-			"links": [{
-				"url": "http://robertnyman.com/2010/03/22/css-pointer-events-to-allow-clicks-on-underlying-elements/",
-				"title": "Article & tutorial"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/css.js#css-pointerevents",
-				"title": "has.js test"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Already part of the SVG specification, and all SVG-supporting browsers appear to support the property on SVG elements.",
-			"usage_perc_y": 63.82,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "pointerevents"
-		},
-		"blobbuilder": {
-			"title": "Blob constructing",
-			"description": "Construct Blobs (binary large objects) either using the BlobBuilder API (deprecated) or the Blob constructor.",
-			"spec": "http://www.w3.org/TR/file-writer-api/#the-blobbuilder-interface",
-			"status": "wd",
-			"links": [{
-				"url": "https://developer.mozilla.org/en/DOM/BlobBuilder",
-				"title": "MDN article on BlobBuilder"
-			}, {
-				"url": "https://developer.mozilla.org/en-US/docs/DOM/Blob",
-				"title": "MDN article on Blobs"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "a x",
-					"7": "a x",
-					"8": "a x",
-					"9": "a x",
-					"10": "a x",
-					"11": "a x",
-					"12": "a x",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "a x",
-					"9": "a x",
-					"10": "a x",
-					"11": "a x",
-					"12": "a x",
-					"13": "a x",
-					"14": "a x",
-					"15": "a x",
-					"16": "a x",
-					"17": "a x",
-					"18": "a x",
-					"19": "a x",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "a x",
-					"4": "a x",
-					"4.1": "a x",
-					"4.2-4.3": "a x",
-					"4.4": "a x"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "a x"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Partial support refers to only supporting the now deprecated BlobBuilder to create blobs.",
-			"usage_perc_y": 64.97,
-			"usage_perc_a": 6.3,
-			"ucprefix": true,
-			"parent": "fileapi",
-			"keywords": ""
-		},
-		"filereader": {
-			"title": "FileReader API",
-			"description": "Method of reading the contents of a File or Blob object into memory",
-			"spec": "http://www.w3.org/TR/FileAPI/#dfn-filereader",
-			"status": "wd",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/apis/file/FileReader",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "https://developer.mozilla.org/en/DOM/FileReader",
-				"title": "FileReader API"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 71.89,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "fileapi",
-			"keywords": ""
-		},
-		"filesystem": {
-			"title": "Filesystem & FileWriter API",
-			"description": "Method of reading and writing files to a sandboxed file system.\r\n",
-			"spec": "http://www.w3.org/TR/file-system-api/",
-			"status": "wd",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/apis/filesystem",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://www.html5rocks.com/en/tutorials/file/filesystem/",
-				"title": "HTML5 Rocks tutorial"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "a x",
-					"9": "a x",
-					"10": "a x",
-					"11": "a x",
-					"12": "a x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x",
-					"28": "y x",
-					"29": "y x",
-					"30": "y x",
-					"31": "y x",
-					"32": "y x"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "u",
-					"7": "u"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y x"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y x"
-				},
-				"and_chr": {
-					"0": "y x"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 34.87,
-			"usage_perc_a": 0.28,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "filewriter"
-		},
-		"bloburls": {
-			"title": "Blob URLs",
-			"description": "Method of creating URL handles to the specified File or Blob object.",
-			"spec": "http://www.w3.org/TR/FileAPI/#url",
-			"status": "wd",
-			"links": [{
-				"url": "https://developer.mozilla.org/en/DOM/window.URL.createObjectURL",
-				"title": "MDN article"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "y x",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "y x",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "y x",
-					"4.1": "y x",
-					"4.2-4.3": "y x",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y x"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 70.6,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "fileapi",
-			"keywords": "createobjecturl"
-		},
-		"typedarrays": {
-			"title": "Typed Arrays",
-			"description": "JavaScript typed arrays provide a mechanism for accessing raw binary data much more efficiently.\r\n",
-			"spec": "http://www.khronos.org/registry/typedarray/specs/latest/",
-			"status": "other",
-			"links": [{
-				"url": "https://developer.mozilla.org/en/javascript_typed_arrays",
-				"title": "MDN article"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 73.11,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "float64array,dataview,uint8array"
-		},
-		"deviceorientation": {
-			"title": "DeviceOrientation events",
-			"description": "API for detecting orientation and motion events from the device running the browser.",
-			"spec": "http://www.w3.org/TR/orientation-event/",
-			"status": "wd",
-			"links": [{
-				"url": "http://html5labs.interoperabilitybridges.com/prototypes/device-orientation-events/device-orientation-events/info",
-				"title": "DeviceOrientation implementation prototype for IE10"
-			}, {
-				"url": "http://www.html5rocks.com/en/tutorials/device/orientation/",
-				"title": "HTML5 Rocks tutorial"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/features.js#native-orientation",
-				"title": "has.js test"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "a"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "p",
-					"4": "p",
-					"5": "p",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "a",
-					"12": "a",
-					"13": "a",
-					"14": "a",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a",
-					"19": "a",
-					"20": "a",
-					"21": "a",
-					"22": "a",
-					"23": "a",
-					"24": "a",
-					"25": "a",
-					"26": "a",
-					"27": "a"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "a",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "a",
-					"12": "a",
-					"13": "a",
-					"14": "a",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a",
-					"19": "a",
-					"20": "a",
-					"21": "a",
-					"22": "a",
-					"23": "a",
-					"24": "a",
-					"25": "a",
-					"26": "a",
-					"27": "a",
-					"28": "a",
-					"29": "a",
-					"30": "a",
-					"31": "a",
-					"32": "a"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "u",
-					"7": "u"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "a",
-					"5.0-5.1": "a",
-					"6.0-6.1": "a",
-					"7.0": "a"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "a",
-					"4": "a",
-					"4.1": "a",
-					"4.2-4.3": "a",
-					"4.4": "a"
-				},
-				"bb": {
-					"7": "n",
-					"10": "a"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "y",
-					"12.1": "y",
-					"0": "a"
-				},
-				"and_chr": {
-					"0": "a"
-				},
-				"and_ff": {
-					"0": "a"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Partial support refers to the lack of compassneedscalibration event. Partial support also refers to the lack of devicemotion event support for Chrome 30- and Opera. Opera Mobile 14 lost the ondevicemotion event support. Firefox 3.6, 4 and 5 support the non-standard <a href=\"https://developer.mozilla.org/en/DOM/MozOrientation\">MozOrientation</a> event.",
-			"usage_perc_y": 0.14,
-			"usage_perc_a": 57.76,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"script-defer": {
-			"title": "defer attribute for external scripts",
-			"description": "The boolean defer attribute on script elements allows the external JavaScript file to run when the DOM is loaded, without delaying page load first.",
-			"spec": "http://www.w3.org/TR/html5/the-script-element.html#attr-script-defer",
-			"status": "cr",
-			"links": [{
-				"url": "https://developer.mozilla.org/en/HTML/Element/script#Attributes",
-				"title": "MDN article"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/html/attributes/defer",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/script.js#script-defer",
-				"title": "has.js test"
-			}],
-			"categories": ["DOM", "HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "a",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "a",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Partial support refers to a buggy implementation in IE<10",
-			"usage_perc_y": 73.17,
-			"usage_perc_a": 14.25,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"nav-timing": {
-			"title": "Navigation Timing API",
-			"description": "API for accessing timing information related to navigation and elements.",
-			"spec": "http://www.w3.org/TR/navigation-timing/",
-			"status": "cr",
-			"links": [{
-				"url": "https://developer.mozilla.org/en/API/navigationTiming",
-				"title": "MDN article"
-			}, {
-				"url": "http://www.html5rocks.com/en/tutorials/webperformance/basics/",
-				"title": "HTML5 Rocks tutorial"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/apis/navigation_timing",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["DOM", "JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "n",
-					"7": "n"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 69.95,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "performance,performance.timing"
-		},
-		"audio-api": {
-			"title": "Web Audio API",
-			"description": "High-level JavaScript API for processing and synthesizing audio",
-			"spec": "http://www.w3.org/TR/webaudio/",
-			"status": "wd",
-			"links": [{
-				"url": "http://www.doboism.com/projects/webaudio-compatibility/",
-				"title": "Additional browser compatibility tests for specific features"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/apis/webaudio",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "https://github.com/corbanbrook/audionode.js",
-				"title": "Polyfill to support Web Audio API in Firefox"
-			}, {
-				"url": "https://github.com/g200kg/WAAPISim",
-				"title": "Polyfill to enable Web Audio API through Firefox Audio Data api or flash"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x",
-					"28": "y x",
-					"29": "y x",
-					"30": "y x",
-					"31": "y x",
-					"32": "y x"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "y x",
-					"6.1": "y x",
-					"7": "y x"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "y x",
-					"7.0": "y x"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "n"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "n"
-				},
-				"and_chr": {
-					"0": "y x"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Firefox versions < 25 support an alternative, deprecated audio API.",
-			"usage_perc_y": 41.68,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "web-audio"
-		},
-		"css-regions": {
-			"title": "CSS Regions",
-			"description": "Method of flowing content into multiple elements.",
-			"spec": "http://www.w3.org/TR/css3-regions/",
-			"status": "wd",
-			"links": [{
-				"url": "http://msdn.microsoft.com/en-us/ie/hh272902#_CSSConnected",
-				"title": "IE10 developer guide info"
-			}, {
-				"url": "http://html.adobe.com/webstandards/cssregions/",
-				"title": "Adobe demos and samples"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/css/atrules/@region",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "a x",
-					"11": "a x"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "a x",
-					"16": "a x",
-					"17": "a x",
-					"18": "a x",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n",
-					"28": "n",
-					"29": "n",
-					"30": "n",
-					"31": "n",
-					"32": "n"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "y x",
-					"7": "y x"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "y x"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "n"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "n"
-				},
-				"and_chr": {
-					"0": "n"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "a x"
-				}
-			},
-			"notes": "Currently supported in WebKit Nightly using <code>-webkit-flow-into: flow_name;</code> and <code>-webkit-from-flow: flow_name;</code>. Support in Chrome 19+ is disabled by default and can be enabled using a runtime flag (see <code>about:flags</code>) or a command line flag (see  <a href=\"http://peter.sh/experiments/chromium-command-line-switches/#enable-css-regions\">this list</a>). For Chrome 19-22 the flag is named \"Enable CSS Regions\" / <code>--enable-css-regions</code>, while for Chrome 23+ the flag is named \"Enable experimental WebKit features\" / <code>--enable-experimental-webkit-features</code>. Support in IE10 is limited to using an iframe as a content source with the <code>-ms-flow-into: flow_name;</code> and <code>-ms-flow-from: flow_name;</code> syntax. Support for Safari 6.1&7 is <a href=\"http://www.broken-links.com/2013/07/10/web-platform-technologies-in-safari-6-1-and-7/\">likely</a> but not official.",
-			"usage_perc_y": 2.75,
-			"usage_perc_a": 11.35,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"fullscreen": {
-			"title": "Full Screen API",
-			"description": "API for allowing content (like a video or canvas element) to take up the entire screen.",
-			"spec": "http://www.w3.org/TR/fullscreen/",
-			"status": "wd",
-			"links": [{
-				"url": "https://developer.mozilla.org/en/DOM/Using_full-screen_mode",
-				"title": "MDN article"
-			}, {
-				"url": "http://jlongster.com/2011/11/21/canvas.html",
-				"title": "Blog post"
-			}, {
-				"url": "http://hacks.mozilla.org/2012/01/using-the-fullscreen-api-in-web-browsers/",
-				"title": "Mozilla hacks article"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/dom/methods/requestFullscreen",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "y x"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "a x",
-					"11": "a x",
-					"12": "a x",
-					"13": "a x",
-					"14": "a x",
-					"15": "a x",
-					"16": "a x",
-					"17": "a x",
-					"18": "a x",
-					"19": "a x",
-					"20": "a x",
-					"21": "a x",
-					"22": "a x",
-					"23": "a x",
-					"24": "a x",
-					"25": "a x",
-					"26": "a x",
-					"27": "a x"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "a x",
-					"16": "a x",
-					"17": "a x",
-					"18": "a x",
-					"19": "a x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x",
-					"28": "y x",
-					"29": "y x",
-					"30": "y x",
-					"31": "y x",
-					"32": "y x"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "a x",
-					"6": "y x",
-					"6.1": "y x",
-					"7": "y x"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "y",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "n"
-				},
-				"bb": {
-					"7": "n",
-					"10": "a"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y x"
-				},
-				"and_chr": {
-					"0": "y x"
-				},
-				"and_ff": {
-					"0": "a x"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Partial support refers to supporting an earlier draft of the spec.",
-			"usage_perc_y": 37.35,
-			"usage_perc_a": 16.21,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "full-screen"
-		},
-		"requestanimationframe": {
-			"title": "requestAnimationFrame",
-			"description": "API allowing a more efficient way of running script-based animation, compared to traditional methods using timeouts.",
-			"spec": "http://www.w3.org/TR/animation-timing/#requestAnimationFrame",
-			"status": "wd",
-			"links": [{
-				"url": "http://hacks.mozilla.org/2011/08/animating-with-javascript-from-setinterval-to-requestanimationframe/",
-				"title": "Mozilla Hacks article"
-			}, {
-				"url": "http://paulirish.com/2011/requestanimationframe-for-smart-animating/",
-				"title": "Blog post"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/apis/timing/methods/requestAnimationFrame",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "y x",
-					"5": "y x",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "y x",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "y x",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y x"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 67.13,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"input-range": {
-			"title": "Range input type",
-			"description": "Form field type that allows the user to select a value using a slider widget.",
-			"spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#range-state-(type=range)",
-			"status": "wd",
-			"links": [{
-				"url": "https://github.com/fryn/html5slider",
-				"title": "Polyfill for Firefox"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/html/elements/input/type/range",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://tutorialzine.com/2011/12/what-you-need-to-know-html5-range-input/",
-				"title": "Tutorial"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/form.js#input-type-range",
-				"title": "has.js test"
-			}, {
-				"url": "https://github.com/freqdec/fd-slider",
-				"title": "Cross-browser polyfill"
-			}],
-			"categories": ["HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "u",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "a",
-					"2.2": "a",
-					"2.3": "a",
-					"3": "a",
-					"4": "a",
-					"4.1": "a",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Currently all Android browsers with partial support hide the slider input field by default. However, the element <a href=\"http://tiffanybbrown.com/2012/02/07/input-typerange-and-androids-stock-browser/\">can be styled</a> to be made visible and usable.",
-			"usage_perc_y": 68.52,
-			"usage_perc_a": 4.31,
-			"ucprefix": false,
-			"parent": "forms",
-			"keywords": ""
-		},
-		"matchmedia": {
-			"title": "matchMedia",
-			"description": "API for finding out whether or not a media query applies to the document.",
-			"spec": "http://www.w3.org/TR/cssom-view/#dom-window-matchmedia",
-			"status": "wd",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/css/media_queries/apis/matchMedia",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "https://github.com/paulirish/matchMedia.js/",
-				"title": "matchMedia.js polyfill"
-			}, {
-				"url": "https://developer.mozilla.org/en/DOM/window.matchMedia",
-				"title": "MDN article"
-			}, {
-				"url": "https://developer.mozilla.org/en/CSS/Using_media_queries_from_code",
-				"title": "MDN tutorial"
-			}],
-			"categories": ["JS API", "DOM"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 72.81,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "mediaquerylist"
-		},
-		"input-datetime": {
-			"title": "Date/time input types",
-			"description": "Form field widget to easily allow users to enter dates and/or times, generally by using a calendar widget.",
-			"spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#date-state-(type=date)",
-			"status": "wd",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/html/elements/input/type/date",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://net.tutsplus.com/tutorials/javascript-ajax/quick-tip-cross-browser-datepickers-within-minutes/",
-				"title": "Datepicker tutorial w/polyfill"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/form.js#input-type-datetime;input-type-datetime-local",
-				"title": "has.js test"
-			}, {
-				"url": "https://github.com/zoltan-dulac/html5Forms.js",
-				"title": "Polyfill for HTML5 forms"
-			}],
-			"categories": ["HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "a",
-					"21": "a",
-					"22": "a",
-					"23": "a",
-					"24": "a",
-					"25": "a",
-					"26": "a",
-					"27": "a",
-					"28": "a",
-					"29": "a",
-					"30": "a",
-					"31": "a",
-					"32": "a"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "u",
-					"7": "u"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "a"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Safari provides date-formatted text fields, but no real calendar widget. Partial support in Chrome refers to a missing calendar widget for the \"datetime\" type (and other types in older versions). Some modified versions of the Android 4.x browser do have support for date/time fields. ",
-			"usage_perc_y": 6.13,
-			"usage_perc_a": 33.1,
-			"ucprefix": false,
-			"parent": "forms",
-			"keywords": "datepicker,timepicker"
-		},
-		"input-color": {
-			"title": "Color input type",
-			"description": "Form field allowing the user to select a color.",
-			"spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#color-state-(type=color)",
-			"status": "wd",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/html/elements/input/type/color",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://www.html5tutorial.info/html5-color.php",
-				"title": "Tutorial"
-			}, {
-				"url": "https://github.com/jonstipe/color-polyfill",
-				"title": "Polyfill"
-			}],
-			"categories": ["HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "n",
-					"7": "n"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "n",
-					"16": "n",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 35.22,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "forms",
-			"keywords": "colour"
-		},
-		"input-number": {
-			"title": "Number input type",
-			"description": "Form field type for numbers.",
-			"spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#number-state-(type=number)",
-			"status": "wd",
-			"links": [{
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/form.js#input-type-number",
-				"title": "has.js test"
-			}, {
-				"url": "http://www.html5tutorial.info/html5-number.php",
-				"title": "Tutorial"
-			}, {
-				"url": "https://github.com/jonstipe/number-polyfill",
-				"title": "Polyfill"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/html/elements/input/type/number",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "a",
-					"11": "a"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "u",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "a",
-					"4.0-4.1": "a",
-					"4.2-4.3": "a",
-					"5.0-5.1": "a",
-					"6.0-6.1": "a",
-					"7.0": "a"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "a",
-					"4.1": "a",
-					"4.2-4.3": "a",
-					"4.4": "a"
-				},
-				"bb": {
-					"7": "n",
-					"10": "a"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "a"
-				},
-				"and_chr": {
-					"0": "a"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "a"
-				}
-			},
-			"notes": "iOS Safari, Android 4 and Chrome for Android show number input, but do not use \"step\", \"min\" or \"max\" attributes or show increment/decrement buttons. Internet Explorer 10 does not show increment/decrement buttons.",
-			"usage_perc_y": 38.44,
-			"usage_perc_a": 20.1,
-			"ucprefix": false,
-			"parent": "forms",
-			"keywords": "spinner"
-		},
-		"iframe-sandbox": {
-			"title": "sandbox attribute for iframes",
-			"description": "Method of running external site pages with reduced privileges (e.g. no JavaScript) in iframes",
-			"spec": "http://www.w3.org/TR/html5/the-iframe-element.html#attr-iframe-sandbox",
-			"status": "cr",
-			"links": [{
-				"url": "http://msdn.microsoft.com/en-us/hh563496",
-				"title": "MSDN article"
-			}, {
-				"url": "http://blog.chromium.org/2010/05/security-in-depth-html5s-sandbox.html",
-				"title": "Chromium blog article"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/html/attributes/sandbox",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "a",
-					"18": "a",
-					"19": "a",
-					"20": "a",
-					"21": "a",
-					"22": "a",
-					"23": "a",
-					"24": "a",
-					"25": "a",
-					"26": "a",
-					"27": "a"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 59.45,
-			"usage_perc_a": 13.57,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"css-counters": {
-			"title": "CSS Counters",
-			"description": "Method of controlling number values in generated content, using the counter-reset and counter-increment properties.",
-			"spec": "http://www.w3.org/TR/CSS21/generate.html#counters",
-			"status": "wd",
-			"links": [{
-				"url": "http://onwebdev.blogspot.com/2012/02/css-counters-tutorial.html",
-				"title": "Tutorial and information"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/css/properties/counter-reset",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "https://developer.mozilla.org/en/CSS_Counters",
-				"title": "MDN article"
-			}],
-			"categories": ["CSS2"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "y",
-					"3": "y",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "y"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 93.86,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"css-resize": {
-			"title": "CSS resize property",
-			"description": "Method of allowing an element to be resized by the user, with options to limit to a given direction. ",
-			"spec": "http://www.w3.org/TR/css3-ui/#resize",
-			"status": "wd",
-			"links": [{
-				"url": "http://css-tricks.com/almanac/properties/r/resize/",
-				"title": "CSS Tricks info"
-			}, {
-				"url": "http://davidwalsh.name/textarea-resize",
-				"title": "On textarea resizing"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "y x",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "a",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "n"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "n"
-				},
-				"and_chr": {
-					"0": "n"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Opera 12.10+ currently only supports the resize property for textarea elements.",
-			"usage_perc_y": 52.82,
-			"usage_perc_a": 0.48,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "horizontal,vertical"
-		},
-		"input-placeholder": {
-			"title": "input placeholder attribute",
-			"description": "Method of setting placeholder text for text-like input fields, to suggest the expected inserted information.",
-			"spec": "http://dev.w3.org/html5/spec/Overview.html#attr-input-placeholder",
-			"status": "cr",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/html/attributes/placeholder",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "https://raw.github.com/phiggins42/has.js/master/detect/form.js#input-attr-placeholder",
-				"title": "has.js test"
-			}, {
-				"url": "http://www.zachleat.com/web/placeholder/",
-				"title": "Article on usage"
-			}, {
-				"url": "https://github.com/mathiasbynens/jquery-placeholder",
-				"title": "Polyfill"
-			}],
-			"categories": ["HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "a",
-					"3.2": "a",
-					"4": "a",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "a",
-					"11.1": "a",
-					"11.5": "a",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Partial support in older Safari and Opera versions refers to lacking placeholder support on textarea elements. ",
-			"usage_perc_y": 75.1,
-			"usage_perc_a": 0.15,
-			"ucprefix": false,
-			"parent": "forms",
-			"keywords": ""
-		},
-		"spdy": {
-			"title": "SPDY networking protocol",
-			"description": "Networking protocol for low-latency transport of content over the web.",
-			"spec": "http://tools.ietf.org/html/draft-mbelshe-httpbis-spdy-00",
-			"status": "unoff",
-			"links": [{
-				"url": "http://en.wikipedia.org/wiki/SPDY",
-				"title": "Wikipedia"
-			}, {
-				"url": "http://dev.chromium.org/spdy/spdy-whitepaper",
-				"title": "SPDY whitepaper"
-			}],
-			"categories": ["Other"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "a"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "u",
-					"7": "u"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "u"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 53.69,
-			"usage_perc_a": 0.11,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"css-repeating-gradients": {
-			"title": "CSS Repeating Gradients",
-			"description": "Method of defining a repeating linear or radial color gradient as a CSS image.",
-			"spec": "http://www.w3.org/TR/css3-images/#repeating-gradients",
-			"status": "cr",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/css/repeating-linear-gradient",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "https://developer.mozilla.org/en/CSS/repeating-linear-gradient",
-				"title": "MDN article"
-			}, {
-				"url": "http://www.css3files.com/gradient/#repeatinglineargradient",
-				"title": "Information page"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "y x",
-					"4": "y x",
-					"5": "y x",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "y x",
-					"6": "y x",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "a x",
-					"11.5": "a x",
-					"11.6": "y x",
-					"12": "y x",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "y x",
-					"6.0-6.1": "y x",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "y x",
-					"4.1": "y x",
-					"4.2-4.3": "y x",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "a x",
-					"11.5": "a x",
-					"12": "y x",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y x"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Firefox 10+, Chrome 26+ and Opera 11.6+ also support the new \"to (side)\" syntax.",
-			"usage_perc_y": 73.31,
-			"usage_perc_a": 0.03,
-			"ucprefix": false,
-			"parent": "css-gradients",
-			"keywords": ""
-		},
-		"css-filters": {
-			"title": "CSS Filter Effects",
-			"description": "Method of applying filter effects (like blur, grayscale, brightness, contrast and hue) to elements, previously only possible by using SVG.",
-			"spec": "http://www.w3.org/TR/filter-effects/",
-			"status": "wd",
-			"links": [{
-				"url": "http://dl.dropbox.com/u/3260327/angular/CSS3ImageManipulation.html",
-				"title": "Filter editor"
-			}, {
-				"url": "http://bennettfeely.com/filters/",
-				"title": "Filter Playground"
-			}, {
-				"url": "http://html5-demos.appspot.com/static/css/filters/index.html",
-				"title": "Demo file for WebKit browsers"
-			}, {
-				"url": "http://www.html5rocks.com/en/tutorials/filters/understanding-css/",
-				"title": "Mozilla hacks article"
-			}],
-			"categories": ["CSS3", "CSS"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "u",
-					"27": "u"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x",
-					"28": "y x",
-					"29": "y x",
-					"30": "y x",
-					"31": "y x",
-					"32": "y x"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "y x",
-					"6.1": "y x",
-					"7": "y x"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "y x",
-					"7.0": "y x"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y x"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y x"
-				},
-				"and_chr": {
-					"0": "y x"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Note that this property is significantly different from and incompatible with Microsoft's <a href=\"http://msdn.microsoft.com/en-us/library/ie/ms530752%28v=vs.85%29.aspx\">older \"filter\" property</a>.",
-			"usage_perc_y": 40.55,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "sepia,hue-rotate,invert,saturate"
-		},
-		"getcomputedstyle": {
-			"title": "getComputedStyle",
-			"description": "API to get the current computed CSS styles applied to an element. This may be the current value applied by an animation or as set by a stylesheet.",
-			"spec": "http://www.w3.org/TR/cssom/#dom-window-getcomputedstyle",
-			"status": "rec",
-			"links": [{
-				"url": "http://ie.microsoft.com/testdrive/HTML5/getComputedStyle/",
-				"title": "Demo"
-			}, {
-				"url": "http://snipplr.com/view/13523/",
-				"title": "Polyfill for IE"
-			}, {
-				"url": "https://developer.mozilla.org/en/DOM/window.getComputedStyle",
-				"title": "MDN article"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/css/cssom/methods/getComputedStyle",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["JS API", "CSS3", "DOM"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "a",
-					"3.5": "a",
-					"3.6": "a",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "a",
-					"5": "a",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "a",
-					"3.2": "a",
-					"4": "a",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "a",
-					"9.5-9.6": "a",
-					"10.0-10.1": "a",
-					"10.5": "a",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "a",
-					"4.0-4.1": "a",
-					"4.2-4.3": "a",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "a"
-				},
-				"android": {
-					"2.1": "a",
-					"2.2": "a",
-					"2.3": "a",
-					"3": "a",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "a",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "a",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Partial support in older Firefox versions refers to requiring the second parameter to be included. Partial support in all other browsers refers to not supporting getComputedStyle on pseudo-elements.",
-			"usage_perc_y": 78.53,
-			"usage_perc_a": 7,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"word-break": {
-			"title": "CSS3 word-break",
-			"description": "Property to prevent or allow words to be broken over multiple lines between letters.",
-			"spec": "http://www.w3.org/TR/css3-text/#word-break",
-			"status": "wd",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/css/properties/word-break",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "https://developer.mozilla.org/en/CSS/word-break",
-				"title": "MDN article"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "a",
-					"5": "a",
-					"6": "a",
-					"7": "a",
-					"8": "a",
-					"9": "a",
-					"10": "a",
-					"11": "a",
-					"12": "a",
-					"13": "a",
-					"14": "a",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a",
-					"19": "a",
-					"20": "a",
-					"21": "a",
-					"22": "a",
-					"23": "a",
-					"24": "a",
-					"25": "a",
-					"26": "a",
-					"27": "a",
-					"28": "a",
-					"29": "a",
-					"30": "a",
-					"31": "a",
-					"32": "a"
-				},
-				"safari": {
-					"3.1": "a",
-					"3.2": "a",
-					"4": "a",
-					"5": "a",
-					"5.1": "a",
-					"6": "a",
-					"6.1": "a",
-					"7": "a"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a"
-				},
-				"ios_saf": {
-					"3.2": "a",
-					"4.0-4.1": "a",
-					"4.2-4.3": "a",
-					"5.0-5.1": "a",
-					"6.0-6.1": "a",
-					"7.0": "a"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "a",
-					"2.2": "a",
-					"2.3": "a",
-					"3": "a",
-					"4": "a",
-					"4.1": "a",
-					"4.2-4.3": "a",
-					"4.4": "a"
-				},
-				"bb": {
-					"7": "a",
-					"10": "a"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "a"
-				},
-				"and_chr": {
-					"0": "a"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "Partial support refers to supporting the \"break-all\" value, but not the \"keep-all\" value.",
-			"usage_perc_y": 39.39,
-			"usage_perc_a": 48.42,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "break-all,keep-all"
-		},
-		"viewport-units": {
-			"title": "Viewport units: vw, vh, vmin, vmax",
-			"description": "Length units representing 1% of the viewport size for viewport width (vw), height (vh), the smaller of the two (vmin), or the larger of the two (vmax).",
-			"spec": "http://www.w3.org/TR/css3-values/#viewport-relative-lengths",
-			"status": "cr",
-			"links": [{
-				"url": "http://css-tricks.com/viewport-sized-typography/",
-				"title": "Blog post"
-			}, {
-				"url": "https://github.com/saabi/vminpoly",
-				"title": "Polyfill"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "a",
-					"10": "a",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "a",
-					"21": "a",
-					"22": "a",
-					"23": "a",
-					"24": "a",
-					"25": "a",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "a",
-					"6.1": "a",
-					"7": "a"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "a",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "a"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "a"
-				}
-			},
-			"notes": "Partial support in IE9 refers to supporting \"vm\" instead of \"vmin\". All other partial support refers to not supporting the \"vmax\" unit.",
-			"usage_perc_y": 48.9,
-			"usage_perc_a": 21.18,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "vm,viewport-percentage"
-		},
-		"contentsecuritypolicy": {
-			"title": "Content Security Policy",
-			"description": "Mitigate cross-site scripting attacks by whitelisting allowed sources of script, style, and other resources.",
-			"spec": "http://www.w3.org/TR/CSP/",
-			"status": "cr",
-			"links": [{
-				"url": "http://content-security-policy.com/",
-				"title": "CSP Examples & Quick Reference"
-			}, {
-				"url": "http://html5rocks.com/en/tutorials/security/content-security-policy/",
-				"title": "HTML5Rocks article"
-			}],
-			"categories": ["Other"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "a x",
-					"11": "a x"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "y x",
-					"5": "y x",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "a x",
-					"6": "y x",
-					"6.1": "y x",
-					"7": "y x"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "a x",
-					"6.0-6.1": "y x",
-					"7.0": "y x"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y x"
-				},
-				"ie_mob": {
-					"10": "a x"
-				}
-			},
-			"notes": "The HTTP header is 'X-Content-Security-Policy' for Firefox and IE 10&11, and 'X-WebKit-CSP' for Safari and Chrome. IE 10&11's support is limited to the 'sandbox' directive.",
-			"usage_perc_y": 55.74,
-			"usage_perc_a": 12.68,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "csp,security,header"
-		},
-		"pagevisibility": {
-			"title": "PageVisibility",
-			"description": "JavaScript API for determining whether a document is visible on the display",
-			"spec": "http://www.w3.org/TR/page-visibility/",
-			"status": "cr",
-			"links": [{
-				"url": "https://developer.mozilla.org/en-US/docs/DOM/Using_the_Page_Visibility_API",
-				"title": "MDN article"
-			}, {
-				"url": "http://docs.webplatform.org/wiki/apis/timing/properties/visibilityState",
-				"title": "WebPlatform Docs"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x",
-					"28": "y x",
-					"29": "y x",
-					"30": "y x",
-					"31": "y x",
-					"32": "y x"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "y",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y x"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "y",
-					"0": "y x"
-				},
-				"and_chr": {
-					"0": "y x"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 63.89,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "visibilitystate"
-		},
-		"stricttransportsecurity": {
-			"title": "Strict Transport Security",
-			"description": "Declare that a website is only accessible over a secure connection (HTTPS).",
-			"spec": "http://tools.ietf.org/html/rfc6797",
-			"status": "other",
-			"links": [{
-				"url": "http://dev.chromium.org/sts",
-				"title": "Strict Transport Security @ Chromium"
-			}, {
-				"url": "https://developer.mozilla.org/en-US/docs/Security/HTTP_Strict_Transport_Security",
-				"title": "Strict Transport Security @ Mozilla Developer Network"
-			}],
-			"categories": ["Other"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "u",
-					"7": "u"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "u"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "The HTTP header is 'Strict-Transport-Security'.",
-			"usage_perc_y": 50.76,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "sts,hsts,security,header"
-		},
-		"style-scoped": {
-			"title": "Scoped CSS",
-			"description": "Allows CSS rules to be scoped to part of the document, based on the position of the style element.",
-			"spec": "http://www.w3.org/TR/html5/document-metadata.html#attr-style-scoped",
-			"status": "cr",
-			"links": [{
-				"url": "https://github.com/PM5544/scoped-polyfill",
-				"title": "Polyfill"
-			}, {
-				"url": "http://html5doctor.com/the-scoped-attribute/",
-				"title": "HTML5 Doctor article"
-			}, {
-				"url": "http://updates.html5rocks.com/2012/03/A-New-Experimental-Feature-style-scoped",
-				"title": "HTML5Rocks article"
-			}],
-			"categories": ["CSS", "HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n",
-					"28": "n",
-					"29": "n",
-					"30": "n",
-					"31": "u",
-					"32": "u"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "u",
-					"7": "u"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "n"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "u",
-					"0": "n"
-				},
-				"and_chr": {
-					"0": "n"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Supported in Chrome 20+ by enabling the \"experimental WebKit features\" flag in chrome://flags.",
-			"usage_perc_y": 13.05,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "scope"
-		},
-		"svg-fragment": {
-			"title": "SVG fragment identifiers",
-			"description": "Method of displaying only a part of an SVG image by defining a view ID or view box dimensions as the file's fragment identifier.",
-			"spec": "http://www.w3.org/TR/SVG/linking.html#SVGFragmentIdentifiers",
-			"status": "rec",
-			"links": [{
-				"url": "http://www.broken-links.com/2012/08/14/better-svg-sprites-with-fragment-identifiers/",
-				"title": "Blog post"
-			}],
-			"categories": ["SVG"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n",
-					"28": "n",
-					"29": "n",
-					"30": "n",
-					"31": "u",
-					"32": "u"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "n",
-					"7": "n"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "n"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "u",
-					"0": "n"
-				},
-				"and_chr": {
-					"0": "n"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 25.15,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "fragments,sprite"
-		},
-		"outline": {
-			"title": "CSS outline",
-			"description": "The CSS outline property is a shorthand property for setting one or more of the individual outline properties outline-style, outline-width and outline-color in a single rule. In most cases the use of this shortcut is preferable and more convenient.",
-			"spec": "http://www.w3.org/TR/CSS2/ui.html#propdef-outline",
-			"status": "rec",
-			"links": [{
-				"url": "https://developer.mozilla.org/en-US/docs/CSS/outline",
-				"title": "Mozilla Developer Network: outline"
-			}, {
-				"url": "http://dev.w3.org/csswg/css3-ui/#outline",
-				"title": "CSS Basic User Interface Module Level 3"
-			}],
-			"categories": ["CSS2"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "y",
-					"3": "y",
-					"3.5": "y",
-					"3.6": "y",
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "y",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "y",
-					"4.0-4.1": "y",
-					"4.2-4.3": "y",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "y",
-					"2.2": "y",
-					"2.3": "y",
-					"3": "y",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 89.27,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "-moz-outline,outline-width,outline-style,outline-color"
-		},
-		"download": {
-			"title": "Download attribute",
-			"description": "When used on an anchor, this attribute signifies that the resource it points to should be downloaded by the browser rather than navigate to it.",
-			"spec": "http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#downloading-resources",
-			"status": "wd",
-			"links": [{
-				"url": "http://html5-demos.appspot.com/static/a.download.html",
-				"title": "Demo: creating a text file and downloading it."
-			}, {
-				"url": "http://updates.html5rocks.com/2011/08/Downloading-resources-in-HTML5-a-download",
-				"title": "HTML5Rocks post"
-			}],
-			"categories": ["HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "n",
-					"7": "n"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 48.02,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "download,a.download,a[download],download attribute"
-		},
-		"pointer": {
-			"title": "Pointer events",
-			"description": "This specification integrates various inputs from mice, touchscreens, and pens, making separate implementations no longer necessary and authoring for cross-device pointers easier. Not to be mistaken with the unrelated \"pointer-events\" CSS property.",
-			"spec": "http://www.w3.org/TR/pointerevents/",
-			"status": "cr",
-			"links": [{
-				"url": "http://blogs.msdn.com/b/eternalcoding/archive/2013/01/16/hand-js-a-polyfill-for-supporting-pointer-events-on-every-browser.aspx",
-				"title": "Hand.js, the polyfill for browsers only supporting Touch Events"
-			}, {
-				"url": "http://blogs.msdn.com/b/ie/archive/2011/09/20/touch-input-for-ie10-and-metro-style-apps.aspx",
-				"title": "Implementation of Pointer Events in IE10"
-			}, {
-				"url": "http://blogs.msdn.com/b/davrous/archive/2013/02/20/handling-touch-in-your-html5-apps-thanks-to-the-pointer-events-of-ie10-and-windows-8.aspx",
-				"title": "Article & tutorial"
-			}],
-			"categories": ["DOM", "JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "a x",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "p",
-					"10": "p",
-					"11": "p",
-					"12": "p",
-					"13": "p",
-					"14": "p",
-					"15": "p",
-					"16": "p",
-					"17": "p",
-					"18": "p",
-					"19": "p",
-					"20": "p",
-					"21": "p",
-					"22": "p",
-					"23": "p",
-					"24": "p",
-					"25": "p",
-					"26": "p",
-					"27": "p"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "p",
-					"23": "p",
-					"24": "p",
-					"25": "p",
-					"26": "p",
-					"27": "p",
-					"28": "p",
-					"29": "p",
-					"30": "p",
-					"31": "p",
-					"32": "p"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "u",
-					"7": "u"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "p",
-					"16": "p",
-					"17": "p",
-					"18": "p"
-				},
-				"ios_saf": {
-					"3.2": "p",
-					"4.0-4.1": "p",
-					"4.2-4.3": "p",
-					"5.0-5.1": "p",
-					"6.0-6.1": "p",
-					"7.0": "p"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "p",
-					"2.2": "p",
-					"2.3": "p",
-					"3": "p",
-					"4": "p",
-					"4.1": "p",
-					"4.2-4.3": "p",
-					"4.4": "p"
-				},
-				"bb": {
-					"7": "p",
-					"10": "p"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "p",
-					"11.1": "p",
-					"11.5": "p",
-					"12": "p",
-					"12.1": "p",
-					"0": "p"
-				},
-				"and_chr": {
-					"0": "p"
-				},
-				"and_ff": {
-					"0": "p"
-				},
-				"ie_mob": {
-					"10": "a x"
-				}
-			},
-			"notes": "Partial support in IE10 refers the lack of pointerenter and pointerleave events.",
-			"usage_perc_y": 0.11,
-			"usage_perc_a": 10.99,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "pointerdown,pointermove,pointerup,pointercancel,pointerover,pointerout,pointerenter,pointerleave"
-		},
-		"user-select-none": {
-			"title": "CSS user-select: none",
-			"description": "Method of preventing text/element selection using CSS. ",
-			"spec": "https://developer.mozilla.org/en-US/docs/CSS/user-select",
-			"status": "unoff",
-			"links": [{
-				"url": "http://msdn.microsoft.com/en-us/library/ie/hh781492(v=vs.85).aspx",
-				"title": "MSDN Documentation"
-			}, {
-				"url": "https://developer.mozilla.org/en-US/docs/CSS/user-select",
-				"title": "MDN article"
-			}, {
-				"url": "http://css-tricks.com/almanac/properties/u/user-select/",
-				"title": "CSS Tricks article"
-			}],
-			"categories": ["CSS"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y x",
-					"11": "y x"
-				},
-				"firefox": {
-					"2": "y x",
-					"3": "y x",
-					"3.5": "y x",
-					"3.6": "y x",
-					"4": "y x",
-					"5": "y x",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x"
-				},
-				"chrome": {
-					"4": "u",
-					"5": "u",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x",
-					"28": "y x",
-					"29": "y x",
-					"30": "y x",
-					"31": "y x",
-					"32": "y x"
-				},
-				"safari": {
-					"3.1": "y x",
-					"3.2": "y x",
-					"4": "y x",
-					"5": "y x",
-					"5.1": "y x",
-					"6": "y x",
-					"6.1": "y x",
-					"7": "y x"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x"
-				},
-				"ios_saf": {
-					"3.2": "y x",
-					"4.0-4.1": "y x",
-					"4.2-4.3": "y x",
-					"5.0-5.1": "y x",
-					"6.0-6.1": "y x",
-					"7.0": "y x"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "y x",
-					"2.2": "y x",
-					"2.3": "y x",
-					"3": "y x",
-					"4": "y x",
-					"4.1": "y x",
-					"4.2-4.3": "y x",
-					"4.4": "y x"
-				},
-				"bb": {
-					"7": "y x",
-					"10": "y x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y x"
-				},
-				"and_chr": {
-					"0": "y x"
-				},
-				"and_ff": {
-					"0": "y x"
-				},
-				"ie_mob": {
-					"10": "y x"
-				}
-			},
-			"notes": "Currently the user-select property does not appear in any W3C specification. Support information here is only for \"none\" value, not others.",
-			"usage_perc_y": 74.91,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"webp": {
-			"title": "WebP image format",
-			"description": "Image format that supports lossy and lossless compression, as well as animation and alpha transparency.",
-			"spec": "https://developers.google.com/speed/webp/",
-			"status": "other",
-			"links": [{
-				"url": "http://libwebpjs.appspot.com/",
-				"title": "Decoder in JS"
-			}, {
-				"url": "https://developers.google.com/speed/webp/",
-				"title": "Official website"
-			}, {
-				"url": "http://antimatter15.github.io/weppy/demo.html",
-				"title": "Polyfill for browsers with WebM support"
-			}, {
-				"url": "http://webpjs.appspot.com/",
-				"title": "Polyfill for browsers with or without WebM support (i.e. IE6-IE9, Safari/iOS version 6.1 and below; Firefox versions 24 and bel"
-			}],
-			"categories": ["Other"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "p",
-					"5": "p",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "p",
-					"10": "p",
-					"11": "p",
-					"12": "p",
-					"13": "p",
-					"14": "p",
-					"15": "p",
-					"16": "p",
-					"17": "p",
-					"18": "p",
-					"19": "p",
-					"20": "p",
-					"21": "p",
-					"22": "p",
-					"23": "p",
-					"24": "p",
-					"25": "p",
-					"26": "p",
-					"27": "p"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "p",
-					"7": "p",
-					"8": "p",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "n",
-					"7": "n"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "p",
-					"11": "p",
-					"11.1": "p",
-					"11.5": "p",
-					"11.6": "p",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "y",
-					"4.1": "y",
-					"4.2-4.3": "y",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "a",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Animated webp images are supported in Chrome 32+ and Opera 19+.",
-			"usage_perc_y": 39.4,
-			"usage_perc_a": 0.01,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"intrinsic-width": {
-			"title": "Intrinsic & Extrinsic Sizing",
-			"description": "Allows for the heights and widths to be specified in intrinsic values using the fill-available, max-content, min-content, and fit-content properties.",
-			"spec": "http://www.w3.org/TR/css3-sizing/",
-			"status": "wd",
-			"links": [{
-				"url": "http://demosthenes.info/blog/662/Design-From-the-Inside-Out-With-CSS-MinContent",
-				"title": "Min-Content tutorial"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "y x",
-					"5": "y x",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x",
-					"28": "y x",
-					"29": "y x",
-					"30": "y x",
-					"31": "y x",
-					"32": "y x"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "y x",
-					"7": "y x"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "y x"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y x"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y x"
-				},
-				"and_chr": {
-					"0": "y x"
-				},
-				"and_ff": {
-					"0": "y x"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Prefixes are on the values, not the property names (e.g. -webkit-min-content) Firefox currently supports the \"-moz-available\" property rather than \"-moz-fill-available\".",
-			"usage_perc_y": 51.68,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "fill-available,max-content,min-content,fit-content,contain-floats"
-		},
-		"template": {
-			"title": "HTML templates",
-			"description": "Method of declaring a portion of reusable markup that is parsed but not rendered until cloned.",
-			"spec": "http://www.w3.org/TR/html-templates/",
-			"status": "wd",
-			"links": [{
-				"url": "http://www.html5rocks.com/en/tutorials/webcomponents/template/",
-				"title": "HTML5Rocks - HTML's New template Tag"
-			}, {
-				"url": "http://polymer-project.org",
-				"title": "Polymer project (polyfill & web compontents framework)"
-			}],
-			"categories": ["DOM", "HTML5"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "n",
-					"7": "n"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 45.76,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "web components, template"
-		},
-		"opus": {
-			"title": "Opus",
-			"description": "Royalty-free open audio codec by IETF, which incorporated SILK from Skype and CELT from Xiph.org, to serve higher sound quality and lower latency at the same bitrate.",
-			"spec": "http://tools.ietf.org/html/rfc6716",
-			"status": "other",
-			"links": [{
-				"url": "https://hacks.mozilla.org/2012/07/firefox-beta-15-supports-the-new-opus-audio-format/",
-				"title": "Introduction of Opus by Mozilla"
-			}, {
-				"url": "http://www.ietf.org/mail-archive/web/rtcweb/current/msg04953.html",
-				"title": "Google's statement about the use of VP8 and Opus codec for WebRTC standard"
-			}],
-			"categories": ["Other"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n",
-					"28": "n",
-					"29": "n",
-					"30": "n",
-					"31": "n",
-					"32": "n"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "u",
-					"7": "u"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "u"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "n"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "n"
-				},
-				"and_chr": {
-					"0": "n"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Chrome does not support Opus by default but users can enable it via the 'enable-opus-playback' flag. When it comes to Opera, it is said that the Linux version may be able to play it when the GStreamer module is up to date and the served mime-type is 'audio/ogg'.",
-			"usage_perc_y": 14.04,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "audio",
-			"keywords": ""
-		},
-		"jpegxr": {
-			"title": "JPEG XR image format",
-			"description": "The latest JPEG image format of Joint Photographic Experts Group which boasts better compression and supports lossless compression, alpha channel, and 48-bit deep color over normal jpg format.",
-			"spec": "http://www.itu.int/rec/T-REC-T.832",
-			"status": "other",
-			"links": [{
-				"url": "http://msdn.microsoft.com/en-us/library/windows/desktop/hh707223(v=vs.85).aspx",
-				"title": "Microsoft JPEG XR Codec Overview"
-			}],
-			"categories": ["Other"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n",
-					"28": "n",
-					"29": "n",
-					"30": "n",
-					"31": "n",
-					"32": "n"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "n",
-					"7": "n"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "n"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "n"
-				},
-				"and_chr": {
-					"0": "n"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 16.32,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		},
-		"channel-messaging": {
-			"title": "Channel messaging",
-			"description": "Method for having two-way communication between browsing contexts (using MessageChannel)",
-			"spec": "http://www.w3.org/TR/webmessaging/#channel-messaging",
-			"status": "cr",
-			"links": [{
-				"url": "http://dev.opera.com/articles/view/window-postmessage-messagechannel/#channel",
-				"title": "An Introduction to HTML5 web messaging"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "u",
-					"10.0-10.1": "u",
-					"10.5": "u",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "y",
-					"6.0-6.1": "y",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "u",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 55.07,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "x-doc-messaging",
-			"keywords": ""
-		},
-		"css3-tabsize": {
-			"title": "CSS3 tab-size",
-			"description": "Method of customizing the width of a tab character. Only effective using 'white-space: pre'.",
-			"spec": "http://www.w3.org/TR/css3-text/#tab-size1",
-			"status": "wd",
-			"links": [{
-				"url": "https://developer.mozilla.org/en-US/docs/Web/CSS/tab-size",
-				"title": "MDN article"
-			}],
-			"categories": ["CSS3"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "y x",
-					"5": "y x",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "y x",
-					"11": "y x",
-					"11.1": "y x",
-					"11.5": "y x",
-					"11.6": "y x",
-					"12": "y x",
-					"12.1": "y x",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "y",
-					"10": "y"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "y x",
-					"11.1": "y x",
-					"11.5": "y x",
-					"12": "y x",
-					"12.1": "y x",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y x"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 53.05,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "tab-size,tab-width"
-		},
-		"mutationobserver": {
-			"title": "Mutation Observer",
-			"description": "Method for observing and reacting to changes to the DOM. Replaces MutationEvents, which is deprecated.",
-			"spec": "http://www.w3.org/TR/dom/",
-			"status": "wd",
-			"links": [{
-				"url": "https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver",
-				"title": "MutationObserver from MDN"
-			}, {
-				"url": "https://github.com/Polymer/MutationObservers",
-				"title": "Polyfill"
-			}],
-			"categories": ["DOM", "JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "p",
-					"10": "p",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "y x",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "y x",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "p",
-					"4.1": "p",
-					"4.2-4.3": "p",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "y x"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "p"
-				}
-			},
-			"notes": "When the content of a node with a single CharacterData child node is changed by innerHTML attribute and the node have a single different one as a result, WebKit browsers consider it as a characterData mutation of the child CharacterData node, while other browsers think it as a childList mutation of the parent node.",
-			"usage_perc_y": 54.8,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "MutationObserver"
-		},
-		"css-selection": {
-			"title": "::selection CSS pseudo-element",
-			"description": "The ::selection CSS pseudo-element applies rules to the portion of a document that has been highlighted (e.g., selected with the mouse or another pointing device) by the user.",
-			"spec": "https://developer.mozilla.org/en-US/docs/Web/CSS/::selection",
-			"status": "unoff",
-			"links": [{
-				"url": "http://docs.webplatform.org/wiki/css/selectors/pseudo-elements/::selection",
-				"title": "WebPlatform Docs"
-			}, {
-				"url": "http://quirksmode.org/css/selectors/selection.html",
-				"title": "::selection test"
-			}],
-			"categories": ["CSS"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "y",
-					"10": "y",
-					"11": "y"
-				},
-				"firefox": {
-					"2": "y x",
-					"3": "y x",
-					"3.5": "y x",
-					"3.6": "y x",
-					"4": "y x",
-					"5": "y x",
-					"6": "y x",
-					"7": "y x",
-					"8": "y x",
-					"9": "y x",
-					"10": "y x",
-					"11": "y x",
-					"12": "y x",
-					"13": "y x",
-					"14": "y x",
-					"15": "y x",
-					"16": "y x",
-					"17": "y x",
-					"18": "y x",
-					"19": "y x",
-					"20": "y x",
-					"21": "y x",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x"
-				},
-				"chrome": {
-					"4": "y",
-					"5": "y",
-					"6": "y",
-					"7": "y",
-					"8": "y",
-					"9": "y",
-					"10": "y",
-					"11": "y",
-					"12": "y",
-					"13": "y",
-					"14": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y",
-					"19": "y",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y",
-					"28": "y",
-					"29": "y",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "y",
-					"3.2": "y",
-					"4": "y",
-					"5": "y",
-					"5.1": "y",
-					"6": "y",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "y",
-					"10.0-10.1": "y",
-					"10.5": "y",
-					"10.6": "y",
-					"11": "y",
-					"11.1": "y",
-					"11.5": "y",
-					"11.6": "y",
-					"12": "y",
-					"12.1": "y",
-					"15": "y",
-					"16": "y",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "u",
-					"11": "u",
-					"11.1": "u",
-					"11.5": "y",
-					"12": "y",
-					"12.1": "y",
-					"0": "y"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "n"
-				},
-				"ie_mob": {
-					"10": "y"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 71.68,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "::selection,selection"
-		},
-		"canvas-blending": {
-			"title": "Canvas blend modes",
-			"description": "Method of defining the effect resulting from overlaying two layers on a Canvas element. ",
-			"spec": "http://www.w3.org/TR/compositing-1/#blending",
-			"status": "wd",
-			"links": [{
-				"url": "http://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas/",
-				"title": "Blog post"
-			}],
-			"categories": ["Canvas"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "y",
-					"21": "y",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "n",
-					"24": "n",
-					"25": "n",
-					"26": "n",
-					"27": "n",
-					"28": "n",
-					"29": "n",
-					"30": "y",
-					"31": "y",
-					"32": "y"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "y",
-					"7": "y"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "n",
-					"16": "n",
-					"17": "y",
-					"18": "y"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "y"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "y"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "n"
-				},
-				"and_chr": {
-					"0": "y"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "",
-			"usage_perc_y": 42.33,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "canvas",
-			"keywords": ""
-		},
-		"clipboard": {
-			"title": "Clipboard API",
-			"description": "API to provide copy, cut and paste functionality using the OS clipboard.",
-			"spec": "http://www.w3.org/TR/clipboard-apis/",
-			"status": "wd",
-			"links": [{
-				"url": "http://www.deluxeblogtips.com/2010/06/javascript-copy-to-clipboard.html",
-				"title": "Blog post on cross-browser usage"
-			}, {
-				"url": "https://developer.mozilla.org/en-US/docs/Web/API/ClipboardEvent",
-				"title": "MDN page on ClipboardEvent"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "a #1",
-					"6": "a #1",
-					"7": "a #1",
-					"8": "a #1",
-					"9": "a #1",
-					"10": "a #1",
-					"11": "a #1"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "y",
-					"23": "y",
-					"24": "y",
-					"25": "y",
-					"26": "y",
-					"27": "y"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "a",
-					"14": "a",
-					"15": "a",
-					"16": "a",
-					"17": "a",
-					"18": "a",
-					"19": "a",
-					"20": "a",
-					"21": "a",
-					"22": "a",
-					"23": "a",
-					"24": "a",
-					"25": "a",
-					"26": "a",
-					"27": "a",
-					"28": "a",
-					"29": "a",
-					"30": "a",
-					"31": "a",
-					"32": "a"
-				},
-				"safari": {
-					"3.1": "u",
-					"3.2": "u",
-					"4": "a",
-					"5": "a",
-					"5.1": "a",
-					"6": "a",
-					"6.1": "a",
-					"7": "a"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "n",
-					"16": "a",
-					"17": "a",
-					"18": "a"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "a",
-					"6.0-6.1": "a",
-					"7.0": "a"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "a"
-				},
-				"bb": {
-					"7": "n",
-					"10": "a"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "a"
-				},
-				"and_chr": {
-					"0": "a"
-				},
-				"and_ff": {
-					"0": "y"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "Partial support in IE refers using <a href=\"http://msdn.microsoft.com/en-us/library/ie/ms535220%28v=vs.85%29.aspx\">a non-standard method</a> of interacting with the clipboard. For other browsers it refers to not supporting the ClipboardEvent constructor.",
-			"usage_perc_y": 12.83,
-			"usage_perc_a": 67.91,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": "cut,copy,paste,clipboarddata"
-		},
-		"rtcpeerconnection": {
-			"title": "WebRTC Peer-to-peer connections",
-			"description": "Method of allowing two users to communicate directly, browser to browser using the RTCPeerConnection API.",
-			"spec": "http://www.w3.org/TR/webrtc/#peer-to-peer-connections",
-			"status": "wd",
-			"links": [{
-				"url": "http://www.webrtc.org/",
-				"title": "WebRTC Project site"
-			}],
-			"categories": ["JS API"],
-			"stats": {
-				"ie": {
-					"5.5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n"
-				},
-				"firefox": {
-					"2": "n",
-					"3": "n",
-					"3.5": "n",
-					"3.6": "n",
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "y x",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x"
-				},
-				"chrome": {
-					"4": "n",
-					"5": "n",
-					"6": "n",
-					"7": "n",
-					"8": "n",
-					"9": "n",
-					"10": "n",
-					"11": "n",
-					"12": "n",
-					"13": "n",
-					"14": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n",
-					"19": "n",
-					"20": "n",
-					"21": "n",
-					"22": "n",
-					"23": "y x",
-					"24": "y x",
-					"25": "y x",
-					"26": "y x",
-					"27": "y x",
-					"28": "y x",
-					"29": "y x",
-					"30": "y x",
-					"31": "y x",
-					"32": "y x"
-				},
-				"safari": {
-					"3.1": "n",
-					"3.2": "n",
-					"4": "n",
-					"5": "n",
-					"5.1": "n",
-					"6": "n",
-					"6.1": "u",
-					"7": "u"
-				},
-				"opera": {
-					"9": "n",
-					"9.5-9.6": "n",
-					"10.0-10.1": "n",
-					"10.5": "n",
-					"10.6": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"11.6": "n",
-					"12": "n",
-					"12.1": "n",
-					"15": "n",
-					"16": "n",
-					"17": "n",
-					"18": "n"
-				},
-				"ios_saf": {
-					"3.2": "n",
-					"4.0-4.1": "n",
-					"4.2-4.3": "n",
-					"5.0-5.1": "n",
-					"6.0-6.1": "n",
-					"7.0": "n"
-				},
-				"op_mini": {
-					"5.0-7.0": "n"
-				},
-				"android": {
-					"2.1": "n",
-					"2.2": "n",
-					"2.3": "n",
-					"3": "n",
-					"4": "n",
-					"4.1": "n",
-					"4.2-4.3": "n",
-					"4.4": "n"
-				},
-				"bb": {
-					"7": "n",
-					"10": "n"
-				},
-				"op_mob": {
-					"10": "n",
-					"11": "n",
-					"11.1": "n",
-					"11.5": "n",
-					"12": "n",
-					"12.1": "n",
-					"0": "y x"
-				},
-				"and_chr": {
-					"0": "y x"
-				},
-				"and_ff": {
-					"0": "y x"
-				},
-				"ie_mob": {
-					"10": "n"
-				}
-			},
-			"notes": "BlackBerry 10 recognizes RTCPeerConnection but real support is unconfirmed.",
-			"usage_perc_y": 46.24,
-			"usage_perc_a": 0,
-			"ucprefix": false,
-			"parent": "",
-			"keywords": ""
-		}
-	}
-}
-},{}],36:[function(require,module,exports){
-/**
- * Abstract implementation of edit tree interface.
- * Edit tree is a named container of editable “name-value” child elements, 
- * parsed from <code>source</code>. This container provides convenient methods
- * for editing/adding/removing child elements. All these update actions are
- * instantly reflected in the <code>source</code> code with respect of formatting.
- * <br><br>
- * For example, developer can create an edit tree from CSS rule and add or 
- * remove properties from it–all changes will be immediately reflected in the 
- * original source.
- * <br><br>
- * All classes defined in this module should be extended the same way as in
- * Backbone framework: using <code>extend</code> method to create new class and 
- * <code>initialize</code> method to define custom class constructor.
- * 
- * @example
- * <pre><code>
- * var MyClass = require('editTree/base').EditElement.extend({
- *     initialize: function() {
- *     // constructor code here
- *   }
- * });
- * 
- * var elem = new MyClass(); 
- * </code></pre>
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var range = require('../assets/range');
-	var utils = require('../utils/common');
-	var klass = require('../vendor/klass');
-	
-	/**
-	 * Named container of edited source
-	 * @type EditContainer
-	 * @param {String} source
-	 * @param {Object} options
-	 */
-	function EditContainer(source, options) {
-		this.options = utils.extend({offset: 0}, options);
-		/**
-		 * Source code of edited structure. All changes in the structure are 
-		 * immediately reflected into this property
-		 */
-		this.source = source;
-		
-		/** 
-		 * List of all editable children
-		 * @private 
-		 */
-		this._children = [];
-		
-		/**
-		 * Hash of all positions of container
-		 * @private
-		 */
-		this._positions = {
-			name: 0
-		};
-		
-		this.initialize.apply(this, arguments);
-	}
-	
-	/**
-	 * The self-propagating extend function for classes.
-	 * @type Function
-	 */
-	EditContainer.extend = klass.extend;
-	
-	EditContainer.prototype = {
-		type: 'container',
-		/**
-		 * Child class constructor
-		 */
-		initialize: function() {},
-
-		/**
-		 * Make position absolute
-		 * @private
-		 * @param {Number} num
-		 * @param {Boolean} isAbsolute
-		 * @returns {Boolean}
-		 */
-		_pos: function(num, isAbsolute) {
-			return num + (isAbsolute ? this.options.offset : 0);
-		},
-		
-		/**
-		 * Replace substring of tag's source
-		 * @param {String} value
-		 * @param {Number} start
-		 * @param {Number} end
-		 * @private
-		 */
-		_updateSource: function(value, start, end) {
-			// create modification range
-			var r = range.create(start, typeof end === 'undefined' ? 0 : end - start);
-			var delta = value.length - r.length();
-			
-			var update = function(obj) {
-				Object.keys(obj).forEach(function(k) {
-					if (obj[k] >= r.end) {
-						obj[k] += delta;
-					}
-				});
-			};
-			
-			// update affected positions of current container
-			update(this._positions);
-			
-			// update affected positions of children
-			var recursiveUpdate = function(items) {
-				items.forEach(function(item) {
-					update(item._positions);
-					if (item.type == 'container') {
-						recursiveUpdate(item.list());
-					}
-				});
-			};
-
-			recursiveUpdate(this.list());
-			this.source = utils.replaceSubstring(this.source, value, r);
-		},
-			
-			
-		/**
-		 * Adds new attribute 
-		 * @param {String} name Property name
-		 * @param {String} value Property value
-		 * @param {Number} pos Position at which to insert new property. By 
-		 * default the property is inserted at the end of rule 
-		 * @returns {EditElement} Newly created element
-		 */
-		add: function(name, value, pos) {
-			// this is abstract implementation
-			var item = new EditElement(name, value);
-			this._children.push(item);
-			return item;
-		},
-		
-		/**
-		 * Returns attribute object
-		 * @param {String} name Attribute name or its index
-		 * @returns {EditElement}
-		 */
-		get: function(name) {
-			if (typeof name === 'number') {
-				return this.list()[name];
-			}
-			
-			if (typeof name === 'string') {
-				return utils.find(this.list(), function(prop) {
-					return prop.name() === name;
-				});
-			}
-			
-			return name;
-		},
-		
-		/**
-		 * Returns all children by name or indexes
-		 * @param {Object} name Element name(s) or indexes (<code>String</code>,
-		 * <code>Array</code>, <code>Number</code>)
-		 * @returns {Array}
-		 */
-		getAll: function(name) {
-			if (!Array.isArray(name))
-				name = [name];
-			
-			// split names and indexes
-			var names = [], indexes = [];
-			name.forEach(function(item) {
-				if (typeof item === 'string') {
-					names.push(item);
-				} else if (typeof item === 'number') {
-					indexes.push(item);
-				}
-			});
-			
-			return this.list().filter(function(attribute, i) {
-				return ~indexes.indexOf(i) || ~names.indexOf(attribute.name());
-			});
-		},
-
-		/**
-		 * Returns list of all editable child elements
-		 * @returns {Array}
-		 */
-		list: function() {
-			return this._children;
-		},
-
-		/**
-		 * Remove child element
-		 * @param {String} name Property name or its index
-		 */
-		remove: function(name) {
-			var element = this.get(name);
-			if (element) {
-				this._updateSource('', element.fullRange());
-				var ix = this._children.indexOf(element);
-				if (~ix) {
-					this._children.splice(ix, 1);
-				}
-			}
-		},
-		
-		/**
-		 * Returns index of editble child in list
-		 * @param {Object} item
-		 * @returns {Number}
-		 */
-		indexOf: function(item) {
-			return this.list().indexOf(this.get(item));
-		},
-		
-		/**
-		 * Returns or updates element value. If such element doesn't exists,
-		 * it will be created automatically and added at the end of child list.
-		 * @param {String} name Element name or its index
-		 * @param {String} value New element value
-		 * @returns {String}
-		 */
-		value: function(name, value, pos) {
-			var element = this.get(name);
-			if (element)
-				return element.value(value);
-			
-			if (typeof value !== 'undefined') {
-				// no such element — create it
-				return this.add(name, value, pos);
-			}
-		},
-		
-		/**
-		 * Returns all values of child elements found by <code>getAll()</code>
-		 * method
-		 * @param {Object} name Element name(s) or indexes (<code>String</code>,
-		 * <code>Array</code>, <code>Number</code>)
-		 * @returns {Array}
-		 */
-		values: function(name) {
-			return this.getAll(name).map(function(element) {
-				return element.value();
-			});
-		},
-		
-		/**
-		 * Sets or gets container name
-		 * @param {String} val New name. If not passed, current 
-		 * name is returned
-		 * @return {String}
-		 */
-		name: function(val) {
-			if (typeof val !== 'undefined' && this._name !== (val = String(val))) {
-				this._updateSource(val, this._positions.name, this._positions.name + this._name.length);
-				this._name = val;
-			}
-			
-			return this._name;
-		},
-		
-		/**
-		 * Returns name range object
-		 * @param {Boolean} isAbsolute Return absolute range (with respect of 
-		 * rule offset)
-		 * @returns {Range}
-		 */
-		nameRange: function(isAbsolute) {
-			return range.create(this._positions.name + (isAbsolute ? this.options.offset : 0), this.name());
-		},
-
-		/**
-		 * Returns range of current source
-		 * @param {Boolean} isAbsolute
-		 */
-		range: function(isAbsolute) {
-			return range.create(isAbsolute ? this.options.offset : 0, this.valueOf());
-		},
-		
-		/**
-		 * Returns element that belongs to specified position
-		 * @param {Number} pos
-		 * @param {Boolean} isAbsolute
-		 * @returns {EditElement}
-		 */
-		itemFromPosition: function(pos, isAbsolute) {
-			return utils.find(this.list(), function(elem) {
-				return elem.range(isAbsolute).inside(pos);
-			});
-		},
-		
-		/**
-		 * Returns source code of current container 
-		 * @returns {String}
-		 */
-		toString: function() {
-			return this.valueOf();
-		},
-
-		valueOf: function() {
-			return this.source;
-		}
-	};
-	
-	/**
-	 * @param {EditContainer} parent
-	 * @param {Object} nameToken
-	 * @param {Object} valueToken
-	 */
-	function EditElement(parent, nameToken, valueToken) {
-		/** @type EditContainer */
-		this.parent = parent;
-		
-		this._name = nameToken.value;
-		this._value = valueToken ? valueToken.value : '';
-		
-		this._positions = {
-			name: nameToken.start,
-			value: valueToken ? valueToken.start : -1
-		};
-		
-		this.initialize.apply(this, arguments);
-	}
-	
-	/**
-	 * The self-propagating extend function for classes.
-	 * @type Function
-	 */
-	EditElement.extend = klass.extend;
-	
-	EditElement.prototype = {
-		type: 'element',
-
-		/**
-		 * Child class constructor
-		 */
-		initialize: function() {},
-		
-		/**
-		 * Make position absolute
-		 * @private
-		 * @param {Number} num
-		 * @param {Boolean} isAbsolute
-		 * @returns {Boolean}
-		 */
-		_pos: function(num, isAbsolute) {
-			return num + (isAbsolute ? this.parent.options.offset : 0);
-		},
-			
-		/**
-		 * Sets of gets element value
-		 * @param {String} val New element value. If not passed, current 
-		 * value is returned
-		 * @returns {String}
-		 */
-		value: function(val) {
-			if (typeof val !== 'undefined' && this._value !== (val = String(val))) {
-				this.parent._updateSource(val, this.valueRange());
-				this._value = val;
-			}
-			
-			return this._value;
-		},
-		
-		/**
-		 * Sets of gets element name
-		 * @param {String} val New element name. If not passed, current 
-		 * name is returned
-		 * @returns {String}
-		 */
-		name: function(val) {
-			if (typeof val !== 'undefined' && this._name !== (val = String(val))) {
-				this.parent._updateSource(val, this.nameRange());
-				this._name = val;
-			}
-			
-			return this._name;
-		},
-		
-		/**
-		 * Returns position of element name token
-		 * @param {Boolean} isAbsolute Return absolute position
-		 * @returns {Number}
-		 */
-		namePosition: function(isAbsolute) {
-			return this._pos(this._positions.name, isAbsolute);
-		},
-		
-		/**
-		 * Returns position of element value token
-		 * @param {Boolean} isAbsolute Return absolute position
-		 * @returns {Number}
-		 */
-		valuePosition: function(isAbsolute) {
-			return this._pos(this._positions.value, isAbsolute);
-		},
-		
-		/**
-		 * Returns element name
-		 * @param {Boolean} isAbsolute Return absolute range 
-		 * @returns {Range}
-		 */
-		range: function(isAbsolute) {
-			return range.create(this.namePosition(isAbsolute), this.valueOf());
-		},
-		
-		/**
-		 * Returns full element range, including possible indentation
-		 * @param {Boolean} isAbsolute Return absolute range
-		 * @returns {Range}
-		 */
-		fullRange: function(isAbsolute) {
-			return this.range(isAbsolute);
-		},
-		
-		/**
-		 * Returns element name range
-		 * @param {Boolean} isAbsolute Return absolute range
-		 * @returns {Range}
-		 */
-		nameRange: function(isAbsolute) {
-			return range.create(this.namePosition(isAbsolute), this.name());
-		},
-		
-		/**
-		 * Returns element value range
-		 * @param {Boolean} isAbsolute Return absolute range
-		 * @returns {Range}
-		 */
-		valueRange: function(isAbsolute) {
-			return range.create(this.valuePosition(isAbsolute), this.value());
-		},
-		
-		/**
-		 * Returns current element string representation
-		 * @returns {String}
-		 */
-		toString: function() {
-			return this.valueOf();
-		},
-		
-		valueOf: function() {
-			return this.name() + this.value();
-		}
-	};
-	
-	return {
-		EditContainer: EditContainer,
-		EditElement: EditElement,
-		
-		/**
-		 * Creates token that can be fed to <code>EditElement</code>
-		 * @param {Number} start
-		 * @param {String} value
-		 * @param {String} type
-		 * @returns
-		 */
-		createToken: function(start, value, type) {
-			var obj = {
-				start: start || 0,
-				value: value || '',
-				type: type
-			};
-			
-			obj.end = obj.start + obj.value.length;
-			return obj;
-		}
-	};
-});
-},{"../assets/range":30,"../utils/common":73,"../vendor/klass":78}],37:[function(require,module,exports){
-/**
- * CSS EditTree is a module that can parse a CSS rule into a tree with 
- * convenient methods for adding, modifying and removing CSS properties. These 
- * changes can be written back to string with respect of code formatting.
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('../utils/common');
-	var editTree = require('./base');
-	var cssParser = require('../parser/css');
-	var cssSections = require('../utils/cssSections');
-	var range = require('../assets/range');
-	var stringStream = require('../assets/stringStream');
-	var tokenIterator = require('../assets/tokenIterator');
-
-	var defaultOptions = {
-		styleBefore: '\n\t',
-		styleSeparator: ': ',
-		offset: 0
-	};
-	
-	var reSpaceStart = /^\s+/;
-	var reSpaceEnd = /\s+$/;
-	var WHITESPACE_REMOVE_FROM_START = 1;
-	var WHITESPACE_REMOVE_FROM_END   = 2;
-	
-	/**
-	 * Modifies given range to remove whitespace from beginning
-	 * and/or from the end
-	 * @param  {Range} rng Range to modify
-	 * @param  {String} text  Text that range belongs to
-	 * @param  {Number} mask  Mask indicating from which end 
-	 * whitespace should be removed
-	 * @return {Range}
-	 */
-	function trimWhitespaceInRange(rng, text, mask) {
-		mask = mask || (WHITESPACE_REMOVE_FROM_START | WHITESPACE_REMOVE_FROM_END);
-		text = rng.substring(text);
-		var m;
-		if ((mask & WHITESPACE_REMOVE_FROM_START) && (m = text.match(reSpaceStart))) {
-			rng.start += m[0].length;
-		}
-
-		if ((mask & WHITESPACE_REMOVE_FROM_END) && (m = text.match(reSpaceEnd))) {
-			rng.end -= m[0].length;
-		}
-
-		// in case given range is just a whatespace
-		if (rng.end < rng.start) {
-			rng.end = rng.start;
-		}
-
-		return rng;
-	}
-
-	/**
-	 * Consumes CSS property and value from current token
-	 * iterator state. Offsets iterator pointer into token
-	 * that can be used for next value consmption
-	 * @param  {TokenIterator} it
-	 * @param  {String} text
-	 * @return {Object}    Object with `name` and `value` properties 
-	 * ar ranges. Value range can be zero-length.
-	 */
-	function consumeSingleProperty(it, text) {
-		var name, value, end;
-		var token = it.current();
-
-		if (!token) {
-			return null;
-		}
-
-		// skip whitespace
-		var ws = {'white': 1, 'line': 1, 'comment': 1};
-		while ((token = it.current())) {
-			if (!(token.type in ws)) {
-				break;
-			}
-			it.next();
-		}
-
-		if (!it.hasNext()) {
-			return null;
-		}
-
-		// consume property name
-		token = it.current();
-		name = range(token.start, token.value);
-		var isAtProperty = token.value.charAt(0) == '@';
-		while (token = it.next()) {
-			name.end = token.end;
-			if (token.type == ':' || token.type == 'white') {
-				name.end = token.start;
-				it.next();
-				if (token.type == ':' || isAtProperty) {
-					// XXX I really ashame of this hardcode, but I need
-					// to stop parsing if this is an SCSS mixin call,
-					// for example: @include border-radius(10px)
-					break;
-				}
-			} else if (token.type == ';' || token.type == 'line') {
-				// there’s no value, looks like a mixin
-				// or a special use case:
-				// user is writing a new property or abbreviation
-				name.end = token.start;
-				value = range(token.start, 0);
-				it.next();
-				break;
-			}
-		}
-
-		token = it.current();
-		if (!value && token) {
-			if (token.type == 'line') {
-				lastNewline = token;
-			}
-			// consume value
-			value = range(token.start, token.value);
-			var lastNewline;
-			while ((token = it.next())) {
-				value.end = token.end;
-				if (token.type == 'line') {
-					lastNewline = token;
-				} else if (token.type == '}' || token.type == ';') {
-					value.end = token.start;
-					if (token.type == ';') {
-						end = range(token.start, token.value);
-					}
-					it.next();
-					break;
-				} else if (token.type == ':' && lastNewline) {
-					// A special case: 
-					// user is writing a value before existing
-					// property, but didn’t inserted closing semi-colon.
-					// In this case, limit value range to previous
-					// newline
-					value.end = lastNewline.start;
-					it._i = it.tokens.indexOf(lastNewline);
-					break;
-				}
-			}
-		}
-
-		if (!value) {
-			value = range(name.end, 0);
-		}
-
-		return {
-			name: trimWhitespaceInRange(name, text),
-			value: trimWhitespaceInRange(value, text, WHITESPACE_REMOVE_FROM_START | (end ? WHITESPACE_REMOVE_FROM_END : 0)),
-			end: end || range(value.end, 0)
-		};
-	}
-
-	/**
-	 * Finds parts of complex CSS value
-	 * @param {String} str
-	 * @returns {Array} Returns list of <code>Range</code>'s
-	 */
-	function findParts(str) {
-		/** @type StringStream */
-		var stream = stringStream.create(str);
-		var ch;
-		var result = [];
-		var sep = /[\s\u00a0,;]/;
-		
-		var add = function() {
-			stream.next();
-			result.push(range(stream.start, stream.current()));
-			stream.start = stream.pos;
-		};
-		
-		// skip whitespace
-		stream.eatSpace();
-		stream.start = stream.pos;
-		
-		while ((ch = stream.next())) {
-			if (ch == '"' || ch == "'") {
-				stream.next();
-				if (!stream.skipTo(ch)) break;
-				add();
-			} else if (ch == '(') {
-				// function found, may have nested function
-				stream.backUp(1);
-				if (!stream.skipToPair('(', ')')) break;
-				stream.backUp(1);
-				add();
-			} else {
-				if (sep.test(ch)) {
-					result.push(range(stream.start, stream.current().length - 1));
-					stream.eatWhile(sep);
-					stream.start = stream.pos;
-				}
-			}
-		}
-		
-		add();
-
-		return utils.unique(result.filter(function(item) {
-			return !!item.length();
-		}));
-	}
-	
-	/**
-	 * Parses CSS properties from given CSS source
-	 * and adds them to CSSEditContainer node
-	 * @param  {CSSEditContainer} node
-	 * @param  {String} source CSS source
-	 * @param {Number} offset Offset of properties subset from original source
-	 */
-	function consumeProperties(node, source, offset) {
-		var list = extractPropertiesFromSource(source, offset);
-
-		list.forEach(function(property) {
-			node._children.push(new CSSEditElement(node,
-				editTree.createToken(property.name.start, property.nameText),
-				editTree.createToken(property.value.start, property.valueText),
-				editTree.createToken(property.end.start, property.endText)
-				));
-		});
-	}
-
-	/**
-	 * Parses given CSS source and returns list of ranges of located CSS properties.
-	 * Normally, CSS source must contain properties only, it must be,
-	 * for example, a content of CSS selector or text between nested
-	 * CSS sections
-	 * @param  {String} source CSS source
-	 * @param {Number} offset Offset of properties subset from original source.
-	 * Used to provide proper ranges of locates items
-	 */
-	function extractPropertiesFromSource(source, offset) {
-		offset = offset || 0;
-		source = source.replace(reSpaceEnd, '');
-		var out = [];
-
-		if (!source) {
-			return out;
-		}
-
-		var tokens = cssParser.parse(source);
-		var it = tokenIterator.create(tokens);
-		var property;
-
-		while ((property = consumeSingleProperty(it, source))) {
-			out.push({
-				nameText: property.name.substring(source),
-				name: property.name.shift(offset),
-
-				valueText: property.value.substring(source),
-				value: property.value.shift(offset),
-
-				endText: property.end.substring(source),
-				end: property.end.shift(offset)
-			});
-		}
-
-		return out;
-	}
-	
-	/**
-	 * @class
-	 * @extends EditContainer
-	 */
-	var CSSEditContainer = editTree.EditContainer.extend({
-		initialize: function(source, options) {
-			utils.extend(this.options, defaultOptions, options);
-			
-			if (Array.isArray(source)) {
-				source = cssParser.toSource(source);
-			}
-
-			var allRules = cssSections.findAllRules(source);
-			var currentRule = allRules.shift();
-
-			// keep top-level rules only since they will
-			// be parsed by nested CSSEditContainer call
-			var topLevelRules = [];
-			allRules.forEach(function(r) {
-				var isTopLevel = !utils.find(topLevelRules, function(tr) {
-					return tr.contains(r);
-				});
-
-				if (isTopLevel) {
-					topLevelRules.push(r);
-				}
-			});
-
-
-			var selectorRange = range.create2(currentRule.start, currentRule._selectorEnd);
-			this._name = selectorRange.substring(source);
-			this._positions.name = selectorRange.start;
-			this._positions.contentStart = currentRule._contentStart + 1;
-
-			var sectionOffset = currentRule._contentStart + 1;
-			var sectionEnd = currentRule.end - 1;
-
-			// parse properties between nested rules
-			// and add nested rules as children
-			var that = this;
-			topLevelRules.forEach(function(r) {
-				consumeProperties(that, source.substring(sectionOffset, r.start), sectionOffset);
-				var opt = utils.extend({}, that.options, {offset: r.start + that.options.offset});
-				// XXX I think I don’t need nested containers here
-				// They should be handled separately
-				// that._children.push(new CSSEditContainer(r.substring(source), opt));
-				sectionOffset = r.end;
-			});
-
-			// consume the rest of data
-			consumeProperties(this, source.substring(sectionOffset, currentRule.end - 1), sectionOffset);
-			this._saveStyle();
-		},
-		
-		/**
-		 * Remembers all styles of properties
-		 * @private
-		 */
-		_saveStyle: function() {
-			var start = this._positions.contentStart;
-			var source = this.source;
-			
-			this.list().forEach(function(p) {
-				if (p.type === 'container') {
-					return;
-				}
-
-				p.styleBefore = source.substring(start, p.namePosition());
-				// a small hack here:
-				// Sometimes users add empty lines before properties to logically
-				// separate groups of properties. In this case, a blind copy of
-				// characters between rules may lead to undesired behavior,
-				// especially when current rule is duplicated or used as a donor
-				// to create new rule.
-				// To solve this issue, we‘ll take only last newline indentation
-				var lines = utils.splitByLines(p.styleBefore);
-				if (lines.length > 1) {
-					p.styleBefore = '\n' + lines[lines.length - 1];
-				}
-				
-				p.styleSeparator = source.substring(p.nameRange().end, p.valuePosition());
-				
-				// graceful and naive comments removal 
-				var parts = p.styleBefore.split('*/');
-				p.styleBefore = parts[parts.length - 1];
-				p.styleSeparator = p.styleSeparator.replace(/\/\*.*?\*\//g, '');
-				
-				start = p.range().end;
-			});
-		},
-
-		/**
-		 * Returns position of element name token
-		 * @param {Boolean} isAbsolute Return absolute position
-		 * @returns {Number}
-		 */
-		namePosition: function(isAbsolute) {
-			return this._pos(this._positions.name, isAbsolute);
-		},
-		
-		/**
-		 * Returns position of element value token
-		 * @param {Boolean} isAbsolute Return absolute position
-		 * @returns {Number}
-		 */
-		valuePosition: function(isAbsolute) {
-			return this._pos(this._positions.contentStart, isAbsolute);
-		},
-
-		/**
-		 * Returns element value range
-		 * @param {Boolean} isAbsolute Return absolute range
-		 * @returns {Range}
-		 */
-		valueRange: function(isAbsolute) {
-			return range.create2(this.valuePosition(isAbsolute), this._pos(this.valueOf().length, isAbsolute) - 1);
-		},
-		
-		/**
-		 * Adds new CSS property 
-		 * @param {String} name Property name
-		 * @param {String} value Property value
-		 * @param {Number} pos Position at which to insert new property. By 
-		 * default the property is inserted at the end of rule 
-		 * @returns {CSSEditProperty}
-		 */
-		add: function(name, value, pos) {
-			var list = this.list();
-			var start = this._positions.contentStart;
-			var styles = utils.pick(this.options, 'styleBefore', 'styleSeparator');
-			
-			if (typeof pos === 'undefined') {
-				pos = list.length;
-			}
-			
-			/** @type CSSEditProperty */
-			var donor = list[pos];
-			if (donor) {
-				start = donor.fullRange().start;
-			} else if ((donor = list[pos - 1])) {
-				// make sure that donor has terminating semicolon
-				donor.end(';');
-				start = donor.range().end;
-			}
-			
-			if (donor) {
-				styles = utils.pick(donor, 'styleBefore', 'styleSeparator');
-			}
-			
-			var nameToken = editTree.createToken(start + styles.styleBefore.length, name);
-			var valueToken = editTree.createToken(nameToken.end + styles.styleSeparator.length, value);
-			
-			var property = new CSSEditElement(this, nameToken, valueToken,
-					editTree.createToken(valueToken.end, ';'));
-			
-			utils.extend(property, styles);
-			
-			// write new property into the source
-			this._updateSource(property.styleBefore + property.toString(), start);
-			
-			// insert new property
-			this._children.splice(pos, 0, property);
-			return property;
-		}
-	});
-	
-	/**
-	 * @class
-	 * @type CSSEditElement
-	 * @constructor
-	 */
-	var CSSEditElement = editTree.EditElement.extend({
-		initialize: function(rule, name, value, end) {
-			this.styleBefore = rule.options.styleBefore;
-			this.styleSeparator = rule.options.styleSeparator;
-			
-			this._end = end.value;
-			this._positions.end = end.start;
-		},
-		
-		/**
-		 * Returns ranges of complex value parts
-		 * @returns {Array} Returns <code>null</code> if value is not complex
-		 */
-		valueParts: function(isAbsolute) {
-			var parts = findParts(this.value());
-			if (isAbsolute) {
-				var offset = this.valuePosition(true);
-				parts.forEach(function(p) {
-					p.shift(offset);
-				});
-			}
-			
-			return parts;
-		},
-
-		/**
-		 * Sets of gets element value. 
-		 * When setting value, this implementation will ensure that your have 
-		 * proper name-value separator
-		 * @param {String} val New element value. If not passed, current 
-		 * value is returned
-		 * @returns {String}
-		 */
-		value: function(val) {
-			var isUpdating = typeof val !== 'undefined';
-			var allItems = this.parent.list();
-			if (isUpdating && this.isIncomplete()) {
-				var self = this;
-				var donor = utils.find(allItems, function(item) {
-					return item !== self && !item.isIncomplete();
-				});
-
-				this.styleSeparator = donor 
-					? donor.styleSeparator 
-					: this.parent.options.styleSeparator;
-				this.parent._updateSource(this.styleSeparator, range(this.valueRange().start, 0));
-			}
-
-			var value = this.constructor.__super__.value.apply(this, arguments);
-			if (isUpdating) {
-				// make sure current property has terminating semi-colon
-				// if it’s not the last one
-				var ix = allItems.indexOf(this);
-				if (ix !== allItems.length - 1 && !this.end()) {
-					this.end(';');
-				}
-			}
-			return value;
-		},
-
-		/**
-		 * Test if current element is incomplete, e.g. has no explicit
-		 * name-value separator
-		 * @return {Boolean} [description]
-		 */
-		isIncomplete: function() {
-			return this.nameRange().end === this.valueRange().start;
-		},
-		
-		/**
-		 * Sets of gets property end value (basically, it's a semicolon)
-		 * @param {String} val New end value. If not passed, current 
-		 * value is returned
-		 */
-		end: function(val) {
-			if (typeof val !== 'undefined' && this._end !== val) {
-				this.parent._updateSource(val, this._positions.end, this._positions.end + this._end.length);
-				this._end = val;
-			}
-			
-			return this._end;
-		},
-		
-		/**
-		 * Returns full rule range, with indentation
-		 * @param {Boolean} isAbsolute Return absolute range (with respect of
-		 * rule offset)
-		 * @returns {Range}
-		 */
-		fullRange: function(isAbsolute) {
-			var r = this.range(isAbsolute);
-			r.start -= this.styleBefore.length;
-			return r;
-		},
-		
-		/**
-		 * Returns item string representation
-		 * @returns {String}
-		 */
-		valueOf: function() {
-			return this.name() + this.styleSeparator + this.value() + this.end();
-		}
-	});
-	
-	return {
-		/**
-		 * Parses CSS rule into editable tree
-		 * @param {String} source
-		 * @param {Object} options
-		 * @memberOf emmet.cssEditTree
-		 * @returns {EditContainer}
-		 */
-		parse: function(source, options) {
-			return new CSSEditContainer(source, options);
-		},
-		
-		/**
-		 * Extract and parse CSS rule from specified position in <code>content</code> 
-		 * @param {String} content CSS source code
-		 * @param {Number} pos Character position where to start source code extraction
-		 * @returns {EditContainer}
-		 */
-		parseFromPosition: function(content, pos, isBackward) {
-			var bounds = cssSections.locateRule(content, pos, isBackward);
-			if (!bounds || !bounds.inside(pos)) {
-				// no matching CSS rule or caret outside rule bounds
-				return null;
-			}
-			
-			return this.parse(bounds.substring(content), {
-				offset: bounds.start
-			});
-		},
-
-		/**
-		 * Locates CSS property in given CSS code fragment under specified character position
-		 * @param  {String} css CSS code or parsed CSSEditContainer
-		 * @param  {Number} pos Character position where to search CSS property
-		 * @return {CSSEditElement}
-		 */
-		propertyFromPosition: function(css, pos) {
-			var cssProp = null;
-			/** @type EditContainer */
-			var cssRule = typeof css === 'string' ? this.parseFromPosition(css, pos, true) : css;
-			if (cssRule) {
-				cssProp = cssRule.itemFromPosition(pos, true);
-				if (!cssProp) {
-					// in case user just started writing CSS property
-					// and didn't include semicolon–try another approach
-					cssProp = utils.find(cssRule.list(), function(elem) {
-						return elem.range(true).end == pos;
-					});
-				}
-			}
-
-			return cssProp;
-		},
-		
-		/**
-		 * Removes vendor prefix from CSS property
-		 * @param {String} name CSS property
-		 * @return {String}
-		 */
-		baseName: function(name) {
-			return name.replace(/^\s*\-\w+\-/, '');
-		},
-		
-		/**
-		 * Finds parts of complex CSS value
-		 * @param {String} str
-		 * @returns {Array}
-		 */
-		findParts: findParts,
-
-		extractPropertiesFromSource: extractPropertiesFromSource
-	};
-});
-},{"../assets/range":30,"../assets/stringStream":32,"../assets/tokenIterator":34,"../parser/css":56,"../utils/common":73,"../utils/cssSections":74,"./base":36}],38:[function(require,module,exports){
-/**
- * XML EditTree is a module that can parse an XML/HTML element into a tree with 
- * convenient methods for adding, modifying and removing attributes. These 
- * changes can be written back to string with respect of code formatting.
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var editTree = require('./base');
-	var xmlParser = require('../parser/xml');
-	var range = require('../assets/range');
-	var utils = require('../utils/common');
-
-	var defaultOptions = {
-		styleBefore: ' ',
-		styleSeparator: '=',
-		styleQuote: '"',
-		offset: 0
-	};
-	
-	var startTag = /^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/m;
-	
-	var XMLEditContainer = editTree.EditContainer.extend({
-		initialize: function(source, options) {
-			utils.defaults(this.options, defaultOptions);
-			this._positions.name = 1;
-			
-			var attrToken = null;
-			var tokens = xmlParser.parse(source);
-			
-			tokens.forEach(function(token) {
-				token.value = range.create(token).substring(source);
-				switch (token.type) {
-					case 'tag':
-						if (/^<[^\/]+/.test(token.value)) {
-							this._name = token.value.substring(1);
-						}
-						break;
-						
-					case 'attribute':
-						// add empty attribute
-						if (attrToken) {
-							this._children.push(new XMLEditElement(this, attrToken));
-						}
-						
-						attrToken = token;
-						break;
-						
-					case 'string':
-						this._children.push(new XMLEditElement(this, attrToken, token));
-						attrToken = null;
-						break;
-				}
-			}, this);
-			
-			if (attrToken) {
-				this._children.push(new XMLEditElement(this, attrToken));
-			}
-			
-			this._saveStyle();
-		},
-		
-		/**
-		 * Remembers all styles of properties
-		 * @private
-		 */
-		_saveStyle: function() {
-			var start = this.nameRange().end;
-			var source = this.source;
-			
-			this.list().forEach(function(p) {
-				p.styleBefore = source.substring(start, p.namePosition());
-				
-				if (p.valuePosition() !== -1) {
-					p.styleSeparator = source.substring(p.namePosition() + p.name().length, p.valuePosition() - p.styleQuote.length);
-				}
-				
-				start = p.range().end;
-			});
-		},
-		
-		/**
-		 * Adds new attribute 
-		 * @param {String} name Property name
-		 * @param {String} value Property value
-		 * @param {Number} pos Position at which to insert new property. By 
-		 * default the property is inserted at the end of rule 
-		 */
-		add: function(name, value, pos) {
-			var list = this.list();
-			var start = this.nameRange().end;
-			var styles = utils.pick(this.options, 'styleBefore', 'styleSeparator', 'styleQuote');
-			
-			if (typeof pos === 'undefined') {
-				pos = list.length;
-			}
-			
-			
-			/** @type XMLEditAttribute */
-			var donor = list[pos];
-			if (donor) {
-				start = donor.fullRange().start;
-			} else if ((donor = list[pos - 1])) {
-				start = donor.range().end;
-			}
-			
-			if (donor) {
-				styles = utils.pick(donor, 'styleBefore', 'styleSeparator', 'styleQuote');
-			}
-			
-			value = styles.styleQuote + value + styles.styleQuote;
-			
-			var attribute = new XMLEditElement(this, 
-					editTree.createToken(start + styles.styleBefore.length, name),
-					editTree.createToken(start + styles.styleBefore.length + name.length 
-							+ styles.styleSeparator.length, value)
-					);
-			
-			utils.extend(attribute, styles);
-			
-			// write new attribute into the source
-			this._updateSource(attribute.styleBefore + attribute.toString(), start);
-			
-			// insert new attribute
-			this._children.splice(pos, 0, attribute);
-			return attribute;
-		},
-
-		/**
-		 * A special case of attribute editing: adds class value to existing
-		 * `class` attribute
-		 * @param {String} value
-		 */
-		addClass: function(value) {
-			var attr = this.get('class');
-			value = utils.trim(value);
-			if (!attr) {
-				return this.add('class', value);
-			}
-
-			var classVal = attr.value();
-			var classList = ' ' + classVal.replace(/\n/g, ' ') + ' ';
-			if (!~classList.indexOf(' ' + value + ' ')) {
-				attr.value(classVal + ' ' + value);
-			}
-		},
-
-		/**
-		 * A special case of attribute editing: removes class value from existing
-		 * `class` attribute
-		 * @param {String} value
-		 */
-		removeClass: function(value) {
-			var attr = this.get('class');
-			value = utils.trim(value);
-			if (!attr) {
-				return;
-			}
-
-			var reClass = new RegExp('(^|\\s+)' + utils.escapeForRegexp(value));
-			var classVal = attr.value().replace(reClass, '');
-			if (!utils.trim(classVal)) {
-				this.remove('class');
-			} else {
-				attr.value(classVal);
-			}
-		}
-	});
-	
-	var XMLEditElement = editTree.EditElement.extend({
-		initialize: function(parent, nameToken, valueToken) {
-			this.styleBefore = parent.options.styleBefore;
-			this.styleSeparator = parent.options.styleSeparator;
-			
-			var value = '', quote = parent.options.styleQuote;
-			if (valueToken) {
-				value = valueToken.value;
-				quote = value.charAt(0);
-				if (quote == '"' || quote == "'") {
-					value = value.substring(1);
-				} else {
-					quote = '';
-				}
-				
-				if (quote && value.charAt(value.length - 1) == quote) {
-					value = value.substring(0, value.length - 1);
-				}
-			}
-			
-			this.styleQuote = quote;
-			
-			this._value = value;
-			this._positions.value = valueToken ? valueToken.start + quote.length : -1;
-		},
-		
-		/**
-		 * Returns full rule range, with indentation
-		 * @param {Boolean} isAbsolute Return absolute range (with respect of
-		 * rule offset)
-		 * @returns {Range}
-		 */
-		fullRange: function(isAbsolute) {
-			var r = this.range(isAbsolute);
-			r.start -= this.styleBefore.length;
-			return r;
-		},
-		
-		valueOf: function() {
-			return this.name() + this.styleSeparator
-				+ this.styleQuote + this.value() + this.styleQuote;
-		}
-	});
-	
-	return {
-		/**
-		 * Parses HTML element into editable tree
-		 * @param {String} source
-		 * @param {Object} options
-		 * @memberOf emmet.htmlEditTree
-		 * @returns {EditContainer}
-		 */
-		parse: function(source, options) {
-			return new XMLEditContainer(source, options);
-		},
-		
-		/**
-		 * Extract and parse HTML from specified position in <code>content</code> 
-		 * @param {String} content CSS source code
-		 * @param {Number} pos Character position where to start source code extraction
-		 * @returns {XMLEditElement}
-		 */
-		parseFromPosition: function(content, pos, isBackward) {
-			var bounds = this.extractTag(content, pos, isBackward);
-			if (!bounds || !bounds.inside(pos))
-				// no matching HTML tag or caret outside tag bounds
-				return null;
-			
-			return this.parse(bounds.substring(content), {
-				offset: bounds.start
-			});
-		},
-		
-		/**
-		 * Extracts nearest HTML tag range from <code>content</code>, starting at 
-		 * <code>pos</code> position
-		 * @param {String} content
-		 * @param {Number} pos
-		 * @param {Boolean} isBackward
-		 * @returns {Range}
-		 */
-		extractTag: function(content, pos, isBackward) {
-			var len = content.length, i;
-			
-			// max extraction length. I don't think there may be tags larger 
-			// than 2000 characters length
-			var maxLen = Math.min(2000, len);
-			
-			/** @type Range */
-			var r = null;
-			
-			var match = function(pos) {
-				var m;
-				if (content.charAt(pos) == '<' && (m = content.substr(pos, maxLen).match(startTag)))
-					return range.create(pos, m[0]);
-			};
-			
-			// lookup backward, in case we are inside tag already
-			for (i = pos; i >= 0; i--) {
-				if ((r = match(i))) break;
-			}
-			
-			if (r && (r.inside(pos) || isBackward))
-				return r;
-			
-			if (!r && isBackward)
-				return null;
-			
-			// search forward
-			for (i = pos; i < len; i++) {
-				if ((r = match(i)))
-					return r;
-			}
-		}
-	};
-});
-},{"../assets/range":30,"../parser/xml":62,"../utils/common":73,"./base":36}],39:[function(require,module,exports){
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var global = typeof self != 'undefined' ? self : this;
-
-	var utils = require('./utils/common');
-	var actions = require('./action/main');
-	var parser = require('./parser/abbreviation');
-	var file = require('./plugin/file');
-
-	var preferences = require('./assets/preferences');
-	var resources = require('./assets/resources');
-	var profile = require('./assets/profile');
-	var ciu = require('./assets/caniuse');
-	var logger = require('./assets/logger');
-
-	var sliceFn = Array.prototype.slice;
-
-	/**
-	 * Returns file name part from path
-	 * @param {String} path Path to file
-	 * @return {String}
-	 */
-	function getFileName(path) {
-		var re = /([\w\.\-]+)$/i;
-		var m = re.exec(path);
-		return m ? m[1] : '';
-	}
-
-	/**
-	 * Normalizes profile definition: converts some
-	 * properties to valid data types
-	 * @param {Object} profile
-	 * @return {Object}
-	 */
-	function normalizeProfile(profile) {
-		if (typeof profile === 'object') {
-			if ('indent' in profile) {
-				profile.indent = !!profile.indent;
-			}
-
-			if ('self_closing_tag' in profile) {
-				if (typeof profile.self_closing_tag === 'number') {
-					profile.self_closing_tag = !!profile.self_closing_tag;
-				}
-			}
-		}
-
-		return profile;
-	}
-	
-	return {
-		/**
-		 * The essential function that expands Emmet abbreviation
-		 * @param {String} abbr Abbreviation to parse
-		 * @param {String} syntax Abbreviation's context syntax
-		 * @param {String} profile Output profile (or its name)
-		 * @param {Object} contextNode Contextual node where abbreviation is
-		 * written
-		 * @return {String}
-		 */
-		expandAbbreviation: function(abbr, syntax, profile, contextNode) {
-			return parser.expand(abbr, {
-				syntax: syntax,
-				profile: profile,
-				contextNode: contextNode
-			});
-		},
-
-		/**
-		 * Runs given action
-		 * @param  {String} name Action name
-		 * @param  {IEmmetEditor} editor Editor instance
-		 * @return {Boolean} Returns true if action was performed successfully
-		 */
-		run: function(name) {
-			return actions.run.apply(actions, sliceFn.call(arguments, 0));
-		},
-
-		/**
-		 * Loads Emmet extensions. Extensions are simple .js files that
-		 * uses Emmet modules and resources to create new actions, modify
-		 * existing ones etc.
-		 * @param {Array} fileList List of absolute paths to files in extensions 
-		 * folder. Back-end app should not filter this list (e.g. by extension) 
-		 * but return it "as-is" so bootstrap can decide how to load contents 
-		 * of each file.
-		 * This method requires a <code>file</code> module of <code>IEmmetFile</code> 
-		 * interface to be implemented.
-		 * @memberOf bootstrap
-		 */
-		loadExtensions: function(fileList) {
-			var payload = {};
-			var userSnippets = null;
-			var that = this;
-
-			// make sure file list contians only valid extension files
-			fileList = fileList.filter(function(f) {
-				var ext = file.getExt(f);
-				return ext === 'json' || ext === 'js';
-			});
-
-			var reader = (file.readText || file.read).bind(file);
-			var next = function() {
-				if (fileList.length) {
-					var f = fileList.shift();
-					reader(f, function(err, content) {
-						if (err) {
-							logger.log('Unable to read "' + f + '" file: '+ err);
-							return next();
-						}
-												
-						switch (file.getExt(f)) {
-							case 'js':
-								try {
-									eval(content);
-								} catch (e) {
-									logger.log('Unable to eval "' + f + '" file: '+ e);
-								}
-								break;
-							case 'json':
-								var fileName = getFileName(f).toLowerCase().replace(/\.json$/, '');
-								if (/^snippets/.test(fileName)) {
-									if (fileName === 'snippets') {
-										// data in snippets.json is more important to user
-										userSnippets = utils.parseJSON(content);
-									} else {
-										payload.snippets = utils.deepMerge(payload.snippets || {}, utils.parseJSON(content));
-									}
-								} else {
-									payload[fileName] = content;
-								}
-								
-								break;
-						}
-						
-						next();
-					});
-				} else {
-					// complete
-					if (userSnippets) {
-						payload.snippets = utils.deepMerge(payload.snippets || {}, userSnippets);
-					}
-					
-					that.loadUserData(payload);
-				}
-			};
-			
-			next();
-		},
-		
-		/**
-		 * Loads preferences from JSON object (or string representation of JSON)
-		 * @param {Object} data
-		 * @returns
-		 */
-		loadPreferences: function(data) {
-			preferences.load(utils.parseJSON(data));
-		},
-		
-		/**
-		 * Loads user snippets and abbreviations. It doesn’t replace current
-		 * user resource vocabulary but merges it with passed one. If you need 
-		 * to <i>replaces</i> user snippets you should call 
-		 * <code>resetSnippets()</code> method first
-		 */
-		loadSnippets: function(data) {
-			data = utils.parseJSON(data);
-			
-			var userData = resources.getVocabulary('user') || {};
-			resources.setVocabulary(utils.deepMerge(userData, data), 'user');
-		},
-		
-		/**
-		 * Helper function that loads default snippets, defined in project’s
-		 * <i>snippets.json</i>
-		 * @param {Object} data
-		 */
-		loadSystemSnippets: function(data) {
-			resources.setVocabulary(utils.parseJSON(data), 'system');
-		},
-
-		/**
-		 * Helper function that loads Can I Use database
-		 * @param {Object} data
-		 */
-		loadCIU: function(data) {
-			ciu.load(utils.parseJSON(data));
-		},
-		
-		/**
-		 * Removes all user-defined snippets
-		 */
-		resetSnippets: function() {
-			resources.setVocabulary({}, 'user');
-		},
-		
-		/**
-		 * Helper function that loads all user data (snippets and preferences)
-		 * defined as a single JSON object. This is useful for loading data 
-		 * stored in a common storage, for example <code>NSUserDefaults</code>
-		 * @param {Object} data
-		 */
-		loadUserData: function(data) {
-			data = utils.parseJSON(data);
-			if (data.snippets) {
-				this.loadSnippets(data.snippets);
-			}
-			
-			if (data.preferences) {
-				this.loadPreferences(data.preferences);
-			}
-			
-			if (data.profiles) {
-				this.loadProfiles(data.profiles);
-			}
-
-			if (data.caniuse) {
-				this.loadCIU(data.caniuse);
-			}
-			
-			var profiles = data.syntaxProfiles || data.syntaxprofiles;
-			if (profiles) {
-				this.loadSyntaxProfiles(profiles);
-			}
-		},
-		
-		/**
-		 * Resets all user-defined data: preferences, snippets etc.
-		 * @returns
-		 */
-		resetUserData: function() {
-			this.resetSnippets();
-			preferences.reset();
-			profile.reset();
-		},
-		
-		/**
-		 * Load syntax-specific output profiles. These are essentially 
-		 * an extension to syntax snippets 
-		 * @param {Object} profiles Dictionary of profiles
-		 */
-		loadSyntaxProfiles: function(profiles) {
-			profiles = utils.parseJSON(profiles);
-			var snippets = {};
-			Object.keys(profiles).forEach(function(syntax) {
-				var options = profiles[syntax];
-				if (!(syntax in snippets)) {
-					snippets[syntax] = {};
-				}
-				snippets[syntax].profile = normalizeProfile(options);
-			});
-			
-			this.loadSnippets(snippets);
-		},
-		
-		/**
-		 * Load named profiles
-		 * @param {Object} profiles
-		 */
-		loadProfiles: function(profiles) {
-			profiles = utils.parseJSON(profiles);
-			Object.keys(profiles).forEach(function(name) {
-				profile.create(name, normalizeProfile(profiles[name]));
-			});
-		},
-		require: require,
-
-		// expose some useful data for plugin authors
-		actions: actions,
-		file: file,
-		preferences: preferences,
-		resources: resources,
-		profile: profile,
-		tabStops: require('./assets/tabStops'),
-		htmlMatcher: require('./assets/htmlMatcher'),
-		utils: {
-			common: utils,
-			action: require('./utils/action'),
-			editor: require('./utils/editor')
-		}
-	};
-});
-},{"./action/main":12,"./assets/caniuse":23,"./assets/htmlMatcher":26,"./assets/logger":27,"./assets/preferences":28,"./assets/profile":29,"./assets/resources":31,"./assets/tabStops":33,"./parser/abbreviation":55,"./plugin/file":63,"./utils/action":70,"./utils/common":73,"./utils/editor":75}],40:[function(require,module,exports){
-/**
- * Filter for aiding of writing elements with complex class names as described
- * in Yandex's BEM (Block, Element, Modifier) methodology. This filter will
- * automatically inherit block and element names from parent elements and insert
- * them into child element classes
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var htmlFilter = require('./html');
-	var prefs = require('../assets/preferences');
-	var abbreviationUtils = require('../utils/abbreviation');
-	var utils = require('../utils/common');
-
-	prefs.define('bem.elementSeparator', '__', 'Class name’s element separator.');
-	prefs.define('bem.modifierSeparator', '_', 'Class name’s modifier separator.');
-	prefs.define('bem.shortElementPrefix', '-', 
-			'Symbol for describing short “block-element” notation. Class names '
-			+ 'prefixed with this symbol will be treated as element name for parent‘s '
-			+ 'block name. Each symbol instance traverses one level up in parsed ' 
-			+ 'tree for block name lookup. Empty value will disable short notation.');
-	
-	var shouldRunHtmlFilter = false;
-	
-	function getSeparators() {
-		return {
-			element: prefs.get('bem.elementSeparator'),
-			modifier: prefs.get('bem.modifierSeparator')
-		};
-	}
-
-	/**
-	 * @param {AbbreviationNode} item
-	 */
-	function bemParse(item) {
-		if (abbreviationUtils.isSnippet(item))
-			return item;
-		
-		// save BEM stuff in cache for faster lookups
-		item.__bem = {
-			block: '',
-			element: '',
-			modifier: ''
-		};
-		
-		var classNames = normalizeClassName(item.attribute('class')).split(' ');
-		
-		// guess best match for block name
-		var reBlockName = /^[a-z]\-/i;
-		item.__bem.block = utils.find(classNames, function(name) {
-			return reBlockName.test(name);
-		});
-		
-		// guessing doesn't worked, pick first class name as block name
-		if (!item.__bem.block) {
-			reBlockName = /^[a-z]/i;
-			item.__bem.block = utils.find(classNames, function(name) {
-				return reBlockName.test(name);
-			}) || '';
-		}
-
-		classNames = classNames.map(function(name) {
-			return processClassName(name, item);
-		});
-
-		classNames = utils.unique(utils.flatten(classNames)).join(' ');
-		if (classNames) {
-			item.attribute('class', classNames);
-		}
-		
-		return item;
-	}
-	
-	/**
-	 * @param {String} className
-	 * @returns {String}
-	 */
-	function normalizeClassName(className) {
-		className = (' ' + (className || '') + ' ').replace(/\s+/g, ' ');
-		
-		var shortSymbol = prefs.get('bem.shortElementPrefix');
-		if (shortSymbol) {
-			var re = new RegExp('\\s(' + utils.escapeForRegexp(shortSymbol) + '+)', 'g');
-			className = className.replace(re, function(str, p1) {
-				return ' ' + utils.repeatString(getSeparators().element, p1.length);
-			});
-		}
-		
-		return utils.trim(className);
-	}
-	
-	/**
-	 * Processes class name
-	 * @param {String} name Class name item to process
-	 * @param {AbbreviationNode} item Host node for provided class name
-	 * @returns Processed class name. May return <code>Array</code> of
-	 * class names 
-	 */
-	function processClassName(name, item) {
-		name = transformClassName(name, item, 'element');
-		name = transformClassName(name, item, 'modifier');
-		
-		// expand class name
-		// possible values:
-		// * block__element
-		// * block__element_modifier
-		// * block__element_modifier1_modifier2
-		// * block_modifier
-		var block = '', element = '', modifier = '';
-		var separators = getSeparators();
-		if (~name.indexOf(separators.element)) {
-			var elements = name.split(separators.element);
-			block = elements.shift();
-
-			var modifiers = elements.pop().split(separators.modifier);
-			elements.push(modifiers.shift());
-			element = elements.join(separators.element);
-			modifier = modifiers.join(separators.modifier);
-		} else if (~name.indexOf(separators.modifier)) {
-			var blockModifiers = name.split(separators.modifier);
-			
-			block = blockModifiers.shift();
-			modifier = blockModifiers.join(separators.modifier);
-		}
-		
-		if (block || element || modifier) {
-			if (!block) {
-				block = item.__bem.block;
-			}
-			
-			// inherit parent bem element, if exists
-//			if (item.parent && item.parent.__bem && item.parent.__bem.element)
-//				element = item.parent.__bem.element + separators.element + element;
-			
-			// produce multiple classes
-			var prefix = block;
-			var result = [];
-			
-			if (element) {
-				prefix += separators.element + element;
-				result.push(prefix);
-			} else {
-				result.push(prefix);
-			}
-			
-			if (modifier) {
-				result.push(prefix + separators.modifier + modifier);
-			}
-			
-			item.__bem.block = block;
-			item.__bem.element = element;
-			item.__bem.modifier = modifier;
-			
-			return result;
-		}
-		
-		// ...otherwise, return processed or original class name
-		return name;
-	}
-	
-	/**
-	 * Low-level function to transform user-typed class name into full BEM class
-	 * @param {String} name Class name item to process
-	 * @param {AbbreviationNode} item Host node for provided class name
-	 * @param {String} entityType Type of entity to be tried to transform 
-	 * ('element' or 'modifier')
-	 * @returns {String} Processed class name or original one if it can't be
-	 * transformed
-	 */
-	function transformClassName(name, item, entityType) {
-		var separators = getSeparators();
-		var reSep = new RegExp('^(' + separators[entityType] + ')+', 'g');
-		if (reSep.test(name)) {
-			var depth = 0; // parent lookup depth
-			var cleanName = name.replace(reSep, function(str) {
-				depth = str.length / separators[entityType].length;
-				return '';
-			});
-			
-			// find donor element
-			var donor = item;
-			while (donor.parent && depth--) {
-				donor = donor.parent;
-			}
-			
-			if (!donor || !donor.__bem)
-				donor = item;
-			
-			if (donor && donor.__bem) {
-				var prefix = donor.__bem.block;
-				
-				// decide if we should inherit element name
-//				if (entityType == 'element') {
-//					var curElem = cleanName.split(separators.modifier, 1)[0];
-//					if (donor.__bem.element && donor.__bem.element != curElem)
-//						prefix += separators.element + donor.__bem.element;
-//				}
-				
-				if (entityType == 'modifier' &&  donor.__bem.element)
-					prefix += separators.element + donor.__bem.element;
-				
-				return prefix + separators[entityType] + cleanName;
-			}
-		}
-		
-		return name;
-	}
-	
-	/**
-	 * Recursive function for processing tags, which extends class names 
-	 * according to BEM specs: http://bem.github.com/bem-method/pages/beginning/beginning.ru.html
-	 * <br><br>
-	 * It does several things:<br>
-	 * <ul>
-	 * <li>Expands complex class name (according to BEM symbol semantics):
-	 * .block__elem_modifier → .block.block__elem.block__elem_modifier
-	 * </li>
-	 * <li>Inherits block name on child elements: 
-	 * .b-block > .__el > .__el → .b-block > .b-block__el > .b-block__el__el
-	 * </li>
-	 * <li>Treats first dash symbol as '__'</li>
-	 * <li>Double underscore (or typographic '–') is also treated as an element 
-	 * level lookup, e.g. ____el will search for element definition in parent’s 
-	 * parent element:
-	 * .b-block > .__el1 > .____el2 → .b-block > .b-block__el1 > .b-block__el2
-	 * </li>
-	 * </ul>
-	 * 
-	 * @param {AbbreviationNode} tree
-	 * @param {Object} profile
-	 */
-	function process(tree, profile) {
-		if (tree.name) {
-			bemParse(tree, profile);
-		}
-		
-		tree.children.forEach(function(item) {
-			process(item, profile);
-			if (!abbreviationUtils.isSnippet(item) && item.start) {
-				shouldRunHtmlFilter = true;
-			}
-		});
-		
-		return tree;
-	}
-
-	return function(tree, profile) {
-		shouldRunHtmlFilter = false;
-		tree = process(tree, profile);
-		// in case 'bem' filter is applied after 'html' filter: run it again
-		// to update output
-		if (shouldRunHtmlFilter) {
-			tree = htmlFilter(tree, profile);
-		}
-		
-		return tree;
-	};
-});
-},{"../assets/preferences":28,"../utils/abbreviation":69,"../utils/common":73,"./html":46}],41:[function(require,module,exports){
-/**
- * Comment important tags (with 'id' and 'class' attributes)
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var prefs = require('../assets/preferences');
-	var utils = require('../utils/common');
-	var template = require('../utils/template');
-	var abbrUtils = require('../utils/abbreviation');
-	var filterCore = require('./main');
-	
-	prefs.define('filter.commentAfter', 
-			'\n<!-- /<%= attr("id", "#") %><%= attr("class", ".") %> -->',
-			'A definition of comment that should be placed <i>after</i> matched '
-			+ 'element when <code>comment</code> filter is applied. This definition '
-			+ 'is an ERB-style template passed to <code>_.template()</code> '
-			+ 'function (see Underscore.js docs for details). In template context, '
-			+ 'the following properties and functions are availabe:\n'
-			+ '<ul>'
-			
-			+ '<li><code>attr(name, before, after)</code> – a function that outputs' 
-			+ 'specified attribute value concatenated with <code>before</code> ' 
-			+ 'and <code>after</code> strings. If attribute doesn\'t exists, the ' 
-			+ 'empty string will be returned.</li>'
-			
-			+ '<li><code>node</code> – current node (instance of <code>AbbreviationNode</code>)</li>'
-			
-			+ '<li><code>name</code> – name of current tag</li>'
-			
-			+ '<li><code>padding</code> – current string padding, can be used ' 
-			+ 'for formatting</li>'
-			
-			+'</ul>');
-	
-	prefs.define('filter.commentBefore', 
-			'',
-			'A definition of comment that should be placed <i>before</i> matched '
-			+ 'element when <code>comment</code> filter is applied. '
-			+ 'For more info, read description of <code>filter.commentAfter</code> '
-			+ 'property');
-	
-	prefs.define('filter.commentTrigger', 'id, class',
-			'A comma-separated list of attribute names that should exist in abbreviatoin '
-			+ 'where comment should be added. If you wish to add comment for '
-			+ 'every element, set this option to <code>*</code>');
-	
-	/**
-	 * Add comments to tag
-	 * @param {AbbreviationNode} node
-	 */
-	function addComments(node, templateBefore, templateAfter) {
-		// check if comments should be added
-		var trigger = prefs.get('filter.commentTrigger');
-		if (trigger != '*') {
-			var shouldAdd = utils.find(trigger.split(','), function(name) {
-				return !!node.attribute(utils.trim(name));
-			});
-
-			if (!shouldAdd) {
-				return;
-			}
-		}
-		
-		var ctx = {
-			node: node,
-			name: node.name(),
-			padding: node.parent ? node.parent.padding : '',
-			attr: function(name, before, after) {
-				var attr = node.attribute(name);
-				if (attr) {
-					return (before || '') + attr + (after || '');
-				}
-				
-				return '';
-			}
-		};
-		
-		var nodeBefore = templateBefore ? templateBefore(ctx) : '';
-		var nodeAfter = templateAfter ? templateAfter(ctx) : '';
-		
-		node.start = node.start.replace(/</, nodeBefore + '<');
-		node.end = node.end.replace(/>/, '>' + nodeAfter);
-	}
-	
-	function process(tree, before, after) {
-		tree.children.forEach(function(item) {
-			if (abbrUtils.isBlock(item)) {
-				addComments(item, before, after);
-			}
-			
-			process(item, before, after);
-		});
-			
-		return tree;
-	}
-
-	return function(tree) {
-		var templateBefore = template(prefs.get('filter.commentBefore'));
-		var templateAfter = template(prefs.get('filter.commentAfter'));
-		
-		return process(tree, templateBefore, templateAfter);
-	};
-});
-
-},{"../assets/preferences":28,"../utils/abbreviation":69,"../utils/common":73,"../utils/template":77,"./main":49}],42:[function(require,module,exports){
-/**
- * Filter for outputting CSS and alike
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	/**
-	 * Test if passed item is very first child in parsed tree
-	 * @param {AbbreviationNode} item
-	 */
-	function isVeryFirstChild(item) {
-		return item.parent && !item.parent.parent && !item.index();
-	}
-
-	return function process(tree, profile, level) {
-		level = level || 0;
-		
-		tree.children.forEach(function(item) {
-			if (!isVeryFirstChild(item) && profile.tag_nl !== false) {
-				item.start = '\n' + item.start;
-			}
-			process(item, profile, level + 1);
-		});
-		
-		return tree;
-	};
-});
-},{}],43:[function(require,module,exports){
-/**
- * Filter for escaping unsafe XML characters: <, >, &
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var charMap = {
-		'<': '&lt;',
-		'>': '&gt;',
-		'&': '&amp;'
-	};
-	
-	function escapeChars(str) {
-		return str.replace(/([<>&])/g, function(str, p1){
-			return charMap[p1];
-		});
-	}
-	
-	return function process(tree) {
-		tree.children.forEach(function(item) {
-			item.start = escapeChars(item.start);
-			item.end = escapeChars(item.end);
-			item.content = escapeChars(item.content);
-			process(item);
-		});
-		
-		return tree;
-	};
-});
-},{}],44:[function(require,module,exports){
-/**
- * Generic formatting filter: creates proper indentation for each tree node,
- * placing "%s" placeholder where the actual output should be. You can use
- * this filter to preformat tree and then replace %s placeholder to whatever you
- * need. This filter should't be called directly from editor as a part 
- * of abbreviation.
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('../utils/common');
-	var abbrUtils = require('../utils/abbreviation');
-	var prefs = require('../assets/preferences');
-	var resources = require('../assets/resources');
-
-	prefs.define('format.noIndentTags', 'html', 
-			'A comma-separated list of tag names that should not get inner indentation.');
-	
-	prefs.define('format.forceIndentationForTags', 'body', 
-		'A comma-separated list of tag names that should <em>always</em> get inner indentation.');
-
-	var placeholder = '%s';
-	
-	/**
-	 * Get indentation for given node
-	 * @param {AbbreviationNode} node
-	 * @returns {String}
-	 */
-	function getIndentation(node) {
-		var items = prefs.getArray('format.noIndentTags') || [];
-		if (~items.indexOf(node.name())) {
-			return '';
-		}
-		
-		return '\t';
-	}
-	
-	/**
-	 * Test if passed node has block-level sibling element
-	 * @param {AbbreviationNode} item
-	 * @return {Boolean}
-	 */
-	function hasBlockSibling(item) {
-		return item.parent && abbrUtils.hasBlockChildren(item.parent);
-	}
-	
-	/**
-	 * Test if passed item is very first child in parsed tree
-	 * @param {AbbreviationNode} item
-	 */
-	function isVeryFirstChild(item) {
-		return item.parent && !item.parent.parent && !item.index();
-	}
-	
-	/**
-	 * Check if a newline should be added before element
-	 * @param {AbbreviationNode} node
-	 * @param {OutputProfile} profile
-	 * @return {Boolean}
-	 */
-	function shouldAddLineBreak(node, profile) {
-		if (profile.tag_nl === true || abbrUtils.isBlock(node))
-			return true;
-		
-		if (!node.parent || !profile.inline_break)
-			return false;
-		
-		// check if there are required amount of adjacent inline element
-		return shouldFormatInline(node.parent, profile);
-}
-	
-	/**
-	 * Need to add newline because <code>item</code> has too many inline children
-	 * @param {AbbreviationNode} node
-	 * @param {OutputProfile} profile
-	 */
-	function shouldBreakChild(node, profile) {
-		// we need to test only one child element, because 
-		// hasBlockChildren() method will do the rest
-		return node.children.length && shouldAddLineBreak(node.children[0], profile);
-	}
-	
-	function shouldFormatInline(node, profile) {
-		var nodeCount = 0;
-		return !!utils.find(node.children, function(child) {
-			if (child.isTextNode() || !abbrUtils.isInline(child))
-				nodeCount = 0;
-			else if (abbrUtils.isInline(child))
-				nodeCount++;
-			
-			if (nodeCount >= profile.inline_break)
-				return true;
-		});
-	}
-	
-	function isRoot(item) {
-		return !item.parent;
-	}
-	
-	/**
-	 * Processes element with matched resource of type <code>snippet</code>
-	 * @param {AbbreviationNode} item
-	 * @param {OutputProfile} profile
-	 */
-	function processSnippet(item, profile) {
-		item.start = item.end = '';
-		if (!isVeryFirstChild(item) && profile.tag_nl !== false && shouldAddLineBreak(item, profile)) {
-			// check if we’re not inside inline element
-			if (isRoot(item.parent) || !abbrUtils.isInline(item.parent)) {
-				item.start = '\n' + item.start;
-			}
-		}
-		
-		return item;
-	}
-	
-	/**
-	 * Check if we should add line breaks inside inline element
-	 * @param {AbbreviationNode} node
-	 * @param {OutputProfile} profile
-	 * @return {Boolean}
-	 */
-	function shouldBreakInsideInline(node, profile) {
-		var hasBlockElems = node.children.some(function(child) {
-			if (abbrUtils.isSnippet(child))
-				return false;
-			
-			return !abbrUtils.isInline(child);
-		});
-		
-		if (!hasBlockElems) {
-			return shouldFormatInline(node, profile);
-		}
-		
-		return true;
-	}
-	
-	/**
-	 * Processes element with <code>tag</code> type
-	 * @param {AbbreviationNode} item
-	 * @param {OutputProfile} profile
-	 */
-	function processTag(item, profile) {
-		item.start = item.end = placeholder;
-		var isUnary = abbrUtils.isUnary(item);
-		var nl = '\n';
-		var indent = getIndentation(item);
-			
-		// formatting output
-		if (profile.tag_nl !== false) {
-			var forceNl = profile.tag_nl === true && (profile.tag_nl_leaf || item.children.length);
-			if (!forceNl) {
-				var forceIndentTags = prefs.getArray('format.forceIndentationForTags') || [];
-				forceNl = ~forceIndentTags.indexOf(item.name());
-			}
-			
-			// formatting block-level elements
-			if (!item.isTextNode()) {
-				if (shouldAddLineBreak(item, profile)) {
-					// - do not indent the very first element
-					// - do not indent first child of a snippet
-					if (!isVeryFirstChild(item) && (!abbrUtils.isSnippet(item.parent) || item.index()))
-						item.start = nl + item.start;
-						
-					if (abbrUtils.hasBlockChildren(item) || shouldBreakChild(item, profile) || (forceNl && !isUnary))
-						item.end = nl + item.end;
-						
-					if (abbrUtils.hasTagsInContent(item) || (forceNl && !item.children.length && !isUnary))
-						item.start += nl + indent;
-				} else if (abbrUtils.isInline(item) && hasBlockSibling(item) && !isVeryFirstChild(item)) {
-					item.start = nl + item.start;
-				} else if (abbrUtils.isInline(item) && shouldBreakInsideInline(item, profile)) {
-					item.end = nl + item.end;
-				}
-				
-				item.padding = indent;
-			}
-		}
-		
-		return item;
-	}
-
-	/**
-	 * Processes simplified tree, making it suitable for output as HTML structure
-	 * @param {AbbreviationNode} tree
-	 * @param {OutputProfile} profile
-	 * @param {Number} level Depth level
-	 */
-	return function process(tree, profile, level) {
-		level = level || 0;
-	
-		tree.children.forEach(function(item) {
-			if (abbrUtils.isSnippet(item)) {
-				processSnippet(item, profile, level);
-			} else {
-				processTag(item, profile, level);
-			}
-			
-			process(item, profile, level + 1);
-		});
-		
-		return tree;
-	};
-});
-},{"../assets/preferences":28,"../assets/resources":31,"../utils/abbreviation":69,"../utils/common":73}],45:[function(require,module,exports){
-/**
- * Filter for producing HAML code from abbreviation.
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('../utils/common');
-	var abbrUtils = require('../utils/abbreviation');
-	var formatFilter = require('./format');
-
-	function transformClassName(className) {
-		return utils.trim(className).replace(/\s+/g, '.');
-	}
-
-	/**
-	 * Condenses all "data-" attributes into a single entry.
-	 * HAML allows data attributes to be ouputted as a sub-hash
-	 * of `:data` key
-	 * @param  {Array} attrs
-	 * @return {Array}
-	 */
-	function condenseDataAttrs(attrs) {
-		var out = [], data = null;
-		var reData = /^data-/i;
-		attrs.forEach(function(attr) {
-			if (reData.test(attr.name)) {
-				if (!data) {
-					data = [];
-					out.push({
-						name: 'data',
-						value: data
-					});
-				}
-
-				data.push(utils.extend({}, attr, {name: attr.name.replace(reData, '')}));
-			} else {
-				out.push(attr);
-			}
-		});
-
-		return out;
-	}
-
-	function stringifyAttrs(attrs, profile) {
-		var attrQuote = profile.attributeQuote();
-		return '{' + attrs.map(function(attr) {
-			var value = attrQuote + attr.value + attrQuote;
-			if (Array.isArray(attr.value)) {
-				value = stringifyAttrs(attr.value, profile);
-			} else if (attr.isBoolean) {
-				value = 'true';
-			}
-
-			return ':' + attr.name + ' => ' + value
-		}).join(', ') + '}';
-	}
-	
-	/**
-	 * Creates HAML attributes string from tag according to profile settings
-	 * @param {AbbreviationNode} tag
-	 * @param {Object} profile
-	 */
-	function makeAttributesString(tag, profile) {
-		var attrs = '';
-		var otherAttrs = [];
-		var attrQuote = profile.attributeQuote();
-		var cursor = profile.cursor();
-		
-		tag.attributeList().forEach(function(a) {
-			var attrName = profile.attributeName(a.name);
-			switch (attrName.toLowerCase()) {
-				// use short notation for ID and CLASS attributes
-				case 'id':
-					attrs += '#' + (a.value || cursor);
-					break;
-				case 'class':
-					attrs += '.' + transformClassName(a.value || cursor);
-					break;
-				// process other attributes
-				default:
-					otherAttrs.push({
-						name: attrName,
-						value: a.value || cursor,
-						isBoolean: profile.isBoolean(a.name, a.value)
-					});
-			}
-		});
-		
-		if (otherAttrs.length) {
-			attrs += stringifyAttrs(condenseDataAttrs(otherAttrs), profile);
-		}
-		
-		return attrs;
-	}
-	
-	/**
-	 * Processes element with <code>tag</code> type
-	 * @param {AbbreviationNode} item
-	 * @param {OutputProfile} profile
-	 */
-	function processTag(item, profile) {
-		if (!item.parent)
-			// looks like it's root element
-			return item;
-		
-		var attrs = makeAttributesString(item, profile);
-		var cursor = profile.cursor();
-		var isUnary = abbrUtils.isUnary(item);
-		var selfClosing = profile.self_closing_tag && isUnary ? '/' : '';
-		var start= '';
-			
-		// define tag name
-		var tagName = '%' + profile.tagName(item.name());
-		if (tagName.toLowerCase() == '%div' && attrs && attrs.indexOf('{') == -1)
-			// omit div tag
-			tagName = '';
-			
-		item.end = '';
-		start = tagName + attrs + selfClosing;
-		if (item.content && !/^\s/.test(item.content)) {
-			item.content = ' ' + item.content;
-		}
-		
-		var placeholder = '%s';
-		// We can't just replace placeholder with new value because
-		// JavaScript will treat double $ character as a single one, assuming
-		// we're using RegExp literal.
-		item.start = utils.replaceSubstring(item.start, start, item.start.indexOf(placeholder), placeholder);
-		
-		if (!item.children.length && !isUnary)
-			item.start += cursor;
-		
-		return item;
-	}
-
-	return function process(tree, profile, level) {
-		level = level || 0;
-		
-		if (!level) {
-			tree = formatFilter(tree, '_format', profile);
-		}
-		
-		tree.children.forEach(function(item) {
-			if (!abbrUtils.isSnippet(item)) {
-				processTag(item, profile, level);
-			}
-			
-			process(item, profile, level + 1);
-		});
-		
-		return tree;
-	};
-});
-},{"../utils/abbreviation":69,"../utils/common":73,"./format":44}],46:[function(require,module,exports){
-/**
- * Filter that produces HTML tree
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var abbrUtils = require('../utils/abbreviation');
-	var utils = require('../utils/common');
-	var tabStops = require('../assets/tabStops');
-	var formatFilter = require('./format');
-
-	/**
-	 * Creates HTML attributes string from tag according to profile settings
-	 * @param {AbbreviationNode} node
-	 * @param {OutputProfile} profile
-	 */
-	function makeAttributesString(node, profile) {
-		var attrQuote = profile.attributeQuote();
-		var cursor = profile.cursor();
-		
-		return node.attributeList().map(function(a) {
-			var isBoolean = profile.isBoolean(a.name, a.value);
-			var attrName = profile.attributeName(a.name);
-			var attrValue = isBoolean ? attrName : a.value;
-			if (isBoolean && profile.allowCompactBoolean()) {
-				return ' ' + attrName;
-			}
-			return ' ' + attrName + '=' + attrQuote + (attrValue || cursor) + attrQuote;
-		}).join('');
-	}
-	
-	/**
-	 * Processes element with <code>tag</code> type
-	 * @param {AbbreviationNode} item
-	 * @param {OutputProfile} profile
-	 */
-	function processTag(item, profile) {
-		if (!item.parent) { // looks like it's root element
-			return item;
-		}
-		
-		var attrs = makeAttributesString(item, profile); 
-		var cursor = profile.cursor();
-		var isUnary = abbrUtils.isUnary(item);
-		var start = '';
-		var end = '';
-			
-		// define opening and closing tags
-		if (!item.isTextNode()) {
-			var tagName = profile.tagName(item.name());
-			if (isUnary) {
-				start = '<' + tagName + attrs + profile.selfClosing() + '>';
-				item.end = '';
-			} else {
-				start = '<' + tagName + attrs + '>';
-				end = '</' + tagName + '>';
-			}
-		}
-		
-		var placeholder = '%s';
-		// We can't just replace placeholder with new value because
-		// JavaScript will treat double $ character as a single one, assuming
-		// we're using RegExp literal.
-		item.start = utils.replaceSubstring(item.start, start, item.start.indexOf(placeholder), placeholder);
-		item.end = utils.replaceSubstring(item.end, end, item.end.indexOf(placeholder), placeholder);
-		
-		// should we put caret placeholder after opening tag?
-		if (
-				!item.children.length 
-				&& !isUnary 
-				&& !~item.content.indexOf(cursor)
-				&& !tabStops.extract(item.content).tabstops.length
-			) {
-			item.start += cursor;
-		}
-		
-		return item;
-	}
-
-	return function process(tree, profile, level) {
-		level = level || 0;
-		
-		if (!level) {
-			tree = formatFilter(tree, profile, level)
-		}
-		
-		tree.children.forEach(function(item) {
-			if (!abbrUtils.isSnippet(item)) {
-				processTag(item, profile, level);
-			}
-			
-			process(item, profile, level + 1);
-		});
-		
-		return tree;
-	};
-});
-},{"../assets/tabStops":33,"../utils/abbreviation":69,"../utils/common":73,"./format":44}],47:[function(require,module,exports){
-/**
- * Filter for producing Jade code from abbreviation.
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('../utils/common');
-	var abbrUtils = require('../utils/abbreviation');
-	var formatFilter = require('./format');
-	var tabStops = require('../assets/tabStops');
-	var profile = require('../assets/profile');
-
-	var reNl = /[\n\r]/;
-	var reIndentedText = /^\s*\|/;
-	var reSpace = /^\s/;
-
-	function transformClassName(className) {
-		return utils.trim(className).replace(/\s+/g, '.');
-	}
-
-	function stringifyAttrs(attrs, profile) {
-		var attrQuote = profile.attributeQuote();
-		return '(' + attrs.map(function(attr) {
-			if (attr.isBoolean) {
-				return attr.name;
-			}
-
-			return attr.name + '=' + attrQuote + attr.value + attrQuote;
-		}).join(', ') + ')';
-	}
-	
-	/**
-	 * Creates HAML attributes string from tag according to profile settings
-	 * @param {AbbreviationNode} tag
-	 * @param {Object} profile
-	 */
-	function makeAttributesString(tag, profile) {
-		var attrs = '';
-		var otherAttrs = [];
-		var attrQuote = profile.attributeQuote();
-		var cursor = profile.cursor();
-		
-		tag.attributeList().forEach(function(a) {
-			var attrName = profile.attributeName(a.name);
-			switch (attrName.toLowerCase()) {
-				// use short notation for ID and CLASS attributes
-				case 'id':
-					attrs += '#' + (a.value || cursor);
-					break;
-				case 'class':
-					attrs += '.' + transformClassName(a.value || cursor);
-					break;
-				// process other attributes
-				default:
-					otherAttrs.push({
-						name: attrName,
-						value: a.value || cursor,
-						isBoolean: profile.isBoolean(a.name, a.value)
-					});
-			}
-		});
-		
-		if (otherAttrs.length) {
-			attrs += stringifyAttrs(otherAttrs, profile);
-		}
-		
-		return attrs;
-	}
-
-	function processTagContent(item) {
-		if (!item.content) {
-			return;
-		}
-
-		var content = tabStops.replaceVariables(item.content, function(str, name) {
-			if (name === 'nl' || name === 'newline') {
-				return '\n';
-			}
-			return str;
-		});
-
-		if (reNl.test(content) && !reIndentedText.test(content)) {
-			// multiline content: pad it with indentation and pipe
-			var pad = '| ';
-			item.content = '\n' + pad + utils.padString(content, pad);
-		} else if (!reSpace.test(content)) {
-			item.content = ' ' + content;
-		}
-	}
-	
-	/**
-	 * Processes element with <code>tag</code> type
-	 * @param {AbbreviationNode} item
-	 * @param {OutputProfile} profile
-	 */
-	function processTag(item, profile) {
-		if (!item.parent)
-			// looks like it's a root (empty) element
-			return item;
-		
-		var attrs = makeAttributesString(item, profile);
-		var cursor = profile.cursor();
-		var isUnary = abbrUtils.isUnary(item);
-			
-		// define tag name
-		var tagName = profile.tagName(item.name());
-		if (tagName.toLowerCase() == 'div' && attrs && attrs.charAt(0) != '(')
-			// omit div tag
-			tagName = '';
-			
-		item.end = '';
-		var start = tagName + attrs;
-		processTagContent(item);
-
-		var placeholder = '%s';
-		// We can't just replace placeholder with new value because
-		// JavaScript will treat double $ character as a single one, assuming
-		// we're using RegExp literal.
-		item.start = utils.replaceSubstring(item.start, start, item.start.indexOf(placeholder), placeholder);
-		
-		if (!item.children.length && !isUnary)
-			item.start += cursor;
-		
-		return item;
-	}
-
-	return function process(tree, curProfile, level) {
-		level = level || 0;
-		
-		if (!level) {
-			// always format with `xml` profile since
-			// Jade requires all tags to be on separate lines
-			tree = formatFilter(tree, profile.get('xml'));
-		}
-		
-		tree.children.forEach(function(item) {
-			if (!abbrUtils.isSnippet(item)) {
-				processTag(item, curProfile, level);
-			}
-			
-			process(item, curProfile, level + 1);
-		});
-		
-		return tree;
-	};
-});
-},{"../assets/profile":29,"../assets/tabStops":33,"../utils/abbreviation":69,"../utils/common":73,"./format":44}],48:[function(require,module,exports){
-/**
- * A filter for React.js (JSX):
- * ranames attributes like `class` and `for`
- * for proper representation in JSX
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var attrMap = {
-		'class': 'className',
-		'for': 'htmlFor'
-	};
-
-	return function process(tree) {
-		tree.children.forEach(function(item) {
-			item._attributes.forEach(function(attr) {
-				if (attr.name in attrMap) {
-					attr.name = attrMap[attr.name]
-				}
-			});
-			process(item);
-		});
-
-		return tree;
-	};
-});
-},{}],49:[function(require,module,exports){
-/**
- * Module for handling filters
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('../utils/common');
-	var profile = require('../assets/profile');
-	var resources = require('../assets/resources');
-
-	/** List of registered filters */
-	var registeredFilters = {
-		html: require('./html'),
-		haml: require('./haml'),
-		jade: require('./jade'),
-		jsx: require('./jsx'),
-		slim: require('./slim'),
-		xsl: require('./xsl'),
-		css: require('./css'),
-		bem: require('./bem'),
-		c: require('./comment'),
-		e: require('./escape'),
-		s: require('./singleLine'),
-		t: require('./trim')
-	};
-	
-	/** Filters that will be applied for unknown syntax */
-	var basicFilters = 'html';
-	
-	function list(filters) {
-		if (!filters)
-			return [];
-		
-		if (typeof filters === 'string') {
-			return filters.split(/[\|,]/g);
-		}
-		
-		return filters;
-	}
-	
-	return  {
-		/**
-		 * Register new filter
-		 * @param {String} name Filter name
-		 * @param {Function} fn Filter function
-		 */
-		add: function(name, fn) {
-			registeredFilters[name] = fn;
-		},
-		
-		/**
-		 * Apply filters for final output tree
-		 * @param {AbbreviationNode} tree Output tree
-		 * @param {Array} filters List of filters to apply. Might be a 
-		 * <code>String</code>
-		 * @param {Object} profile Output profile, defined in <i>profile</i> 
-		 * module. Filters defined it profile are not used, <code>profile</code>
-		 * is passed to filter function
-		 * @memberOf emmet.filters
-		 * @returns {AbbreviationNode}
-		 */
-		apply: function(tree, filters, profileName) {
-			profileName = profile.get(profileName);
-			
-			list(filters).forEach(function(filter) {
-				var name = utils.trim(filter.toLowerCase());
-				if (name && name in registeredFilters) {
-					tree = registeredFilters[name](tree, profileName);
-				}
-			});
-			
-			return tree;
-		},
-		
-		/**
-		 * Composes list of filters that should be applied to a tree, based on 
-		 * passed data
-		 * @param {String} syntax Syntax name ('html', 'css', etc.)
-		 * @param {Object} profile Output profile
-		 * @param {String} additionalFilters List or pipe-separated
-		 * string of additional filters to apply
-		 * @returns {Array}
-		 */
-		composeList: function(syntax, profileName, additionalFilters) {
-			profileName = profile.get(profileName);
-			var filters = list(profileName.filters || resources.findItem(syntax, 'filters') || basicFilters);
-			
-			if (profileName.extraFilters) {
-				filters = filters.concat(list(profileName.extraFilters));
-			}
-				
-			if (additionalFilters) {
-				filters = filters.concat(list(additionalFilters));
-			}
-				
-			if (!filters || !filters.length) {
-				// looks like unknown syntax, apply basic filters
-				filters = list(basicFilters);
-			}
-				
-			return filters;
-		},
-		
-		/**
-		 * Extracts filter list from abbreviation
-		 * @param {String} abbr
-		 * @returns {Array} Array with cleaned abbreviation and list of 
-		 * extracted filters
-		 */
-		extract: function(abbr) {
-			var filters = '';
-			abbr = abbr.replace(/\|([\w\|\-]+)$/, function(str, p1){
-				filters = p1;
-				return '';
-			});
-			
-			return [abbr, list(filters)];
-		}
-	};
-});
-},{"../assets/profile":29,"../assets/resources":31,"../utils/common":73,"./bem":40,"./comment":41,"./css":42,"./escape":43,"./haml":45,"./html":46,"./jade":47,"./jsx":48,"./singleLine":50,"./slim":51,"./trim":52,"./xsl":53}],50:[function(require,module,exports){
-/**
- * Output abbreviation on a single line (i.e. no line breaks)
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var abbrUtils = require('../utils/abbreviation');
-	var rePad = /^\s+/;
-	var reNl = /[\n\r]/g;
-
-	return function process(tree) {
-		tree.children.forEach(function(item) {
-			if (!abbrUtils.isSnippet(item)) {
-				// remove padding from item 
-				item.start = item.start.replace(rePad, '');
-				item.end = item.end.replace(rePad, '');
-			}
-			
-			// remove newlines 
-			item.start = item.start.replace(reNl, '');
-			item.end = item.end.replace(reNl, '');
-			item.content = item.content.replace(reNl, '');
-			
-			process(item);
-		});
-		
-		return tree;
-	};
-});
-
-},{"../utils/abbreviation":69}],51:[function(require,module,exports){
-/**
- * Filter for producing Jade code from abbreviation.
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('../utils/common');
-	var abbrUtils = require('../utils/abbreviation');
-	var formatFilter = require('./format');
-	var tabStops = require('../assets/tabStops');
-	var prefs = require('../assets/preferences');
-	var profile = require('../assets/profile');
-
-	var reNl = /[\n\r]/;
-	var reIndentedText = /^\s*\|/;
-	var reSpace = /^\s/;
-
-	prefs.define('slim.attributesWrapper', 'none', 
-		'Defines how attributes will be wrapped:' +
-		'<ul>' +
-		'<li><code>none</code> – no wrapping;</li>' +
-		'<li><code>round</code> — wrap attributes with round braces;</li>' +
-		'<li><code>square</code> — wrap attributes with round braces;</li>' +
-		'<li><code>curly</code> — wrap attributes with curly braces.</li>' +
-		'</ul>');
-
-	function transformClassName(className) {
-		return utils.trim(className).replace(/\s+/g, '.');
-	}
-
-	function getAttrWrapper() {
-		var start = ' ', end = '';
-		switch (prefs.get('slim.attributesWrapper')) {
-			case 'round':
-				start = '(';
-				end = ')';
-				break;
-			case 'square':
-				start = '[';
-				end = ']';
-				break;
-			case 'curly':
-				start = '{';
-				end = '}';
-				break;
-		}
-
-		return {
-			start: start,
-			end: end
-		};
-	}
-
-	function stringifyAttrs(attrs, profile) {
-		var attrQuote = profile.attributeQuote();
-		var attrWrap = getAttrWrapper();
-		return attrWrap.start + attrs.map(function(attr) {
-			var value = attrQuote + attr.value + attrQuote;
-			if (attr.isBoolean) {
-				if (!attrWrap.end) {
-					value = 'true';
-				} else {
-					return attr.name;
-				}
-			}
-
-			return attr.name + '=' + value;
-		}).join(' ') + attrWrap.end;
-	}
-	
-	/**
-	 * Creates HAML attributes string from tag according to profile settings
-	 * @param {AbbreviationNode} tag
-	 * @param {Object} profile
-	 */
-	function makeAttributesString(tag, profile) {
-		var attrs = '';
-		var otherAttrs = [];
-		var attrQuote = profile.attributeQuote();
-		var cursor = profile.cursor();
-		
-		tag.attributeList().forEach(function(a) {
-			var attrName = profile.attributeName(a.name);
-			switch (attrName.toLowerCase()) {
-				// use short notation for ID and CLASS attributes
-				case 'id':
-					attrs += '#' + (a.value || cursor);
-					break;
-				case 'class':
-					attrs += '.' + transformClassName(a.value || cursor);
-					break;
-				// process other attributes
-				default:
-					otherAttrs.push({
-						name: attrName,
-						value: a.value || cursor,
-						isBoolean: profile.isBoolean(a.name, a.value)
-					});
-			}
-		});
-		
-		if (otherAttrs.length) {
-			attrs += stringifyAttrs(otherAttrs, profile);
-		}
-		
-		return attrs;
-	}
-
-	function processTagContent(item) {
-		if (!item.content) {
-			return;
-		}
-
-		var content = tabStops.replaceVariables(item.content, function(str, name) {
-			if (name === 'nl' || name === 'newline') {
-				return '\n';
-			}
-			return str;
-		});
-
-		if (reNl.test(content) && !reIndentedText.test(content)) {
-			// multiline content: pad it with indentation and pipe
-			var pad = '  ';
-			item.content = '\n| ' + utils.padString(content, pad);
-		} else if (!reSpace.test(content)) {
-			item.content = ' ' + content;
-		}
-	}
-	
-	/**
-	 * Processes element with <code>tag</code> type
-	 * @param {AbbreviationNode} item
-	 * @param {OutputProfile} profile
-	 */
-	function processTag(item, profile) {
-		if (!item.parent)
-			// looks like it's a root (empty) element
-			return item;
-		
-		var attrs = makeAttributesString(item, profile);
-		var cursor = profile.cursor();
-		var isUnary = abbrUtils.isUnary(item);
-		var selfClosing = profile.self_closing_tag && isUnary ? '/' : '';
-			
-		// define tag name
-		var tagName = profile.tagName(item.name());
-		if (tagName.toLowerCase() == 'div' && attrs && '([{'.indexOf(attrs.charAt(0)) == -1)
-			// omit div tag
-			tagName = '';
-			
-		item.end = '';
-		var start = tagName + attrs + selfClosing;
-		processTagContent(item);
-
-		var placeholder = '%s';
-		// We can't just replace placeholder with new value because
-		// JavaScript will treat double $ character as a single one, assuming
-		// we're using RegExp literal.
-		item.start = utils.replaceSubstring(item.start, start, item.start.indexOf(placeholder), placeholder);
-		
-		if (!item.children.length && !isUnary)
-			item.start += cursor;
-		
-		return item;
-	}
-
-	return function process(tree, curProfile, level) {
-		level = level || 0;
-		
-		if (!level) {
-			// always format with `xml` profile since
-			// Slim requires all tags to be on separate lines
-			tree = formatFilter(tree, profile.get('xml'));
-		}
-		
-		tree.children.forEach(function(item) {
-			if (!abbrUtils.isSnippet(item)) {
-				processTag(item, curProfile, level);
-			}
-			
-			process(item, curProfile, level + 1);
-		});
-		
-		return tree;
-	};
-});
-},{"../assets/preferences":28,"../assets/profile":29,"../assets/tabStops":33,"../utils/abbreviation":69,"../utils/common":73,"./format":44}],52:[function(require,module,exports){
-/**
- * Trim filter: removes characters at the beginning of the text
- * content that indicates lists: numbers, #, *, -, etc.
- * 
- * Useful for wrapping lists with abbreviation.
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var prefs = require('../assets/preferences');
-	prefs.define('filter.trimRegexp', 
-		'[\\s|\\u00a0]*[\\d|#|\\-|\*|\\u2022]+\\.?\\s*',
-		'Regular expression used to remove list markers (numbers, dashes, ' 
-		+ 'bullets, etc.) in <code>t</code> (trim) filter. The trim filter '
-		+ 'is useful for wrapping with abbreviation lists, pased from other ' 
-		+ 'documents (for example, Word documents).');
-	
-	function process(tree, re) {
-		tree.children.forEach(function(item) {
-			if (item.content) {
-				item.content = item.content.replace(re, '');
-			}
-			
-			process(item, re);
-		});
-		
-		return tree;
-	}
-
-	return function(tree) {
-		var re = new RegExp(prefs.get('filter.trimRegexp'));
-		return process(tree, re);
-	};
-});
-
-},{"../assets/preferences":28}],53:[function(require,module,exports){
-/**
- * Filter for trimming "select" attributes from some tags that contains
- * child elements
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var abbrUtils = require('../utils/abbreviation');
-
-	var tags = {
-		'xsl:variable': 1,
-		'xsl:with-param': 1
-	};
-	
-	/**
-	 * Removes "select" attribute from node
-	 * @param {AbbreviationNode} node
-	 */
-	function trimAttribute(node) {
-		node.start = node.start.replace(/\s+select\s*=\s*(['"]).*?\1/, '');
-	}
-
-	return function process(tree) {
-		tree.children.forEach(function(item) {
-			if (!abbrUtils.isSnippet(item)
-					&& (item.name() || '').toLowerCase() in tags 
-					&& item.children.length)
-				trimAttribute(item);
-			process(item);
-		});
-		
-		return tree;
-	};
-});
-},{"../utils/abbreviation":69}],54:[function(require,module,exports){
-/**
- * "Lorem ipsum" text generator. Matches <code>lipsum(num)?</code> or 
- * <code>lorem(num)?</code> abbreviation.
- * This code is based on Django's contribution: 
- * https://code.djangoproject.com/browser/django/trunk/django/contrib/webdesign/lorem_ipsum.py
- * <br><br>
- * Examples to test:<br>
- * <code>lipsum</code> – generates 30 words text.<br>
- * <code>lipsum*6</code> – generates 6 paragraphs (autowrapped with &lt;p&gt; element) of text.<br>
- * <code>ol>lipsum10*5</code> — generates ordered list with 5 list items (autowrapped with &lt;li&gt; tag)
- * with text of 10 words on each line.<br>
- * <code>span*3>lipsum20</code> – generates 3 paragraphs of 20-words text, each wrapped with &lt;span&gt; element.
- * Each paragraph phrase is unique.   
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var prefs = require('../assets/preferences');
-
-	var langs = {
-		en: {
-			common: ['lorem', 'ipsum', 'dolor', 'sit', 'amet', 'consectetur', 'adipisicing', 'elit'],
-			words: ['exercitationem', 'perferendis', 'perspiciatis', 'laborum', 'eveniet',
-				'sunt', 'iure', 'nam', 'nobis', 'eum', 'cum', 'officiis', 'excepturi',
-				'odio', 'consectetur', 'quasi', 'aut', 'quisquam', 'vel', 'eligendi',
-				'itaque', 'non', 'odit', 'tempore', 'quaerat', 'dignissimos',
-				'facilis', 'neque', 'nihil', 'expedita', 'vitae', 'vero', 'ipsum',
-				'nisi', 'animi', 'cumque', 'pariatur', 'velit', 'modi', 'natus',
-				'iusto', 'eaque', 'sequi', 'illo', 'sed', 'ex', 'et', 'voluptatibus',
-				'tempora', 'veritatis', 'ratione', 'assumenda', 'incidunt', 'nostrum',
-				'placeat', 'aliquid', 'fuga', 'provident', 'praesentium', 'rem',
-				'necessitatibus', 'suscipit', 'adipisci', 'quidem', 'possimus',
-				'voluptas', 'debitis', 'sint', 'accusantium', 'unde', 'sapiente',
-				'voluptate', 'qui', 'aspernatur', 'laudantium', 'soluta', 'amet',
-				'quo', 'aliquam', 'saepe', 'culpa', 'libero', 'ipsa', 'dicta',
-				'reiciendis', 'nesciunt', 'doloribus', 'autem', 'impedit', 'minima',
-				'maiores', 'repudiandae', 'ipsam', 'obcaecati', 'ullam', 'enim',
-				'totam', 'delectus', 'ducimus', 'quis', 'voluptates', 'dolores',
-				'molestiae', 'harum', 'dolorem', 'quia', 'voluptatem', 'molestias',
-				'magni', 'distinctio', 'omnis', 'illum', 'dolorum', 'voluptatum', 'ea',
-				'quas', 'quam', 'corporis', 'quae', 'blanditiis', 'atque', 'deserunt',
-				'laboriosam', 'earum', 'consequuntur', 'hic', 'cupiditate',
-				'quibusdam', 'accusamus', 'ut', 'rerum', 'error', 'minus', 'eius',
-				'ab', 'ad', 'nemo', 'fugit', 'officia', 'at', 'in', 'id', 'quos',
-				'reprehenderit', 'numquam', 'iste', 'fugiat', 'sit', 'inventore',
-				'beatae', 'repellendus', 'magnam', 'recusandae', 'quod', 'explicabo',
-				'doloremque', 'aperiam', 'consequatur', 'asperiores', 'commodi',
-				'optio', 'dolor', 'labore', 'temporibus', 'repellat', 'veniam',
-				'architecto', 'est', 'esse', 'mollitia', 'nulla', 'a', 'similique',
-				'eos', 'alias', 'dolore', 'tenetur', 'deleniti', 'porro', 'facere',
-				'maxime', 'corrupti']
-		},
-		sp: {
-			common: ['mujer', 'uno', 'dolor', 'más', 'de', 'poder', 'mismo', 'si'],
-			words: ['ejercicio', 'preferencia', 'perspicacia', 'laboral', 'paño',
-				'suntuoso', 'molde', 'namibia', 'planeador', 'mirar', 'demás', 'oficinista', 'excepción',
-				'odio', 'consecuencia', 'casi', 'auto', 'chicharra', 'velo', 'elixir',
-				'ataque', 'no', 'odio', 'temporal', 'cuórum', 'dignísimo',
-				'facilismo', 'letra', 'nihilista', 'expedición', 'alma', 'alveolar', 'aparte',
-				'león', 'animal', 'como', 'paria', 'belleza', 'modo', 'natividad',
-				'justo', 'ataque', 'séquito', 'pillo', 'sed', 'ex', 'y', 'voluminoso',
-				'temporalidad', 'verdades', 'racional', 'asunción', 'incidente', 'marejada',
-				'placenta', 'amanecer', 'fuga', 'previsor', 'presentación', 'lejos',
-				'necesariamente', 'sospechoso', 'adiposidad', 'quindío', 'pócima',
-				'voluble', 'débito', 'sintió', 'accesorio', 'falda', 'sapiencia',
-				'volutas', 'queso', 'permacultura', 'laudo', 'soluciones', 'entero',
-				'pan', 'litro', 'tonelada', 'culpa', 'libertario', 'mosca', 'dictado',
-				'reincidente', 'nascimiento', 'dolor', 'escolar', 'impedimento', 'mínima',
-				'mayores', 'repugnante', 'dulce', 'obcecado', 'montaña', 'enigma',
-				'total', 'deletéreo', 'décima', 'cábala', 'fotografía', 'dolores',
-				'molesto', 'olvido', 'paciencia', 'resiliencia', 'voluntad', 'molestias',
-				'magnífico', 'distinción', 'ovni', 'marejada', 'cerro', 'torre', 'y',
-				'abogada', 'manantial', 'corporal', 'agua', 'crepúsculo', 'ataque', 'desierto',
-				'laboriosamente', 'angustia', 'afortunado', 'alma', 'encefalograma',
-				'materialidad', 'cosas', 'o', 'renuncia', 'error', 'menos', 'conejo',
-				'abadía', 'analfabeto', 'remo', 'fugacidad', 'oficio', 'en', 'almácigo', 'vos', 'pan',
-				'represión', 'números', 'triste', 'refugiado', 'trote', 'inventor',
-				'corchea', 'repelente', 'magma', 'recusado', 'patrón', 'explícito',
-				'paloma', 'síndrome', 'inmune', 'autoinmune', 'comodidad',
-				'ley', 'vietnamita', 'demonio', 'tasmania', 'repeler', 'apéndice',
-				'arquitecto', 'columna', 'yugo', 'computador', 'mula', 'a', 'propósito',
-				'fantasía', 'alias', 'rayo', 'tenedor', 'deleznable', 'ventana', 'cara',
-				'anemia', 'corrupto']
-		},
-		ru: {
-			common: ['далеко-далеко', 'за', 'словесными', 'горами', 'в стране', 'гласных', 'и согласных', 'живут', 'рыбные', 'тексты'],
-			words: ['вдали', 'от всех', 'они', 'буквенных', 'домах', 'на берегу', 'семантика', 
-				'большого', 'языкового', 'океана', 'маленький', 'ручеек', 'даль', 
-				'журчит', 'по всей', 'обеспечивает', 'ее','всеми', 'необходимыми', 
-				'правилами', 'эта', 'парадигматическая', 'страна', 'которой', 'жаренные', 
-				'предложения', 'залетают', 'прямо', 'рот', 'даже', 'всемогущая', 
-				'пунктуация', 'не', 'имеет', 'власти', 'над', 'рыбными', 'текстами', 
-				'ведущими', 'безорфографичный', 'образ', 'жизни', 'однажды', 'одна', 
-				'маленькая', 'строчка','рыбного', 'текста', 'имени', 'lorem', 'ipsum', 
-				'решила', 'выйти', 'большой', 'мир', 'грамматики', 'великий', 'оксмокс', 
-				'предупреждал', 'о', 'злых', 'запятых', 'диких', 'знаках', 'вопроса', 
-				'коварных', 'точках', 'запятой', 'но', 'текст', 'дал', 'сбить', 
-				'себя', 'толку', 'он', 'собрал', 'семь', 'своих', 'заглавных', 'букв', 
-				'подпоясал', 'инициал', 'за', 'пояс', 'пустился', 'дорогу', 
-				'взобравшись', 'первую', 'вершину', 'курсивных', 'гор', 'бросил', 
-				'последний', 'взгляд', 'назад', 'силуэт', 'своего', 'родного', 'города', 
-				'буквоград', 'заголовок', 'деревни', 'алфавит', 'подзаголовок', 'своего', 
-				'переулка', 'грустный', 'реторический', 'вопрос', 'скатился', 'его', 
-				'щеке', 'продолжил', 'свой', 'путь', 'дороге', 'встретил', 'рукопись', 
-				'она', 'предупредила',  'моей', 'все', 'переписывается', 'несколько', 
-				'раз', 'единственное', 'что', 'меня', 'осталось', 'это', 'приставка', 
-				'возвращайся', 'ты', 'лучше', 'свою', 'безопасную', 'страну', 'послушавшись', 
-				'рукописи', 'наш', 'продолжил', 'свой', 'путь', 'вскоре', 'ему', 
-				'повстречался', 'коварный', 'составитель', 'рекламных', 'текстов', 
-				'напоивший', 'языком', 'речью', 'заманивший', 'свое', 'агенство', 
-				'которое', 'использовало', 'снова', 'снова', 'своих', 'проектах', 
-				'если', 'переписали', 'то', 'живет', 'там', 'до', 'сих', 'пор']
-		}
-	};
-
-	
-	prefs.define('lorem.defaultLang', 'en', 
-		'Default language of generated dummy text. Currently, <code>en</code>\
-		and <code>ru</code> are supported, but users can add their own syntaxes\
-		see <a href="http://docs.emmet.io/abbreviations/lorem-ipsum/">docs</a>.');
-	prefs.define('lorem.omitCommonPart', false,
-		'Omit commonly used part (e.g. “Lorem ipsum dolor sit amet“) from generated text.');
-	
-	/**
-	 * Returns random integer between <code>from</code> and <code>to</code> values
-	 * @param {Number} from
-	 * @param {Number} to
-	 * @returns {Number}
-	 */
-	function randint(from, to) {
-		return Math.round(Math.random() * (to - from) + from);
-	}
-	
-	/**
-	 * @param {Array} arr
-	 * @param {Number} count
-	 * @returns {Array}
-	 */
-	function sample(arr, count) {
-		var len = arr.length;
-		var iterations = Math.min(len, count);
-		var result = [];
-		while (result.length < iterations) {
-			var randIx = randint(0, len - 1);
-			if (!~result.indexOf(randIx)) {
-				result.push(randIx);
-			}
-		}
-		
-		return result.map(function(ix) {
-			return arr[ix];
-		});
-	}
-	
-	function choice(val) {
-		if (typeof val === 'string')
-			return val.charAt(randint(0, val.length - 1));
-		
-		return val[randint(0, val.length - 1)];
-	}
-	
-	function sentence(words, end) {
-		if (words.length) {
-			words[0] = words[0].charAt(0).toUpperCase() + words[0].substring(1);
-		}
-		
-		return words.join(' ') + (end || choice('?!...')); // more dots than question marks
-	}
-	
-	/**
-	 * Insert commas at randomly selected words. This function modifies values
-	 * inside <code>words</code> array 
-	 * @param {Array} words
-	 */
-	function insertCommas(words) {
-		var len = words.length;
-
-		if (len < 2) {
-			return;
-		}
-
-		var totalCommas = 0;
-		if (len > 3 && len <= 6) {
-			totalCommas = randint(0, 1);
-		} else if (len > 6 && len <= 12) {
-			totalCommas = randint(0, 2);
-		} else {
-			totalCommas = randint(1, 4);
-		}
-
-		for (var i = 0, pos, word; i < totalCommas; i++) {
-			pos = randint(0, words.length - 2);
-			word = words[pos];
-			if (word.charAt(word.length - 1) !== ',') {
-				words[pos] += ',';
-			}
-		}
-	}
-	
-	/**
-	 * Generate a paragraph of "Lorem ipsum" text
-	 * @param {Number} wordCount Words count in paragraph
-	 * @param {Boolean} startWithCommon Should paragraph start with common 
-	 * "lorem ipsum" sentence.
-	 * @returns {String}
-	 */
-	function paragraph(lang, wordCount, startWithCommon) {
-		var data = langs[lang];
-		if (!data) {
-			return '';
-		}
-
-		var result = [];
-		var totalWords = 0;
-		var words;
-		
-		wordCount = parseInt(wordCount, 10);
-		
-		if (startWithCommon && data.common) {
-			words = data.common.slice(0, wordCount);
-			if (words.length > 5) {
-				words[4] += ',';
-			}
-			totalWords += words.length;
-			result.push(sentence(words, '.'));
-		}
-		
-		while (totalWords < wordCount) {
-			words = sample(data.words, Math.min(randint(2, 30), wordCount - totalWords));
-			totalWords += words.length;
-			insertCommas(words);
-			result.push(sentence(words));
-		}
-		
-		return result.join(' ');
-	}
-
-	return {
-		/**
-		 * Adds new language words for Lorem Ipsum generator
-		 * @param {String} lang Two-letter lang definition
-		 * @param {Object} data Words for language. Maight be either a space-separated 
-		 * list of words (String), Array of words or object with <code>text</code> and
-		 * <code>common</code> properties
-		 */
-		addLang: function(lang, data) {
-			if (typeof data === 'string') {
-				data = {
-					words: data.split(' ').filter(function(item) {
-						return !!item;
-					})
-				};
-			} else if (Array.isArray(data)) {
-				data = {words: data};
-			}
-
-			langs[lang] = data;
-		},
-		preprocessor: function(tree) {
-			var re = /^(?:lorem|lipsum)([a-z]{2})?(\d*)$/i, match;
-			var allowCommon = !prefs.get('lorem.omitCommonPart');
-			
-			/** @param {AbbreviationNode} node */
-			tree.findAll(function(node) {
-				if (node._name && (match = node._name.match(re))) {
-					var wordCound = match[2] || 30;
-					var lang = match[1] || prefs.get('lorem.defaultLang') || 'en';
-					
-					// force node name resolving if node should be repeated
-					// or contains attributes. In this case, node should be outputed
-					// as tag, otherwise as text-only node
-					node._name = '';
-					node.data('forceNameResolving', node.isRepeating() || node.attributeList().length);
-					node.data('pasteOverwrites', true);
-					node.data('paste', function(i) {
-						return paragraph(lang, wordCound, !i && allowCommon);
-					});
-				}
-			});
-		}
-	};
-});
-
-},{"../assets/preferences":28}],55:[function(require,module,exports){
-/**
- * Emmet abbreviation parser.
- * Takes string abbreviation and recursively parses it into a tree. The parsed 
- * tree can be transformed into a string representation with 
- * <code>toString()</code> method. Note that string representation is defined
- * by custom processors (called <i>filters</i>), not by abbreviation parser 
- * itself.
- * 
- * This module can be extended with custom pre-/post-processors to shape-up
- * final tree or its representation. Actually, many features of abbreviation 
- * engine are defined in other modules as tree processors
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var tabStops = require('../assets/tabStops');
-	var profile = require('../assets/profile');
-	var filters = require('../filter/main');
-	var utils = require('../utils/common');
-	var abbreviationUtils = require('../utils/abbreviation');
-	var stringStream = require('../assets/stringStream');
-
-	// pre- and post-processorcs
-	var lorem = require('../generator/lorem');
-	var procPastedContent = require('./processor/pastedContent');
-	var procTagName = require('./processor/tagName');
-	var procResourceMatcher = require('./processor/resourceMatcher');
-	var procAttributes = require('./processor/attributes');
-	var procHref = require('./processor/href');
-
-	var reValidName = /^[\w\-\$\:@\!%]+\+?$/i;
-	var reWord = /[\w\-:\$@]/;
-	var DEFAULT_ATTR_NAME = '%default';
-	
-	var pairs = {
-		'[': ']',
-		'(': ')',
-		'{': '}'
-	};
-	
-	var spliceFn = Array.prototype.splice;
-	
-	var preprocessors = [];
-	var postprocessors = [];
-	var outputProcessors = [];
-	
-	/**
-	 * @type AbbreviationNode
-	 */
-	function AbbreviationNode(parent) {
-		/** @type AbbreviationNode */
-		this.parent = null;
-		this.children = [];
-		this._attributes = [];
-		
-		/** @type String Raw abbreviation for current node */
-		this.abbreviation = '';
-		this.counter = 1;
-		this._name = null;
-		this._text = '';
-		this.repeatCount = 1;
-		this.hasImplicitRepeat = false;
-		
-		/** Custom data dictionary */
-		this._data = {};
-		
-		// output properties
-		this.start = '';
-		this.end = '';
-		this.content = '';
-		this.padding = '';
-	}
-	
-	AbbreviationNode.prototype = {
-		/**
-		 * Adds passed node as child or creates new child
-		 * @param {AbbreviationNode} child
-		 * @param {Number} position Index in children array where child should 
-		 * be inserted
-		 * @return {AbbreviationNode}
-		 */
-		addChild: function(child, position) {
-			child = child || new AbbreviationNode();
-			child.parent = this;
-			
-			if (typeof position === 'undefined') {
-				this.children.push(child);
-			} else {
-				this.children.splice(position, 0, child);
-			}
-			
-			return child;
-		},
-		
-		/**
-		 * Creates a deep copy of current node
-		 * @returns {AbbreviationNode}
-		 */
-		clone: function() {
-			var node = new AbbreviationNode();
-			var attrs = ['abbreviation', 'counter', '_name', '_text', 'repeatCount', 'hasImplicitRepeat', 'start', 'end', 'content', 'padding'];
-			attrs.forEach(function(a) {
-				node[a] = this[a];
-			}, this);
-			
-			// clone attributes
-			node._attributes = this._attributes.map(function(attr) {
-				return utils.extend({}, attr);
-			});
-			
-			node._data = utils.extend({}, this._data);
-			
-			// clone children
-			node.children = this.children.map(function(child) {
-				child = child.clone();
-				child.parent = node;
-				return child;
-			});
-			
-			return node;
-		},
-		
-		/**
-		 * Removes current node from parent‘s child list
-		 * @returns {AbbreviationNode} Current node itself
-		 */
-		remove: function() {
-			if (this.parent) {
-				var ix = this.parent.children.indexOf(this);
-				if (~ix) {
-					this.parent.children.splice(ix, 1);
-				}
-			}
-			
-			return this;
-		},
-		
-		/**
-		 * Replaces current node in parent‘s children list with passed nodes
-		 * @param {AbbreviationNode} node Replacement node or array of nodes
-		 */
-		replace: function() {
-			var parent = this.parent;
-			var ix = parent.children.indexOf(this);
-			var items = utils.flatten(arguments);
-			spliceFn.apply(parent.children, [ix, 1].concat(items));
-			
-			// update parent
-			items.forEach(function(item) {
-				item.parent = parent;
-			});
-		},
-		
-		/**
-		 * Recursively sets <code>property</code> to <code>value</code> of current
-		 * node and its children 
-		 * @param {String} name Property to update
-		 * @param {Object} value New property value
-		 */
-		updateProperty: function(name, value) {
-			this[name] = value;
-			this.children.forEach(function(child) {
-				child.updateProperty(name, value);
-			});
-			
-			return this;
-		},
-		
-		/**
-		 * Finds first child node that matches truth test for passed 
-		 * <code>fn</code> function
-		 * @param {Function} fn
-		 * @returns {AbbreviationNode}
-		 */
-		find: function(fn) {
-			return this.findAll(fn, {amount: 1})[0];
-		},
-		
-		/**
-		 * Finds all child nodes that matches truth test for passed 
-		 * <code>fn</code> function
-		 * @param {Function} fn
-		 * @returns {Array}
-		 */
-		findAll: function(fn, state) {
-			state = utils.extend({amount: 0, found: 0}, state || {});
-
-			if (typeof fn !== 'function') {
-				var elemName = fn.toLowerCase();
-				fn = function(item) {return item.name().toLowerCase() == elemName;};
-			}
-				
-			var result = [];
-			this.children.forEach(function(child) {
-				if (fn(child)) {
-					result.push(child);
-					state.found++;
-					if (state.amount && state.found >= state.amount) {
-						return;
-					}
-				}
-				
-				result = result.concat(child.findAll(fn));
-			});
-			
-			return result.filter(function(item) {
-				return !!item;
-			});
-		},
-		
-		/**
-		 * Sets/gets custom data
-		 * @param {String} name
-		 * @param {Object} value
-		 * @returns {Object}
-		 */
-		data: function(name, value) {
-			if (arguments.length == 2) {
-				this._data[name] = value;
-			}
-			
-			return this._data[name];
-		},
-		
-		/**
-		 * Returns name of current node
-		 * @returns {String}
-		 */
-		name: function() {
-			return this._name;
-		},
-		
-		/**
-		 * Returns list of attributes for current node
-		 * @returns {Array}
-		 */
-		attributeList: function() {
-			return optimizeAttributes(this._attributes.slice(0));
-		},
-		
-		/**
-		 * Returns or sets attribute value
-		 * @param {String} name Attribute name
-		 * @param {String} value New attribute value. `Null` value 
-		 * will remove attribute
-		 * @returns {String}
-		 */
-		attribute: function(name, value) {
-			if (arguments.length == 2) {
-				if (value === null) {
-					// remove attribute
-					var vals = this._attributes.filter(function(attr) {
-						return attr.name === name;
-					});
-
-					var that = this;
-					vals.forEach(function(attr) {
-						var ix = that._attributes.indexOf(attr);
-						if (~ix) {
-							that._attributes.splice(ix, 1);
-						}
-					});
-
-					return;
-				}
-
-				// modify attribute
-				var attrNames = this._attributes.map(function(attr) {
-					return attr.name;
-				});
-				var ix = attrNames.indexOf(name.toLowerCase());
-				if (~ix) {
-					this._attributes[ix].value = value;
-				} else {
-					this._attributes.push({
-						name: name,
-						value: value
-					});
-				}
-			}
-			
-			return (utils.find(this.attributeList(), function(attr) {
-				return attr.name == name;
-			}) || {}).value;
-		},
-		
-		/**
-		 * Returns index of current node in parent‘s children list
-		 * @returns {Number}
-		 */
-		index: function() {
-			return this.parent ? this.parent.children.indexOf(this) : -1;
-		},
-		
-		/**
-		 * Sets how many times current element should be repeated
-		 * @private
-		 */
-		_setRepeat: function(count) {
-			if (count) {
-				this.repeatCount = parseInt(count, 10) || 1;
-			} else {
-				this.hasImplicitRepeat = true;
-			}
-		},
-		
-		/**
-		 * Sets abbreviation that belongs to current node
-		 * @param {String} abbr
-		 */
-		setAbbreviation: function(abbr) {
-			abbr = abbr || '';
-			
-			var that = this;
-			
-			// find multiplier
-			abbr = abbr.replace(/\*(\d+)?$/, function(str, repeatCount) {
-				that._setRepeat(repeatCount);
-				return '';
-			});
-			
-			this.abbreviation = abbr;
-			
-			var abbrText = extractText(abbr);
-			if (abbrText) {
-				abbr = abbrText.element;
-				this.content = this._text = abbrText.text;
-			}
-			
-			var abbrAttrs = parseAttributes(abbr);
-			if (abbrAttrs) {
-				abbr = abbrAttrs.element;
-				this._attributes = abbrAttrs.attributes;
-			}
-			
-			this._name = abbr;
-			
-			// validate name
-			if (this._name && !reValidName.test(this._name)) {
-				throw new Error('Invalid abbreviation');
-			}
-		},
-		
-		/**
-		 * Returns string representation of current node
-		 * @return {String}
-		 */
-		valueOf: function() {
-			var start = this.start;
-			var end = this.end;
-			var content = this.content;
-			
-			// apply output processors
-			var node = this;
-			outputProcessors.forEach(function(fn) {
-				start = fn(start, node, 'start');
-				content = fn(content, node, 'content');
-				end = fn(end, node, 'end');
-			});
-			
-			
-			var innerContent = this.children.map(function(child) {
-				return child.valueOf();
-			}).join('');
-			
-			content = abbreviationUtils.insertChildContent(content, innerContent, {
-				keepVariable: false
-			});
-			
-			return start + utils.padString(content, this.padding) + end;
-		},
-
-		toString: function() {
-			return this.valueOf();
-		},
-		
-		/**
-		 * Check if current node contains children with empty <code>expr</code>
-		 * property
-		 * @return {Boolean}
-		 */
-		hasEmptyChildren: function() {
-			return !!utils.find(this.children, function(child) {
-				return child.isEmpty();
-			});
-		},
-		
-		/**
-		 * Check if current node has implied name that should be resolved
-		 * @returns {Boolean}
-		 */
-		hasImplicitName: function() {
-			return !this._name && !this.isTextNode();
-		},
-		
-		/**
-		 * Indicates that current element is a grouping one, e.g. has no 
-		 * representation but serves as a container for other nodes
-		 * @returns {Boolean}
-		 */
-		isGroup: function() {
-			return !this.abbreviation;
-		},
-		
-		/**
-		 * Indicates empty node (i.e. without abbreviation). It may be a 
-		 * grouping node and should not be outputted
-		 * @return {Boolean}
-		 */
-		isEmpty: function() {
-			return !this.abbreviation && !this.children.length;
-		},
-		
-		/**
-		 * Indicates that current node should be repeated
-		 * @returns {Boolean}
-		 */
-		isRepeating: function() {
-			return this.repeatCount > 1 || this.hasImplicitRepeat;
-		},
-		
-		/**
-		 * Check if current node is a text-only node
-		 * @return {Boolean}
-		 */
-		isTextNode: function() {
-			return !this.name() && !this.attributeList().length;
-		},
-		
-		/**
-		 * Indicates whether this node may be used to build elements or snippets
-		 * @returns {Boolean}
-		 */
-		isElement: function() {
-			return !this.isEmpty() && !this.isTextNode();
-		},
-		
-		/**
-		 * Returns latest and deepest child of current tree
-		 * @returns {AbbreviationNode}
-		 */
-		deepestChild: function() {
-			if (!this.children.length)
-				return null;
-				
-			var deepestChild = this;
-			while (deepestChild.children.length) {
-				deepestChild = deepestChild.children[deepestChild.children.length - 1];
-			}
-			
-			return deepestChild;
-		}
-	};
-	
-	/**
-	 * Returns stripped string: a string without first and last character.
-	 * Used for “unquoting” strings
-	 * @param {String} str
-	 * @returns {String}
-	 */
-	function stripped(str) {
-		return str.substring(1, str.length - 1);
-	}
-	
-	function consumeQuotedValue(stream, quote) {
-		var ch;
-		while ((ch = stream.next())) {
-			if (ch === quote)
-				return true;
-			
-			if (ch == '\\')
-				continue;
-		}
-		
-		return false;
-	}
-	
-	/**
-	 * Parses abbreviation into a tree
-	 * @param {String} abbr
-	 * @returns {AbbreviationNode}
-	 */
-	function parseAbbreviation(abbr) {
-		abbr = utils.trim(abbr);
-		
-		var root = new AbbreviationNode();
-		var context = root.addChild(), ch;
-		
-		/** @type StringStream */
-		var stream = stringStream.create(abbr);
-		var loopProtector = 1000, multiplier;
-		var addChild = function(child) {
-			context.addChild(child);
-		};
-
-		var consumeAbbr = function() {
-			stream.start = stream.pos;
-			stream.eatWhile(function(c) {
-				if (c == '[' || c == '{') {
-					if (stream.skipToPair(c, pairs[c])) {
-						stream.backUp(1);
-						return true;
-					}
-					
-					throw new Error('Invalid abbreviation: mo matching "' + pairs[c] + '" found for character at ' + stream.pos);
-				}
-				
-				if (c == '+') {
-					// let's see if this is an expando marker
-					stream.next();
-					var isMarker = stream.eol() ||  ~'+>^*'.indexOf(stream.peek());
-					stream.backUp(1);
-					return isMarker;
-				}
-				
-				return c != '(' && isAllowedChar(c);
-			});
-		};
-		
-		while (!stream.eol() && --loopProtector > 0) {
-			ch = stream.peek();
-			
-			switch (ch) {
-				case '(': // abbreviation group
-					stream.start = stream.pos;
-					if (stream.skipToPair('(', ')')) {
-						var inner = parseAbbreviation(stripped(stream.current()));
-						if ((multiplier = stream.match(/^\*(\d+)?/, true))) {
-							context._setRepeat(multiplier[1]);
-						}
-						
-						inner.children.forEach(addChild);
-					} else {
-						throw new Error('Invalid abbreviation: mo matching ")" found for character at ' + stream.pos);
-					}
-					break;
-					
-				case '>': // child operator
-					context = context.addChild();
-					stream.next();
-					break;
-					
-				case '+': // sibling operator
-					context = context.parent.addChild();
-					stream.next();
-					break;
-					
-				case '^': // climb up operator
-					var parent = context.parent || context;
-					context = (parent.parent || parent).addChild();
-					stream.next();
-					break;
-					
-				default: // consume abbreviation
-					consumeAbbr();
-					context.setAbbreviation(stream.current());
-					stream.start = stream.pos;
-			}
-		}
-		
-		if (loopProtector < 1) {
-			throw new Error('Endless loop detected');
-		}
-		
-		return root;
-	}
-
-	/**
-	 * Splits attribute set into a list of attributes string
-	 * @param  {String} attrSet 
-	 * @return {Array}
-	 */
-	function splitAttributes(attrSet) {
-		attrSet = utils.trim(attrSet);
-		var parts = [];
-
-		// split attribute set by spaces
-		var stream = stringStream(attrSet), ch;
-		while ((ch = stream.next())) {
-			if (ch == ' ') {
-				parts.push(utils.trim(stream.current()));
-				// skip spaces
-				while (stream.peek() == ' ') {
-					stream.next();
-				}
-
-				stream.start = stream.pos;
-			} else if (ch == '"' || ch == "'") {
-				// skip values in strings
-				if (!stream.skipString(ch)) {
-					throw new Error('Invalid attribute set');
-				}
-			}
-		}
-
-		parts.push(utils.trim(stream.current()));
-		return parts;
-	}
-
-	/**
-	 * Removes opening and closing quotes from given string
-	 * @param  {String} str
-	 * @return {String}
-	 */
-	function unquote(str) {
-		var ch = str.charAt(0);
-		if (ch == '"' || ch == "'") {
-			str = str.substr(1);
-			var last = str.charAt(str.length - 1);
-			if (last === ch) {
-				str = str.substr(0, str.length - 1);
-			}
-		}
-
-		return str;
-	}
-
-	/**
-	 * Extract attributes and their values from attribute set: 
-	 * <code>[attr col=3 title="Quoted string"]</code> (without square braces)
-	 * @param {String} attrSet
-	 * @returns {Array}
-	 */
-	function extractAttributes(attrSet) {
-		var reAttrName = /^[\w\-:\$@]+\.?$/;
-		return splitAttributes(attrSet).map(function(attr) {
-			// attribute name: [attr]
-			if (reAttrName.test(attr)) {
-				var value = '';
-				if (attr.charAt(attr.length - 1) == '.') {
-					// a boolean attribute
-					attr = attr.substr(0, attr.length - 1);
-					value = attr;
-				}
-				return {
-					name: attr,
-					value: value
-				};
-			}
-
-			// attribute with value: [name=val], [name="val"]
-			if (~attr.indexOf('=')) {
-				var parts = attr.split('=');
-				return {
-					name: parts.shift(),
-					value: unquote(parts.join('='))
-				};
-			}
-
-			// looks like it’s implied attribute
-			return {
-				name: DEFAULT_ATTR_NAME,
-				value: unquote(attr)
-			};
-		});
-	}
-	
-	/**
-	 * Parses tag attributes extracted from abbreviation. If attributes found, 
-	 * returns object with <code>element</code> and <code>attributes</code>
-	 * properties
-	 * @param {String} abbr
-	 * @returns {Object} Returns <code>null</code> if no attributes found in 
-	 * abbreviation
-	 */
-	function parseAttributes(abbr) {
-		/*
-		 * Example of incoming data:
-		 * #header
-		 * .some.data
-		 * .some.data#header
-		 * [attr]
-		 * #item[attr=Hello other="World"].class
-		 */
-		var result = [];
-		var attrMap = {'#': 'id', '.': 'class'};
-		var nameEnd = null;
-		
-		/** @type StringStream */
-		var stream = stringStream.create(abbr);
-		while (!stream.eol()) {
-			switch (stream.peek()) {
-				case '#': // id
-				case '.': // class
-					if (nameEnd === null)
-						nameEnd = stream.pos;
-					
-					var attrName = attrMap[stream.peek()];
-					
-					stream.next();
-					stream.start = stream.pos;
-					stream.eatWhile(reWord);
-					result.push({
-						name: attrName, 
-						value: stream.current()
-					});
-					break;
-				case '[': //begin attribute set
-					if (nameEnd === null)
-						nameEnd = stream.pos;
-					
-					stream.start = stream.pos;
-					if (!stream.skipToPair('[', ']')) {
-						throw new Error('Invalid attribute set definition');
-					}
-					
-					result = result.concat(
-						extractAttributes(stripped(stream.current()))
-					);
-					break;
-				default:
-					stream.next();
-			}
-		}
-		
-		if (!result.length)
-			return null;
-		
-		return {
-			element: abbr.substring(0, nameEnd),
-			attributes: optimizeAttributes(result)
-		};
-	}
-	
-	/**
-	 * Optimize attribute set: remove duplicates and merge class attributes
-	 * @param attrs
-	 */
-	function optimizeAttributes(attrs) {
-		// clone all attributes to make sure that original objects are 
-		// not modified
-		attrs = attrs.map(function(attr) {
-			return utils.clone(attr);
-		});
-		
-		var lookup = {};
-
-		return attrs.filter(function(attr) {
-			if (!(attr.name in lookup)) {
-				return lookup[attr.name] = attr;
-			}
-			
-			var la = lookup[attr.name];
-			
-			if (attr.name.toLowerCase() == 'class') {
-				la.value += (la.value.length ? ' ' : '') + attr.value;
-			} else {
-				la.value = attr.value;
-				la.isImplied = !!attr.isImplied;
-			}
-			
-			return false;
-		});
-	}
-	
-	/**
-	 * Extract text data from abbreviation: if <code>a{hello}</code> abbreviation
-	 * is passed, returns object <code>{element: 'a', text: 'hello'}</code>.
-	 * If nothing found, returns <code>null</code>
-	 * @param {String} abbr
-	 * 
-	 */
-	function extractText(abbr) {
-		if (!~abbr.indexOf('{'))
-			return null;
-		
-		/** @type StringStream */
-		var stream = stringStream.create(abbr);
-		while (!stream.eol()) {
-			switch (stream.peek()) {
-				case '[':
-				case '(':
-					stream.skipToPair(stream.peek(), pairs[stream.peek()]); break;
-					
-				case '{':
-					stream.start = stream.pos;
-					stream.skipToPair('{', '}');
-					return {
-						element: abbr.substring(0, stream.start),
-						text: stripped(stream.current())
-					};
-					
-				default:
-					stream.next();
-			}
-		}
-	}
-	
-	/**
-	 * “Un-rolls“ contents of current node: recursively replaces all repeating 
-	 * children with their repeated clones
-	 * @param {AbbreviationNode} node
-	 * @returns {AbbreviationNode}
-	 */
-	function unroll(node) {
-		for (var i = node.children.length - 1, j, child, maxCount; i >= 0; i--) {
-			child = node.children[i];
-			
-			if (child.isRepeating()) {
-				maxCount = j = child.repeatCount;
-				child.repeatCount = 1;
-				child.updateProperty('counter', 1);
-				child.updateProperty('maxCount', maxCount);
-				while (--j > 0) {
-					child.parent.addChild(child.clone(), i + 1)
-						.updateProperty('counter', j + 1)
-						.updateProperty('maxCount', maxCount);
-				}
-			}
-		}
-		
-		// to keep proper 'counter' property, we need to walk
-		// on children once again
-		node.children.forEach(unroll);
-		
-		return node;
-	}
-	
-	/**
-	 * Optimizes tree node: replaces empty nodes with their children
-	 * @param {AbbreviationNode} node
-	 * @return {AbbreviationNode}
-	 */
-	function squash(node) {
-		for (var i = node.children.length - 1; i >= 0; i--) {
-			/** @type AbbreviationNode */
-			var n = node.children[i];
-			if (n.isGroup()) {
-				n.replace(squash(n).children);
-			} else if (n.isEmpty()) {
-				n.remove();
-			}
-		}
-		
-		node.children.forEach(squash);
-		
-		return node;
-	}
-	
-	function isAllowedChar(ch) {
-		var charCode = ch.charCodeAt(0);
-		var specialChars = '#.*:$-_!@|%';
-		
-		return (charCode > 64 && charCode < 91)       // uppercase letter
-				|| (charCode > 96 && charCode < 123)  // lowercase letter
-				|| (charCode > 47 && charCode < 58)   // number
-				|| specialChars.indexOf(ch) != -1;    // special character
-	}
-
-	// XXX add counter replacer function as output processor
-	outputProcessors.push(function(text, node) {
-		return utils.replaceCounter(text, node.counter, node.maxCount);
-	});
-
-	// XXX add tabstop updater
-	outputProcessors.push(tabStops.abbrOutputProcessor.bind(tabStops));
-
-	// include default pre- and postprocessors
-	[lorem, procResourceMatcher, procAttributes, procPastedContent, procTagName, procHref].forEach(function(mod) {
-		if (mod.preprocessor) {
-			preprocessors.push(mod.preprocessor.bind(mod));
-		}
-
-		if (mod.postprocessor) {
-			postprocessors.push(mod.postprocessor.bind(mod));
-		}
-	});
-
-	return {
-		DEFAULT_ATTR_NAME: DEFAULT_ATTR_NAME,
-
-		/**
-		 * Parses abbreviation into tree with respect of groups, 
-		 * text nodes and attributes. Each node of the tree is a single 
-		 * abbreviation. Tree represents actual structure of the outputted 
-		 * result
-		 * @memberOf abbreviationParser
-		 * @param {String} abbr Abbreviation to parse
-		 * @param {Object} options Additional options for parser and processors
-		 * 
-		 * @return {AbbreviationNode}
-		 */
-		parse: function(abbr, options) {
-			options = options || {};
-			
-			var tree = parseAbbreviation(abbr);
-			var that = this;
-			
-			if (options.contextNode) {
-				// add info about context node –
-				// a parent XHTML node in editor inside which abbreviation is 
-				// expanded
-				tree._name = options.contextNode.name;
-				var attrLookup = {};
-				tree._attributes.forEach(function(attr) {
-					attrLookup[attr.name] = attr;
-				});
-				
-				options.contextNode.attributes.forEach(function(attr) {
-					if (attr.name in attrLookup) {
-						attrLookup[attr.name].value = attr.value;
-					} else {
-						attr = utils.clone(attr);
-						tree._attributes.push(attr);
-						attrLookup[attr.name] = attr;
-					}
-				});
-			}
-			
-			// apply preprocessors
-			preprocessors.forEach(function(fn) {
-				fn(tree, options, that);
-			});
-
-			if ('counter' in options) {
-				tree.updateProperty('counter', options.counter);
-			}
-			
-			tree = squash(unroll(tree));
-			
-			// apply postprocessors
-			postprocessors.forEach(function(fn) {
-				fn(tree, options, that);
-			});
-			
-			return tree;
-		},
-
-		/**
-		 * Expands given abbreviation into a formatted code structure.
-		 * This is the main method that is used for expanding abbreviation
-		 * @param {String} abbr Abbreviation to expand
-		 * @param {Options} options Additional options for abbreviation
-		 * expanding and transformation: `syntax`, `profile`, `contextNode` etc.
-		 * @return {String}
-		 */
-		expand: function(abbr, options) {
-			if (!abbr) return '';
-			if (typeof options == 'string') {
-				throw new Error('Deprecated use of `expand` method: `options` must be object');
-			}
-
-			options = options || {};
-
-			if (!options.syntax) {
-				options.syntax = utils.defaultSyntax();
-			}
-
-			var p = profile.get(options.profile, options.syntax);
-			tabStops.resetTabstopIndex();
-			
-			var data = filters.extract(abbr);
-			var outputTree = this.parse(data[0], options);
-
-			var filtersList = filters.composeList(options.syntax, p, data[1]);
-			filters.apply(outputTree, filtersList, p);
-
-			return outputTree.valueOf();
-		},
-		
-		AbbreviationNode: AbbreviationNode,
-		
-		/**
-		 * Add new abbreviation preprocessor. <i>Preprocessor</i> is a function
-		 * that applies to a parsed abbreviation tree right after it get parsed.
-		 * The passed tree is in unoptimized state.
-		 * @param {Function} fn Preprocessor function. This function receives
-		 * two arguments: parsed abbreviation tree (<code>AbbreviationNode</code>)
-		 * and <code>options</code> hash that was passed to <code>parse</code>
-		 * method
-		 */
-		addPreprocessor: function(fn) {
-			if (!~preprocessors.indexOf(fn)) {
-				preprocessors.push(fn);
-			}
-		},
-		
-		/**
-		 * Removes registered preprocessor
-		 */
-		removeFilter: function(fn) {
-			var ix = preprocessors.indexOf(fn);
-			if (~ix) {
-				preprocessors.splice(ix, 1);
-			}
-		},
-		
-		/**
-		 * Adds new abbreviation postprocessor. <i>Postprocessor</i> is a 
-		 * functinon that applies to <i>optimized</i> parsed abbreviation tree
-		 * right before it returns from <code>parse()</code> method
-		 * @param {Function} fn Postprocessor function. This function receives
-		 * two arguments: parsed abbreviation tree (<code>AbbreviationNode</code>)
-		 * and <code>options</code> hash that was passed to <code>parse</code>
-		 * method
-		 */
-		addPostprocessor: function(fn) {
-			if (!~postprocessors.indexOf(fn)) {
-				postprocessors.push(fn);
-			}
-		},
-		
-		/**
-		 * Removes registered postprocessor function
-		 */
-		removePostprocessor: function(fn) {
-			var ix = postprocessors.indexOf(fn);
-			if (~ix) {
-				postprocessors.splice(ix, 1);
-			}
-		},
-		
-		/**
-		 * Registers output postprocessor. <i>Output processor</i> is a 
-		 * function that applies to output part (<code>start</code>, 
-		 * <code>end</code> and <code>content</code>) when 
-		 * <code>AbbreviationNode.toString()</code> method is called
-		 */
-		addOutputProcessor: function(fn) {
-			if (!~outputProcessors.indexOf(fn)) {
-				outputProcessors.push(fn);
-			}
-		},
-		
-		/**
-		 * Removes registered output processor
-		 */
-		removeOutputProcessor: function(fn) {
-			var ix = outputProcessors.indexOf(fn);
-			if (~ix) {
-				outputProcessors.splice(ix, 1);
-			}
-		},
-		
-		/**
-		 * Check if passed symbol is valid symbol for abbreviation expression
-		 * @param {String} ch
-		 * @return {Boolean}
-		 */
-		isAllowedChar: function(ch) {
-			ch = String(ch); // convert Java object to JS
-			return isAllowedChar(ch) || ~'>+^[](){}'.indexOf(ch);
-		}
-	};
-});
-},{"../assets/profile":29,"../assets/stringStream":32,"../assets/tabStops":33,"../filter/main":49,"../generator/lorem":54,"../utils/abbreviation":69,"../utils/common":73,"./processor/attributes":57,"./processor/href":58,"./processor/pastedContent":59,"./processor/resourceMatcher":60,"./processor/tagName":61}],56:[function(require,module,exports){
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var session = {tokens: null};
-	
-	// walks around the source
-	var walker = {
-		init: function (source) {
-			// this.source = source.replace(/\r\n?/g, '\n');
-			this.source = source;
-			this.ch = '';
-			this.chnum = -1;
-		
-			// advance
-			this.nextChar();
-		},
-		nextChar: function () {
-			return this.ch = this.source.charAt(++this.chnum);
-		},
-		peek: function() {
-			return this.source.charAt(this.chnum + 1);
-		}
-	};
-
-	// utility helpers
-	function isNameChar(c, cc) {
-		cc = cc || c.charCodeAt(0);
-		return (
-			(cc >= 97 && cc <= 122 /* a-z */) || 
-			(cc >= 65 && cc <= 90 /* A-Z */) || 
-			/* 
-			Experimental: include cyrillic ranges 
-			since some letters, similar to latin ones, can 
-			accidentally appear in CSS tokens
-			*/
-			(cc >= 1024 && cc <= 1279) || 
-			c === '&' || /* selector placeholder (LESS, SCSS) */
-			c === '_' || 
-			c === '<' || /* comparisons (LESS, SCSS) */
-			c === '>' || 
-			c === '=' || 
-			c === '-'
-		);
-	}
-
-	function isDigit(c, cc) {
-		cc = cc || c.charCodeAt(0);
-		return (cc >= 48 && cc <= 57);
-	}
-
-	var isOp = (function () {
-		var opsa = "{}[]()+*=.,;:>~|\\%$#@^!".split(''),
-			opsmatcha = "*^|$~".split(''),
-			ops = {},
-			opsmatch = {},
-			i = 0;
-		for (; i < opsa.length; i += 1) {
-			ops[opsa[i]] = true;
-		}
-		for (i = 0; i < opsmatcha.length; i += 1) {
-			opsmatch[opsmatcha[i]] = true;
-		}
-		return function (ch, matchattr) {
-			if (matchattr) {
-				return ch in opsmatch;
-			}
-			return ch in ops;
-		};
-	}());
-	
-	// creates token objects and pushes them to a list
-	function tokener(value, type) {
-		session.tokens.push({
-			value: value,
-			type:  type || value,
-			start: null,
-			end:   null
-		});
-	}
-
-	function getPosInfo(w) {
-		var errPos = w.chnum;
-		var source = w.source.replace(/\r\n?/g, '\n');
-		var part = w.source.substring(0, errPos + 1).replace(/\r\n?/g, '\n');
-		var lines = part.split('\n');
-		var ch = (lines[lines.length - 1] || '').length;
-		var fullLine = source.split('\n')[lines.length - 1] || '';
-		
-		var chunkSize = 100;
-		var offset = Math.max(0, ch - chunkSize);
-		var formattedLine = fullLine.substr(offset, chunkSize * 2) + '\n';
-		for (var i = 0; i < ch - offset - 1; i++) {
-			formattedLine += '-';
-		}
-		formattedLine += '^';
-
-		return {
-			line: lines.length,
-			ch: ch,
-			text: fullLine,
-			hint: formattedLine
-		};
-	}
-
-	function raiseError(message) {
-		var err = error(message);
-		var errObj = new Error(err.message, '', err.line);
-		errObj.line = err.line;
-		errObj.ch = err.ch;
-		errObj.name = err.name;
-		errObj.hint = err.hint;
-
-		throw errObj;
-	}
-	
-	// oops
-	function error(m) { 
-		var w = walker;
-		var info = getPosInfo(walker);
-		var tokens = session.tokens;
-		session.tokens = null;
-
-		var message = 'CSS parsing error at line ' + info.line + ', char ' + info.ch + ': ' + m;
-		message += '\n' +  info.hint;
-		return {
-			name: "ParseError",
-			message: message,
-			hint: info.hint,
-			line: info.line,
-			ch: info.ch
-		};
-	}
-
-
-	// token handlers follow for:
-	// white space, comment, string, identifier, number, operator
-	function white() {
-		var c = walker.ch,
-			token = '';
-	
-		while (c === " " || c === "\t") {
-			token += c;
-			c = walker.nextChar();
-		}
-	
-		tokener(token, 'white');
-	
-	}
-
-	function comment() {
-		var w = walker,
-			c = w.ch,
-			token = c,
-			cnext;
-	 
-		cnext = w.nextChar();
-
-		if (cnext === '/') {
-			// inline comment in SCSS and LESS
-			while (c && !(cnext === "\n" || cnext === "\r")) {
-				token += cnext;
-				c = cnext;
-				cnext = w.nextChar();
-			}
-		} else if (cnext === '*') {
-			// multiline CSS commment
-			while (c && !(c === "*" && cnext === "/")) {
-				token += cnext;
-				c = cnext;
-				cnext = w.nextChar();
-			}
-		} else {
-			// oops, not a comment, just a /
-			return tokener(token, token);
-		}
-		
-		token += cnext;
-		w.nextChar();
-		tokener(token, 'comment');
-	}
-
-	function eatString() {
-		var w = walker,
-			c = w.ch,
-			q = c,
-			token = c,
-			cnext;
-	
-		c = w.nextChar();
-
-		while (c !== q) {
-			if (c === '\n') {
-				cnext = w.nextChar();
-				if (cnext === "\\") {
-					token += c + cnext;
-				} else {
-					// end of line with no \ escape = bad
-					raiseError("Unterminated string");
-				}
-			} else {
-				if (c === "\\") {
-					token += c + w.nextChar();
-				} else {
-					token += c;
-				}
-			}
-		
-			c = w.nextChar();
-		}
-
-		token += c;
-
-		return token;
-	}
-
-	function str() {
-		var token = eatString();
-		walker.nextChar();
-		tokener(token, 'string');
-	}
-	
-	function brace() {
-		var w = walker,
-			c = w.ch,
-			depth = 1,
-			token = c,
-			stop = false;
-	
-		c = w.nextChar();
-	
-		while (c && !stop) {
-			if (c === '(') {
-				depth++;
-			} else if (c === ')') {
-				depth--;
-				if (!depth) {
-					stop = true;
-				}
-			} else if (c === '"' || c === "'") {
-				c = eatString();
-			} else if (c === '') {
-				raiseError("Unterminated brace");
-			}
-			
-			token += c;
-			c = w.nextChar();
-		}
-		
-		tokener(token, 'brace');
-	}
-
-	function identifier(pre) {
-		var c = walker.ch;
-		var token = pre ? pre + c : c;
-			
-		c = walker.nextChar();
-		var cc = c.charCodeAt(0);
-		while (isNameChar(c, cc) || isDigit(c, cc)) {
-			token += c;
-			c = walker.nextChar();
-			cc = c.charCodeAt(0);
-		}
-	
-		tokener(token, 'identifier');
-	}
-
-	function num() {
-		var w = walker,
-			c = w.ch,
-			token = c,
-			point = token === '.',
-			nondigit;
-		
-		c = w.nextChar();
-		nondigit = !isDigit(c);
-	
-		// .2px or .classname?
-		if (point && nondigit) {
-			// meh, NaN, could be a class name, so it's an operator for now
-			return tokener(token, '.');    
-		}
-		
-		// -2px or -moz-something
-		if (token === '-' && nondigit) {
-			return identifier('-');
-		}
-	
-		while (c !== '' && (isDigit(c) || (!point && c === '.'))) { // not end of source && digit or first instance of .
-			if (c === '.') {
-				point = true;
-			}
-			token += c;
-			c = w.nextChar();
-		}
-
-		tokener(token, 'number');    
-	
-	}
-
-	function op() {
-		var w = walker,
-			c = w.ch,
-			token = c,
-			next = w.nextChar();
-			
-		if (next === "=" && isOp(token, true)) {
-			token += next;
-			tokener(token, 'match');
-			w.nextChar();
-			return;
-		} 
-		
-		tokener(token, token);
-	}
-
-
-	// call the appropriate handler based on the first character in a token suspect
-	function tokenize() {
-		var ch = walker.ch;
-	
-		if (ch === " " || ch === "\t") {
-			return white();
-		}
-
-		if (ch === '/') {
-			return comment();
-		} 
-
-		if (ch === '"' || ch === "'") {
-			return str();
-		}
-		
-		if (ch === '(') {
-			return brace();
-		}
-	
-		if (ch === '-' || ch === '.' || isDigit(ch)) { // tricky - char: minus (-1px) or dash (-moz-stuff)
-			return num();
-		}
-	
-		if (isNameChar(ch)) {
-			return identifier();
-		}
-
-		if (isOp(ch)) {
-			return op();
-		}
-
-		if (ch === '\r') {
-			if (walker.peek() === '\n') {
-				ch += walker.nextChar();
-			}
-
-			tokener(ch, 'line');
-			walker.nextChar();
-			return;
-		}
-		
-		if (ch === '\n') {
-			tokener(ch, 'line');
-			walker.nextChar();
-			return;
-		}
-		
-		raiseError("Unrecognized character '" + ch + "'");
-	}
-
-	return {
-		/**
-		 * Sprits given source into tokens
-		 * @param {String} source
-		 * @returns {Array}
-		 */
-		lex: function (source) {
-			walker.init(source);
-			session.tokens = [];
-
-			// for empty source, return single space token
-			if (!source) {
-				session.tokens.push(this.white());
-			} else {
-				while (walker.ch !== '') {
-					tokenize();
-				}
-			}
-
-			var tokens = session.tokens;
-			session.tokens = null;
-			return tokens;
-		},
-		
-		/**
-		 * Tokenizes CSS source. It's like `lex()` method,
-		 * but also stores proper token indexes in source, 
-		 * so it's a bit slower
-		 * @param {String} source
-		 * @returns {Array}
-		 */
-		parse: function(source) {
-			// transform tokens
-			var tokens = this.lex(source), pos = 0, token;
-			for (var i = 0, il = tokens.length; i < il; i++) {
-				token = tokens[i];
-				token.start = pos;
-				token.end = (pos += token.value.length);
-			}
-			return tokens;
-		},
-
-		white: function() {
-			return {
-				value: '',
-				type:  'white',
-				start: 0,
-				end:   0
-			};
-		},
-		
-		toSource: function(toks) {
-			var i = 0, max = toks.length, src = '';
-			for (; i < max; i++) {
-				src += toks[i].value;
-			}
-			return src;
-		}
-	};
-});
-},{}],57:[function(require,module,exports){
-/**
- * Resolves node attribute names: moves `default` attribute value
- * from stub to real attribute.
- *
- * This resolver should be applied *after* resource matcher
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('../../utils/common');
-
-	var findDefault = function(attr) {
-		return attr.isDefault;
-	};
-
-	var findImplied = function(attr) {
-		return attr.isImplied;
-	};
-
-	var findEmpty = function(attr) {
-		return !attr.value;
-	};
-
-	function resolveDefaultAttrs(node, parser) {
-		node.children.forEach(function(item) {
-			var attrList = item.attributeList();
-			var defaultAttrValue = item.attribute(parser.DEFAULT_ATTR_NAME);
-			if (typeof defaultAttrValue !== 'undefined') {
-				// remove stub attribute
-				item.attribute(parser.DEFAULT_ATTR_NAME, null);
-				
-				if (attrList.length) {
-					// target for default value:
-					// 1. default attribute
-					// 2. implied attribute
-					// 3. first empty attribute
-				
-					// find attribute marked as default
-					var defaultAttr = utils.find(attrList, findDefault) 
-						|| utils.find(attrList, findImplied) 
-						|| utils.find(attrList, findEmpty);
-
-					if (defaultAttr) {
-						var oldVal = item.attribute(defaultAttr.name);
-						var newVal = utils.replaceUnescapedSymbol(oldVal, '|', defaultAttrValue);
-						// no replacement, e.g. default value does not contains | symbol
-						if (oldVal == newVal) {
-							newVal = defaultAttrValue
-						}
-						
-						item.attribute(defaultAttr.name, newVal);
-					}
-				}
-			} else {
-				// if no default attribute value, remove implied attributes
-				attrList.forEach(function(attr) {
-					if (attr.isImplied) {
-						item.attribute(attr.name, null);
-					}
-				});
-			}
-
-			resolveDefaultAttrs(item, parser);
-		});
-	}
-
-	return {
-		/**
-		 * @param  {AbbreviationNode} tree
-		 * @param  {Object} options
-		 * @param  {abbreviation} parser
-		 */
-		preprocessor: function(tree, options, parser) {
-			resolveDefaultAttrs(tree, parser);
-		}
-	};
-});
-},{"../../utils/common":73}],58:[function(require,module,exports){
-/**
- * A preptocessor for &lt;a&gt; tag: tests wrapped content
- * for common URL patterns and, if matched, inserts it as 
- * `href` attribute
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var prefs = require('../../assets/preferences');
-	var utils = require('../../utils/common');
-	var pc = require('./pastedContent');
-
-	prefs.define('href.autodetect', true, 
-		'Enables or disables automatic URL recognition when wrapping\
-		text with <code>&lt;a&gt;</code> tag. With this option enabled,\
-		if wrapped text matches URL or e-mail pattern it will be automatically\
-		inserted into <code>href</code> attribute.');
-	prefs.define('href.urlPattern', '^(?:(?:https?|ftp|file)://|www\\.|ftp\\.)(?:\\([-A-Z0-9+&@#/%=~_|$?!:,.]*\\)|[-A-Z0-9+&@#/%=~_|$?!:,.])*(?:\\([-A-Z0-9+&@#/%=~_|$?!:,.]*\\)|[A-Z0-9+&@#/%=~_|$])', 
-		'RegExp pattern to match wrapped URLs. Matched content will be inserts\
-		as-is into <code>href</code> attribute, only whitespace will be trimmed.');
-
-	prefs.define('href.emailPattern', '^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,5}$', 
-		'RegExp pattern to match wrapped e-mails. Unlike <code>href.urlPattern</code>,\
-		wrapped content will be prefixed with <code>mailto:</code> in <code>href</code>\
-		attribute');
-
-	return {
-		/**
-		 * @param {AbbreviationNode} tree
-		 * @param {Object} options
-		 */
-		postprocessor: function(tree, options) {
-			if (!prefs.get('href.autodetect')) {
-				return;
-			}
-
-			var reUrl = new RegExp(prefs.get('href.urlPattern'), 'i');
-			var reEmail = new RegExp(prefs.get('href.emailPattern'), 'i');
-			var reProto = /^([a-z]+:)?\/\//i;
-
-			tree.findAll(function(item) {
-				if (item.name().toLowerCase() != 'a' || item.attribute('href')) {
-					return;
-				}
-
-				var pastedContent = utils.trim(pc.pastedContent(item) || options.pastedContent);
-				if (pastedContent) {
-					if (reUrl.test(pastedContent)) {
-						// do we have protocol?
-						if (!reProto.test(pastedContent)) {
-							pastedContent = 'http://' + pastedContent;
-						}
-
-						item.attribute('href', pastedContent);
-					} else if (reEmail.test(pastedContent)) {
-						item.attribute('href', 'mailto:' + pastedContent);
-					}
-				}
-			});
-		}
-	};
-});
-},{"../../assets/preferences":28,"../../utils/common":73,"./pastedContent":59}],59:[function(require,module,exports){
-/**
- * Pasted content abbreviation processor. A pasted content is a content that
- * should be inserted into implicitly repeated abbreviation nodes.
- * This processor powers “Wrap With Abbreviation” action
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('../../utils/common');
-	var abbrUtils = require('../../utils/abbreviation');
-	var stringStream = require('../../assets/stringStream');
-	var range = require('../../assets/range');
-
-	var outputPlaceholder = '$#';
-	
-	/**
-	 * Locates output placeholders inside text
-	 * @param {String} text
-	 * @returns {Array} Array of ranges of output placeholder in text
-	 */
-	function locateOutputPlaceholder(text) {
-		var result = [];
-		
-		var stream = stringStream.create(text);
-		
-		while (!stream.eol()) {
-			if (stream.peek() == '\\') {
-				stream.next();
-			} else {
-				stream.start = stream.pos;
-				if (stream.match(outputPlaceholder, true)) {
-					result.push(range.create(stream.start, outputPlaceholder));
-					continue;
-				}
-			}
-			stream.next();
-		}
-		
-		return result;
-	}
-	
-	/**
-	 * Replaces output placeholders inside <code>source</code> with 
-	 * <code>value</code>
-	 * @param {String} source
-	 * @param {String} value
-	 * @returns {String}
-	 */
-	function replaceOutputPlaceholders(source, value) {
-		var ranges = locateOutputPlaceholder(source);
-		
-		ranges.reverse().forEach(function(r) {
-			source = utils.replaceSubstring(source, value, r);
-		});
-		
-		return source;
-	}
-	
-	/**
-	 * Check if parsed node contains output placeholder – a target where
-	 * pasted content should be inserted
-	 * @param {AbbreviationNode} node
-	 * @returns {Boolean}
-	 */
-	function hasOutputPlaceholder(node) {
-		if (locateOutputPlaceholder(node.content).length)
-			return true;
-		
-		// check if attributes contains placeholder
-		return !!utils.find(node.attributeList(), function(attr) {
-			return !!locateOutputPlaceholder(attr.value).length;
-		});
-	}
-	
-	/**
-	 * Insert pasted content into correct positions of parsed node
-	 * @param {AbbreviationNode} node
-	 * @param {String} content
-	 * @param {Boolean} overwrite Overwrite node content if no value placeholders
-	 * found instead of appending to existing content
-	 */
-	function insertPastedContent(node, content, overwrite) {
-		var nodesWithPlaceholders = node.findAll(function(item) {
-			return hasOutputPlaceholder(item);
-		});
-		
-		if (hasOutputPlaceholder(node))
-			nodesWithPlaceholders.unshift(node);
-		
-		if (nodesWithPlaceholders.length) {
-			nodesWithPlaceholders.forEach(function(item) {
-				item.content = replaceOutputPlaceholders(item.content, content);
-				item._attributes.forEach(function(attr) {
-					attr.value = replaceOutputPlaceholders(attr.value, content);
-				});
-			});
-		} else {
-			// on output placeholders in subtree, insert content in the deepest
-			// child node
-			var deepest = node.deepestChild() || node;
-			if (overwrite) {
-				deepest.content = content;
-			} else {
-				deepest.content = abbrUtils.insertChildContent(deepest.content, content);
-			}
-		}
-	}
-
-	return {
-		pastedContent: function(item) {
-			var content = item.data('paste');
-			if (Array.isArray(content)) {
-				return content[item.counter - 1];
-			} else if (typeof content === 'function') {
-				return content(item.counter - 1, item.content);
-			} else if (content) {
-				return content;
-			}
-		},
-
-		/**
-		 * @param {AbbreviationNode} tree
-		 * @param {Object} options
-		 */
-		preprocessor: function(tree, options) {
-			if (options.pastedContent) {
-				var lines = utils.splitByLines(options.pastedContent, true).map(utils.trim);
-				
-				// set repeat count for implicitly repeated elements before
-				// tree is unrolled
-				tree.findAll(function(item) {
-					if (item.hasImplicitRepeat) {
-						item.data('paste', lines);
-						return item.repeatCount = lines.length;
-					}
-				});
-			}
-		},
-
-		/**
-		 * @param {AbbreviationNode} tree
-		 * @param {Object} options
-		 */
-		postprocessor: function(tree, options) {
-			var that = this;
-			// for each node with pasted content, update text data
-			var targets = tree.findAll(function(item) {
-				var pastedContent = that.pastedContent(item);
-				if (pastedContent) {
-					insertPastedContent(item, pastedContent, !!item.data('pasteOverwrites'));
-				}
-				
-				return !!pastedContent;
-			});
-			
-			if (!targets.length && options.pastedContent) {
-				// no implicitly repeated elements, put pasted content in
-				// the deepest child
-				insertPastedContent(tree, options.pastedContent);
-			}
-		}
-	};
-});
-},{"../../assets/range":30,"../../assets/stringStream":32,"../../utils/abbreviation":69,"../../utils/common":73}],60:[function(require,module,exports){
-/**
- * Processor function that matches parsed <code>AbbreviationNode</code>
- * against resources defined in <code>resource</code> module
- */ 
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var resources = require('../../assets/resources');
-	var elements = require('../../assets/elements');
-	var utils = require('../../utils/common');
-	var abbreviationUtils = require('../../utils/abbreviation');
-
-	/**
-	 * Finds matched resources for child nodes of passed <code>node</code> 
-	 * element. A matched resource is a reference to <i>snippets.json</i> entry
-	 * that describes output of parsed node 
-	 * @param {AbbreviationNode} node
-	 * @param {String} syntax
-	 */
-	function matchResources(node, syntax, parser) {
-		// do a shallow copy because the children list can be modified during
-		// resource matching
-		node.children.slice(0).forEach(function(child) {
-			var r = resources.getMatchedResource(child, syntax);
-			if (typeof r === 'string') {
-				r = elements.create('snippet', r);
-			}
-
-			child.data('resource', r);
-			var elemType = elements.type(r);
-
-			if (elemType == 'snippet') {
-				var content = r.data;
-				var curContent = child._text || child.content;
-				if (curContent) {
-					content = abbreviationUtils.insertChildContent(content, curContent);
-				}
-
-				child.content = content;
-			} else if (elemType == 'element') {
-				child._name = r.name;
-				if (Array.isArray(r.attributes)) {
-					child._attributes = [].concat(r.attributes, child._attributes);
-				}
-			} else if (elemType == 'reference') {
-				// it’s a reference to another abbreviation:
-				// parse it and insert instead of current child
-				/** @type AbbreviationNode */
-				var subtree = parser.parse(r.data, {
-					syntax: syntax
-				});
-
-				// if context element should be repeated, check if we need to 
-				// transfer repeated element to specific child node
-				if (child.repeatCount > 1) {
-					var repeatedChildren = subtree.findAll(function(node) {
-						return node.hasImplicitRepeat;
-					});
-
-					if (!repeatedChildren.length) {
-						repeatedChildren = subtree.children
-					}
-					
-					repeatedChildren.forEach(function(node) {
-						node.repeatCount = child.repeatCount;
-						node.hasImplicitRepeat = false;
-					});
-				}
-
-				// move child‘s children into the deepest child of new subtree
-				var deepestChild = subtree.deepestChild();
-				if (deepestChild) {
-					child.children.forEach(function(c) {
-						deepestChild.addChild(c);
-					});
-					deepestChild.content = child.content;
-				}
-
-				// copy current attributes to children
-				subtree.children.forEach(function(node) {
-					child.attributeList().forEach(function(attr) {
-						node.attribute(attr.name, attr.value);
-					});
-				});
-				
-				child.replace(subtree.children);
-			}
-			
-			matchResources(child, syntax, parser);
-		});
-	}
-	
-	return {
-		preprocessor: function(tree, options, parser) {
-			var syntax = options.syntax || utils.defaultSyntax();
-			matchResources(tree, syntax, parser);
-		}
-	};
-});
-},{"../../assets/elements":24,"../../assets/resources":31,"../../utils/abbreviation":69,"../../utils/common":73}],61:[function(require,module,exports){
-/**
- * Resolves tag names in abbreviations with implied name
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var tagName = require('../../resolver/tagName');
-
-	/**
-	 * Resolves implicit node names in parsed tree
-	 * @param {AbbreviationNode} tree
-	 */
-	function resolveNodeNames(tree) {
-		tree.children.forEach(function(node) {
-			if (node.hasImplicitName() || node.data('forceNameResolving')) {
-				node._name = tagName.resolve(node.parent.name());
-				node.data('nameResolved', true);
-			}
-			resolveNodeNames(node);
-		});
-		
-		return tree;
-	}
-
-	return {
-		postprocessor: resolveNodeNames
-	};
-});
-},{"../../resolver/tagName":67}],62:[function(require,module,exports){
-/**
- * HTML tokenizer by Marijn Haverbeke
- * http://codemirror.net/
- * @constructor
- * @memberOf __xmlParseDefine
- * @param {Function} require
- * @param {Underscore} _
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var stringStream = require('../assets/stringStream');
-
-	var Kludges = {
-		autoSelfClosers : {},
-		implicitlyClosed : {},
-		contextGrabbers : {},
-		doNotIndent : {},
-		allowUnquoted : true,
-		allowMissing : true
-	};
-
-	// Return variables for tokenizers
-	var tagName = null, type = null;
-
-	function inText(stream, state) {
-		function chain(parser) {
-			state.tokenize = parser;
-			return parser(stream, state);
-		}
-
-		var ch = stream.next();
-		if (ch == "<") {
-			if (stream.eat("!")) {
-				if (stream.eat("[")) {
-					if (stream.match("CDATA["))
-						return chain(inBlock("atom", "]]>"));
-					else
-						return null;
-				} else if (stream.match("--"))
-					return chain(inBlock("comment", "-->"));
-				else if (stream.match("DOCTYPE", true, true)) {
-					stream.eatWhile(/[\w\._\-]/);
-					return chain(doctype(1));
-				} else
-					return null;
-			} else if (stream.eat("?")) {
-				stream.eatWhile(/[\w\._\-]/);
-				state.tokenize = inBlock("meta", "?>");
-				return "meta";
-			} else {
-				type = stream.eat("/") ? "closeTag" : "openTag";
-				stream.eatSpace();
-				tagName = "";
-				var c;
-				while ((c = stream.eat(/[^\s\u00a0=<>\"\'\/?]/)))
-					tagName += c;
-				state.tokenize = inTag;
-				return "tag";
-			}
-		} else if (ch == "&") {
-			var ok;
-			if (stream.eat("#")) {
-				if (stream.eat("x")) {
-					ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";");
-				} else {
-					ok = stream.eatWhile(/[\d]/) && stream.eat(";");
-				}
-			} else {
-				ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(";");
-			}
-			return ok ? "atom" : "error";
-		} else {
-			stream.eatWhile(/[^&<]/);
-			return "text";
-		}
-	}
-
-	function inTag(stream, state) {
-		var ch = stream.next();
-		if (ch == ">" || (ch == "/" && stream.eat(">"))) {
-			state.tokenize = inText;
-			type = ch == ">" ? "endTag" : "selfcloseTag";
-			return "tag";
-		} else if (ch == "=") {
-			type = "equals";
-			return null;
-		} else if (/[\'\"]/.test(ch)) {
-			state.tokenize = inAttribute(ch);
-			return state.tokenize(stream, state);
-		} else {
-			stream.eatWhile(/[^\s\u00a0=<>\"\'\/?]/);
-			return "word";
-		}
-	}
-
-	function inAttribute(quote) {
-		return function(stream, state) {
-			while (!stream.eol()) {
-				if (stream.next() == quote) {
-					state.tokenize = inTag;
-					break;
-				}
-			}
-			return "string";
-		};
-	}
-
-	function inBlock(style, terminator) {
-		return function(stream, state) {
-			while (!stream.eol()) {
-				if (stream.match(terminator)) {
-					state.tokenize = inText;
-					break;
-				}
-				stream.next();
-			}
-			return style;
-		};
-	}
-	
-	function doctype(depth) {
-		return function(stream, state) {
-			var ch;
-			while ((ch = stream.next()) !== null) {
-				if (ch == "<") {
-					state.tokenize = doctype(depth + 1);
-					return state.tokenize(stream, state);
-				} else if (ch == ">") {
-					if (depth == 1) {
-						state.tokenize = inText;
-						break;
-					} else {
-						state.tokenize = doctype(depth - 1);
-						return state.tokenize(stream, state);
-					}
-				}
-			}
-			return "meta";
-		};
-	}
-
-	var curState = null, setStyle;
-	function pass() {
-		for (var i = arguments.length - 1; i >= 0; i--)
-			curState.cc.push(arguments[i]);
-	}
-	
-	function cont() {
-		pass.apply(null, arguments);
-		return true;
-	}
-
-	function pushContext(tagName, startOfLine) {
-		var noIndent = Kludges.doNotIndent.hasOwnProperty(tagName) 
-			|| (curState.context && curState.context.noIndent);
-		curState.context = {
-			prev : curState.context,
-			tagName : tagName,
-			indent : curState.indented,
-			startOfLine : startOfLine,
-			noIndent : noIndent
-		};
-	}
-	
-	function popContext() {
-		if (curState.context)
-			curState.context = curState.context.prev;
-	}
-
-	function element(type) {
-		if (type == "openTag") {
-			curState.tagName = tagName;
-			return cont(attributes, endtag(curState.startOfLine));
-		} else if (type == "closeTag") {
-			var err = false;
-			if (curState.context) {
-				if (curState.context.tagName != tagName) {
-					if (Kludges.implicitlyClosed.hasOwnProperty(curState.context.tagName.toLowerCase())) {
-						popContext();
-					}
-					err = !curState.context || curState.context.tagName != tagName;
-				}
-			} else {
-				err = true;
-			}
-			
-			if (err)
-				setStyle = "error";
-			return cont(endclosetag(err));
-		}
-		return cont();
-	}
-	
-	function endtag(startOfLine) {
-		return function(type) {
-			if (type == "selfcloseTag"
-					|| (type == "endTag" && Kludges.autoSelfClosers
-							.hasOwnProperty(curState.tagName
-									.toLowerCase()))) {
-				maybePopContext(curState.tagName.toLowerCase());
-				return cont();
-			}
-			if (type == "endTag") {
-				maybePopContext(curState.tagName.toLowerCase());
-				pushContext(curState.tagName, startOfLine);
-				return cont();
-			}
-			return cont();
-		};
-	}
-	
-	function endclosetag(err) {
-		return function(type) {
-			if (err)
-				setStyle = "error";
-			if (type == "endTag") {
-				popContext();
-				return cont();
-			}
-			setStyle = "error";
-			return cont(arguments.callee);
-		};
-	}
-	
-	function maybePopContext(nextTagName) {
-		var parentTagName;
-		while (true) {
-			if (!curState.context) {
-				return;
-			}
-			parentTagName = curState.context.tagName.toLowerCase();
-			if (!Kludges.contextGrabbers.hasOwnProperty(parentTagName)
-					|| !Kludges.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {
-				return;
-			}
-			popContext();
-		}
-	}
-
-	function attributes(type) {
-		if (type == "word") {
-			setStyle = "attribute";
-			return cont(attribute, attributes);
-		}
-		if (type == "endTag" || type == "selfcloseTag")
-			return pass();
-		setStyle = "error";
-		return cont(attributes);
-	}
-	
-	function attribute(type) {
-		if (type == "equals")
-			return cont(attvalue, attributes);
-		if (!Kludges.allowMissing)
-			setStyle = "error";
-		return (type == "endTag" || type == "selfcloseTag") ? pass()
-				: cont();
-	}
-	
-	function attvalue(type) {
-		if (type == "string")
-			return cont(attvaluemaybe);
-		if (type == "word" && Kludges.allowUnquoted) {
-			setStyle = "string";
-			return cont();
-		}
-		setStyle = "error";
-		return (type == "endTag" || type == "selfCloseTag") ? pass()
-				: cont();
-	}
-	
-	function attvaluemaybe(type) {
-		if (type == "string")
-			return cont(attvaluemaybe);
-		else
-			return pass();
-	}
-	
-	function startState() {
-		return {
-			tokenize : inText,
-			cc : [],
-			indented : 0,
-			startOfLine : true,
-			tagName : null,
-			context : null
-		};
-	}
-	
-	function token(stream, state) {
-		if (stream.sol()) {
-			state.startOfLine = true;
-			state.indented = 0;
-		}
-		
-		if (stream.eatSpace())
-			return null;
-
-		setStyle = type = tagName = null;
-		var style = state.tokenize(stream, state);
-		state.type = type;
-		if ((style || type) && style != "comment") {
-			curState = state;
-			while (true) {
-				var comb = state.cc.pop() || element;
-				if (comb(type || style))
-					break;
-			}
-		}
-		state.startOfLine = false;
-		return setStyle || style;
-	}
-
-	return {
-		/**
-		 * @memberOf emmet.xmlParser
-		 * @returns
-		 */
-		parse: function(data, offset) {
-			offset = offset || 0;
-			var state = startState();
-			var stream = stringStream.create(data);
-			var tokens = [];
-			while (!stream.eol()) {
-				tokens.push({
-					type: token(stream, state),
-					start: stream.start + offset,
-					end: stream.pos + offset
-				});
-				stream.start = stream.pos;
-			}
-			
-			return tokens;
-		}		
-	};
-});
-
-},{"../assets/stringStream":32}],63:[function(require,module,exports){
-/**
- * Module for working with file. Shall implement
- * IEmmetFile interface.
- *
- * Since implementation of this module depends
- * greatly on current runtime, this module must be
- * initialized with actual implementation first
- * before use. E.g. 
- * require('./plugin/file')({
- * 	read: function() {...}
- * })
- *
- * By default, this module provides Node.JS implementation
- */
-
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('../utils/common');
-
-	// hide it from Require.JS parser
-	(function(r) {
-		if (typeof define === 'undefined' || !define.amd) {
-			try {
-				fs = r('fs');
-				path = r('path');
-			} catch(e) {}
-		}
-	})(require);
-
-	// module is a function that can extend itself
-	module.exports = function(obj) {
-		if (obj) {
-			utils.extend(module.exports, obj);
-		}
-	};
-
-	function bts(bytes) {
-		var out = [];
-		for (var i = 0, il = bytes.length; i < il; i++) {
-			out.push(String.fromCharCode(bytes[i]));
-		}
-		return out.join('');
-	}
-
-	function isURL(path) {
-		var re = /^https?:\/\//;
-		return re.test(path);
-	}
-
-	return utils.extend(module.exports, {
-		_parseParams: function(args) {
-			var params = {
-				path: args[0],
-				size: 0
-			};
-
-			args = utils.toArray(args, 1);
-			params.callback = args[args.length - 1];
-			args = args.slice(0, args.length - 1);
-			if (args.length) {
-				params.size = args[0];
-			}
-
-			return params;
-		},
-
-		_read: function(params, callback) {
-			if (isURL(params.path)) {
-				var req = require(/^https:/.test(params.path) ? 'https' : 'http').get(params.path, function(res) {
-					var bufs = [];
-					var totalLength = 0;
-					var finished = false;
-					res
-						.on('data', function(chunk) {
-							totalLength += chunk.length;
-							bufs.push(chunk);
-							if (params.size && totalLength >= params.size) {
-								finished = true;
-								callback(null, Buffer.concat(bufs));
-								req.abort();
-							}
-						})
-						.on('end', function() {
-							if (!finished) {
-								finished = true;
-								callback(null, Buffer.concat(bufs));
-							}
-						});
-				}).on('error', callback);
-			} else {
-				if (params.size) {
-					var fd = fs.openSync(params.path, 'r');
-					var buf = new Buffer(params.size);
-					fs.read(fd, buf, 0, params.size, null, function(err, bytesRead) {
-						callback(err, buf)
-					});
-				} else {
-					callback(null, fs.readFileSync(params.path));
-				}
-			}
-		},
-
-		/**
-		 * Reads binary file content and return it
-		 * @param {String} path File's relative or absolute path
-		 * @return {String}
-		 */
-		read: function(path, size, callback) {
-			var params = this._parseParams(arguments);
-			this._read(params, function(err, buf) {
-				params.callback(err, err ? '' : bts(buf));
-			});
-		},
-
-		/**
-		 * Read file content and return it
-		 * @param {String} path File's relative or absolute path
-		 * @return {String}
-		 */
-		readText: function(path, size, callback) {
-			var params = this._parseParams(arguments);
-			this._read(params, function(err, buf) {
-				params.callback(err, err ? '' : buf.toString());
-			});
-		},
-		
-		/**
-		 * Locate <code>file_name</code> file that relates to <code>editor_file</code>.
-		 * File name may be absolute or relative path
-		 * 
-		 * <b>Dealing with absolute path.</b>
-		 * Many modern editors have a "project" support as information unit, but you
-		 * should not rely on project path to find file with absolute path. First,
-		 * it requires user to create a project before using this method (and this 
-		 * is not very convenient). Second, project path doesn't always points to
-		 * to website's document root folder: it may point, for example, to an 
-		 * upper folder which contains server-side scripts.
-		 * 
-		 * For better result, you should use the following algorithm in locating
-		 * absolute resources:
-		 * 1) Get parent folder for <code>editorFile</code> as a start point
-		 * 2) Append required <code>fileName</code> to start point and test if
-		 * file exists
-		 * 3) If it doesn't exists, move start point one level up (to parent folder)
-		 * and repeat step 2.
-		 * 
-		 * @param {String} editorFile
-		 * @param {String} fileName
-		 * @return {String} Returns null if <code>fileName</code> cannot be located
-		 */
-		locateFile: function(editorFile, fileName) {
-			if (isURL(fileName)) {
-				return fileName;
-			}
-
-			var dirname = editorFile, f;
-			fileName = fileName.replace(/^\/+/, '');
-			while (dirname && dirname !== path.dirname(dirname)) {
-				dirname = path.dirname(dirname);
-				f = path.join(dirname, fileName);
-				if (fs.existsSync(f))
-					return f;
-			}
-			
-			return '';
-		},
-		
-		/**
-		 * Creates absolute path by concatenating <code>parent</code> and <code>fileName</code>.
-		 * If <code>parent</code> points to file, its parent directory is used
-		 * @param {String} parent
-		 * @param {String} fileName
-		 * @return {String}
-		 */
-		createPath: function(parent, fileName, callback) {
-			var stat = fs.statSync(parent);
-			if (stat && !stat.isDirectory()) {
-				parent = path.dirname(parent);
-			}
-			
-			return callback(path.resolve(parent, fileName));
-		},
-		
-		/**
-		 * Saves <code>content</code> as <code>file</code>
-		 * @param {String} file File's absolute path
-		 * @param {String} content File content
-		 */
-		save: function(file, content) {
-			fs.writeFileSync(file, content, 'ascii');
-		},
-		
-		/**
-		 * Returns file extension in lower case
-		 * @param {String} file
-		 * @return {String}
-		 */
-		getExt: function(file) {
-			var m = (file || '').match(/\.([\w\-]+)$/);
-			return m ? m[1].toLowerCase() : '';
-		}
-	
-	});
-});
-},{"../utils/common":73}],64:[function(require,module,exports){
-/**
- * Resolver for fast CSS typing. Handles abbreviations with the following 
- * notation:<br>
- * 
- * <code>(-vendor prefix)?property(value)*(!)?</code>
- * 
- * <br><br>
- * <b>Abbreviation handling</b><br>
- * 
- * By default, Emmet searches for matching snippet definition for provided abbreviation.
- * If snippet wasn't found, Emmet automatically generates element with 
- * abbreviation's name. For example, <code>foo</code> abbreviation will generate
- * <code>&lt;foo&gt;&lt;/foo&gt;</code> output.
- * <br><br>
- * This module will capture all expanded properties and upgrade them with values, 
- * vendor prefixes and !important declarations. All unmatched abbreviations will 
- * be automatically transformed into <code>property-name: ${1}</code> snippets. 
- * 
- * <b>Vendor prefixes<b><br>
- * 
- * If CSS-property is preceded with dash, resolver should output property with
- * all <i>known</i> vendor prefixes. For example, if <code>brad</code> 
- * abbreviation generates <code>border-radius: ${value};</code> snippet,
- * the <code>-brad</code> abbreviation should generate:
- * <pre><code>
- * -webkit-border-radius: ${value};
- * -moz-border-radius: ${value};
- * border-radius: ${value};
- * </code></pre>
- * Note that <i>o</i> and <i>ms</i> prefixes are omitted since Opera and IE 
- * supports unprefixed property.<br><br>
- * 
- * Users can also provide an explicit list of one-character prefixes for any
- * CSS property. For example, <code>-wm-float</code> will produce
- * 
- * <pre><code>
- * -webkit-float: ${1};
- * -moz-float: ${1};
- * float: ${1};
- * </code></pre>
- * 
- * Although this example looks pointless, users can use this feature to write
- * cutting-edge properties implemented by browser vendors recently.  
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var prefs = require('../assets/preferences');
-	var resources = require('../assets/resources');
-	var stringStream = require('../assets/stringStream');
-	var ciu = require('../assets/caniuse');
-	var utils = require('../utils/common');
-	var template = require('../utils/template');
-	var cssEditTree = require('../editTree/css');
-
-	var prefixObj = {
-		/** Real vendor prefix name */
-		prefix: 'emmet',
-		
-		/** 
-		 * Indicates this prefix is obsolete and should't be used when user 
-		 * wants to generate all-prefixed properties
-		 */
-		obsolete: false,
-		
-		/**
-		 * Returns prefixed CSS property name
-		 * @param {String} name Unprefixed CSS property
-		 */
-		transformName: function(name) {
-			return '-' + this.prefix + '-' + name;
-		},
-		
-		/**
-		 * List of unprefixed CSS properties that supported by 
-		 * current prefix. This list is used to generate all-prefixed property
-		 * @returns {Array} 
-		 */
-		properties: function() {
-			return getProperties('css.' + this.prefix + 'Properties') || [];
-		},
-		
-		/**
-		 * Check if given property is supported by current prefix
-		 * @param name
-		 */
-		supports: function(name) {
-			return ~this.properties().indexOf(name);
-		}
-	};
-	
-	
-	/** 
-	 * List of registered one-character prefixes. Key is a one-character prefix, 
-	 * value is an <code>prefixObj</code> object
-	 */
-	var vendorPrefixes = {};
-	
-	var defaultValue = '${1};';
-	
-	// XXX module preferences
-	prefs.define('css.valueSeparator', ': ',
-			'Defines a symbol that should be placed between CSS property and ' 
-			+ 'value when expanding CSS abbreviations.');
-	prefs.define('css.propertyEnd', ';',
-			'Defines a symbol that should be placed at the end of CSS property  ' 
-			+ 'when expanding CSS abbreviations.');
-	
-	prefs.define('stylus.valueSeparator', ' ',
-			'Defines a symbol that should be placed between CSS property and ' 
-			+ 'value when expanding CSS abbreviations in Stylus dialect.');
-	prefs.define('stylus.propertyEnd', '',
-			'Defines a symbol that should be placed at the end of CSS property  ' 
-			+ 'when expanding CSS abbreviations in Stylus dialect.');
-	
-	prefs.define('sass.propertyEnd', '',
-			'Defines a symbol that should be placed at the end of CSS property  ' 
-			+ 'when expanding CSS abbreviations in SASS dialect.');
-
-	prefs.define('css.syntaxes', 'css, less, sass, scss, stylus, styl',
-			'List of syntaxes that should be treated as CSS dialects.');
-	
-	prefs.define('css.autoInsertVendorPrefixes', true,
-			'Automatically generate vendor-prefixed copies of expanded CSS ' 
-			+ 'property. By default, Emmet will generate vendor-prefixed '
-			+ 'properties only when you put dash before abbreviation ' 
-			+ '(e.g. <code>-bxsh</code>). With this option enabled, you don’t ' 
-			+ 'need dashes before abbreviations: Emmet will produce ' 
-			+ 'vendor-prefixed properties for you.');
-
-	prefs.define('less.autoInsertVendorPrefixes', false, 'Same as <code>css.autoInsertVendorPrefixes</code> but for LESS syntax');
-	prefs.define('scss.autoInsertVendorPrefixes', false, 'Same as <code>css.autoInsertVendorPrefixes</code> but for SCSS syntax');
-	prefs.define('sass.autoInsertVendorPrefixes', false, 'Same as <code>css.autoInsertVendorPrefixes</code> but for SASS syntax');
-	prefs.define('stylus.autoInsertVendorPrefixes', false, 'Same as <code>css.autoInsertVendorPrefixes</code> but for Stylus syntax');
-	
-	var descTemplate = template('A comma-separated list of CSS properties that may have ' 
-		+ '<code><%= vendor %></code> vendor prefix. This list is used to generate '
-		+ 'a list of prefixed properties when expanding <code>-property</code> '
-		+ 'abbreviations. Empty list means that all possible CSS values may ' 
-		+ 'have <code><%= vendor %></code> prefix.');
-	
-	var descAddonTemplate = template('A comma-separated list of <em>additional</em> CSS properties ' 
-			+ 'for <code>css.<%= vendor %>Preperties</code> preference. ' 
-			+ 'You should use this list if you want to add or remove a few CSS ' 
-			+ 'properties to original set. To add a new property, simply write its name, '
-			+ 'to remove it, precede property with hyphen.<br>'
-			+ 'For example, to add <em>foo</em> property and remove <em>border-radius</em> one, '
-			+ 'the preference value will look like this: <code>foo, -border-radius</code>.');
-	
-	// properties list is created from cssFeatures.html file
-	var props = {
-		'webkit': 'animation, animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, appearance, backface-visibility, background-clip, background-composite, background-origin, background-size, border-fit, border-horizontal-spacing, border-image, border-vertical-spacing, box-align, box-direction, box-flex, box-flex-group, box-lines, box-ordinal-group, box-orient, box-pack, box-reflect, box-shadow, color-correction, column-break-after, column-break-before, column-break-inside, column-count, column-gap, column-rule-color, column-rule-style, column-rule-width, column-span, column-width, dashboard-region, font-smoothing, highlight, hyphenate-character, hyphenate-limit-after, hyphenate-limit-before, hyphens, line-box-contain, line-break, line-clamp, locale, margin-before-collapse, margin-after-collapse, marquee-direction, marquee-increment, marquee-repetition, marquee-style, mask-attachment, mask-box-image, mask-box-image-outset, mask-box-image-repeat, mask-box-image-slice, mask-box-image-source, mask-box-image-width, mask-clip, mask-composite, mask-image, mask-origin, mask-position, mask-repeat, mask-size, nbsp-mode, perspective, perspective-origin, rtl-ordering, text-combine, text-decorations-in-effect, text-emphasis-color, text-emphasis-position, text-emphasis-style, text-fill-color, text-orientation, text-security, text-stroke-color, text-stroke-width, transform, transition, transform-origin, transform-style, transition-delay, transition-duration, transition-property, transition-timing-function, user-drag, user-modify, user-select, writing-mode, svg-shadow, box-sizing, border-radius',
-		'moz': 'animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, appearance, backface-visibility, background-inline-policy, binding, border-bottom-colors, border-image, border-left-colors, border-right-colors, border-top-colors, box-align, box-direction, box-flex, box-ordinal-group, box-orient, box-pack, box-shadow, box-sizing, column-count, column-gap, column-rule-color, column-rule-style, column-rule-width, column-width, float-edge, font-feature-settings, font-language-override, force-broken-image-icon, hyphens, image-region, orient, outline-radius-bottomleft, outline-radius-bottomright, outline-radius-topleft, outline-radius-topright, perspective, perspective-origin, stack-sizing, tab-size, text-blink, text-decoration-color, text-decoration-line, text-decoration-style, text-size-adjust, transform, transform-origin, transform-style, transition, transition-delay, transition-duration, transition-property, transition-timing-function, user-focus, user-input, user-modify, user-select, window-shadow, background-clip, border-radius',
-		'ms': 'accelerator, backface-visibility, background-position-x, background-position-y, behavior, block-progression, box-align, box-direction, box-flex, box-line-progression, box-lines, box-ordinal-group, box-orient, box-pack, content-zoom-boundary, content-zoom-boundary-max, content-zoom-boundary-min, content-zoom-chaining, content-zoom-snap, content-zoom-snap-points, content-zoom-snap-type, content-zooming, filter, flow-from, flow-into, font-feature-settings, grid-column, grid-column-align, grid-column-span, grid-columns, grid-layer, grid-row, grid-row-align, grid-row-span, grid-rows, high-contrast-adjust, hyphenate-limit-chars, hyphenate-limit-lines, hyphenate-limit-zone, hyphens, ime-mode, interpolation-mode, layout-flow, layout-grid, layout-grid-char, layout-grid-line, layout-grid-mode, layout-grid-type, line-break, overflow-style, perspective, perspective-origin, perspective-origin-x, perspective-origin-y, scroll-boundary, scroll-boundary-bottom, scroll-boundary-left, scroll-boundary-right, scroll-boundary-top, scroll-chaining, scroll-rails, scroll-snap-points-x, scroll-snap-points-y, scroll-snap-type, scroll-snap-x, scroll-snap-y, scrollbar-arrow-color, scrollbar-base-color, scrollbar-darkshadow-color, scrollbar-face-color, scrollbar-highlight-color, scrollbar-shadow-color, scrollbar-track-color, text-align-last, text-autospace, text-justify, text-kashida-space, text-overflow, text-size-adjust, text-underline-position, touch-action, transform, transform-origin, transform-origin-x, transform-origin-y, transform-origin-z, transform-style, transition, transition-delay, transition-duration, transition-property, transition-timing-function, user-select, word-break, wrap-flow, wrap-margin, wrap-through, writing-mode',
-		'o': 'dashboard-region, animation, animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, border-image, link, link-source, object-fit, object-position, tab-size, table-baseline, transform, transform-origin, transition, transition-delay, transition-duration, transition-property, transition-timing-function, accesskey, input-format, input-required, marquee-dir, marquee-loop, marquee-speed, marquee-style'
-	};
-	
-	Object.keys(props).forEach(function(k) {
-		prefs.define('css.' + k + 'Properties', props[k], descTemplate({vendor: k}));
-		prefs.define('css.' + k + 'PropertiesAddon', '', descAddonTemplate({vendor: k}));
-	});
-	
-	prefs.define('css.unitlessProperties', 'z-index, line-height, opacity, font-weight, zoom', 
-			'The list of properties whose values ​​must not contain units.');
-	
-	prefs.define('css.intUnit', 'px', 'Default unit for integer values');
-	prefs.define('css.floatUnit', 'em', 'Default unit for float values');
-	
-	prefs.define('css.keywords', 'auto, inherit, all', 
-			'A comma-separated list of valid keywords that can be used in CSS abbreviations.');
-	
-	prefs.define('css.keywordAliases', 'a:auto, i:inherit, s:solid, da:dashed, do:dotted, t:transparent', 
-			'A comma-separated list of keyword aliases, used in CSS abbreviation. '
-			+ 'Each alias should be defined as <code>alias:keyword_name</code>.');
-	
-	prefs.define('css.unitAliases', 'e:em, p:%, x:ex, r:rem', 
-			'A comma-separated list of unit aliases, used in CSS abbreviation. '
-			+ 'Each alias should be defined as <code>alias:unit_value</code>.');
-	
-	prefs.define('css.color.short', true, 
-			'Should color values like <code>#ffffff</code> be shortened to '
-			+ '<code>#fff</code> after abbreviation with color was expanded.');
-	
-	prefs.define('css.color.case', 'keep', 
-			'Letter case of color values generated by abbreviations with color '
-			+ '(like <code>c#0</code>). Possible values are <code>upper</code>, '
-			+ '<code>lower</code> and <code>keep</code>.');
-	
-	prefs.define('css.fuzzySearch', true, 
-			'Enable fuzzy search among CSS snippet names. When enabled, every ' 
-			+ '<em>unknown</em> snippet will be scored against available snippet '
-			+ 'names (not values or CSS properties!). The match with best score '
-			+ 'will be used to resolve snippet value. For example, with this ' 
-			+ 'preference enabled, the following abbreviations are equal: '
-			+ '<code>ov:h</code> == <code>ov-h</code> == <code>o-h</code> == '
-			+ '<code>oh</code>');
-	
-	prefs.define('css.fuzzySearchMinScore', 0.3, 
-			'The minium score (from 0 to 1) that fuzzy-matched abbreviation should ' 
-			+ 'achive. Lower values may produce many false-positive matches, '
-			+ 'higher values may reduce possible matches.');
-	
-	prefs.define('css.alignVendor', false, 
-			'If set to <code>true</code>, all generated vendor-prefixed properties ' 
-			+ 'will be aligned by real property name.');
-	
-	
-	function isNumeric(ch) {
-		var code = ch && ch.charCodeAt(0);
-		return (ch && ch == '.' || (code > 47 && code < 58));
-	}
-	
-	/**
-	 * Check if provided snippet contains only one CSS property and value.
-	 * @param {String} snippet
-	 * @returns {Boolean}
-	 */
-	function isSingleProperty(snippet) {
-		snippet = utils.trim(snippet);
-		
-		// check if it doesn't contain a comment and a newline
-		if (/\/\*|\n|\r/.test(snippet)) {
-			return false;
-		}
-		
-		// check if it's a valid snippet definition
-		if (!/^[a-z0-9\-]+\s*\:/i.test(snippet)) {
-			return false;
-		}
-		
-		return snippet.replace(/\$\{.+?\}/g, '').split(':').length == 2;
-	}
-	
-	/**
-	 * Normalizes abbreviated value to final CSS one
-	 * @param {String} value
-	 * @returns {String}
-	 */
-	function normalizeValue(value) {
-		if (value.charAt(0) == '-' && !/^\-[\.\d]/.test(value)) {
-			value = value.replace(/^\-+/, '');
-		}
-		
-		var ch = value.charAt(0);
-		if (ch == '#') {
-			return normalizeHexColor(value);
-		}
-
-		if (ch == '$') {
-			return utils.escapeText(value);
-		}
-
-		return getKeyword(value);
-	}
-	
-	function normalizeHexColor(value) {
-		var hex = value.replace(/^#+/, '') || '0';
-		if (hex.toLowerCase() == 't') {
-			return 'transparent';
-		}
-
-		var opacity = '';
-		hex = hex.replace(/\.(\d+)$/, function(str) {
-			opacity = '0' + str;
-			return '';
-		});
-		
-		var repeat = utils.repeatString;
-		var color = null;
-		switch (hex.length) {
-			case 1:
-				color = repeat(hex, 6);
-				break;
-			case 2:
-				color = repeat(hex, 3);
-				break;
-			case 3:
-				color = hex.charAt(0) + hex.charAt(0) + hex.charAt(1) + hex.charAt(1) + hex.charAt(2) + hex.charAt(2);
-				break;
-			case 4:
-				color = hex + hex.substr(0, 2);
-				break;
-			case 5:
-				color = hex + hex.charAt(0);
-				break;
-			default:
-				color = hex.substr(0, 6);
-		}
-
-		if (opacity) {
-			return toRgba(color, opacity);
-		}
-		
-		// color must be shortened?
-		if (prefs.get('css.color.short')) {
-			var p = color.split('');
-			if (p[0] == p[1] && p[2] == p[3] && p[4] == p[5]) {
-				color = p[0] + p[2] + p[4];
-			}
-		}
-		
-		// should transform case?
-		switch (prefs.get('css.color.case')) {
-			case 'upper':
-				color = color.toUpperCase();
-				break;
-			case 'lower':
-				color = color.toLowerCase();
-				break;
-		}
-		
-		return '#' + color;
-	}
-
-	/**
-	 * Transforms HEX color definition into RGBA one
-	 * @param  {String} color   HEX color, 6 characters
-	 * @param  {String} opacity Opacity value
-	 * @return {String}
-	 */
-	function toRgba(color, opacity) {
-		var r = parseInt(color.substr(0, 2), 16);
-		var g = parseInt(color.substr(2, 2), 16);
-		var b = parseInt(color.substr(4, 2), 16);
-
-		return 'rgba(' + [r, g, b, opacity].join(', ') + ')';
-	}
-	
-	function getKeyword(name) {
-		var aliases = prefs.getDict('css.keywordAliases');
-		return name in aliases ? aliases[name] : name;
-	}
-	
-	function getUnit(name) {
-		var aliases = prefs.getDict('css.unitAliases');
-		return name in aliases ? aliases[name] : name;
-	}
-	
-	function isValidKeyword(keyword) {
-		return ~prefs.getArray('css.keywords').indexOf(getKeyword(keyword));
-	}
-	
-	/**
-	 * Check if passed CSS property support specified vendor prefix 
-	 * @param {String} property
-	 * @param {String} prefix
-	 */
-	function hasPrefix(property, prefix) {
-		var info = vendorPrefixes[prefix];
-		
-		if (!info)
-			info = utils.find(vendorPrefixes, function(data) {
-				return data.prefix == prefix;
-			});
-		
-		return info && info.supports(property);
-	}
-
-	/**
-	 * Finds available vendor prefixes for given CSS property.
-	 * Search is performed within Can I Use database and internal
-	 * property list
-	 * @param  {String} property CSS property name
-	 * @return {Array} Array of resolved prefixes or null if
-	 * prefixes are not available for this property at all.
-	 * Empty array means prefixes are not available for current
-	 * user-define era
-	 */
-	function findVendorPrefixes(property) {
-		var prefixes = ciu.resolvePrefixes(property);
-		if (!prefixes) {
-			// Can I Use database is disabled or prefixes are not
-			// available for this property
-			prefixes = [];
-			Object.keys(vendorPrefixes).forEach(function(key) {
-				if (hasPrefix(property, key)) {
-					prefixes.push(vendorPrefixes[key].prefix);
-				}
-			});
-
-			if (!prefixes.length) {
-				prefixes = null;
-			}
-		}
-
-		return prefixes;
-	}
-	
-	/**
-	 * Search for a list of supported prefixes for CSS property. This list
-	 * is used to generate all-prefixed snippet
-	 * @param {String} property CSS property name
-	 * @returns {Array}
-	 */
-	function findInternalPrefixes(property, noAutofill) {
-		var result = [];
-		var prefixes = findVendorPrefixes(property);
-		
-		if (prefixes) {
-			var prefixMap = {};
-			Object.keys(vendorPrefixes).forEach(function(key) {
-				prefixMap[vendorPrefixes[key].prefix] = key;
-			});
-
-			result = prefixes.map(function(prefix) {
-				return prefixMap[prefix];
-			});
-		}
-		
-		if (!result.length && !noAutofill) {
-			// add all non-obsolete prefixes
-			Object.keys(vendorPrefixes).forEach(function(prefix) {
-				if (!vendorPrefixes[prefix].obsolete) {
-					result.push(prefix);
-				}
-			});
-		}
-		
-		return result;
-	}
-	
-	function addPrefix(name, obj) {
-		if (typeof obj === 'string') {
-			obj = {prefix: obj};
-		}
-		
-		vendorPrefixes[name] = utils.extend({}, prefixObj, obj);
-	}
-	
-	function getSyntaxPreference(name, syntax) {
-		if (syntax) {
-			// hacky alias for Stylus dialect
-			if (syntax == 'styl') {
-				syntax = 'stylus';
-			}
-
-			var val = prefs.get(syntax + '.' + name);
-			if (typeof val !== 'undefined') {
-				return val;
-			}
-		}
-		
-		return prefs.get('css.' + name);
-	}
-	
-	/**
-	 * Format CSS property according to current syntax dialect
-	 * @param {String} property
-	 * @param {String} syntax
-	 * @returns {String}
-	 */
-	function formatProperty(property, syntax) {
-		var ix = property.indexOf(':');
-		property = property.substring(0, ix).replace(/\s+$/, '') 
-			+ getSyntaxPreference('valueSeparator', syntax)
-			+ utils.trim(property.substring(ix + 1));
-		
-		return property.replace(/\s*;\s*$/, getSyntaxPreference('propertyEnd', syntax));
-	}
-	
-	/**
-	 * Transforms snippet value if required. For example, this transformation
-	 * may add <i>!important</i> declaration to CSS property
-	 * @param {String} snippet
-	 * @param {Boolean} isImportant
-	 * @returns {String}
-	 */
-	function transformSnippet(snippet, isImportant, syntax) {
-		if (typeof snippet !== 'string') {
-			snippet = snippet.data;
-		}
-		
-		if (!isSingleProperty(snippet)) {
-			return snippet;
-		}
-		
-		if (isImportant) {
-			if (~snippet.indexOf(';')) {
-				snippet = snippet.split(';').join(' !important;');
-			} else {
-				snippet += ' !important';
-			}
-		}
-		
-		return formatProperty(snippet, syntax);
-	}
-	
-	function getProperties(key) {
-		var list = prefs.getArray(key);
-		var addon = prefs.getArray(key + 'Addon');
-		if (addon) {
-			addon.forEach(function(prop) {
-				if (prop.charAt(0) == '-') {
-					list = utils.without(list, prop.substr(1));
-				} else {
-					if (prop.charAt(0) == '+')
-						prop = prop.substr(1);
-					
-					list.push(prop);
-				}
-			});
-		}
-		
-		return list;
-	}
-
-	/**
-	 * Tries to produce properties with vendor-prefixed value
-	 * @param  {Object} snippetObj Parsed snippet object
-	 * @return {Array} Array of properties with prefixed values
-	 */
-	function resolvePrefixedValues(snippetObj, isImportant, syntax) {
-		var prefixes = [];
-		var lookup = {};
-
-		var parts = cssEditTree.findParts(snippetObj.value);
-		parts.reverse();
-		parts.forEach(function(p) {
-			var partValue = p.substring(snippetObj.value);
-			(findVendorPrefixes(partValue) || []).forEach(function(prefix) {
-				if (!lookup[prefix]) {
-					lookup[prefix] = snippetObj.value;
-					prefixes.push(prefix);
-				}
-
-				lookup[prefix] = utils.replaceSubstring(lookup[prefix], '-' + prefix + '-' + partValue, p);
-			});
-		});
-
-		return prefixes.map(function(prefix) {
-			return transformSnippet(snippetObj.name + ':' + lookup[prefix], isImportant, syntax);
-		});
-	}
-	
-	
-	// TODO refactor, this looks awkward now
-	addPrefix('w', {
-		prefix: 'webkit'
-	});
-	addPrefix('m', {
-		prefix: 'moz'
-	});
-	addPrefix('s', {
-		prefix: 'ms'
-	});
-	addPrefix('o', {
-		prefix: 'o'
-	});
-	
-	
-	module = module || {};
-	module.exports = {
-		/**
-		 * Adds vendor prefix
-		 * @param {String} name One-character prefix name
-		 * @param {Object} obj Object describing vendor prefix
-		 * @memberOf cssResolver
-		 */
-		addPrefix: addPrefix,
-		
-		/**
-		 * Check if passed CSS property supports specified vendor prefix
-		 * @param {String} property
-		 * @param {String} prefix
-		 */
-		supportsPrefix: hasPrefix,
-
-		resolve: function(node, syntax) {
-			var cssSyntaxes = prefs.getArray('css.syntaxes');
-			if (cssSyntaxes && ~cssSyntaxes.indexOf(syntax) && node.isElement()) {
-				return this.expandToSnippet(node.abbreviation, syntax);
-			}
-			
-			return null;
-		},
-
-		/**
-		 * Returns prefixed version of passed CSS property, only if this
-		 * property supports such prefix
-		 * @param {String} property
-		 * @param {String} prefix
-		 * @returns
-		 */
-		prefixed: function(property, prefix) {
-			return hasPrefix(property, prefix) 
-				? '-' + prefix + '-' + property 
-				: property;
-		},
-		
-		/**
-		 * Returns list of all registered vendor prefixes
-		 * @returns {Array}
-		 */
-		listPrefixes: function() {
-			return vendorPrefixes.map(function(obj) {
-				return obj.prefix;
-			});
-		},
-		
-		/**
-		 * Returns object describing vendor prefix
-		 * @param {String} name
-		 * @returns {Object}
-		 */
-		getPrefix: function(name) {
-			return vendorPrefixes[name];
-		},
-		
-		/**
-		 * Removes prefix object
-		 * @param {String} name
-		 */
-		removePrefix: function(name) {
-			if (name in vendorPrefixes)
-				delete vendorPrefixes[name];
-		},
-		
-		/**
-		 * Extract vendor prefixes from abbreviation
-		 * @param {String} abbr
-		 * @returns {Object} Object containing array of prefixes and clean 
-		 * abbreviation name
-		 */
-		extractPrefixes: function(abbr) {
-			if (abbr.charAt(0) != '-') {
-				return {
-					property: abbr,
-					prefixes: null
-				};
-			}
-			
-			// abbreviation may either contain sequence of one-character prefixes
-			// or just dash, meaning that user wants to produce all possible
-			// prefixed properties
-			var i = 1, il = abbr.length, ch;
-			var prefixes = [];
-			
-			while (i < il) {
-				ch = abbr.charAt(i);
-				if (ch == '-') {
-					// end-sequence character found, stop searching
-					i++;
-					break;
-				}
-				
-				if (ch in vendorPrefixes) {
-					prefixes.push(ch);
-				} else {
-					// no prefix found, meaning user want to produce all
-					// vendor-prefixed properties
-					prefixes.length = 0;
-					i = 1;
-					break;
-				}
-				
-				i++;
-			}
-			
-			// reached end of abbreviation and no property name left
-			if (i == il -1) {
-				i = 1;
-				prefixes.length = 1;
-			}
-			
-			return {
-				property: abbr.substring(i),
-				prefixes: prefixes.length ? prefixes : 'all'
-			};
-		},
-		
-		/**
-		 * Search for value substring in abbreviation
-		 * @param {String} abbr
-		 * @returns {String} Value substring
-		 */
-		findValuesInAbbreviation: function(abbr, syntax) {
-			syntax = syntax || 'css';
-			
-			var i = 0, il = abbr.length, value = '', ch;
-			while (i < il) {
-				ch = abbr.charAt(i);
-				if (isNumeric(ch) || ch == '#' || ch == '$' || (ch == '-' && isNumeric(abbr.charAt(i + 1)))) {
-					value = abbr.substring(i);
-					break;
-				}
-				
-				i++;
-			}
-			
-			// try to find keywords in abbreviation
-			var property = abbr.substring(0, abbr.length - value.length);
-			var keywords = [];
-			// try to extract some commonly-used properties
-			while (~property.indexOf('-') && !resources.findSnippet(syntax, property)) {
-				var parts = property.split('-');
-				var lastPart = parts.pop();
-				if (!isValidKeyword(lastPart)) {
-					break;
-				}
-				
-				keywords.unshift(lastPart);
-				property = parts.join('-');
-			}
-
-			return keywords.join('-') + value;
-		},
-		
-		parseValues: function(str) {
-			/** @type StringStream */
-			var stream = stringStream.create(str);
-			var values = [];
-			var ch = null;
-			
-			while ((ch = stream.next())) {
-				if (ch == '$') {
-					stream.match(/^[^\$]+/, true);
-					values.push(stream.current());
-				} else if (ch == '#') {
-					stream.match(/^t|[0-9a-f]+(\.\d+)?/i, true);
-					values.push(stream.current());
-				} else if (ch == '-') {
-					if (isValidKeyword(utils.last(values)) || 
-							( stream.start && isNumeric(str.charAt(stream.start - 1)) )
-						) {
-						stream.start = stream.pos;
-					}
-					
-					stream.match(/^\-?[0-9]*(\.[0-9]+)?[a-z%\.]*/, true);
-					values.push(stream.current());
-				} else {
-					stream.match(/^[0-9]*(\.[0-9]*)?[a-z%]*/, true);
-					values.push(stream.current());
-				}
-				
-				stream.start = stream.pos;
-			}
-			
-			return values
-				.filter(function(item) {
-					return !!item;
-				})
-				.map(normalizeValue);
-		},
-		
-		/**
-		 * Extracts values from abbreviation
-		 * @param {String} abbr
-		 * @returns {Object} Object containing array of values and clean 
-		 * abbreviation name
-		 */
-		extractValues: function(abbr) {
-			// search for value start
-			var abbrValues = this.findValuesInAbbreviation(abbr);
-			if (!abbrValues) {
-				return {
-					property: abbr,
-					values: null
-				};
-			}
-			
-			return {
-				property: abbr.substring(0, abbr.length - abbrValues.length).replace(/-$/, ''),
-				values: this.parseValues(abbrValues)
-			};
-		},
-		
-		/**
-		 * Normalizes value, defined in abbreviation.
-		 * @param {String} value
-		 * @param {String} property
-		 * @returns {String}
-		 */
-		normalizeValue: function(value, property) {
-			property = (property || '').toLowerCase();
-			var unitlessProps = prefs.getArray('css.unitlessProperties');
-			return value.replace(/^(\-?[0-9\.]+)([a-z]*)$/, function(str, val, unit) {
-				if (!unit && (val == '0' || ~unitlessProps.indexOf(property)))
-					return val;
-				
-				if (!unit)
-					return val.replace(/\.$/, '') + prefs.get(~val.indexOf('.') ? 'css.floatUnit' : 'css.intUnit');
-				
-				return val + getUnit(unit);
-			});
-		},
-		
-		/**
-		 * Expands abbreviation into a snippet
-		 * @param {String} abbr Abbreviation name to expand
-		 * @param {String} value Abbreviation value
-		 * @param {String} syntax Currect syntax or dialect. Default is 'css'
-		 * @returns {Object} Array of CSS properties and values or predefined
-		 * snippet (string or element)
-		 */
-		expand: function(abbr, value, syntax) {
-			syntax = syntax || 'css';
-			var autoInsertPrefixes = prefs.get(syntax + '.autoInsertVendorPrefixes');
-			
-			// check if snippet should be transformed to !important
-			var isImportant = /^(.+)\!$/.test(abbr);
-			if (isImportant) {
-				abbr = RegExp.$1;
-			}
-
-			// check if we have abbreviated resource
-			var snippet = resources.findSnippet(syntax, abbr);
-			if (snippet && !autoInsertPrefixes) {
-				return transformSnippet(snippet, isImportant, syntax);
-			}
-			
-			// no abbreviated resource, parse abbreviation
-			var prefixData = this.extractPrefixes(abbr);
-			var valuesData = this.extractValues(prefixData.property);
-			var abbrData = utils.extend(prefixData, valuesData);
-
-			if (!snippet) {
-				snippet = resources.findSnippet(syntax, abbrData.property);
-			} else {
-				abbrData.values = null;
-			}
-			
-			if (!snippet && prefs.get('css.fuzzySearch')) {
-				// let’s try fuzzy search
-				snippet = resources.fuzzyFindSnippet(syntax, abbrData.property, parseFloat(prefs.get('css.fuzzySearchMinScore')));
-			}
-			
-			if (!snippet) {
-				if (!abbrData.property) {
-					return null;
-				}
-				snippet = abbrData.property + ':' + defaultValue;
-			} else if (typeof snippet !== 'string') {
-				snippet = snippet.data;
-			}
-			
-			if (!isSingleProperty(snippet)) {
-				return snippet;
-			}
-			
-			var snippetObj = this.splitSnippet(snippet);
-			var result = [];
-			if (!value && abbrData.values) {
-				value = abbrData.values.map(function(val) {
-					return this.normalizeValue(val, snippetObj.name);
-				}, this).join(' ') + ';';
-			}
-			
-			snippetObj.value = value || snippetObj.value;
-
-			var prefixes = abbrData.prefixes == 'all' || (!abbrData.prefixes && autoInsertPrefixes) 
-				? findInternalPrefixes(snippetObj.name, autoInsertPrefixes && abbrData.prefixes != 'all')
-				: abbrData.prefixes;
-				
-				
-			var names = [], propName;
-			(prefixes || []).forEach(function(p) {
-				if (p in vendorPrefixes) {
-					propName = vendorPrefixes[p].transformName(snippetObj.name);
-					names.push(propName);
-					result.push(transformSnippet(propName + ':' + snippetObj.value,
-							isImportant, syntax));
-				}
-			});
-			
-			// put the original property
-			result.push(transformSnippet(snippetObj.name + ':' + snippetObj.value, isImportant, syntax));
-			names.push(snippetObj.name);
-
-			result = resolvePrefixedValues(snippetObj, isImportant, syntax).concat(result);
-			
-			if (prefs.get('css.alignVendor')) {
-				var pads = utils.getStringsPads(names);
-				result = result.map(function(prop, i) {
-					return pads[i] + prop;
-				});
-			}
-			
-			return result;
-		},
-		
-		/**
-		 * Same as <code>expand</code> method but transforms output into 
-		 * Emmet snippet
-		 * @param {String} abbr
-		 * @param {String} syntax
-		 * @returns {String}
-		 */
-		expandToSnippet: function(abbr, syntax) {
-			var snippet = this.expand(abbr, null, syntax);
-			if (snippet === null) {
-				return null;
-			}
-
-			if (Array.isArray(snippet)) {
-				return snippet.join('\n');
-			}
-			
-			if (typeof snippet !== 'string') {
-				return snippet.data;
-			}
-			
-			return snippet + '';
-		},
-		
-		/**
-		 * Split snippet into a CSS property-value pair
-		 * @param {String} snippet
-		 */
-		splitSnippet: function(snippet) {
-			snippet = utils.trim(snippet);
-			if (snippet.indexOf(':') == -1) {
-				return {
-					name: snippet,
-					value: defaultValue
-				};
-			}
-			
-			var pair = snippet.split(':');
-			
-			return {
-				name: utils.trim(pair.shift()),
-				// replace ${0} tabstop to produce valid vendor-prefixed values
-				// where possible
-				value: utils.trim(pair.join(':')).replace(/^(\$\{0\}|\$0)(\s*;?)$/, '${1}$2')
-			};
-		},
-		
-		getSyntaxPreference: getSyntaxPreference,
-		transformSnippet: transformSnippet,
-		vendorPrefixes: findVendorPrefixes
-	};
-
-	return module.exports;
-});
-},{"../assets/caniuse":23,"../assets/preferences":28,"../assets/resources":31,"../assets/stringStream":32,"../editTree/css":37,"../utils/common":73,"../utils/template":77}],65:[function(require,module,exports){
-/**
- * 'Expand Abbreviation' handler that parses gradient definition from under 
- * cursor and updates CSS rule with vendor-prefixed values.
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var prefs = require('../assets/preferences');
-	var resources = require('../assets/resources');
-	var utils = require('../utils/common');
-	var stringStream = require('../assets/stringStream');
-	var cssResolver = require('./css');
-	var range = require('../assets/range');
-	var cssEditTree = require('../editTree/css');
-	var editorUtils = require('../utils/editor');
-	var linearGradient = require('./gradient/linear');
-
-	var cssSyntaxes = ['css', 'less', 'sass', 'scss', 'stylus', 'styl'];
-	
-	// XXX define preferences
-	prefs.define('css.gradient.prefixes', 'webkit, moz, o',
-			'A comma-separated list of vendor-prefixes for which values should ' 
-			+ 'be generated.');
-	
-	prefs.define('css.gradient.oldWebkit', false,
-			'Generate gradient definition for old Webkit implementations');
-	
-	prefs.define('css.gradient.omitDefaultDirection', true,
-		'Do not output default direction definition in generated gradients.');
-	
-	prefs.define('css.gradient.defaultProperty', 'background-image',
-		'When gradient expanded outside CSS value context, it will produce '
-			+ 'properties with this name.');
-	
-	prefs.define('css.gradient.fallback', false,
-			'With this option enabled, CSS gradient generator will produce '
-			+ '<code>background-color</code> property with gradient first color '
-			+ 'as fallback for old browsers.');
-
-	/**
-	 * Resolves property name (abbreviation): searches for snippet definition in 
-	 * 'resources' and returns new name of matched property
-	 */
-	function resolvePropertyName(name, syntax) {
-		var snippet = resources.findSnippet(syntax, name);
-		
-		if (!snippet && prefs.get('css.fuzzySearch')) {
-			var minScore = parseFloat(prefs.get('css.fuzzySearchMinScore'));
-			snippet = resources.fuzzyFindSnippet(syntax, name, minScore);
-		}
-		
-		if (snippet) {
-			if (typeof snippet !== 'string') {
-				snippet = snippet.data;
-			}
-			
-			return cssResolver.splitSnippet(snippet).name;
-		}
-	}
-
-	/**
-	 * Returns vendor prefixes for given gradient type
-	 * @param {String} type Gradient type (currently, 'linear-gradient' 
-	 * is the only supported value)
-	 * @return {Array}
-	 */
-	function getGradientPrefixes(type) {
-		var prefixes = cssResolver.vendorPrefixes(type);
-		if (!prefixes) {
-			// disabled Can I Use, fallback to property list
-			prefixes = prefs.getArray('css.gradient.prefixes');
-		}
-
-		return prefixes || [];
-	}
-	
-	function getPrefixedNames(type) {
-		var prefixes = getGradientPrefixes(type);
-		var names = prefixes 
-			? prefixes.map(function(p) {
-				return '-' + p + '-' + type;
-			}) 
-			: [];
-		
-		names.push(type);
-		
-		return names;
-	}
-	
-	/**
-	 * Returns list of CSS properties with gradient
-	 * @param {Array} gradient List of gradient objects
-	 * @param {CSSEditElement} property Original CSS property
-	 * @returns {Array}
-	 */
-	function getPropertiesForGradient(gradients, property) {
-		var props = [];
-		var propertyName = property.name();
-		var omitDir = prefs.get('css.gradient.omitDefaultDirection');
-		
-		if (prefs.get('css.gradient.fallback') && ~propertyName.toLowerCase().indexOf('background')) {
-			props.push({
-				name: 'background-color',
-				value: '${1:' + gradients[0].gradient.colorStops[0].color + '}'
-			});
-		}
-		
-		var value = property.value();
-		getGradientPrefixes('linear-gradient').forEach(function(prefix) {
-			var name = cssResolver.prefixed(propertyName, prefix);
-			if (prefix == 'webkit' && prefs.get('css.gradient.oldWebkit')) {
-				try {
-					props.push({
-						name: name,
-						value: insertGradientsIntoCSSValue(gradients, value, {
-							prefix: prefix, 
-							oldWebkit: true,
-							omitDefaultDirection: omitDir
-						})
-					});
-				} catch(e) {}
-			}
-			
-			props.push({
-				name: name,
-				value: insertGradientsIntoCSSValue(gradients, value, {
-					prefix: prefix,
-					omitDefaultDirection: omitDir
-				})
-			});
-		});
-		
-		return props.sort(function(a, b) {
-			return b.name.length - a.name.length;
-		});
-	}
-
-	/**
-	 * Replaces old gradient definitions in given CSS property value
-	 * with new ones, preserving original formatting
-	 * @param  {Array} gradients List of CSS gradients
-	 * @param  {String} value     Original CSS value
-	 * @param  {Object} options   Options for gradient’s stringify() method
-	 * @return {String}
-	 */
-	function insertGradientsIntoCSSValue(gradients, value, options) {
-		// gradients *should* passed in order they actually appear in CSS property
-		// iterate over it in backward direction to preserve gradient locations
-		options = options || {};
-		gradients = utils.clone(gradients);
-		gradients.reverse().forEach(function(item, i) {
-			var suffix = !i && options.placeholder ? options.placeholder : '';
-			var str = options.oldWebkit ? item.gradient.stringifyOldWebkit(options) : item.gradient.stringify(options);
-			value = utils.replaceSubstring(value, str + suffix, item.matchedPart);
-		});
-
-		return value;
-	}
-
-	/**
-	 * Returns list of properties with the same meaning 
-	 * (e.g. vendor-prefixed + original name)
-	 * @param  {String} property CSS property name
-	 * @return {Array}
-	 */
-	function similarPropertyNames(property) {
-		if (typeof property !== 'string') {
-			property = property.name();
-		}
-
-		var similarProps = (cssResolver.vendorPrefixes(property) || []).map(function(prefix) {
-			return '-' + prefix + '-' + property;
-		});
-		similarProps.push(property);
-		return similarProps;
-	}
-	
-	/**
-	 * Pastes gradient definition into CSS rule with correct vendor-prefixes
-	 * @param {EditElement} property Matched CSS property
-	 * @param {Array} gradients List of gradients to insert
-	 */
-	function pasteGradient(property, gradients) {
-		var rule = property.parent;
-		var alignVendor = prefs.get('css.alignVendor');
-		var omitDir = prefs.get('css.gradient.omitDefaultDirection');
-		
-		// we may have aligned gradient definitions: find the smallest value
-		// separator
-		var sep = property.styleSeparator;
-		var before = property.styleBefore;
-		
-		// first, remove all properties within CSS rule with the same name and
-		// gradient definition
-		rule.getAll(similarPropertyNames(property)).forEach(function(item) {
-			if (item != property && /gradient/i.test(item.value())) {
-				if (item.styleSeparator.length < sep.length) {
-					sep = item.styleSeparator;
-				}
-				if (item.styleBefore.length < before.length) {
-					before = item.styleBefore;
-				}
-				rule.remove(item);
-			}
-		});
-		
-		if (alignVendor) {
-			// update prefix
-			if (before != property.styleBefore) {
-				var fullRange = property.fullRange();
-				rule._updateSource(before, fullRange.start, fullRange.start + property.styleBefore.length);
-				property.styleBefore = before;
-			}
-			
-			// update separator value
-			if (sep != property.styleSeparator) {
-				rule._updateSource(sep, property.nameRange().end, property.valueRange().start);
-				property.styleSeparator = sep;
-			}
-		}
-		
-		var value = property.value();
-
-		// create list of properties to insert
-		var propsToInsert = getPropertiesForGradient(gradients, property);
-		
-		// align prefixed values
-		if (alignVendor) {
-			var names = [], values = [];
-			propsToInsert.forEach(function(item) {
-				names.push(item.name);
-				values.push(item.value);
-			});
-			values.push(property.value());
-			names.push(property.name());
-			
-			var valuePads = utils.getStringsPads(values.map(function(v) {
-				return v.substring(0, v.indexOf('('));
-			}));
-			
-			var namePads = utils.getStringsPads(names);
-			property.name(namePads[namePads.length - 1] + property.name());
-			
-			propsToInsert.forEach(function(prop, i) {
-				prop.name = namePads[i] + prop.name;
-				prop.value = valuePads[i] + prop.value;
-			});
-			
-			property.value(valuePads[valuePads.length - 1] + property.value());
-		}
-		
-		// put vendor-prefixed definitions before current rule
-		propsToInsert.forEach(function(prop) {
-			rule.add(prop.name, prop.value, rule.indexOf(property));
-		});
-
-		// put vanilla-clean gradient definition into current rule
-		property.value(insertGradientsIntoCSSValue(gradients, value, {
-			placeholder: '${2}',
-			omitDefaultDirection: omitDir
-		}));
-	}
-
-	/**
-	 * Validates caret position relatively to located gradients
-	 * in CSS rule. In other words, it checks if it’s safe to 
-	 * expand gradients for current caret position or not.
-	 * 
-	 * See issue https://github.com/sergeche/emmet-sublime/issues/411
-	 * 
-	 * @param  {Array} gradients List of parsed gradients
-	 * @param  {Number} caretPos  Current caret position
-	 * @param  {String} syntax    Current document syntax
-	 * @return {Boolean}
-	 */
-	function isValidCaretPosition(gradients, caretPos, syntax) {
-		syntax = syntax || 'css';
-		if (syntax == 'css' || syntax == 'less' || syntax == 'scss') {
-			return true;
-		}
-
-		var offset = gradients.property.valueRange(true).start;
-		var parts = gradients.gradients;
-
-		// in case of preprocessors where properties are separated with
-		// newlines, make sure there’s no gradient definition past
-		// current caret position. 
-		for (var i = parts.length - 1; i >= 0; i--) {
-			if (parts[i].matchedPart.start + offset >= caretPos) {
-				return false;
-			}
-		}
-
-		return true;
-	}
-	
-	module = module || {};
-	return module.exports = {
-		/**
-		 * Search for gradient definitions inside CSS property value
-		 * @returns {Array} Array of matched gradients
-		 */
-		findGradients: function(cssProp) {
-			var value = cssProp.value();
-			var gradients = [];
-			var that = this;
-			cssProp.valueParts().forEach(function(part) {
-				var partValue = part.substring(value);
-				if (linearGradient.isLinearGradient(partValue)) {
-					var gradient = linearGradient.parse(partValue);
-					if (gradient) {
-						gradients.push({
-							gradient: gradient,
-							matchedPart: part
-						});
-					}
-				}
-			});
-			
-			return gradients.length ? gradients : null;
-		},
-
-		/**
-		 * Returns list of gradients found in CSS property
-		 * of given CSS code in specified (caret) position
-		 * @param  {String} css CSS code snippet
-		 * @param  {Number} pos Character index where to start searching for CSS property
-		 * @return {Array}
-		 */
-		gradientsFromCSSProperty: function(css, pos) {
-			var cssProp = cssEditTree.propertyFromPosition(css, pos);
-			if (cssProp) {
-				var grd = this.findGradients(cssProp);
-				if (grd) {
-					return {
-						property: cssProp,
-						gradients: grd
-					};
-				}
-			}
-
-			return null;
-		},
-
-		/**
-		 * Handler for “Expand Abbreviation” action
-		 * @param  {IEmmetEditor} editor
-		 * @param  {String} syntax
-		 * @param  {String} profile
-		 * return {Boolean}
-		 */
-		expandAbbreviationHandler: function(editor, syntax, profile) {
-			var info = editorUtils.outputInfo(editor, syntax, profile);
-			if (!~cssSyntaxes.indexOf(info.syntax)) {
-				return false;
-			}
-			
-			// let's see if we are expanding gradient definition
-			var caret = editor.getCaretPos();
-			var content = info.content;
-			var gradients = this.gradientsFromCSSProperty(content, caret);
-			if (gradients) {
-				if (!isValidCaretPosition(gradients, caret, info.syntax)) {
-					return false;
-				}
-
-				var cssProperty = gradients.property;
-				var cssRule = cssProperty.parent;
-				var ruleStart = cssRule.options.offset || 0;
-				var ruleEnd = ruleStart + cssRule.toString().length;
-				
-				// Handle special case:
-				// user wrote gradient definition between existing CSS 
-				// properties and did not finished it with semicolon.
-				// In this case, we have semicolon right after gradient 
-				// definition and re-parse rule again
-				if (/[\n\r]/.test(cssProperty.value())) {
-					// insert semicolon at the end of gradient definition
-					var insertPos = cssProperty.valueRange(true).start + utils.last(gradients.gradients).matchedPart.end;
-					content = utils.replaceSubstring(content, ';', insertPos);
-					
-					var _gradients = this.gradientsFromCSSProperty(content, caret);
-					if (_gradients) {
-						gradients = _gradients;
-						cssProperty = gradients.property;
-						cssRule = cssProperty.parent;
-					}
-				}
-				
-				// make sure current property has terminating semicolon
-				cssProperty.end(';');
-				
-				// resolve CSS property name
-				var resolvedName = resolvePropertyName(cssProperty.name(), syntax);
-				if (resolvedName) {
-					cssProperty.name(resolvedName);
-				}
-				
-				pasteGradient(cssProperty, gradients.gradients);
-				editor.replaceContent(cssRule.toString(), ruleStart, ruleEnd, true);
-				return true;
-			}
-			
-			return this.expandGradientOutsideValue(editor, syntax);
-		},
-
-		/**
-		 * Tries to expand gradient outside CSS value 
-		 * @param {IEmmetEditor} editor
-		 * @param {String} syntax
-		 */
-		expandGradientOutsideValue: function(editor, syntax) {
-			var propertyName = prefs.get('css.gradient.defaultProperty');
-			var omitDir = prefs.get('css.gradient.omitDefaultDirection');
-			
-			if (!propertyName) {
-				return false;
-			}
-			
-			// assuming that gradient definition is written on new line,
-			// do a simplified parsing
-			var content = String(editor.getContent());
-			/** @type Range */
-			var lineRange = range.create(editor.getCurrentLineRange());
-			
-			// get line content and adjust range with padding
-			var line = lineRange.substring(content)
-				.replace(/^\s+/, function(pad) {
-					lineRange.start += pad.length;
-					return '';
-				})
-				.replace(/\s+$/, function(pad) {
-					lineRange.end -= pad.length;
-					return '';
-				});
-
-			// trick parser: make it think that we’re parsing actual CSS property
-			var fakeCSS = 'a{' + propertyName + ': ' + line + ';}';
-			var gradients = this.gradientsFromCSSProperty(fakeCSS, fakeCSS.length - 2);
-			if (gradients) {
-				var props = getPropertiesForGradient(gradients.gradients, gradients.property);
-				props.push({
-					name: gradients.property.name(),
-					value: insertGradientsIntoCSSValue(gradients.gradients, gradients.property.value(), {
-						placeholder: '${2}',
-						omitDefaultDirection: omitDir
-					})
-				});
-				
-				var sep = cssResolver.getSyntaxPreference('valueSeparator', syntax);
-				var end = cssResolver.getSyntaxPreference('propertyEnd', syntax);
-				
-				if (prefs.get('css.alignVendor')) {
-					var pads = utils.getStringsPads(props.map(function(prop) {
-						return prop.value.substring(0, prop.value.indexOf('('));
-					}));
-					props.forEach(function(prop, i) {
-						prop.value = pads[i] + prop.value;
-					});
-				}
-				
-				props = props.map(function(item) {
-					return item.name + sep + item.value + end;
-				});
-				
-				editor.replaceContent(props.join('\n'), lineRange.start, lineRange.end);
-				return true;
-			}
-			
-			return false;
-		},
-
-		/**
-		 * Handler for “Reflect CSS Value“ action
-		 * @param  {String} property
-		 */
-		reflectValueHandler: function(property) {
-			var omitDir = prefs.get('css.gradient.omitDefaultDirection');
-			var gradients = this.findGradients(property);
-			if (!gradients) {
-				return false;
-			}
-			
-			var that = this;
-			var value = property.value();
-			
-			// reflect value for properties with the same name
-			property.parent.getAll(similarPropertyNames(property)).forEach(function(prop) {
-				if (prop === property) {
-					return;
-				}
-
-				// make sure current property contains gradient definition,
-				// otherwise – skip it
-				var localGradients = that.findGradients(prop);
-				if (localGradients) {
-					// detect vendor prefix for current property
-					var localValue = prop.value();
-					var dfn = localGradients[0].matchedPart.substring(localValue);
-					var prefix = '';
-					if (/^\s*\-([a-z]+)\-/.test(dfn)) {
-						prefix = RegExp.$1;
-					}
-
-					prop.value(insertGradientsIntoCSSValue(gradients, value, {
-						prefix: prefix,
-						omitDefaultDirection: omitDir
-					}));
-				}
-			});
-			
-			return true;
-		}
-	};
-});
-},{"../assets/preferences":28,"../assets/range":30,"../assets/resources":31,"../assets/stringStream":32,"../editTree/css":37,"../utils/common":73,"../utils/editor":75,"./css":64,"./gradient/linear":66}],66:[function(require,module,exports){
-/**
- * CSS linear gradient definition
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var stringStream = require('../../assets/stringStream');
-	var utils = require('../../utils/common');
-
-	// all directions are expressed in “new style” degrees
-	var directions = {
-		'bottom': 0,
-		'bottom left': 45,
-		'left': 90,
-		'top left': 135,
-		'top': 180,
-		'top right': 225,
-		'right': 270,
-		'bottom right': 315,
-		
-		'to top': 0,
-		'to top right': 45,
-		'to right': 90,
-		'to bottom right': 135,
-		'to bottom': 180,
-		'to bottom left': 225,
-		'to left': 270,
-		'to top left': 315
-	};
-
-	var defaultDirections = ['top', 'to bottom', '0deg'];
-
-
-	var reLinearGradient = /^\s*(\-[a-z]+\-)?(lg|linear\-gradient)\s*\(/i;
-	var reDeg = /(\d+)deg/i;
-	var reKeyword = /top|bottom|left|right/i;
-
-	function LinearGradient(dfn) {
-		this.colorStops = [];
-		this.direction = 180;
-
-		// extract tokens
-		var stream = stringStream.create(utils.trim(dfn));
-		var ch, cur;
-		while ((ch = stream.next())) {
-			if (stream.peek() == ',') {
-				// Is it a first entry? Check if it’s a direction
-				cur = stream.current();
-
-				if (!this.colorStops.length && (reDeg.test(cur) || reKeyword.test(cur))) {
-					this.direction = resolveDirection(cur);
-				} else {
-					this.addColorStop(cur);
-				}
-				
-				stream.next();
-				stream.eatSpace();
-				stream.start = stream.pos;
-			} else if (ch == '(') { // color definition, like 'rgb(0,0,0)'
-				stream.skipTo(')');
-			}
-		}
-		
-		// add last token
-		this.addColorStop(stream.current());		
-	}
-
-	LinearGradient.prototype = {
-		type: 'linear-gradient',
-		addColorStop: function(color, ix) {
-			color = normalizeSpace(color || '');
-			if (!color) {
-				return;
-			}
-
-			color = this.parseColorStop(color);
-
-			if (typeof ix === 'undefined') {
-				this.colorStops.push(color);
-			} else {
-				this.colorStops.splice(ix, 0, color);
-			}
-		},
-
-		/**
-		 * Parses color stop definition
-		 * @param {String} colorStop
-		 * @returns {Object}
-		 */
-		parseColorStop: function(colorStop) {
-			colorStop = normalizeSpace(colorStop);
-			
-			// find color declaration
-			// first, try complex color declaration, like rgb(0,0,0)
-			var color = null;
-			colorStop = colorStop.replace(/^(\w+\(.+?\))\s*/, function(str, c) {
-				color = c;
-				return '';
-			});
-			
-			if (!color) {
-				// try simple declaration, like yellow, #fco, #ffffff, etc.
-				var parts = colorStop.split(' ');
-				color = parts[0];
-				colorStop = parts[1] || '';
-			}
-			
-			var result = {
-				color: color
-			};
-			
-			if (colorStop) {
-				// there's position in color stop definition
-				colorStop.replace(/^(\-?[\d\.]+)([a-z%]+)?$/, function(str, pos, unit) {
-					result.position = pos;
-					if (~pos.indexOf('.')) {
-						unit = '';
-					} else if (!unit) {
-						unit = '%';
-					}
-					
-					if (unit) {
-						result.unit = unit;
-					}
-				});
-			}
-			
-			return result;
-		},
-
-		stringify: function(options) {
-			options = options || {};
-			var fn = 'linear-gradient';
-			if (options.prefix) {
-				fn = '-' + options.prefix + '-' + fn;
-			}
-				
-			// transform color-stops
-			var parts = this.colorStops.map(function(cs) {
-				var pos = cs.position ? ' ' + cs.position + (cs.unit || '') : '';
-				return cs.color + pos;
-			});
-
-			var dir = stringifyDirection(this.direction, !!options.prefix);
-			if (!options.omitDefaultDirection || !~defaultDirections.indexOf(dir)) {
-				parts.unshift(dir);
-			}
-
-			return fn + '(' + parts.join(', ') + ')';
-		},
-
-		stringifyOldWebkit: function() {
-			var colorStops = this.colorStops.map(function(item) {
-				return utils.clone(item);
-			});
-			
-			// normalize color-stops position
-			colorStops.forEach(function(cs) {
-				if (!('position' in cs)) // implied position
-					return;
-				
-				if (~cs.position.indexOf('.') || cs.unit == '%') {
-					cs.position = parseFloat(cs.position) / (cs.unit == '%' ? 100 : 1);
-				} else {
-					throw "Can't convert color stop '" + (cs.position + (cs.unit || '')) + "'";
-				}
-			});
-			
-			this._fillImpliedPositions(colorStops);
-			
-			// transform color-stops into string representation
-			colorStops = colorStops.map(function(cs, i) {
-				if (!cs.position && !i) {
-					return 'from(' + cs.color + ')';
-				}
-				
-				if (cs.position == 1 && i == colorStops.length - 1) {
-					return 'to(' + cs.color + ')';
-				}
-				
-				return 'color-stop(' + (cs.position.toFixed(2).replace(/\.?0+$/, '')) + ', ' + cs.color + ')';
-			});
-			
-			return '-webkit-gradient(linear, ' 
-				+ oldWebkitDirection((this.direction + 180) % 360)
-				+ ', '
-				+ colorStops.join(', ')
-				+ ')';
-		},
-
-		/**
-		 * Fills-out implied positions in color-stops. This function is useful for
-		 * old Webkit gradient definitions
-		 */
-		_fillImpliedPositions: function(colorStops) {
-			var from = 0;
-			
-			colorStops.forEach(function(cs, i) {
-				// make sure that first and last positions are defined
-				if (!i) {
-					return cs.position = cs.position || 0;
-				}
-				
-				if (i == colorStops.length - 1 && !('position' in cs)) {
-					cs.position = 1;
-				}
-				
-				if ('position' in cs) {
-					var start = colorStops[from].position || 0;
-					var step = (cs.position - start) / (i - from);
-					colorStops.slice(from, i).forEach(function(cs2, j) {
-						cs2.position = start + step * j;
-					});
-					
-					from = i;
-				}
-			});
-		},
-
-		valueOf: function() {
-			return this.stringify();
-		}
-	};
-
-	function normalizeSpace(str) {
-		return utils.trim(str).replace(/\s+/g, ' ');
-	}
-
-	/**
-	 * Resolves textual direction to degrees
-	 * @param  {String} dir Direction to resolve
-	 * @return {Number}
-	 */
-	function resolveDirection(dir) {
-		if (typeof dir == 'number') {
-			return dir;
-		}
-
-		dir = normalizeSpace(dir).toLowerCase();
-		if (reDeg.test(dir)) {
-			return +RegExp.$1;
-		}
-
-		var prefix = /^to\s/.test(dir) ? 'to ' : '';
-		var left   = ~dir.indexOf('left')   && 'left';
-		var right  = ~dir.indexOf('right')  && 'right';
-		var top    = ~dir.indexOf('top')    && 'top';
-		var bottom = ~dir.indexOf('bottom') && 'bottom';
-
-		var key = normalizeSpace(prefix + (top || bottom || '') + ' ' + (left || right || ''));
-		return directions[key] || 0;
-	}
-
-	/**
-	 * Tries to find keyword for given direction, expressed in degrees
-	 * @param  {Number} dir Direction (degrees)
-	 * @param {Boolean} oldStyle Use old style keywords (e.g. "top" instead of "to bottom")
-	 * @return {String}     Keyword or <code>Ndeg</code> expression
-	 */
-	function stringifyDirection(dir, oldStyle) {
-		var reNewStyle = /^to\s/;
-		var keys = Object.keys(directions).filter(function(k) {
-			var hasPrefix = reNewStyle.test(k);
-			return oldStyle ? !hasPrefix : hasPrefix;
-		});
-
-		for (var i = 0; i < keys.length; i++) {
-			if (directions[keys[i]] == dir) {
-				return keys[i];
-			}
-		}
-
-		if (oldStyle) {
-			dir = (dir + 270) % 360;
-		}
-
-		return dir + 'deg';
-	}
-
-	/**
-	 * Creates direction definition for old Webkit gradients
-	 * @param {String} direction
-	 * @returns {String}
-	 */
-	function oldWebkitDirection(dir) {
-		dir = stringifyDirection(dir, true);
-		
-		if(reDeg.test(dir)) {
-			throw "The direction is an angle that can’t be converted.";
-		}
-		
-		var v = function(pos) {
-			return ~dir.indexOf(pos) ? '100%' : '0';
-		};
-		
-		return v('left') + ' ' + v('top') + ', ' + v('right') + ' ' + v('bottom');
-	}
-
-	return {
-		/**
-		 * Parses gradient definition into an object.
-		 * This object can be used to transform gradient into various
-		 * forms
-		 * @param  {String} gradient Gradient definition
-		 * @return {LinearGradient}
-		 */
-		parse: function(gradient) {
-			// cut out all redundant data
-			if (this.isLinearGradient(gradient)) {
-				gradient = gradient.replace(/^\s*[\-a-z]+\s*\(|\)\s*$/ig, '');
-			} else {
-				throw 'Invalid linear gradient definition:\n' + gradient;
-			}
-
-			return new LinearGradient(gradient);
-		},
-
-		/**
-		 * Check if given string can be parsed as linear gradient
-		 * @param  {String}  str
-		 * @return {Boolean}
-		 */
-		isLinearGradient: function(str) {
-			return reLinearGradient.test(str);
-		},
-
-		resolveDirection: resolveDirection,
-		stringifyDirection: stringifyDirection
-	};
-});
-},{"../../assets/stringStream":32,"../../utils/common":73}],67:[function(require,module,exports){
-/**
- * Module for resolving tag names: returns best matched tag name for child
- * element based on passed parent's tag name. Also provides utility function
- * for element type detection (inline, block-level, empty)
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('../utils/common');
-	
-	var elementTypes = {
-//		empty: 'area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,keygen,command'.split(','),
-		empty: [],
-		blockLevel: 'address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,link,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul,h1,h2,h3,h4,h5,h6'.split(','),
-		inlineLevel: 'a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var'.split(',')
-	};
-	
-	var elementMap = {
-		'p': 'span',
-		'ul': 'li',
-		'ol': 'li',
-		'table': 'tr',
-		'tr': 'td',
-		'tbody': 'tr',
-		'thead': 'tr',
-		'tfoot': 'tr',
-		'colgroup': 'col',
-		'select': 'option',
-		'optgroup': 'option',
-		'audio': 'source',
-		'video': 'source',
-		'object': 'param',
-		'map': 'area'
-	};
-	
-	return {
-		/**
-		 * Returns best matched child element name for passed parent's
-		 * tag name
-		 * @param {String} name
-		 * @returns {String}
-		 * @memberOf tagName
-		 */
-		resolve: function(name) {
-			name = (name || '').toLowerCase();
-			
-			if (name in elementMap)
-				return this.getMapping(name);
-			
-			if (this.isInlineLevel(name))
-				return 'span';
-			
-			return 'div';
-		},
-		
-		/**
-		 * Returns mapped child element name for passed parent's name 
-		 * @param {String} name
-		 * @returns {String}
-		 */
-		getMapping: function(name) {
-			return elementMap[name.toLowerCase()];
-		},
-		
-		/**
-		 * Check if passed element name belongs to inline-level element
-		 * @param {String} name
-		 * @returns {Boolean}
-		 */
-		isInlineLevel: function(name) {
-			return this.isTypeOf(name, 'inlineLevel');
-		},
-		
-		/**
-		 * Check if passed element belongs to block-level element.
-		 * For better matching of unknown elements (for XML, for example), 
-		 * you should use <code>!this.isInlineLevel(name)</code>
-		 * @returns {Boolean}
-		 */
-		isBlockLevel: function(name) {
-			return this.isTypeOf(name, 'blockLevel');
-		},
-		
-		/**
-		 * Check if passed element is void (i.e. should not have closing tag).
-		 * @returns {Boolean}
-		 */
-		isEmptyElement: function(name) {
-			return this.isTypeOf(name, 'empty');
-		},
-		
-		/**
-		 * Generic function for testing if element name belongs to specified
-		 * elements collection
-		 * @param {String} name Element name
-		 * @param {String} type Collection name
-		 * @returns {Boolean}
-		 */
-		isTypeOf: function(name, type) {
-			return ~elementTypes[type].indexOf(name);
-		},
-		
-		/**
-		 * Adds new parent–child mapping
-		 * @param {String} parent
-		 * @param {String} child
-		 */
-		addMapping: function(parent, child) {
-			elementMap[parent] = child;
-		},
-		
-		/**
-		 * Removes parent-child mapping
-		 */
-		removeMapping: function(parent) {
-			if (parent in elementMap)
-				delete elementMap[parent];
-		},
-		
-		/**
-		 * Adds new element into collection
-		 * @param {String} name Element name
-		 * @param {String} collection Collection name
-		 */
-		addElementToCollection: function(name, collection) {
-			if (!elementTypes[collection])
-				elementTypes[collection] = [];
-			
-			var col = this.getCollection(collection);
-			if (!~col.indexOf(name)) {
-				col.push(name);
-			}
-		},
-		
-		/**
-		 * Removes element name from specified collection
-		 * @param {String} name Element name
-		 * @param {String} collection Collection name
-		 * @returns
-		 */
-		removeElementFromCollection: function(name, collection) {
-			if (collection in elementTypes) {
-				elementTypes[collection] = utils.without(this.getCollection(collection), name);
-			}
-		},
-		
-		/**
-		 * Returns elements name collection
-		 * @param {String} name Collection name
-		 * @returns {Array}
-		 */
-		getCollection: function(name) {
-			return elementTypes[name];
-		}
-	};
-});
-},{"../utils/common":73}],68:[function(require,module,exports){
-module.exports={
-	"variables": {
-		"lang": "en",
-		"locale": "en-US",
-		"charset": "UTF-8",
-		"indentation": "\t",
-		"newline": "\n"
-	},
-	
-	"css": {
-		"filters": "css",
-		"profile": "css",
-		"snippets": {
-			"@i": "@import url(|);",
-			"@import": "@import url(|);",
-			"@m": "@media ${1:screen} {\n\t|\n}",
-			"@media": "@media ${1:screen} {\n\t|\n}",
-			"@f": "@font-face {\n\tfont-family:|;\n\tsrc:url(|);\n}",
-			"@f+": "@font-face {\n\tfont-family: '${1:FontName}';\n\tsrc: url('${2:FileName}.eot');\n\tsrc: url('${2:FileName}.eot?#iefix') format('embedded-opentype'),\n\t\t url('${2:FileName}.woff') format('woff'),\n\t\t url('${2:FileName}.ttf') format('truetype'),\n\t\t url('${2:FileName}.svg#${1:FontName}') format('svg');\n\tfont-style: ${3:normal};\n\tfont-weight: ${4:normal};\n}",
-
-			"@kf": "@-webkit-keyframes ${1:identifier} {\n\t${2:from} { ${3} }${6}\n\t${4:to} { ${5} }\n}\n@-o-keyframes ${1:identifier} {\n\t${2:from} { ${3} }${6}\n\t${4:to} { ${5} }\n}\n@-moz-keyframes ${1:identifier} {\n\t${2:from} { ${3} }${6}\n\t${4:to} { ${5} }\n}\n@keyframes ${1:identifier} {\n\t${2:from} { ${3} }${6}\n\t${4:to} { ${5} }\n}",
-
-			"anim": "animation:|;",
-			"anim-": "animation:${1:name} ${2:duration} ${3:timing-function} ${4:delay} ${5:iteration-count} ${6:direction} ${7:fill-mode};",
-			"animdel": "animation-delay:${1:time};",
-			
-			"animdir": "animation-direction:${1:normal};",
-			"animdir:n": "animation-direction:normal;",
-			"animdir:r": "animation-direction:reverse;",
-			"animdir:a": "animation-direction:alternate;",
-			"animdir:ar": "animation-direction:alternate-reverse;",
-			
-			"animdur": "animation-duration:${1:0}s;",
-			
-			"animfm": "animation-fill-mode:${1:both};",
-			"animfm:f": "animation-fill-mode:forwards;",
-			"animfm:b": "animation-fill-mode:backwards;",
-			"animfm:bt": "animation-fill-mode:both;",
-			"animfm:bh": "animation-fill-mode:both;",
-			
-			"animic": "animation-iteration-count:${1:1};",
-			"animic:i": "animation-iteration-count:infinite;",
-			
-			"animn": "animation-name:${1:none};",
-
-			"animps": "animation-play-state:${1:running};",
-			"animps:p": "animation-play-state:paused;",
-			"animps:r": "animation-play-state:running;",
-
-			"animtf": "animation-timing-function:${1:linear};",
-			"animtf:e": "animation-timing-function:ease;",
-			"animtf:ei": "animation-timing-function:ease-in;",
-			"animtf:eo": "animation-timing-function:ease-out;",
-			"animtf:eio": "animation-timing-function:ease-in-out;",
-			"animtf:l": "animation-timing-function:linear;",
-			"animtf:cb": "animation-timing-function:cubic-bezier(${1:0.1}, ${2:0.7}, ${3:1.0}, ${3:0.1});",
-			
-			"ap": "appearance:${none};",
-
-			"!": "!important",
-			"pos": "position:${1:relative};",
-			"pos:s": "position:static;",
-			"pos:a": "position:absolute;",
-			"pos:r": "position:relative;",
-			"pos:f": "position:fixed;",
-			"t": "top:|;",
-			"t:a": "top:auto;",
-			"r": "right:|;",
-			"r:a": "right:auto;",
-			"b": "bottom:|;",
-			"b:a": "bottom:auto;",
-			"l": "left:|;",
-			"l:a": "left:auto;",
-			"z": "z-index:|;",
-			"z:a": "z-index:auto;",
-			"fl": "float:${1:left};",
-			"fl:n": "float:none;",
-			"fl:l": "float:left;",
-			"fl:r": "float:right;",
-			"cl": "clear:${1:both};",
-			"cl:n": "clear:none;",
-			"cl:l": "clear:left;",
-			"cl:r": "clear:right;",
-			"cl:b": "clear:both;",
-
-			"colm": "columns:|;",
-			"colmc": "column-count:|;",
-			"colmf": "column-fill:|;",
-			"colmg": "column-gap:|;",
-			"colmr": "column-rule:|;",
-			"colmrc": "column-rule-color:|;",
-			"colmrs": "column-rule-style:|;",
-			"colmrw": "column-rule-width:|;",
-			"colms": "column-span:|;",
-			"colmw": "column-width:|;",
-
-			"d": "display:${1:block};",
-			"d:n": "display:none;",
-			"d:b": "display:block;",
-			"d:f": "display:flex;",
-			"d:if": "display:inline-flex;",
-			"d:i": "display:inline;",
-			"d:ib": "display:inline-block;",
-			"d:ib+": "display: inline-block;\n*display: inline;\n*zoom: 1;",
-			"d:li": "display:list-item;",
-			"d:ri": "display:run-in;",
-			"d:cp": "display:compact;",
-			"d:tb": "display:table;",
-			"d:itb": "display:inline-table;",
-			"d:tbcp": "display:table-caption;",
-			"d:tbcl": "display:table-column;",
-			"d:tbclg": "display:table-column-group;",
-			"d:tbhg": "display:table-header-group;",
-			"d:tbfg": "display:table-footer-group;",
-			"d:tbr": "display:table-row;",
-			"d:tbrg": "display:table-row-group;",
-			"d:tbc": "display:table-cell;",
-			"d:rb": "display:ruby;",
-			"d:rbb": "display:ruby-base;",
-			"d:rbbg": "display:ruby-base-group;",
-			"d:rbt": "display:ruby-text;",
-			"d:rbtg": "display:ruby-text-group;",
-			"v": "visibility:${1:hidden};",
-			"v:v": "visibility:visible;",
-			"v:h": "visibility:hidden;",
-			"v:c": "visibility:collapse;",
-			"ov": "overflow:${1:hidden};",
-			"ov:v": "overflow:visible;",
-			"ov:h": "overflow:hidden;",
-			"ov:s": "overflow:scroll;",
-			"ov:a": "overflow:auto;",
-			"ovx": "overflow-x:${1:hidden};",
-			"ovx:v": "overflow-x:visible;",
-			"ovx:h": "overflow-x:hidden;",
-			"ovx:s": "overflow-x:scroll;",
-			"ovx:a": "overflow-x:auto;",
-			"ovy": "overflow-y:${1:hidden};",
-			"ovy:v": "overflow-y:visible;",
-			"ovy:h": "overflow-y:hidden;",
-			"ovy:s": "overflow-y:scroll;",
-			"ovy:a": "overflow-y:auto;",
-			"ovs": "overflow-style:${1:scrollbar};",
-			"ovs:a": "overflow-style:auto;",
-			"ovs:s": "overflow-style:scrollbar;",
-			"ovs:p": "overflow-style:panner;",
-			"ovs:m": "overflow-style:move;",
-			"ovs:mq": "overflow-style:marquee;",
-			"zoo": "zoom:1;",
-			"zm": "zoom:1;",
-			"cp": "clip:|;",
-			"cp:a": "clip:auto;",
-			"cp:r": "clip:rect(${1:top} ${2:right} ${3:bottom} ${4:left});",
-			"bxz": "box-sizing:${1:border-box};",
-			"bxz:cb": "box-sizing:content-box;",
-			"bxz:bb": "box-sizing:border-box;",
-			"bxsh": "box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} ${5:color};",
-			"bxsh:r": "box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} ${5:spread }rgb(${6:0}, ${7:0}, ${8:0});",
-			"bxsh:ra": "box-shadow:${1:inset }${2:h} ${3:v} ${4:blur} ${5:spread }rgba(${6:0}, ${7:0}, ${8:0}, .${9:5});",
-			"bxsh:n": "box-shadow:none;",
-			"m": "margin:|;",
-			"m:a": "margin:auto;",
-			"mt": "margin-top:|;",
-			"mt:a": "margin-top:auto;",
-			"mr": "margin-right:|;",
-			"mr:a": "margin-right:auto;",
-			"mb": "margin-bottom:|;",
-			"mb:a": "margin-bottom:auto;",
-			"ml": "margin-left:|;",
-			"ml:a": "margin-left:auto;",
-			"p": "padding:|;",
-			"pt": "padding-top:|;",
-			"pr": "padding-right:|;",
-			"pb": "padding-bottom:|;",
-			"pl": "padding-left:|;",
-			"w": "width:|;",
-			"w:a": "width:auto;",
-			"h": "height:|;",
-			"h:a": "height:auto;",
-			"maw": "max-width:|;",
-			"maw:n": "max-width:none;",
-			"mah": "max-height:|;",
-			"mah:n": "max-height:none;",
-			"miw": "min-width:|;",
-			"mih": "min-height:|;",
-			"mar": "max-resolution:${1:res};",
-			"mir": "min-resolution:${1:res};",
-			"ori": "orientation:|;",
-			"ori:l": "orientation:landscape;",
-			"ori:p": "orientation:portrait;",
-			"ol": "outline:|;",
-			"ol:n": "outline:none;",
-			"olo": "outline-offset:|;",
-			"olw": "outline-width:|;",
-			"olw:tn": "outline-width:thin;",
-			"olw:m": "outline-width:medium;",
-			"olw:tc": "outline-width:thick;",
-			"ols": "outline-style:|;",
-			"ols:n": "outline-style:none;",
-			"ols:dt": "outline-style:dotted;",
-			"ols:ds": "outline-style:dashed;",
-			"ols:s": "outline-style:solid;",
-			"ols:db": "outline-style:double;",
-			"ols:g": "outline-style:groove;",
-			"ols:r": "outline-style:ridge;",
-			"ols:i": "outline-style:inset;",
-			"ols:o": "outline-style:outset;",
-			"olc": "outline-color:#${1:000};",
-			"olc:i": "outline-color:invert;",
-			"bfv": "backface-visibility:|;",
-			"bfv:h": "backface-visibility:hidden;",
-			"bfv:v": "backface-visibility:visible;",
-			"bd": "border:|;",
-			"bd+": "border:${1:1px} ${2:solid} ${3:#000};",
-			"bd:n": "border:none;",
-			"bdbk": "border-break:${1:close};",
-			"bdbk:c": "border-break:close;",
-			"bdcl": "border-collapse:|;",
-			"bdcl:c": "border-collapse:collapse;",
-			"bdcl:s": "border-collapse:separate;",
-			"bdc": "border-color:#${1:000};",
-			"bdc:t": "border-color:transparent;",
-			"bdi": "border-image:url(|);",
-			"bdi:n": "border-image:none;",
-			"bdti": "border-top-image:url(|);",
-			"bdti:n": "border-top-image:none;",
-			"bdri": "border-right-image:url(|);",
-			"bdri:n": "border-right-image:none;",
-			"bdbi": "border-bottom-image:url(|);",
-			"bdbi:n": "border-bottom-image:none;",
-			"bdli": "border-left-image:url(|);",
-			"bdli:n": "border-left-image:none;",
-			"bdci": "border-corner-image:url(|);",
-			"bdci:n": "border-corner-image:none;",
-			"bdci:c": "border-corner-image:continue;",
-			"bdtli": "border-top-left-image:url(|);",
-			"bdtli:n": "border-top-left-image:none;",
-			"bdtli:c": "border-top-left-image:continue;",
-			"bdtri": "border-top-right-image:url(|);",
-			"bdtri:n": "border-top-right-image:none;",
-			"bdtri:c": "border-top-right-image:continue;",
-			"bdbri": "border-bottom-right-image:url(|);",
-			"bdbri:n": "border-bottom-right-image:none;",
-			"bdbri:c": "border-bottom-right-image:continue;",
-			"bdbli": "border-bottom-left-image:url(|);",
-			"bdbli:n": "border-bottom-left-image:none;",
-			"bdbli:c": "border-bottom-left-image:continue;",
-			"bdf": "border-fit:${1:repeat};",
-			"bdf:c": "border-fit:clip;",
-			"bdf:r": "border-fit:repeat;",
-			"bdf:sc": "border-fit:scale;",
-			"bdf:st": "border-fit:stretch;",
-			"bdf:ow": "border-fit:overwrite;",
-			"bdf:of": "border-fit:overflow;",
-			"bdf:sp": "border-fit:space;",
-			"bdlen": "border-length:|;",
-			"bdlen:a": "border-length:auto;",
-			"bdsp": "border-spacing:|;",
-			"bds": "border-style:|;",
-			"bds:n": "border-style:none;",
-			"bds:h": "border-style:hidden;",
-			"bds:dt": "border-style:dotted;",
-			"bds:ds": "border-style:dashed;",
-			"bds:s": "border-style:solid;",
-			"bds:db": "border-style:double;",
-			"bds:dtds": "border-style:dot-dash;",
-			"bds:dtdtds": "border-style:dot-dot-dash;",
-			"bds:w": "border-style:wave;",
-			"bds:g": "border-style:groove;",
-			"bds:r": "border-style:ridge;",
-			"bds:i": "border-style:inset;",
-			"bds:o": "border-style:outset;",
-			"bdw": "border-width:|;",
-			"bdtw": "border-top-width:|;",
-			"bdrw": "border-right-width:|;",
-			"bdbw": "border-bottom-width:|;",
-			"bdlw": "border-left-width:|;",
-			"bdt": "border-top:|;",
-			"bt": "border-top:|;",
-			"bdt+": "border-top:${1:1px} ${2:solid} ${3:#000};",
-			"bdt:n": "border-top:none;",
-			"bdts": "border-top-style:|;",
-			"bdts:n": "border-top-style:none;",
-			"bdtc": "border-top-color:#${1:000};",
-			"bdtc:t": "border-top-color:transparent;",
-			"bdr": "border-right:|;",
-			"br": "border-right:|;",
-			"bdr+": "border-right:${1:1px} ${2:solid} ${3:#000};",
-			"bdr:n": "border-right:none;",
-			"bdrst": "border-right-style:|;",
-			"bdrst:n": "border-right-style:none;",
-			"bdrc": "border-right-color:#${1:000};",
-			"bdrc:t": "border-right-color:transparent;",
-			"bdb": "border-bottom:|;",
-			"bb": "border-bottom:|;",
-			"bdb+": "border-bottom:${1:1px} ${2:solid} ${3:#000};",
-			"bdb:n": "border-bottom:none;",
-			"bdbs": "border-bottom-style:|;",
-			"bdbs:n": "border-bottom-style:none;",
-			"bdbc": "border-bottom-color:#${1:000};",
-			"bdbc:t": "border-bottom-color:transparent;",
-			"bdl": "border-left:|;",
-			"bl": "border-left:|;",
-			"bdl+": "border-left:${1:1px} ${2:solid} ${3:#000};",
-			"bdl:n": "border-left:none;",
-			"bdls": "border-left-style:|;",
-			"bdls:n": "border-left-style:none;",
-			"bdlc": "border-left-color:#${1:000};",
-			"bdlc:t": "border-left-color:transparent;",
-			"bdrs": "border-radius:|;",
-			"bdtrrs": "border-top-right-radius:|;",
-			"bdtlrs": "border-top-left-radius:|;",
-			"bdbrrs": "border-bottom-right-radius:|;",
-			"bdblrs": "border-bottom-left-radius:|;",
-			"bg": "background:#${1:000};",
-			"bg+": "background:${1:#fff} url(${2}) ${3:0} ${4:0} ${5:no-repeat};",
-			"bg:n": "background:none;",
-			"bg:ie": "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${1:x}.png',sizingMethod='${2:crop}');",
-			"bgc": "background-color:#${1:fff};",
-			"bgc:t": "background-color:transparent;",
-			"bgi": "background-image:url(|);",
-			"bgi:n": "background-image:none;",
-			"bgr": "background-repeat:|;",
-			"bgr:n": "background-repeat:no-repeat;",
-			"bgr:x": "background-repeat:repeat-x;",
-			"bgr:y": "background-repeat:repeat-y;",
-			"bgr:sp": "background-repeat:space;",
-			"bgr:rd": "background-repeat:round;",
-			"bga": "background-attachment:|;",
-			"bga:f": "background-attachment:fixed;",
-			"bga:s": "background-attachment:scroll;",
-			"bgp": "background-position:${1:0} ${2:0};",
-			"bgpx": "background-position-x:|;",
-			"bgpy": "background-position-y:|;",
-			"bgbk": "background-break:|;",
-			"bgbk:bb": "background-break:bounding-box;",
-			"bgbk:eb": "background-break:each-box;",
-			"bgbk:c": "background-break:continuous;",
-			"bgcp": "background-clip:${1:padding-box};",
-			"bgcp:bb": "background-clip:border-box;",
-			"bgcp:pb": "background-clip:padding-box;",
-			"bgcp:cb": "background-clip:content-box;",
-			"bgcp:nc": "background-clip:no-clip;",
-			"bgo": "background-origin:|;",
-			"bgo:pb": "background-origin:padding-box;",
-			"bgo:bb": "background-origin:border-box;",
-			"bgo:cb": "background-origin:content-box;",
-			"bgsz": "background-size:|;",
-			"bgsz:a": "background-size:auto;",
-			"bgsz:ct": "background-size:contain;",
-			"bgsz:cv": "background-size:cover;",
-			"c": "color:#${1:000};",
-			"c:r": "color:rgb(${1:0}, ${2:0}, ${3:0});",
-			"c:ra": "color:rgba(${1:0}, ${2:0}, ${3:0}, .${4:5});",
-			"cm": "/* |${child} */",
-			"cnt": "content:'|';",
-			"cnt:n": "content:normal;",
-			"cnt:oq": "content:open-quote;",
-			"cnt:noq": "content:no-open-quote;",
-			"cnt:cq": "content:close-quote;",
-			"cnt:ncq": "content:no-close-quote;",
-			"cnt:a": "content:attr(|);",
-			"cnt:c": "content:counter(|);",
-			"cnt:cs": "content:counters(|);",
-
-			"tbl": "table-layout:|;",
-			"tbl:a": "table-layout:auto;",
-			"tbl:f": "table-layout:fixed;",
-			"cps": "caption-side:|;",
-			"cps:t": "caption-side:top;",
-			"cps:b": "caption-side:bottom;",
-			"ec": "empty-cells:|;",
-			"ec:s": "empty-cells:show;",
-			"ec:h": "empty-cells:hide;",
-			"lis": "list-style:|;",
-			"lis:n": "list-style:none;",
-			"lisp": "list-style-position:|;",
-			"lisp:i": "list-style-position:inside;",
-			"lisp:o": "list-style-position:outside;",
-			"list": "list-style-type:|;",
-			"list:n": "list-style-type:none;",
-			"list:d": "list-style-type:disc;",
-			"list:c": "list-style-type:circle;",
-			"list:s": "list-style-type:square;",
-			"list:dc": "list-style-type:decimal;",
-			"list:dclz": "list-style-type:decimal-leading-zero;",
-			"list:lr": "list-style-type:lower-roman;",
-			"list:ur": "list-style-type:upper-roman;",
-			"lisi": "list-style-image:|;",
-			"lisi:n": "list-style-image:none;",
-			"q": "quotes:|;",
-			"q:n": "quotes:none;",
-			"q:ru": "quotes:'\\00AB' '\\00BB' '\\201E' '\\201C';",
-			"q:en": "quotes:'\\201C' '\\201D' '\\2018' '\\2019';",
-			"ct": "content:|;",
-			"ct:n": "content:normal;",
-			"ct:oq": "content:open-quote;",
-			"ct:noq": "content:no-open-quote;",
-			"ct:cq": "content:close-quote;",
-			"ct:ncq": "content:no-close-quote;",
-			"ct:a": "content:attr(|);",
-			"ct:c": "content:counter(|);",
-			"ct:cs": "content:counters(|);",
-			"coi": "counter-increment:|;",
-			"cor": "counter-reset:|;",
-			"va": "vertical-align:${1:top};",
-			"va:sup": "vertical-align:super;",
-			"va:t": "vertical-align:top;",
-			"va:tt": "vertical-align:text-top;",
-			"va:m": "vertical-align:middle;",
-			"va:bl": "vertical-align:baseline;",
-			"va:b": "vertical-align:bottom;",
-			"va:tb": "vertical-align:text-bottom;",
-			"va:sub": "vertical-align:sub;",
-			"ta": "text-align:${1:left};",
-			"ta:l": "text-align:left;",
-			"ta:c": "text-align:center;",
-			"ta:r": "text-align:right;",
-			"ta:j": "text-align:justify;",
-			"ta-lst": "text-align-last:|;",
-			"tal:a": "text-align-last:auto;",
-			"tal:l": "text-align-last:left;",
-			"tal:c": "text-align-last:center;",
-			"tal:r": "text-align-last:right;",
-			"td": "text-decoration:${1:none};",
-			"td:n": "text-decoration:none;",
-			"td:u": "text-decoration:underline;",
-			"td:o": "text-decoration:overline;",
-			"td:l": "text-decoration:line-through;",
-			"te": "text-emphasis:|;",
-			"te:n": "text-emphasis:none;",
-			"te:ac": "text-emphasis:accent;",
-			"te:dt": "text-emphasis:dot;",
-			"te:c": "text-emphasis:circle;",
-			"te:ds": "text-emphasis:disc;",
-			"te:b": "text-emphasis:before;",
-			"te:a": "text-emphasis:after;",
-			"th": "text-height:|;",
-			"th:a": "text-height:auto;",
-			"th:f": "text-height:font-size;",
-			"th:t": "text-height:text-size;",
-			"th:m": "text-height:max-size;",
-			"ti": "text-indent:|;",
-			"ti:-": "text-indent:-9999px;",
-			"tj": "text-justify:|;",
-			"tj:a": "text-justify:auto;",
-			"tj:iw": "text-justify:inter-word;",
-			"tj:ii": "text-justify:inter-ideograph;",
-			"tj:ic": "text-justify:inter-cluster;",
-			"tj:d": "text-justify:distribute;",
-			"tj:k": "text-justify:kashida;",
-			"tj:t": "text-justify:tibetan;",
-			"tov": "text-overflow:${ellipsis};",
-			"tov:e": "text-overflow:ellipsis;",
-			"tov:c": "text-overflow:clip;",
-			"to": "text-outline:|;",
-			"to+": "text-outline:${1:0} ${2:0} ${3:#000};",
-			"to:n": "text-outline:none;",
-			"tr": "text-replace:|;",
-			"tr:n": "text-replace:none;",
-			"tt": "text-transform:${1:uppercase};",
-			"tt:n": "text-transform:none;",
-			"tt:c": "text-transform:capitalize;",
-			"tt:u": "text-transform:uppercase;",
-			"tt:l": "text-transform:lowercase;",
-			"tw": "text-wrap:|;",
-			"tw:n": "text-wrap:normal;",
-			"tw:no": "text-wrap:none;",
-			"tw:u": "text-wrap:unrestricted;",
-			"tw:s": "text-wrap:suppress;",
-			"tsh": "text-shadow:${1:hoff} ${2:voff} ${3:blur} ${4:#000};",
-			"tsh:r": "text-shadow:${1:h} ${2:v} ${3:blur} rgb(${4:0}, ${5:0}, ${6:0});",
-			"tsh:ra": "text-shadow:${1:h} ${2:v} ${3:blur} rgba(${4:0}, ${5:0}, ${6:0}, .${7:5});",
-			"tsh+": "text-shadow:${1:0} ${2:0} ${3:0} ${4:#000};",
-			"tsh:n": "text-shadow:none;",
-			"trf": "transform:|;",
-			"trf:skx": "transform: skewX(${1:angle});",
-			"trf:sky": "transform: skewY(${1:angle});",
-			"trf:sc": "transform: scale(${1:x}, ${2:y});",
-			"trf:scx": "transform: scaleX(${1:x});",
-			"trf:scy": "transform: scaleY(${1:y});",
-			"trf:scz": "transform: scaleZ(${1:z});",
-			"trf:sc3": "transform: scale3d(${1:x}, ${2:y}, ${3:z});",
-			"trf:r": "transform: rotate(${1:angle});",
-			"trf:rx": "transform: rotateX(${1:angle});",
-			"trf:ry": "transform: rotateY(${1:angle});",
-			"trf:rz": "transform: rotateZ(${1:angle});",
-			"trf:t": "transform: translate(${1:x}, ${2:y});",
-			"trf:tx": "transform: translateX(${1:x});",
-			"trf:ty": "transform: translateY(${1:y});",
-			"trf:tz": "transform: translateZ(${1:z});",
-			"trf:t3": "transform: translate3d(${1:tx}, ${2:ty}, ${3:tz});",
-			"trfo": "transform-origin:|;",
-			"trfs": "transform-style:${1:preserve-3d};",
-			"trs": "transition:${1:prop} ${2:time};",
-			"trsde": "transition-delay:${1:time};",
-			"trsdu": "transition-duration:${1:time};",
-			"trsp": "transition-property:${1:prop};",
-			"trstf": "transition-timing-function:${1:tfunc};",
-			"lh": "line-height:|;",
-			"whs": "white-space:|;",
-			"whs:n": "white-space:normal;",
-			"whs:p": "white-space:pre;",
-			"whs:nw": "white-space:nowrap;",
-			"whs:pw": "white-space:pre-wrap;",
-			"whs:pl": "white-space:pre-line;",
-			"whsc": "white-space-collapse:|;",
-			"whsc:n": "white-space-collapse:normal;",
-			"whsc:k": "white-space-collapse:keep-all;",
-			"whsc:l": "white-space-collapse:loose;",
-			"whsc:bs": "white-space-collapse:break-strict;",
-			"whsc:ba": "white-space-collapse:break-all;",
-			"wob": "word-break:|;",
-			"wob:n": "word-break:normal;",
-			"wob:k": "word-break:keep-all;",
-			"wob:ba": "word-break:break-all;",
-			"wos": "word-spacing:|;",
-			"wow": "word-wrap:|;",
-			"wow:nm": "word-wrap:normal;",
-			"wow:n": "word-wrap:none;",
-			"wow:u": "word-wrap:unrestricted;",
-			"wow:s": "word-wrap:suppress;",
-			"wow:b": "word-wrap:break-word;",
-			"wm": "writing-mode:${1:lr-tb};",
-			"wm:lrt": "writing-mode:lr-tb;",
-			"wm:lrb": "writing-mode:lr-bt;",
-			"wm:rlt": "writing-mode:rl-tb;",
-			"wm:rlb": "writing-mode:rl-bt;",
-			"wm:tbr": "writing-mode:tb-rl;",
-			"wm:tbl": "writing-mode:tb-lr;",
-			"wm:btl": "writing-mode:bt-lr;",
-			"wm:btr": "writing-mode:bt-rl;",
-			"lts": "letter-spacing:|;",
-			"lts-n": "letter-spacing:normal;",
-			"f": "font:|;",
-			"f+": "font:${1:1em} ${2:Arial,sans-serif};",
-			"fw": "font-weight:|;",
-			"fw:n": "font-weight:normal;",
-			"fw:b": "font-weight:bold;",
-			"fw:br": "font-weight:bolder;",
-			"fw:lr": "font-weight:lighter;",
-			"fs": "font-style:${italic};",
-			"fs:n": "font-style:normal;",
-			"fs:i": "font-style:italic;",
-			"fs:o": "font-style:oblique;",
-			"fv": "font-variant:|;",
-			"fv:n": "font-variant:normal;",
-			"fv:sc": "font-variant:small-caps;",
-			"fz": "font-size:|;",
-			"fza": "font-size-adjust:|;",
-			"fza:n": "font-size-adjust:none;",
-			"ff": "font-family:|;",
-			"ff:s": "font-family:serif;",
-			"ff:ss": "font-family:sans-serif;",
-			"ff:c": "font-family:cursive;",
-			"ff:f": "font-family:fantasy;",
-			"ff:m": "font-family:monospace;",
-			"ff:a": "font-family: Arial, \"Helvetica Neue\", Helvetica, sans-serif;",
-			"ff:t": "font-family: \"Times New Roman\", Times, Baskerville, Georgia, serif;",
-			"ff:v": "font-family: Verdana, Geneva, sans-serif;",
-			"fef": "font-effect:|;",
-			"fef:n": "font-effect:none;",
-			"fef:eg": "font-effect:engrave;",
-			"fef:eb": "font-effect:emboss;",
-			"fef:o": "font-effect:outline;",
-			"fem": "font-emphasize:|;",
-			"femp": "font-emphasize-position:|;",
-			"femp:b": "font-emphasize-position:before;",
-			"femp:a": "font-emphasize-position:after;",
-			"fems": "font-emphasize-style:|;",
-			"fems:n": "font-emphasize-style:none;",
-			"fems:ac": "font-emphasize-style:accent;",
-			"fems:dt": "font-emphasize-style:dot;",
-			"fems:c": "font-emphasize-style:circle;",
-			"fems:ds": "font-emphasize-style:disc;",
-			"fsm": "font-smooth:|;",
-			"fsm:a": "font-smooth:auto;",
-			"fsm:n": "font-smooth:never;",
-			"fsm:aw": "font-smooth:always;",
-			"fst": "font-stretch:|;",
-			"fst:n": "font-stretch:normal;",
-			"fst:uc": "font-stretch:ultra-condensed;",
-			"fst:ec": "font-stretch:extra-condensed;",
-			"fst:c": "font-stretch:condensed;",
-			"fst:sc": "font-stretch:semi-condensed;",
-			"fst:se": "font-stretch:semi-expanded;",
-			"fst:e": "font-stretch:expanded;",
-			"fst:ee": "font-stretch:extra-expanded;",
-			"fst:ue": "font-stretch:ultra-expanded;",
-			"op": "opacity:|;",
-			"op+": "opacity: $1;\nfilter: alpha(opacity=$2);",
-			"op:ie": "filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);",
-			"op:ms": "-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';",
-			"rsz": "resize:|;",
-			"rsz:n": "resize:none;",
-			"rsz:b": "resize:both;",
-			"rsz:h": "resize:horizontal;",
-			"rsz:v": "resize:vertical;",
-			"cur": "cursor:${pointer};",
-			"cur:a": "cursor:auto;",
-			"cur:d": "cursor:default;",
-			"cur:c": "cursor:crosshair;",
-			"cur:ha": "cursor:hand;",
-			"cur:he": "cursor:help;",
-			"cur:m": "cursor:move;",
-			"cur:p": "cursor:pointer;",
-			"cur:t": "cursor:text;",
-			"fxd": "flex-direction:|;",
-			"fxd:r": "flex-direction:row;",
-			"fxd:rr": "flex-direction:row-reverse;",
-			"fxd:c": "flex-direction:column;",
-			"fxd:cr": "flex-direction:column-reverse;",
-			"fxw": "flex-wrap: |;",
-			"fxw:n": "flex-wrap:nowrap;",
-			"fxw:w": "flex-wrap:wrap;",
-			"fxw:wr": "flex-wrap:wrap-reverse;",
-			"fxf": "flex-flow:|;",
-			"jc": "justify-content:|;",
-			"jc:fs": "justify-content:flex-start;",
-			"jc:fe": "justify-content:flex-end;",
-			"jc:c": "justify-content:center;",
-			"jc:sb": "justify-content:space-between;",
-			"jc:sa": "justify-content:space-around;",
-			"ai": "align-items:|;",
-			"ai:fs": "align-items:flex-start;",
-			"ai:fe": "align-items:flex-end;",
-			"ai:c": "align-items:center;",
-			"ai:b": "align-items:baseline;",
-			"ai:s": "align-items:stretch;",
-			"ac": "align-content:|;",
-			"ac:fs": "align-content:flex-start;",
-			"ac:fe": "align-content:flex-end;",
-			"ac:c": "align-content:center;",
-			"ac:sb": "align-content:space-between;",
-			"ac:sa": "align-content:space-around;",
-			"ac:s": "align-content:stretch;",
-			"ord": "order:|;",
-			"fxg": "flex-grow:|;",
-			"fxsh": "flex-shrink:|;",
-			"fxb": "flex-basis:|;",
-			"fx": "flex:|;",
-			"as": "align-self:|;",
-			"as:a": "align-self:auto;",
-			"as:fs": "align-self:flex-start;",
-			"as:fe": "align-self:flex-end;",
-			"as:c": "align-self:center;",
-			"as:b": "align-self:baseline;",
-			"as:s": "align-self:stretch;",
-			"pgbb": "page-break-before:|;",
-			"pgbb:au": "page-break-before:auto;",
-			"pgbb:al": "page-break-before:always;",
-			"pgbb:l": "page-break-before:left;",
-			"pgbb:r": "page-break-before:right;",
-			"pgbi": "page-break-inside:|;",
-			"pgbi:au": "page-break-inside:auto;",
-			"pgbi:av": "page-break-inside:avoid;",
-			"pgba": "page-break-after:|;",
-			"pgba:au": "page-break-after:auto;",
-			"pgba:al": "page-break-after:always;",
-			"pgba:l": "page-break-after:left;",
-			"pgba:r": "page-break-after:right;",
-			"orp": "orphans:|;",
-			"us": "user-select:${none};",
-			"wid": "widows:|;",
-			"wfsm": "-webkit-font-smoothing:${antialiased};",
-			"wfsm:a": "-webkit-font-smoothing:antialiased;",
-			"wfsm:s": "-webkit-font-smoothing:subpixel-antialiased;",
-			"wfsm:sa": "-webkit-font-smoothing:subpixel-antialiased;",
-			"wfsm:n": "-webkit-font-smoothing:none;"
-		}
-	},
-	
-	"html": {
-		"filters": "html",
-		"profile": "html",
-		"snippets": {
-			"!!!":    "<!DOCTYPE html>",
-			"!!!4t":  "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
-			"!!!4s":  "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">",
-			"!!!xt":  "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">",
-			"!!!xs":  "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">",
-			"!!!xxs": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">",
-
-			"c": "<!-- |${child} -->",
-			"cc:ie6": "<!--[if lte IE 6]>\n\t${child}|\n<![endif]-->",
-			"cc:ie": "<!--[if IE]>\n\t${child}|\n<![endif]-->",
-			"cc:noie": "<!--[if !IE]><!-->\n\t${child}|\n<!--<![endif]-->"
-		},
-		
-		"abbreviations": {
-			"!": "html:5",
-			"a": "<a href=\"\">",
-			"a:link": "<a href=\"http://|\">",
-			"a:mail": "<a href=\"mailto:|\">",
-			"abbr": "<abbr title=\"\">",
-			"acr|acronym": "<acronym title=\"\">",
-			"base": "<base href=\"\" />",
-			"basefont": "<basefont/>",
-			"br": "<br/>",
-			"frame": "<frame/>",
-			"hr": "<hr/>",
-			"bdo": "<bdo dir=\"\">",
-			"bdo:r": "<bdo dir=\"rtl\">",
-			"bdo:l": "<bdo dir=\"ltr\">",
-			"col": "<col/>",
-			"link": "<link rel=\"stylesheet\" href=\"\" />",
-			"link:css": "<link rel=\"stylesheet\" href=\"${1:style}.css\" />",
-			"link:print": "<link rel=\"stylesheet\" href=\"${1:print}.css\" media=\"print\" />",
-			"link:favicon": "<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"${1:favicon.ico}\" />",
-			"link:touch": "<link rel=\"apple-touch-icon\" href=\"${1:favicon.png}\" />",
-			"link:rss": "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"${1:rss.xml}\" />",
-			"link:atom": "<link rel=\"alternate\" type=\"application/atom+xml\" title=\"Atom\" href=\"${1:atom.xml}\" />",
-			"link:im|link:import": "<link rel=\"import\" href=\"${1:component}.html\" />",
-			"meta": "<meta/>",
-			"meta:utf": "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\" />",
-			"meta:win": "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=windows-1251\" />",
-			"meta:vp": "<meta name=\"viewport\" content=\"width=${1:device-width}, user-scalable=${2:no}, initial-scale=${3:1.0}, maximum-scale=${4:1.0}, minimum-scale=${5:1.0}\" />",
-			"meta:compat": "<meta http-equiv=\"X-UA-Compatible\" content=\"${1:IE=7}\" />",
-			"style": "<style>",
-			"script": "<script !src=\"\">",
-			"script:src": "<script src=\"\">",
-			"img": "<img src=\"\" alt=\"\" />",
-			"img:s|img:srcset": "<img srcset=\"\" src=\"\" alt=\"\" />",
-			"img:z|img:sizes": "<img sizes=\"\" srcset=\"\" src=\"\" alt=\"\" />",
-			"picture": "<picture>",
-			"src|source": "<source/>",
-			"src:sc|source:src": "<source src=\"\" type=\"\"/>",
-			"src:s|source:srcset": "<source srcset=\"\"/>",
-			"src:m|source:media": "<source media=\"(${1:min-width: })\" srcset=\"\"/>",
-			"src:t|source:type": "<source srcset=\"|\" type=\"${1:image/}\"/>",
-			"src:z|source:sizes": "<source sizes=\"\" srcset=\"\"/>",
-			"src:mt|source:media:type": "<source media=\"(${1:min-width: })\" srcset=\"\" type=\"${2:image/}\"/>",
-			"src:mz|source:media:sizes": "<source media=\"(${1:min-width: })\" sizes=\"\" srcset=\"\"/>",
-			"src:zt|source:sizes:type": "<source sizes=\"\" srcset=\"\" type=\"${1:image/}\"/>",
-			"iframe": "<iframe src=\"\" frameborder=\"0\">",
-			"embed": "<embed src=\"\" type=\"\" />",
-			"object": "<object data=\"\" type=\"\">",
-			"param": "<param name=\"\" value=\"\" />",
-			"map": "<map name=\"\">",
-			"area": "<area shape=\"\" coords=\"\" href=\"\" alt=\"\" />",
-			"area:d": "<area shape=\"default\" href=\"\" alt=\"\" />",
-			"area:c": "<area shape=\"circle\" coords=\"\" href=\"\" alt=\"\" />",
-			"area:r": "<area shape=\"rect\" coords=\"\" href=\"\" alt=\"\" />",
-			"area:p": "<area shape=\"poly\" coords=\"\" href=\"\" alt=\"\" />",
-			"form": "<form action=\"\">",
-			"form:get": "<form action=\"\" method=\"get\">",
-			"form:post": "<form action=\"\" method=\"post\">",
-			"label": "<label for=\"\">",
-			"input": "<input type=\"${1:text}\" />",
-			"inp": "<input type=\"${1:text}\" name=\"\" id=\"\" />",
-			"input:h|input:hidden": "input[type=hidden name]",
-			"input:t|input:text": "inp",
-			"input:search": "inp[type=search]",
-			"input:email": "inp[type=email]",
-			"input:url": "inp[type=url]",
-			"input:p|input:password": "inp[type=password]",
-			"input:datetime": "inp[type=datetime]",
-			"input:date": "inp[type=date]",
-			"input:datetime-local": "inp[type=datetime-local]",
-			"input:month": "inp[type=month]",
-			"input:week": "inp[type=week]",
-			"input:time": "inp[type=time]",
-			"input:tel": "inp[type=tel]",
-			"input:number": "inp[type=number]",
-			"input:color": "inp[type=color]",
-			"input:c|input:checkbox": "inp[type=checkbox]",
-			"input:r|input:radio": "inp[type=radio]",
-			"input:range": "inp[type=range]",
-			"input:f|input:file": "inp[type=file]",
-			"input:s|input:submit": "<input type=\"submit\" value=\"\" />",
-			"input:i|input:image": "<input type=\"image\" src=\"\" alt=\"\" />",
-			"input:b|input:button": "<input type=\"button\" value=\"\" />",
-			"isindex": "<isindex/>",
-			"input:reset": "input:button[type=reset]",
-			"select": "<select name=\"\" id=\"\">",
-			"select:d|select:disabled": "select[disabled.]",
-			"opt|option": "<option value=\"\">",
-			"textarea": "<textarea name=\"\" id=\"\" cols=\"${1:30}\" rows=\"${2:10}\">",
-			"marquee": "<marquee behavior=\"\" direction=\"\">",
-			"menu:c|menu:context": "menu[type=context]>",
-			"menu:t|menu:toolbar": "menu[type=toolbar]>",
-			"video": "<video src=\"\">",
-			"audio": "<audio src=\"\">",
-			"html:xml": "<html xmlns=\"http://www.w3.org/1999/xhtml\">",
-			"keygen": "<keygen/>",
-			"command": "<command/>",
-			"btn:s|button:s|button:submit" : "button[type=submit]",
-			"btn:r|button:r|button:reset" : "button[type=reset]",
-			"btn:d|button:d|button:disabled" : "button[disabled.]",
-			"fst:d|fset:d|fieldset:d|fieldset:disabled" : "fieldset[disabled.]",
-			
-			"bq": "blockquote",
-			"fig": "figure",
-			"figc": "figcaption",
-			"pic": "picture",
-			"ifr": "iframe",
-			"emb": "embed",
-			"obj": "object",
-			"cap": "caption",
-			"colg": "colgroup",
-			"fst": "fieldset",
-			"btn": "button",
-			"optg": "optgroup",
-			"tarea": "textarea",
-			"leg": "legend",
-			"sect": "section",
-			"art": "article",
-			"hdr": "header",
-			"ftr": "footer",
-			"adr": "address",
-			"dlg": "dialog",
-			"str": "strong",
-			"prog": "progress",
-			"mn": "main",
-			"tem": "template",
-			"fset": "fieldset",
-			"datag": "datagrid",
-			"datal": "datalist",
-			"kg": "keygen",
-			"out": "output",
-			"det": "details",
-			"cmd": "command",
-			"doc": "html>(head>meta[charset=${charset}]+title{${1:Document}})+body",
-			"doc4": "html>(head>meta[http-equiv=\"Content-Type\" content=\"text/html;charset=${charset}\"]+title{${1:Document}})+body",
-
-			"ri:d|ri:dpr": "img:s",
-			"ri:v|ri:viewport": "img:z",
-			"ri:a|ri:art": "pic>src:m+img",
-			"ri:t|ri:type": "pic>src:t+img",
-
-			"html:4t":  "!!!4t+doc4[lang=${lang}]",
-			"html:4s":  "!!!4s+doc4[lang=${lang}]",
-			"html:xt":  "!!!xt+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}]",
-			"html:xs":  "!!!xs+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}]",
-			"html:xxs": "!!!xxs+doc4[xmlns=http://www.w3.org/1999/xhtml xml:lang=${lang}]",
-			"html:5":   "!!!+doc[lang=${lang}]",
-			
-			"ol+": "ol>li",
-			"ul+": "ul>li",
-			"dl+": "dl>dt+dd",
-			"map+": "map>area",
-			"table+": "table>tr>td",
-			"colgroup+": "colgroup>col",
-			"colg+": "colgroup>col",
-			"tr+": "tr>td",
-			"select+": "select>option",
-			"optgroup+": "optgroup>option",
-			"optg+": "optgroup>option",
-			"pic+": "picture>source:srcset+img"
-		}
-	},
-	
-	"xml": {
-		"extends": "html",
-		"profile": "xml",
-		"filters": "html"
-	},
-	
-	"xsl": {
-		"extends": "html",
-		"profile": "xml",
-		"filters": "html, xsl",
-		"abbreviations": {
-			"tm|tmatch": "<xsl:template match=\"\" mode=\"\">",
-			"tn|tname": "<xsl:template name=\"\">",
-			"call": "<xsl:call-template name=\"\"/>",
-			"ap": "<xsl:apply-templates select=\"\" mode=\"\"/>",
-			"api": "<xsl:apply-imports/>",
-			"imp": "<xsl:import href=\"\"/>",
-			"inc": "<xsl:include href=\"\"/>",
-
-			"ch": "<xsl:choose>",
-			"wh|xsl:when": "<xsl:when test=\"\">",
-			"ot": "<xsl:otherwise>",
-			"if": "<xsl:if test=\"\">",
-
-			"par": "<xsl:param name=\"\">",
-			"pare": "<xsl:param name=\"\" select=\"\"/>",
-			"var": "<xsl:variable name=\"\">",
-			"vare": "<xsl:variable name=\"\" select=\"\"/>",
-			"wp": "<xsl:with-param name=\"\" select=\"\"/>",
-			"key": "<xsl:key name=\"\" match=\"\" use=\"\"/>",
-
-			"elem": "<xsl:element name=\"\">",
-			"attr": "<xsl:attribute name=\"\">",
-			"attrs": "<xsl:attribute-set name=\"\">",
-
-			"cp": "<xsl:copy select=\"\"/>",
-			"co": "<xsl:copy-of select=\"\"/>",
-			"val": "<xsl:value-of select=\"\"/>",
-			"for|each": "<xsl:for-each select=\"\">",
-			"tex": "<xsl:text></xsl:text>",
-
-			"com": "<xsl:comment>",
-			"msg": "<xsl:message terminate=\"no\">",
-			"fall": "<xsl:fallback>",
-			"num": "<xsl:number value=\"\"/>",
-			"nam": "<namespace-alias stylesheet-prefix=\"\" result-prefix=\"\"/>",
-			"pres": "<xsl:preserve-space elements=\"\"/>",
-			"strip": "<xsl:strip-space elements=\"\"/>",
-			"proc": "<xsl:processing-instruction name=\"\">",
-			"sort": "<xsl:sort select=\"\" order=\"\"/>",
-
-			"choose+": "xsl:choose>xsl:when+xsl:otherwise",
-			"xsl": "!!!+xsl:stylesheet[version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform]>{\n|}"
-		}, 
-		"snippets": {
-			"!!!": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-		}
-	},
-	
-	"haml": {
-		"filters": "haml",
-		"extends": "html",
-		"profile": "xml"
-	},
-
-	"jade": {
-		"filters": "jade",
-		"extends": "html",
-		"profile": "xml"
-	},
-
-	"jsx": {
-		"filters": "jsx, html",
-		"extends": "html",
-		"profile": "xml"
-	},
-
-	"slim": {
-		"filters": "slim",
-		"extends": "html",
-		"profile": "xml"
-	},
-	
-	"scss": {
-		"extends": "css"
-	},
-	
-	"sass": {
-		"extends": "css"
-	},
-	
-	"less": {
-		"extends": "css"
-	},
-	
-	"stylus": {
-		"extends": "css"
-	},
-
-	"styl": {
-		"extends": "stylus"
-	}
-}
-
-},{}],69:[function(require,module,exports){
-/**
- * Utility functions to work with <code>AbbreviationNode</code> as HTML element
- * @param {Function} require
- * @param {Underscore} _
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var elements = require('../assets/elements');
-	var tabStops = require('../assets/tabStops');
-	var utils = require('../utils/common');
-	var tagName = require('../resolver/tagName');
-
-	return {
-		/**
-		 * Test if passed node is unary (no closing tag)
-		 * @param {AbbreviationNode} node
-		 * @return {Boolean}
-		 */
-		isUnary: function(node) {
-			if (node.children.length || node._text || this.isSnippet(node)) {
-				return false;
-			}
-			
-			var r = node.data('resource');
-			return r && r.is_empty;
-		},
-		
-		/**
-		 * Test if passed node is inline-level (like &lt;strong&gt;, &lt;img&gt;)
-		 * @param {AbbreviationNode} node
-		 * @return {Boolean}
-		 */
-		isInline: function(node) {
-			return node.isTextNode() 
-				|| !node.name() 
-				|| tagName.isInlineLevel(node.name());
-		},
-		
-		/**
-		 * Test if passed node is block-level
-		 * @param {AbbreviationNode} node
-		 * @return {Boolean}
-		 */
-		isBlock: function(node) {
-			return this.isSnippet(node) || !this.isInline(node);
-		},
-		
-		/**
-		 * Test if given node is a snippet
-		 * @param {AbbreviationNode} node
-		 * @return {Boolean}
-		 */
-		isSnippet: function(node) {
-			return elements.is(node.data('resource'), 'snippet');
-		},
-		
-		/**
-		 * This function tests if passed node content contains HTML tags. 
-		 * This function is mostly used for output formatting
-		 * @param {AbbreviationNode} node
-		 * @returns {Boolean}
-		 */
-		hasTagsInContent: function(node) {
-			return utils.matchesTag(node.content);
-		},
-		
-		/**
-		 * Test if current element contains block-level children
-		 * @param {AbbreviationNode} node
-		 * @return {Boolean}
-		 */
-		hasBlockChildren: function(node) {
-			return (this.hasTagsInContent(node) && this.isBlock(node)) 
-				|| node.children.some(function(child) {
-					return this.isBlock(child);
-				}, this);
-		},
-		
-		/**
-		 * Utility function that inserts content instead of <code>${child}</code>
-		 * variables on <code>text</code>
-		 * @param {String} text Text where child content should be inserted
-		 * @param {String} childContent Content to insert
-		 * @param {Object} options
-		 * @returns {String
-		 */
-		insertChildContent: function(text, childContent, options) {
-			options = utils.extend({
-				keepVariable: true,
-				appendIfNoChild: true
-			}, options || {});
-			
-			var childVariableReplaced = false;
-			text = tabStops.replaceVariables(text, function(variable, name, data) {
-				var output = variable;
-				if (name == 'child') {
-					// add correct indentation
-					output = utils.padString(childContent, utils.getLinePaddingFromPosition(text, data.start));
-					childVariableReplaced = true;
-					if (options.keepVariable)
-						output += variable;
-				}
-				
-				return output;
-			});
-			
-			if (!childVariableReplaced && options.appendIfNoChild) {
-				text += childContent;
-			}
-			
-			return text;
-		}
-	};
-});
-},{"../assets/elements":24,"../assets/tabStops":33,"../resolver/tagName":67,"../utils/common":73}],70:[function(require,module,exports){
-/**
- * Utility methods for Emmet actions
- * @author Sergey Chikuyonok (serge.che@gmail.com) <http://chikuyonok.ru>
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('./common');
-	var cssSections = require('./cssSections');
-	var abbreviationParser = require('../parser/abbreviation');
-	var htmlMatcher = require('../assets/htmlMatcher');
-	var xmlEditTree = require('../editTree/xml');
-	var range = require('../assets/range');
-	var resources = require('../assets/resources');
-
-	return {
-		mimeTypes: {
-			'gif' : 'image/gif',
-			'png' : 'image/png',
-			'jpg' : 'image/jpeg',
-			'jpeg': 'image/jpeg',
-			'svg' : 'image/svg+xml',
-			'html': 'text/html',
-			'htm' : 'text/html'
-		},
-		
-		/**
-		 * Extracts abbreviations from text stream, starting from the end
-		 * @param {String} str
-		 * @return {String} Abbreviation or empty string
-		 * @memberOf emmet.actionUtils
-		 */
-		extractAbbreviation: function(str) {
-			var curOffset = str.length;
-			var startIndex = -1;
-			var groupCount = 0;
-			var braceCount = 0;
-			var textCount = 0;
-			
-			while (true) {
-				curOffset--;
-				if (curOffset < 0) {
-					// moved to the beginning of the line
-					startIndex = 0;
-					break;
-				}
-				
-				var ch = str.charAt(curOffset);
-				
-				if (ch == ']') {
-					braceCount++;
-				} else if (ch == '[') {
-					if (!braceCount) { // unexpected brace
-						startIndex = curOffset + 1;
-						break;
-					}
-					braceCount--;
-				} else if (ch == '}') {
-					textCount++;
-				} else if (ch == '{') {
-					if (!textCount) { // unexpected brace
-						startIndex = curOffset + 1;
-						break;
-					}
-					textCount--;
-				} else if (ch == ')') {
-					groupCount++;
-				} else if (ch == '(') {
-					if (!groupCount) { // unexpected brace
-						startIndex = curOffset + 1;
-						break;
-					}
-					groupCount--;
-				} else {
-					if (braceCount || textCount) 
-						// respect all characters inside attribute sets or text nodes
-						continue;
-					else if (!abbreviationParser.isAllowedChar(ch) || (ch == '>' && utils.endsWithTag(str.substring(0, curOffset + 1)))) {
-						// found stop symbol
-						startIndex = curOffset + 1;
-						break;
-					}
-				}
-			}
-			
-			if (startIndex != -1 && !textCount && !braceCount && !groupCount) 
-				// found something, remove some invalid symbols from the 
-				// beginning and return abbreviation
-				return str.substring(startIndex).replace(/^[\*\+\>\^]+/, '');
-			else
-				return '';
-		},
-		
-		/**
-		 * Gets image size from image byte stream.
-		 * @author http://romeda.org/rePublish/
-		 * @param {String} stream Image byte stream (use <code>IEmmetFile.read()</code>)
-		 * @return {Object} Object with <code>width</code> and <code>height</code> properties
-		 */
-		getImageSize: function(stream) {
-			var pngMagicNum = "\211PNG\r\n\032\n",
-				jpgMagicNum = "\377\330",
-				gifMagicNum = "GIF8",
-				pos = 0,
-				nextByte = function() {
-					return stream.charCodeAt(pos++);
-				};
-		
-			if (stream.substr(0, 8) === pngMagicNum) {
-				// PNG. Easy peasy.
-				pos = stream.indexOf('IHDR') + 4;
-			
-				return {
-					width:  (nextByte() << 24) | (nextByte() << 16) | (nextByte() <<  8) | nextByte(),
-					height: (nextByte() << 24) | (nextByte() << 16) | (nextByte() <<  8) | nextByte()
-				};
-			
-			} else if (stream.substr(0, 4) === gifMagicNum) {
-				pos = 6;
-			
-				return {
-					width:  nextByte() | (nextByte() << 8),
-					height: nextByte() | (nextByte() << 8)
-				};
-			
-			} else if (stream.substr(0, 2) === jpgMagicNum) {
-				pos = 2;
-			
-				var l = stream.length;
-				while (pos < l) {
-					if (nextByte() != 0xFF) return;
-				
-					var marker = nextByte();
-					if (marker == 0xDA) break;
-				
-					var size = (nextByte() << 8) | nextByte();
-				
-					if (marker >= 0xC0 && marker <= 0xCF && !(marker & 0x4) && !(marker & 0x8)) {
-						pos += 1;
-						return {
-							height: (nextByte() << 8) | nextByte(),
-							width: (nextByte() << 8) | nextByte()
-						};
-				
-					} else {
-						pos += size - 2;
-					}
-				}
-			}
-		},
-		
-		/**
-		 * Captures context XHTML element from editor under current caret position.
-		 * This node can be used as a helper for abbreviation extraction
-		 * @param {IEmmetEditor} editor
-		 * @returns {Object}
-		 */
-		captureContext: function(editor, pos) {
-			var allowedSyntaxes = {'html': 1, 'xml': 1, 'xsl': 1};
-			var syntax = editor.getSyntax();
-			if (syntax in allowedSyntaxes) {
-				var content = editor.getContent();
-				if (typeof pos === 'undefined') {
-					pos = editor.getCaretPos();
-				}
-
-				var tag = htmlMatcher.find(content, pos);
-				if (tag && tag.type == 'tag') {
-					var startTag = tag.open;
-					var contextNode = {
-						name: startTag.name,
-						attributes: [],
-						match: tag
-					};
-					
-					// parse attributes
-					var tagTree = xmlEditTree.parse(startTag.range.substring(content));
-					if (tagTree) {
-						contextNode.attributes = tagTree.getAll().map(function(item) {
-							return {
-								name: item.name(),
-								value: item.value()
-							};
-						});
-					}
-					
-					return contextNode;
-				}
-			}
-			
-			return null;
-		},
-		
-		/**
-		 * Find expression bounds in current editor at caret position. 
-		 * On each character a <code>fn</code> function will be called and must 
-		 * return <code>true</code> if current character meets requirements, 
-		 * <code>false</code> otherwise
-		 * @param {IEmmetEditor} editor
-		 * @param {Function} fn Function to test each character of expression
-		 * @return {Range}
-		 */
-		findExpressionBounds: function(editor, fn) {
-			var content = String(editor.getContent());
-			var il = content.length;
-			var exprStart = editor.getCaretPos() - 1;
-			var exprEnd = exprStart + 1;
-				
-			// start by searching left
-			while (exprStart >= 0 && fn(content.charAt(exprStart), exprStart, content)) exprStart--;
-			
-			// then search right
-			while (exprEnd < il && fn(content.charAt(exprEnd), exprEnd, content)) exprEnd++;
-			
-			if (exprEnd > exprStart) {
-				return range([++exprStart, exprEnd]);
-			}
-		},
-		
-		/**
-		 * @param {IEmmetEditor} editor
-		 * @param {Object} data
-		 * @returns {Boolean}
-		 */
-		compoundUpdate: function(editor, data) {
-			if (data) {
-				var sel = editor.getSelectionRange();
-				editor.replaceContent(data.data, data.start, data.end, true);
-				editor.createSelection(data.caret, data.caret + sel.end - sel.start);
-				return true;
-			}
-			
-			return false;
-		},
-		
-		/**
-		 * Common syntax detection method for editors that doesn’t provide any
-		 * info about current syntax scope. 
-		 * @param {IEmmetEditor} editor Current editor
-		 * @param {String} hint Any syntax hint that editor can provide 
-		 * for syntax detection. Default is 'html'
-		 * @returns {String} 
-		 */
-		detectSyntax: function(editor, hint) {
-			var syntax = hint || 'html';
-			
-			if (!resources.hasSyntax(syntax)) {
-				syntax = 'html';
-			}
-			
-			if (syntax == 'html' && (this.isStyle(editor) || this.isInlineCSS(editor))) {
-				syntax = 'css';
-			}
-
-			if (syntax == 'styl') {
-				syntax = 'stylus';
-			}
-			
-			return syntax;
-		},
-		
-		/**
-		 * Common method for detecting output profile
-		 * @param {IEmmetEditor} editor
-		 * @returns {String}
-		 */
-		detectProfile: function(editor) {
-			var syntax = editor.getSyntax();
-			
-			// get profile from syntax definition
-			var profile = resources.findItem(syntax, 'profile');
-			if (profile) {
-				return profile;
-			}
-			
-			switch(syntax) {
-				case 'xml':
-				case 'xsl':
-					return 'xml';
-				case 'css':
-					if (this.isInlineCSS(editor)) {
-						return 'line';
-					}
-					break;
-				case 'html':
-					profile = resources.getVariable('profile');
-					if (!profile) { // no forced profile, guess from content
-						// html or xhtml?
-						profile = this.isXHTML(editor) ? 'xhtml': 'html';
-					}
-
-					return profile;
-			}
-
-			return 'xhtml';
-		},
-		
-		/**
-		 * Tries to detect if current document is XHTML one.
-		 * @param {IEmmetEditor} editor
-		 * @returns {Boolean}
-		 */
-		isXHTML: function(editor) {
-			return editor.getContent().search(/<!DOCTYPE[^>]+XHTML/i) != -1;
-		},
-
-		/**
-		 * Check if current caret position is inside &lt;style&gt; tag
-		 * @param {IEmmetEditor} editor
-		 * @returns {Range} Inner range of &lt;style&gt; tag
-		 */
-		isStyle: function(editor) {
-			return !!cssSections.styleTagRange(editor.getContent(), editor.getCaretPos());
-		},
-
-		/**
-		 * Check if given CSS dialect is supported by CSS actions
-		 * @param  {String}  syntax
-		 * @return {Boolean}
-		 */
-		isSupportedCSS: function(syntax) {
-			return syntax == 'css' || syntax == 'less' || syntax == 'scss';
-		},
-		
-		/**
-		 * Check if current caret position is inside "style" attribute of HTML
-		 * element
-		 * @param {IEmmetEditor} editor
-		 * @returns {Range} Inner range of style attribute
-		 */
-		isInlineCSS: function(editor) {
-			return !!cssSections.styleAttrRange(editor.getContent(), editor.getCaretPos());
-		}
-	};
-});
-},{"../assets/htmlMatcher":26,"../assets/range":30,"../assets/resources":31,"../editTree/xml":38,"../parser/abbreviation":55,"./common":73,"./cssSections":74}],71:[function(require,module,exports){
-/**
- * @author Sergey Chikuyonok (serge.che@gmail.com)
- * @link http://chikuyonok.ru
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
-	
-	return {
-		/**
-		 * Encodes data using base64 algorithm
-		 * @author Tyler Akins (http://rumkin.com)
-		 * @param {String} input
-		 * @returns {String}
-		 */
-		encode : function(input) {
-			var output = [];
-			var chr1, chr2, chr3, enc1, enc2, enc3, enc4, cdp1, cdp2, cdp3;
-			var i = 0, il = input.length, b64 = chars;
-
-			while (i < il) {
-
-				cdp1 = input.charCodeAt(i++);
-				cdp2 = input.charCodeAt(i++);
-				cdp3 = input.charCodeAt(i++);
-
-				chr1 = cdp1 & 0xff;
-				chr2 = cdp2 & 0xff;
-				chr3 = cdp3 & 0xff;
-
-				enc1 = chr1 >> 2;
-				enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
-				enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
-				enc4 = chr3 & 63;
-
-				if (isNaN(cdp2)) {
-					enc3 = enc4 = 64;
-				} else if (isNaN(cdp3)) {
-					enc4 = 64;
-				}
-
-				output.push(b64.charAt(enc1) + b64.charAt(enc2) + b64.charAt(enc3) + b64.charAt(enc4));
-			}
-
-			return output.join('');
-		},
-
-		/**
-		 * Decodes string using MIME base64 algorithm
-		 * 
-		 * @author Tyler Akins (http://rumkin.com)
-		 * @param {String} data
-		 * @return {String}
-		 */
-		decode : function(data) {
-			var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0, tmpArr = [];
-			var b64 = chars, il = data.length;
-
-			if (!data) {
-				return data;
-			}
-
-			data += '';
-
-			do { // unpack four hexets into three octets using index points in b64
-				h1 = b64.indexOf(data.charAt(i++));
-				h2 = b64.indexOf(data.charAt(i++));
-				h3 = b64.indexOf(data.charAt(i++));
-				h4 = b64.indexOf(data.charAt(i++));
-
-				bits = h1 << 18 | h2 << 12 | h3 << 6 | h4;
-
-				o1 = bits >> 16 & 0xff;
-				o2 = bits >> 8 & 0xff;
-				o3 = bits & 0xff;
-
-				if (h3 == 64) {
-					tmpArr[ac++] = String.fromCharCode(o1);
-				} else if (h4 == 64) {
-					tmpArr[ac++] = String.fromCharCode(o1, o2);
-				} else {
-					tmpArr[ac++] = String.fromCharCode(o1, o2, o3);
-				}
-			} while (i < il);
-
-			return tmpArr.join('');
-		}
-	};
-});
-},{}],72:[function(require,module,exports){
-/**
- * Utility module for working with comments in source code
- * (mostly stripping it from source)
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('./common');
-	var range = require('../assets/range');
-	var stringStream = require('../assets/stringStream');
-	var reHasComment = /\/\*|\/\//;
-
-	return {
-		/**
-		 * Replaces all comments in given CSS source with spaces,
-		 * which allows more reliable (and faster) token search
-		 * in CSS content
-		 * @param  {String} content CSS content
-		 * @return {String}
-		 */
-		strip: function(content) {
-			if (!reHasComment.test(content)) {
-				return content;
-			}
-
-			var stream = stringStream(content);
-			var replaceRanges = [];
-			var ch, ch2;
-
-			while ((ch = stream.next())) {
-				if (ch === '/') {
-					ch2 = stream.peek();
-					if (ch2 === '*') { // multiline CSS comment
-						stream.start = stream.pos - 1;
-
-						if (stream.skipTo('*/')) {
-							stream.pos += 2;
-						} else {
-							// unclosed comment
-							stream.skipToEnd();
-						}
-
-						replaceRanges.push([stream.start, stream.pos]);
-					} else if (ch2 === '/') {
-						// preprocessor’s single line comments
-						stream.start = stream.pos - 1;
-						while ((ch2 = stream.next())) {
-							if (ch2 === '\n' || ch2 == '\r') {
-								break
-							}
-						}
-
-						replaceRanges.push([stream.start, stream.pos]);
-					}
-				} else {
-					stream.skipQuoted();
-				}
-			}
-
-			return utils.replaceWith(content, replaceRanges, ' ');
-		}
-	};
-});
-},{"../assets/range":30,"../assets/stringStream":32,"./common":73}],73:[function(require,module,exports){
-/**
- * Common utility helper for Emmet
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var range = require('../assets/range');
-
-	/** 
-	 * Special token used as a placeholder for caret positions inside 
-	 * generated output 
-	 */
-	var caretPlaceholder = '${0}';
-	
-	return {
-		reTag: /<\/?[\w:\-]+(?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*\s*(\/?)>$/,
-
-		defaultSyntax: function() {
-			return 'html';
-		},
-
-		defaultProfile: function() {
-			return 'plain';
-		},
-		
-		/**
-		 * Test if passed string ends with XHTML tag. This method is used for testing
-		 * '>' character: it belongs to tag or it's a part of abbreviation? 
-		 * @param {String} str
-		 * @return {Boolean}
-		 */
-		endsWithTag: function(str) {
-			return this.reTag.test(str);
-		},
-		
-		/**
-		 * Check if passed symbol is a number
-		 * @param {String} ch
-		 * @returns {Boolean}
-		 */
-		isNumeric: function(ch) {
-			if (typeof(ch) == 'string')
-				ch = ch.charCodeAt(0);
-				
-			return (ch && ch > 47 && ch < 58);
-		},
-		
-		/**
-		 * Trim whitespace from string
-		 * @param {String} text
-		 * @return {String}
-		 */
-		trim: (function() {
-			if (String.prototype.trim) {
-				return function(text) {
-					return text ? text.trim() : '';
-				};
-			}
-
-			return function(text) {
-				return (text || "").replace(/^\s+|\s+$/g, "");
-			}
-		})(),
-		
-		/**
-		 * Split text into lines. Set <code>remove_empty</code> to true to filter
-		 * empty lines
-		 * @param {String} text Text to split
-		 * @param {Boolean} removeEmpty Remove empty lines from result
-		 * @return {Array}
-		 */
-		splitByLines: function(text, removeEmpty) {
-			// IE fails to split string by regexp, 
-			// need to normalize newlines first
-			// Also, Mozilla's Rhiho JS engine has a weird newline bug
-			var nl = '\n';
-			var lines = (text || '')
-				.replace(/\r\n/g, '\n')
-				.replace(/\n\r/g, '\n')
-				.replace(/\r/g, '\n')
-				.replace(/\n/g, nl)
-				.split(nl);
-			
-			if (removeEmpty) {
-				lines = lines.filter(function(line) {
-					return line.length && !!this.trim(line);
-				}, this);
-			}
-			
-			return lines;
-		},
-		
-		/**
-		 * Repeats string <code>howMany</code> times
-		 * @param {String} str
-		 * @param {Number} how_many
-		 * @return {String}
-		 */
-		repeatString: function(str, howMany) {
-			var out = '';
-			while (howMany--) {
-				out += str;
-			}
-
-			return out;
-		},
-		
-		/**
-		 * Returns list of paddings that should be used to align passed string
-		 * @param {Array} strings
-		 * @returns {Array}
-		 */
-		getStringsPads: function(strings) {
-			var lengths = strings.map(function(s) {
-				return typeof s === 'string' ? s.length : +s;
-			});
-			
-			var max = lengths.reduce(function(prev, cur) {
-				return typeof prev === 'undefined' ? cur : Math.max(prev, cur);
-			});
-			return lengths.map(function(l) {
-				var pad = max - l;
-				return pad ? this.repeatString(' ', pad) : '';
-			}, this);
-		},
-		
-		/**
-		 * Indents text with padding
-		 * @param {String} text Text to indent
-		 * @param {String} pad Padding size (number) or padding itself (string)
-		 * @return {String}
-		 */
-		padString: function(text, pad) {
-			var result = [];
-			var lines = this.splitByLines(text);
-			var nl = '\n';
-				
-			result.push(lines[0]);
-			for (var j = 1; j < lines.length; j++) 
-				result.push(nl + pad + lines[j]);
-				
-			return result.join('');
-		},
-		
-		/**
-		 * Pad string with zeroes
-		 * @param {String} str String to pad
-		 * @param {Number} pad Desired string length
-		 * @return {String}
-		 */
-		zeroPadString: function(str, pad) {
-			var padding = '';
-			var il = str.length;
-				
-			while (pad > il++) padding += '0';
-			return padding + str; 
-		},
-		
-		/**
-		 * Removes padding at the beginning of each text's line
-		 * @param {String} text
-		 * @param {String} pad
-		 */
-		unindentString: function(text, pad) {
-			var lines = this.splitByLines(text);
-			var pl = pad.length;
-			for (var i = 0, il = lines.length, line; i < il; i++) {
-				line = lines[i];
-				if (line.substr(0, pl) === pad) {
-					lines[i] = line.substr(pl);
-				}
-			}
-			
-			return lines.join('\n');
-		},
-		
-		/**
-		 * Replaces unescaped symbols in <code>str</code>. For example, the '$' symbol
-		 * will be replaced in 'item$count', but not in 'item\$count'.
-		 * @param {String} str Original string
-		 * @param {String} symbol Symbol to replace
-		 * @param {String} replace Symbol replacement. Might be a function that 
-		 * returns new value
-		 * @return {String}
-		 */
-		replaceUnescapedSymbol: function(str, symbol, replace) {
-			var i = 0;
-			var il = str.length;
-			var sl = symbol.length;
-			var matchCount = 0;
-				
-			while (i < il) {
-				if (str.charAt(i) == '\\') {
-					// escaped symbol, skip next character
-					i += sl + 1;
-				} else if (str.substr(i, sl) == symbol) {
-					// have match
-					var curSl = sl;
-					matchCount++;
-					var newValue = replace;
-					if (typeof replace === 'function') {
-						var replaceData = replace(str, symbol, i, matchCount);
-						if (replaceData) {
-							curSl = replaceData[0].length;
-							newValue = replaceData[1];
-						} else {
-							newValue = false;
-						}
-					}
-					
-					if (newValue === false) { // skip replacement
-						i++;
-						continue;
-					}
-					
-					str = str.substring(0, i) + newValue + str.substring(i + curSl);
-					// adjust indexes
-					il = str.length;
-					i += newValue.length;
-				} else {
-					i++;
-				}
-			}
-			
-			return str;
-		},
-		
-		/**
-		 * Replaces '$' character in string assuming it might be escaped with '\'
-		 * @param {String} str String where character should be replaced
-		 * @param {String} value New value
-		 * @return {String}
-		 */
-		replaceCounter: function(str, value, total) {
-			var symbol = '$';
-			// in case we received strings from Java, convert the to native strings
-			str = String(str);
-			value = String(value);
-			
-			if (/^\-?\d+$/.test(value)) {
-				value = +value;
-			}
-			
-			var that = this;
-			
-			return this.replaceUnescapedSymbol(str, symbol, function(str, symbol, pos, matchNum){
-				if (str.charAt(pos + 1) == '{' || that.isNumeric(str.charAt(pos + 1)) ) {
-					// it's a variable, skip it
-					return false;
-				}
-				
-				// replace sequense of $ symbols with padded number  
-				var j = pos + 1;
-				while(str.charAt(j) == '$' && str.charAt(j + 1) != '{') j++;
-				var pad = j - pos;
-				
-				// get counter base
-				var base = 0, decrement = false, m;
-				if ((m = str.substr(j).match(/^@(\-?)(\d*)/))) {
-					j += m[0].length;
-					
-					if (m[1]) {
-						decrement = true;
-					}
-					
-					base = parseInt(m[2] || 1, 10) - 1;
-				}
-				
-				if (decrement && total && typeof value === 'number') {
-					value = total - value + 1;
-				}
-				
-				value += base;
-				
-				return [str.substring(pos, j), that.zeroPadString(value + '', pad)];
-			});
-		},
-		
-		/**
-		 * Check if string matches against <code>reTag</code> regexp. This 
-		 * function may be used to test if provided string contains HTML tags
-		 * @param {String} str
-		 * @returns {Boolean}
-		 */
-		matchesTag: function(str) {
-			return this.reTag.test(str || '');
-		},
-		
-		/**
-		 * Escapes special characters used in Emmet, like '$', '|', etc.
-		 * Use this method before passing to actions like "Wrap with Abbreviation"
-		 * to make sure that existing special characters won't be altered
-		 * @param {String} text
-		 * @return {String}
-		 */
-		escapeText: function(text) {
-			return text.replace(/([\$\\])/g, '\\$1');
-		},
-		
-		/**
-		 * Unescapes special characters used in Emmet, like '$', '|', etc.
-		 * @param {String} text
-		 * @return {String}
-		 */
-		unescapeText: function(text) {
-			return text.replace(/\\(.)/g, '$1');
-		},
-		
-		/**
-		 * Returns caret placeholder
-		 * @returns {String}
-		 */
-		getCaretPlaceholder: function() {
-			return typeof caretPlaceholder === 'function'
-				? caretPlaceholder.apply(this, arguments)
-				: caretPlaceholder;
-		},
-		
-		/**
-		 * Sets new representation for carets in generated output
-		 * @param {String} value New caret placeholder. Might be a 
-		 * <code>Function</code>
-		 */
-		setCaretPlaceholder: function(value) {
-			caretPlaceholder = value;
-		},
-		
-		/**
-		 * Returns line padding
-		 * @param {String} line
-		 * @return {String}
-		 */
-		getLinePadding: function(line) {
-			return (line.match(/^(\s+)/) || [''])[0];
-		},
-		
-		/**
-		 * Helper function that returns padding of line of <code>pos</code>
-		 * position in <code>content</code>
-		 * @param {String} content
-		 * @param {Number} pos
-		 * @returns {String}
-		 */
-		getLinePaddingFromPosition: function(content, pos) {
-			var lineRange = this.findNewlineBounds(content, pos);
-			return this.getLinePadding(lineRange.substring(content));
-		},
-		
-		/**
-		 * Escape special regexp chars in string, making it usable for creating dynamic
-		 * regular expressions
-		 * @param {String} str
-		 * @return {String}
-		 */
-		escapeForRegexp: function(str) {
-			var specials = new RegExp("[.*+?|()\\[\\]{}\\\\]", "g"); // .*+?|()[]{}\
-			return str.replace(specials, "\\$&");
-		},
-		
-		/**
-		 * Make decimal number look good: convert it to fixed precision end remove
-		 * traling zeroes 
-		 * @param {Number} num
-		 * @param {Number} fracion Fraction numbers (default is 2)
-		 * @return {String}
-		 */
-		prettifyNumber: function(num, fraction) {
-			return num.toFixed(typeof fraction == 'undefined' ? 2 : fraction).replace(/\.?0+$/, '');
-		},
-		
-		/**
-		 * Replace substring of <code>str</code> with <code>value</code>
-		 * @param {String} str String where to replace substring
-		 * @param {String} value New substring value
-		 * @param {Number} start Start index of substring to replace. May also
-		 * be a <code>Range</code> object: in this case, the <code>end</code>
-		 * argument is not required
-		 * @param {Number} end End index of substring to replace. If ommited, 
-		 * <code>start</code> argument is used
-		 */
-		replaceSubstring: function(str, value, start, end) {
-			if (typeof start === 'object' && 'end' in start) {
-				end = start.end;
-				start = start.start;
-			}
-			
-			if (typeof end === 'string') {
-				end = start + end.length;
-			}
-			
-			if (typeof end === 'undefined') {
-				end = start;
-			}
-			
-			if (start < 0 || start > str.length)
-				return str;
-			
-			return str.substring(0, start) + value + str.substring(end);
-		},
-
-		/**
-		 * Fills substrings in `content`, defined by given ranges,
-		 * wich `ch` character
-		 * @param  {String} content
-		 * @param  {Array} ranges
-		 * @return {String}
-		 */
-		replaceWith: function(content, ranges, ch, noRepeat) {
-			if (ranges.length) {
-				var offset = 0, fragments = [];
-				ranges.forEach(function(r) {
-					var repl = noRepeat ? ch : this.repeatString(ch, r[1] - r[0]);
-					fragments.push(content.substring(offset, r[0]), repl);
-					offset = r[1];
-				}, this);
-
-				content = fragments.join('') + content.substring(offset);
-			}
-
-			return content;
-		},
-		
-		/**
-		 * Narrows down text range, adjusting selection to non-space characters
-		 * @param {String} text
-		 * @param {Number} start Starting range in <code>text</code> where 
-		 * slection should be adjusted. Can also be any object that is accepted
-		 * by <code>Range</code> class
-		 * @return {Range}
-		 */
-		narrowToNonSpace: function(text, start, end) {
-			var rng = range.create(start, end);
-			
-			var reSpace = /[\s\n\r\u00a0]/;
-			// narrow down selection until first non-space character
-			while (rng.start < rng.end) {
-				if (!reSpace.test(text.charAt(rng.start)))
-					break;
-					
-				rng.start++;
-			}
-			
-			while (rng.end > rng.start) {
-				rng.end--;
-				if (!reSpace.test(text.charAt(rng.end))) {
-					rng.end++;
-					break;
-				}
-			}
-			
-			return rng;
-		},
-		
-		/**
-		 * Find start and end index of text line for <code>from</code> index
-		 * @param {String} text 
-		 * @param {Number} from
-		 */
-		findNewlineBounds: function(text, from) {
-			var len = text.length,
-				start = 0,
-				end = len - 1, 
-				ch;
-
-			
-			// search left
-			for (var i = from - 1; i > 0; i--) {
-				ch = text.charAt(i);
-				if (ch == '\n' || ch == '\r') {
-					start = i + 1;
-					break;
-				}
-			}
-			// search right
-			for (var j = from; j < len; j++) {
-				ch = text.charAt(j);
-				if (ch == '\n' || ch == '\r') {
-					end = j;
-					break;
-				}
-			}
-			
-			return range.create(start, end - start);
-		},
-
-		/**
-		 * Deep merge of two or more objects. Taken from jQuery.extend()
-		 */
-		deepMerge: function() {
-			var options, name, src, copy, copyIsArray, clone,
-				target = arguments[0] || {},
-				i = 1,
-				length = arguments.length;
-
-
-			// Handle case when target is a string or something (possible in deep copy)
-			if (typeof target !== 'object' && typeof target !== 'function') {
-				target = {};
-			}
-
-			for ( ; i < length; i++ ) {
-				// Only deal with non-null/undefined values
-				if ( (options = arguments[ i ]) !== null ) {
-					// Extend the base object
-					for ( name in options ) {
-						src = target[ name ];
-						copy = options[ name ];
-
-						// Prevent never-ending loop
-						if ( target === copy ) {
-							continue;
-						}
-
-						// Recurse if we're merging plain objects or arrays
-						if ( copy && ( typeof copy === 'object' || (copyIsArray = Array.isArray(copy)) ) ) {
-							if ( copyIsArray ) {
-								copyIsArray = false;
-								clone = src && Array.isArray(src) ? src : [];
-
-							} else {
-								clone = src && typeof src === 'object' ? src : {};
-							}
-
-							// Never move original objects, clone them
-							target[ name ] = this.deepMerge(clone, copy );
-
-						// Don't bring in undefined values
-						} else if ( copy !== undefined ) {
-							target[ name ] = copy;
-						}
-					}
-				}
-			}
-
-			// Return the modified object
-			return target;
-		},
-
-		/**
-		 * Dead simple string-to-JSON parser
-		 * @param {String} str
-		 * @returns {Object}
-		 */
-		parseJSON: function(str) {
-			if (typeof str == 'object') {
-				return str;
-			}
-			
-			try {
-				return JSON.parse(str);
-			} catch(e) {
-				return {};
-			}
-		},
-
-
-		/**************************
-		 * Utility belt
-		 **************************/
-		unique: function(arr, comparator) {
-			var lookup = [];
-			return arr.filter(function(item) {
-				var val = comparator ? comparator(item) : item;
-				if (lookup.indexOf(val) < 0) {
-					lookup.push(val);
-					return true;
-				}
-			});
-		},
-
-		/**
-		 * Return a copy of the object, filtered to only have values for 
-		 * the whitelisted keys. 
-		 * @param  {Object} obj
-		 * @return {Object}
-		 */
-		pick: function(obj) {
-			var result = {};
-			var keys = this.toArray(arguments, 1);
-			Object.keys(obj).forEach(function(key) {
-				if (~keys.indexOf(key)) {
-					result[key] = obj[key];
-				}
-			});
-			return result;
-		},
-
-		find: function(arr, comparator, ctx) {
-			var result;
-			if (ctx) {
-				comparator = comparator.bind(ctx);
-			}
-
-			if (Array.isArray(arr)) {
-				arr.some(function(item, i) {
-					if (comparator(item, i)) {
-						return result = item;
-					}
-				});
-			} else {
-				Object.keys(arr).some(function(key, i) {
-					if (comparator(arr[key], i)) {
-						return result = arr[key];
-					}
-				});
-			}
-
-			return result;
-		},
-
-		toArray: function(obj, sliceIx) {
-			if (Array.isArray(obj) && !sliceIx) {
-				return obj;
-			}
-			return Array.prototype.slice.call(obj, sliceIx || 0);
-		},
-
-		extend: function(obj) {
-			for (var i = 1, il = arguments.length, a; i < il; i++) {
-				a = arguments[i];
-				if (a) {
-					Object.keys(a).forEach(function(key) {
-						obj[key] = a[key];
-					});
-				}
-			}
-			return obj;
-		},
-
-		defaults: function(obj) {
-			for (var i = 1, il = arguments.length, a; i < il; i++) {
-				a = arguments[i];
-				if (a) {
-					Object.keys(a).forEach(function(key) {
-						if (!(key in obj)) {
-							obj[key] = a[key];
-						}
-					});
-				}
-			}
-			return obj;
-		},
-
-		flatten: function(arr, out) {
-			out = out || [];
-			var self = this;
-			self.toArray(arr).forEach(function(item) {
-				if (Array.isArray(item)) {
-					self.flatten(item, out);
-				} else {
-					out.push(item);
-				}
-			});
-
-			return out;
-		},
-
-		clone: function(obj) {
-			if (Array.isArray(obj)) {
-				return obj.slice(0);
-			}
-
-			return this.extend({}, obj);
-		},
-
-		without: function(arr) {
-			this.toArray(arguments, 1).forEach(function(item) {
-				var ix;
-				while (~(ix = arr.indexOf(item))) {
-					arr.splice(ix, 1);
-				}
-			});
-			return arr;
-		},
-
-		last: function(arr) {
-			return arr[arr.length - 1];
-		}
-	};
-});
-
-},{"../assets/range":30}],74:[function(require,module,exports){
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('./common');
-	var commentsUtils = require('./comments');
-	var range = require('../assets/range');
-	var stringStream = require('../assets/stringStream');
-	var cssParser = require('../parser/css');
-	var htmlMatcher = require('../assets/htmlMatcher');
-	var xmlEditTree = require('../editTree/xml');
-
-	var idCounter = 1;
-	var maxId = 1000000;
-
-	var reSpaceTrim = /^(\s*).+?(\s*)$/;
-	var reSpace = /\s/g;
-	var reComma = /,/;
-
-	function isQuote(ch) {
-		return ch == '"' || ch == "'";
-	}
-
-	function getId() {
-		idCounter = (idCounter + 1) % maxId;
-		return 's' + idCounter;
-	}
-
-	/**
-	 * @param {Range} range Full selector range with additional
-	 * properties for matching name and content (@see findAllRules())
-	 * @param {String} source CSS source
-	 */
-	function CSSSection(rng, source) {
-		this.id = getId();
-		/** @type {CSSSection} */
-		this.parent = null;
-		/** @type {CSSSection} */
-		this.nextSibling = null;
-		/** @type {CSSSection} */
-		this.previousSibling = null;
-		this._source = source;
-		this._name = null;
-		this._content = null;
-
-		/**
-		 * Custom data for current nodes, used by other modules for
-		 * caching etc.
-		 * @type {Object}
-		 */
-		this._data = {};
-
-		if (!rng && source) {
-			rng = range(0, source);
-		}
-
-		this.range = rng;
-		this.children = [];
-	}
-
-	CSSSection.prototype = {
-		addChild: function(section) {
-			if (!(section instanceof CSSSection)) {
-				section = new CSSSection(section);
-			}
-
-			var lastChild = utils.last(this.children);
-			if (lastChild) {
-				lastChild.nextSibling = section;
-				section.previousSibling = lastChild;
-			}
-			section.parent = this;
-
-			this.children.push(section);
-			return section;
-		},
-
-		/**
-		 * Returns root node
-		 * @return {CSSSection}
-		 */
-		root: function() {
-			var root = this;
-			do {
-				if (!root.parent) {
-					return root;
-				}
-			} while(root = root.parent);
-
-			return root;
-		},
-
-		/**
-		 * Returns currect CSS source
-		 * @return {String}
-		 */
-		source: function() {
-			return this._source || this.root()._source;
-		},
-
-		/**
-		 * Returns section name
-		 * @return {String}
-		 */
-		name: function() {
-			if (this._name === null) {
-				var range = this.nameRange();
-				if (range) {
-					this._name = range.substring(this.source());
-				}
-			}
-
-			return this._name;
-		},
-
-		/**
-		 * Returns section name range
-		 * @return {[type]} [description]
-		 */
-		nameRange: function() {
-			if (this.range && '_selectorEnd' in this.range) {
-				return range.create2(this.range.start, this.range._selectorEnd);
-			}
-		},
-
-		/**
-		 * Returns deepest child of current section (or section itself) 
-		 * which includes given position.
-		 * @param  {Number} pos
-		 * @return {CSSSection}
-		 */
-		matchDeep: function(pos) {
-			if (!this.range.inside(pos)) {
-				return null;
-			}
-
-			for (var i = 0, il = this.children.length, m; i < il; i++) {
-				m = this.children[i].matchDeep(pos);
-				if (m) {
-					return m;
-				}
-			};
-
-			return this.parent ? this : null;
-		},
-
-		/**
-		 * Returns current and all nested sections ranges
-		 * @return {Array}
-		 */
-		allRanges: function() {
-			var out = [];
-			if (this.parent) {
-				// add current range if it is not root node
-				out.push(this.range);
-			}
-
-			this.children.forEach(function(child) {
-				out = out.concat(child.allRanges());
-			});
-
-			return out;
-		},
-
-		data: function(key, value) {
-			if (typeof value !== 'undefined') {
-				this._data[key] = value;
-			}
-
-			return this._data[key];
-		},
-
-		stringify: function(indent) {
-			indent = indent || '';
-			var out = '';
-			this.children.forEach(function(item) {
-				out += indent + item.name().replace(/\n/g, '\\n') + '\n';
-				out += item.stringify(indent + '--');
-			});
-
-			return out;
-		},
-
-		/**
-		 * Returns current section’s actual content,
-		 * e.g. content without nested sections
-		 * @return {String} 
-		 */
-		content: function() {
-			if (this._content !== null) {
-				return this._content;
-			}
-
-			if (!this.range || !('_contentStart' in this.range)) {
-				return '';
-			}
-
-			var r = range.create2(this.range._contentStart + 1, this.range.end - 1);
-			var source = this.source();
-			var start = r.start;
-			var out = '';
-
-			this.children.forEach(function(child) {
-				out += source.substring(start, child.range.start);
-				start = child.range.end;
-			});
-
-			out += source.substring(start, r.end);
-			return this._content = utils.trim(out);
-		}
-	};
-
-	return {
-		/**
-		 * Finds all CSS rules‘ ranges in given CSS source
-		 * @param  {String} content CSS source
-		 * @return {Array} Array of ranges
-		 */
-		findAllRules: function(content) {
-			content = this.sanitize(content);
-			var stream = stringStream(content);
-			var ranges = [], matchedRanges;
-			var self = this;
-
-			var saveRule = function(r) {
-				var selRange = self.extractSelector(content, r.start);
-				var rule = range.create2(selRange.start, r.end);
-				rule._selectorEnd = selRange.end;
-				rule._contentStart = r.start;
-				ranges.push(rule);
-			};
-
-			var ch;
-			while (ch = stream.next()) {
-				if (isQuote(ch)) {
-					if (!stream.skipString(ch)) {
-						break; // unterminated string
-					}
-
-					continue;
-				}
-
-				if (ch == '{') {
-					matchedRanges = this.matchBracesRanges(content, stream.pos - 1);
-					matchedRanges.forEach(saveRule);
-
-					if (matchedRanges.length) {
-						stream.pos = utils.last(matchedRanges).end;
-						continue;
-					} 
-				}
-			}
-			
-			return ranges.sort(function(a, b) {
-				return a.start - b.start;
-			});
-		},
-
-		/**
-		 * Matches curly braces content right after given position
-		 * @param  {String} content CSS content. Must not contain comments!
-		 * @param  {Number} pos     Search start position
-		 * @return {Range}
-		 */
-		matchBracesRanges: function(content, pos, sanitize) {
-			if (sanitize) {
-				content = this.sanitize(content);
-			}
-
-			var stream = stringStream(content);
-			stream.start = stream.pos = pos;
-			var stack = [], ranges = [];
-			var ch;
-			while (ch = stream.next()) {
-				if (ch == '{') {
-					stack.push(stream.pos - 1);
-				} else if (ch == '}') {
-					if (!stack.length) {
-						throw 'Invalid source structure (check for curly braces)';
-					}
-					ranges.push(range.create2(stack.pop(), stream.pos));
-					if (!stack.length) {
-						return ranges;
-					}
-				} else {
-					stream.skipQuoted();
-				}
-			}
-
-			return ranges;
-		},
-
-		/**
-		 * Extracts CSS selector from CSS document from
-		 * given position. The selector is located by moving backward
-		 * from given position which means that passed position
-		 * must point to the end of selector 
-		 * @param  {String}  content CSS source
-		 * @param  {Number}  pos     Search position
-		 * @param  {Boolean} sanitize Sanitize CSS source before processing.
-		 * Off by default and assumes that CSS must be comment-free already
-		 * (for performance)
-		 * @return {Range}
-		 */
-		extractSelector: function(content, pos, sanitize) {
-			if (sanitize) {
-				content = this.sanitize(content);
-			}
-
-			var skipString = function() {
-				var quote = content.charAt(pos);
-				if (quote == '"' || quote == "'") {
-					while (--pos >= 0) {
-						if (content.charAt(pos) == quote && content.charAt(pos - 1) != '\\') {
-							break;
-						}
-					}
-					return true;
-				}
-
-				return false;
-			};
-
-			// find CSS selector
-			var ch;
-			var endPos = pos;
-			while (--pos >= 0) {
-				if (skipString()) continue;
-
-				ch = content.charAt(pos);
-				if (ch == ')') {
-					// looks like it’s a preprocessor thing,
-					// most likely a mixin arguments list, e.g.
-					// .mixin (@arg1; @arg2) {...}
-					while (--pos >= 0) {
-						if (skipString()) continue;
-
-						if (content.charAt(pos) == '(') {
-							break;
-						}
-					}
-					continue;
-				}
-
-				if (ch == '{' || ch == '}' || ch == ';') {
-					pos++;
-					break;
-				}
-			}
-
-			if (pos < 0) {
-				pos = 0;
-			}
-			
-			var selector = content.substring(pos, endPos);
-
-			// trim whitespace from matched selector
-			var m = selector.replace(reSpace, ' ').match(reSpaceTrim);
-			if (m) {
-				pos += m[1].length;
-				endPos -= m[2].length;
-			}
-
-			return range.create2(pos, endPos);
-		},
-
-		/**
-		 * Search for nearest CSS rule/section that contains
-		 * given position
-		 * @param  {String} content CSS content or matched CSS rules (array of ranges)
-		 * @param  {Number} pos     Search position
-		 * @return {Range}
-		 */
-		matchEnclosingRule: function(content, pos) {
-			if (typeof content === 'string') {
-				content = this.findAllRules(content);
-			}
-
-			var rules = content.filter(function(r) {
-				return r.inside(pos);
-			});
-
-			return utils.last(rules);
-		},
-
-		/**
-		 * Locates CSS rule next or before given position
-		 * @param  {String}  content    CSS content
-		 * @param  {Number}  pos        Search start position
-		 * @param  {Boolean} isBackward Search backward (find previous rule insteaf of next one)
-		 * @return {Range}
-		 */
-		locateRule: function(content, pos, isBackward) {
-			// possible case: editor reported that current syntax is
-			// CSS, but it’s actually a HTML document (either `style` tag or attribute)
-			var offset = 0;
-			var subrange = this.styleTagRange(content, pos);
-			if (subrange) {
-				offset = subrange.start;
-				pos -= subrange.start;
-				content = subrange.substring(content);
-			}
-
-			var rules = this.findAllRules(content);
-			var ctxRule = this.matchEnclosingRule(rules, pos);
-
-			if (ctxRule) {
-				return ctxRule.shift(offset);
-			}
-
-			for (var i = 0, il = rules.length; i < il; i++) {
-				if (rules[i].start > pos) {
-					return rules[isBackward && i > 0 ? i - 1 : i].shift(offset);
-				}
-			}
-		},
-
-		/**
-		 * Sanitizes given CSS content: replaces content that may 
-		 * interfere with parsing (comments, interpolations, etc.)
-		 * with spaces. Sanitized content MUST NOT be used for
-		 * editing or outputting, it just simplifies searching
-		 * @param  {String} content CSS content
-		 * @return {String}
-		 */
-		sanitize: function(content) {
-			content = commentsUtils.strip(content);
-
-			// remove preprocessor string interpolations like #{var}
-			var stream = stringStream(content);
-			var replaceRanges = [];
-			var ch, ch2;
-
-			while ((ch = stream.next())) {
-				if (isQuote(ch)) {
-					// skip string
-					stream.skipString(ch)
-					continue;
-				} else if (ch === '#' || ch === '@') {
-					ch2 = stream.peek();
-					if (ch2 === '{') { // string interpolation
-						stream.start = stream.pos - 1;
-
-						if (stream.skipTo('}')) {
-							stream.pos += 1;
-						} else {
-							throw 'Invalid string interpolation at ' + stream.start;
-						}
-
-						replaceRanges.push([stream.start, stream.pos]);
-					}
-				}
-			}
-
-			return utils.replaceWith(content, replaceRanges, 'a');
-		},
-
-		/**
-		 * Parses and returns all sections in given CSS
-		 * as tree-like structure, e.g. provides nesting
-		 * info
-		 * @param  {String} content CSS content
-		 * @return {CSSSection}
-		 */
-		sectionTree: function(content) {
-			var root = new CSSSection(null, content);
-			var rules = this.findAllRules(content);
-
-			// rules are sorted in order they appear in CSS source
-			// so we can optimize their nesting routine
-			var insert = function(range, ctx) {
-				while (ctx && ctx.range) {
-					if (ctx.range.contains(range)) {
-						return ctx.addChild(range);
-					}
-
-					ctx = ctx.parent;
-				}
-
-				// if we are here then given range is a top-level section
-				return root.addChild(range);
-			};
-
-			var ctx = root;
-			rules.forEach(function(r) {
-				ctx = insert(r, ctx);
-			});
-
-			return root;
-		},
-
-		/**
-		 * Returns ranges for all nested sections, available in
-		 * given CSS rule
-		 * @param  {CSSEditContainer} rule
-		 * @return {Array}
-		 */
-		nestedSectionsInRule: function(rule) {
-			var offset = rule.valueRange(true).start;
-			var nestedSections = this.findAllRules(rule.valueRange().substring(rule.source));
-			nestedSections.forEach(function(section) {
-				section.start += offset;
-				section.end += offset;
-				section._selectorEnd += offset;
-				section._contentStart += offset;
-			});
-			return nestedSections;
-		},
-
-		styleTagRange: function(content, pos) {
-			var tag = htmlMatcher.tag(content, pos);
-			return tag && tag.open.name.toLowerCase() == 'style' 
-				&& tag.innerRange.cmp(pos, 'lte', 'gte')
-				&& tag.innerRange;
-		},
-
-		styleAttrRange: function(content, pos) {
-			var tree = xmlEditTree.parseFromPosition(content, pos, true);
-			if (tree) {
-				var attr = tree.itemFromPosition(pos, true);
-				return attr && attr.name().toLowerCase() == 'style' 
-					&& attr.valueRange(true).cmp(pos, 'lte', 'gte')
-					&& attr.valueRange(true);
-			}
-		},
-
-		CSSSection: CSSSection
-	};
-});
-},{"../assets/htmlMatcher":26,"../assets/range":30,"../assets/stringStream":32,"../editTree/xml":38,"../parser/css":56,"./comments":72,"./common":73}],75:[function(require,module,exports){
-/**
- * Utility module used to prepare text for pasting into back-end editor
- * @author Sergey Chikuyonok (serge.che@gmail.com) <http://chikuyonok.ru>
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('./common');
-	var resources = require('../assets/resources');
-
-	return  {
-		/**
-		 * Check if cursor is placed inside XHTML tag
-		 * @param {String} html Contents of the document
-		 * @param {Number} caretPos Current caret position inside tag
-		 * @return {Boolean}
-		 */
-		isInsideTag: function(html, caretPos) {
-			var reTag = /^<\/?\w[\w\:\-]*.*?>/;
-			
-			// search left to find opening brace
-			var pos = caretPos;
-			while (pos > -1) {
-				if (html.charAt(pos) == '<') 
-					break;
-				pos--;
-			}
-			
-			if (pos != -1) {
-				var m = reTag.exec(html.substring(pos));
-				if (m && caretPos > pos && caretPos < pos + m[0].length)
-					return true;
-			}
-			
-			return false;
-		},
-		
-		/**
-		 * Sanitizes incoming editor data and provides default values for
-		 * output-specific info
-		 * @param {IEmmetEditor} editor
-		 * @param {String} syntax
-		 * @param {String} profile
-		 */
-		outputInfo: function(editor, syntax, profile) {
-			// most of this code makes sense for Java/Rhino environment
-			// because string that comes from Java are not actually JS string
-			// but Java String object so the have to be explicitly converted
-			// to native string
-			profile = profile || editor.getProfileName();
-			return  {
-				/** @memberOf outputInfo */
-				syntax: String(syntax || editor.getSyntax()),
-				profile: profile || null,
-				content: String(editor.getContent())
-			};
-		},
-		
-		/**
-		 * Unindent content, thus preparing text for tag wrapping
-		 * @param {IEmmetEditor} editor Editor instance
-		 * @param {String} text
-		 * @return {String}
-		 */
-		unindent: function(editor, text) {
-			return utils.unindentString(text, this.getCurrentLinePadding(editor));
-		},
-		
-		/**
-		 * Returns padding of current editor's line
-		 * @param {IEmmetEditor} Editor instance
-		 * @return {String}
-		 */
-		getCurrentLinePadding: function(editor) {
-			return utils.getLinePadding(editor.getCurrentLine());
-		},
-
-		/**
-		 * Normalizes content according to given preferences, e.g.
-		 * replaces newlines and indentation with ones defined in
-		 * `options`. If options are not provided or incomplete, 
-		 * values will be taken from current user environment
-		 * @param {String} text
-		 * @param {Object} options
-		 * @return {String}
-		 */
-		normalize: function(text, options) {
-			options = utils.extend({
-				newline: resources.getNewline(),
-				indentation: resources.getVariable('indentation')
-			}, options);
-
-			var indent = function(tabs) {
-				return utils.repeatString(options.indentation, tabs.length);
-			};
-
-			var lines = utils.splitByLines(text);
-
-			// normailze indentation if it’s not tabs
-			if (options.indentation !== '\t') {
-				lines = lines.map(function(line) {
-					return line.replace(/^\s+/, function(space) {
-						return space.replace(/\t/g, indent);
-					});
-				});
-			}
-
-			// normalize newlines
-			return lines.join(options.newline);
-		}
-	};
-});
-
-},{"../assets/resources":31,"./common":73}],76:[function(require,module,exports){
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	/*
-	 Source: https://github.com/silentmatt/js-expression-eval
-
-	 Based on ndef.parser, by Raphael Graf(r@undefined.ch)
-	 http://www.undefined.ch/mparser/index.html
-
-	 Ported to JavaScript and modified by Matthew Crumley (email@matthewcrumley.com, http://silentmatt.com/)
-
-	 You are free to use and modify this code in anyway you find useful. Please leave this comment in the code
-	 to acknowledge its original source. If you feel like it, I enjoy hearing about projects that use my code,
-	 but don't feel like you have to let me know or ask permission.
-	*/
-
-	function object(o) {
-		function F() {}
-		F.prototype = o;
-		return new F();
-	}
-
-	var TNUMBER = 0;
-	var TOP1 = 1;
-	var TOP2 = 2;
-	var TVAR = 3;
-	var TFUNCALL = 4;
-
-	function Token(type_, index_, prio_, number_) {
-		this.type_ = type_;
-		this.index_ = index_ || 0;
-		this.prio_ = prio_ || 0;
-		this.number_ = (number_ !== undefined && number_ !== null) ? number_ : 0;
-		this.toString = function () {
-			switch (this.type_) {
-			case TNUMBER:
-				return this.number_;
-			case TOP1:
-			case TOP2:
-			case TVAR:
-				return this.index_;
-			case TFUNCALL:
-				return "CALL";
-			default:
-				return "Invalid Token";
-			}
-		};
-	}
-
-	function Expression(tokens, ops1, ops2, functions) {
-		this.tokens = tokens;
-		this.ops1 = ops1;
-		this.ops2 = ops2;
-		this.functions = functions;
-	}
-
-	// Based on http://www.json.org/json2.js
-    var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
-        escapable = /[\\\'\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
-        meta = {    // table of character substitutions
-            '\b': '\\b',
-            '\t': '\\t',
-            '\n': '\\n',
-            '\f': '\\f',
-            '\r': '\\r',
-            "'" : "\\'",
-            '\\': '\\\\'
-        };
-
-	function escapeValue(v) {
-		if (typeof v === "string") {
-			escapable.lastIndex = 0;
-	        return escapable.test(v) ?
-	            "'" + v.replace(escapable, function (a) {
-	                var c = meta[a];
-	                return typeof c === 'string' ? c :
-	                    '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
-	            }) + "'" :
-	            "'" + v + "'";
-		}
-		return v;
-	}
-
-	Expression.prototype = {
-		simplify: function (values) {
-			values = values || {};
-			var nstack = [];
-			var newexpression = [];
-			var n1;
-			var n2;
-			var f;
-			var L = this.tokens.length;
-			var item;
-			var i = 0;
-			for (i = 0; i < L; i++) {
-				item = this.tokens[i];
-				var type_ = item.type_;
-				if (type_ === TNUMBER) {
-					nstack.push(item);
-				}
-				else if (type_ === TVAR && (item.index_ in values)) {
-					item = new Token(TNUMBER, 0, 0, values[item.index_]);
-					nstack.push(item);
-				}
-				else if (type_ === TOP2 && nstack.length > 1) {
-					n2 = nstack.pop();
-					n1 = nstack.pop();
-					f = this.ops2[item.index_];
-					item = new Token(TNUMBER, 0, 0, f(n1.number_, n2.number_));
-					nstack.push(item);
-				}
-				else if (type_ === TOP1 && nstack.length > 0) {
-					n1 = nstack.pop();
-					f = this.ops1[item.index_];
-					item = new Token(TNUMBER, 0, 0, f(n1.number_));
-					nstack.push(item);
-				}
-				else {
-					while (nstack.length > 0) {
-						newexpression.push(nstack.shift());
-					}
-					newexpression.push(item);
-				}
-			}
-			while (nstack.length > 0) {
-				newexpression.push(nstack.shift());
-			}
-
-			return new Expression(newexpression, object(this.ops1), object(this.ops2), object(this.functions));
-		},
-
-		substitute: function (variable, expr) {
-			if (!(expr instanceof Expression)) {
-				expr = new Parser().parse(String(expr));
-			}
-			var newexpression = [];
-			var L = this.tokens.length;
-			var item;
-			var i = 0;
-			for (i = 0; i < L; i++) {
-				item = this.tokens[i];
-				var type_ = item.type_;
-				if (type_ === TVAR && item.index_ === variable) {
-					for (var j = 0; j < expr.tokens.length; j++) {
-						var expritem = expr.tokens[j];
-						var replitem = new Token(expritem.type_, expritem.index_, expritem.prio_, expritem.number_);
-						newexpression.push(replitem);
-					}
-				}
-				else {
-					newexpression.push(item);
-				}
-			}
-
-			var ret = new Expression(newexpression, object(this.ops1), object(this.ops2), object(this.functions));
-			return ret;
-		},
-
-		evaluate: function (values) {
-			values = values || {};
-			var nstack = [];
-			var n1;
-			var n2;
-			var f;
-			var L = this.tokens.length;
-			var item;
-			var i = 0;
-			for (i = 0; i < L; i++) {
-				item = this.tokens[i];
-				var type_ = item.type_;
-				if (type_ === TNUMBER) {
-					nstack.push(item.number_);
-				}
-				else if (type_ === TOP2) {
-					n2 = nstack.pop();
-					n1 = nstack.pop();
-					f = this.ops2[item.index_];
-					nstack.push(f(n1, n2));
-				}
-				else if (type_ === TVAR) {
-					if (item.index_ in values) {
-						nstack.push(values[item.index_]);
-					}
-					else if (item.index_ in this.functions) {
-						nstack.push(this.functions[item.index_]);
-					}
-					else {
-						throw new Error("undefined variable: " + item.index_);
-					}
-				}
-				else if (type_ === TOP1) {
-					n1 = nstack.pop();
-					f = this.ops1[item.index_];
-					nstack.push(f(n1));
-				}
-				else if (type_ === TFUNCALL) {
-					n1 = nstack.pop();
-					f = nstack.pop();
-					if (f.apply && f.call) {
-						if (Object.prototype.toString.call(n1) == "[object Array]") {
-							nstack.push(f.apply(undefined, n1));
-						}
-						else {
-							nstack.push(f.call(undefined, n1));
-						}
-					}
-					else {
-						throw new Error(f + " is not a function");
-					}
-				}
-				else {
-					throw new Error("invalid Expression");
-				}
-			}
-			if (nstack.length > 1) {
-				throw new Error("invalid Expression (parity)");
-			}
-			return nstack[0];
-		},
-
-		toString: function (toJS) {
-			var nstack = [];
-			var n1;
-			var n2;
-			var f;
-			var L = this.tokens.length;
-			var item;
-			var i = 0;
-			for (i = 0; i < L; i++) {
-				item = this.tokens[i];
-				var type_ = item.type_;
-				if (type_ === TNUMBER) {
-					nstack.push(escapeValue(item.number_));
-				}
-				else if (type_ === TOP2) {
-					n2 = nstack.pop();
-					n1 = nstack.pop();
-					f = item.index_;
-					if (toJS && f == "^") {
-						nstack.push("Math.pow(" + n1 + "," + n2 + ")");
-					}
-					else {
-						nstack.push("(" + n1 + f + n2 + ")");
-					}
-				}
-				else if (type_ === TVAR) {
-					nstack.push(item.index_);
-				}
-				else if (type_ === TOP1) {
-					n1 = nstack.pop();
-					f = item.index_;
-					if (f === "-") {
-						nstack.push("(" + f + n1 + ")");
-					}
-					else {
-						nstack.push(f + "(" + n1 + ")");
-					}
-				}
-				else if (type_ === TFUNCALL) {
-					n1 = nstack.pop();
-					f = nstack.pop();
-					nstack.push(f + "(" + n1 + ")");
-				}
-				else {
-					throw new Error("invalid Expression");
-				}
-			}
-			if (nstack.length > 1) {
-				throw new Error("invalid Expression (parity)");
-			}
-			return nstack[0];
-		},
-
-		variables: function () {
-			var L = this.tokens.length;
-			var vars = [];
-			for (var i = 0; i < L; i++) {
-				var item = this.tokens[i];
-				if (item.type_ === TVAR && (vars.indexOf(item.index_) == -1)) {
-					vars.push(item.index_);
-				}
-			}
-
-			return vars;
-		},
-
-		toJSFunction: function (param, variables) {
-			var f = new Function(param, "with(Parser.values) { return " + this.simplify(variables).toString(true) + "; }");
-			return f;
-		}
-	};
-
-	function add(a, b) {
-		return Number(a) + Number(b);
-	}
-	function sub(a, b) {
-		return a - b; 
-	}
-	function mul(a, b) {
-		return a * b;
-	}
-	function div(a, b) {
-		return a / b;
-	}
-	function mod(a, b) {
-		return a % b;
-	}
-	function concat(a, b) {
-		return "" + a + b;
-	}
-
-	function neg(a) {
-		return -a;
-	}
-
-	function random(a) {
-		return Math.random() * (a || 1);
-	}
-	function fac(a) { //a!
-		a = Math.floor(a);
-		var b = a;
-		while (a > 1) {
-			b = b * (--a);
-		}
-		return b;
-	}
-
-	// TODO: use hypot that doesn't overflow
-	function pyt(a, b) {
-		return Math.sqrt(a * a + b * b);
-	}
-
-	function append(a, b) {
-		if (Object.prototype.toString.call(a) != "[object Array]") {
-			return [a, b];
-		}
-		a = a.slice();
-		a.push(b);
-		return a;
-	}
-
-	function Parser() {
-		this.success = false;
-		this.errormsg = "";
-		this.expression = "";
-
-		this.pos = 0;
-
-		this.tokennumber = 0;
-		this.tokenprio = 0;
-		this.tokenindex = 0;
-		this.tmpprio = 0;
-
-		this.ops1 = {
-			"sin": Math.sin,
-			"cos": Math.cos,
-			"tan": Math.tan,
-			"asin": Math.asin,
-			"acos": Math.acos,
-			"atan": Math.atan,
-			"sqrt": Math.sqrt,
-			"log": Math.log,
-			"abs": Math.abs,
-			"ceil": Math.ceil,
-			"floor": Math.floor,
-			"round": Math.round,
-			"-": neg,
-			"exp": Math.exp
-		};
-
-		this.ops2 = {
-			"+": add,
-			"-": sub,
-			"*": mul,
-			"/": div,
-			"%": mod,
-			"^": Math.pow,
-			",": append,
-			"||": concat
-		};
-
-		this.functions = {
-			"random": random,
-			"fac": fac,
-			"min": Math.min,
-			"max": Math.max,
-			"pyt": pyt,
-			"pow": Math.pow,
-			"atan2": Math.atan2
-		};
-
-		this.consts = {
-			"E": Math.E,
-			"PI": Math.PI
-		};
-	}
-
-	Parser.parse = function (expr) {
-		return new Parser().parse(expr);
-	};
-
-	Parser.evaluate = function (expr, variables) {
-		return Parser.parse(expr).evaluate(variables);
-	};
-
-	Parser.Expression = Expression;
-
-	Parser.values = {
-		sin: Math.sin,
-		cos: Math.cos,
-		tan: Math.tan,
-		asin: Math.asin,
-		acos: Math.acos,
-		atan: Math.atan,
-		sqrt: Math.sqrt,
-		log: Math.log,
-		abs: Math.abs,
-		ceil: Math.ceil,
-		floor: Math.floor,
-		round: Math.round,
-		random: random,
-		fac: fac,
-		exp: Math.exp,
-		min: Math.min,
-		max: Math.max,
-		pyt: pyt,
-		pow: Math.pow,
-		atan2: Math.atan2,
-		E: Math.E,
-		PI: Math.PI
-	};
-
-	var PRIMARY      = 1 << 0;
-	var OPERATOR     = 1 << 1;
-	var FUNCTION     = 1 << 2;
-	var LPAREN       = 1 << 3;
-	var RPAREN       = 1 << 4;
-	var COMMA        = 1 << 5;
-	var SIGN         = 1 << 6;
-	var CALL         = 1 << 7;
-	var NULLARY_CALL = 1 << 8;
-
-	Parser.prototype = {
-		parse: function (expr) {
-			this.errormsg = "";
-			this.success = true;
-			var operstack = [];
-			var tokenstack = [];
-			this.tmpprio = 0;
-			var expected = (PRIMARY | LPAREN | FUNCTION | SIGN);
-			var noperators = 0;
-			this.expression = expr;
-			this.pos = 0;
-
-			while (this.pos < this.expression.length) {
-				if (this.isOperator()) {
-					if (this.isSign() && (expected & SIGN)) {
-						if (this.isNegativeSign()) {
-							this.tokenprio = 2;
-							this.tokenindex = "-";
-							noperators++;
-							this.addfunc(tokenstack, operstack, TOP1);
-						}
-						expected = (PRIMARY | LPAREN | FUNCTION | SIGN);
-					}
-					else if (this.isComment()) {
-
-					}
-					else {
-						if ((expected & OPERATOR) === 0) {
-							this.error_parsing(this.pos, "unexpected operator");
-						}
-						noperators += 2;
-						this.addfunc(tokenstack, operstack, TOP2);
-						expected = (PRIMARY | LPAREN | FUNCTION | SIGN);
-					}
-				}
-				else if (this.isNumber()) {
-					if ((expected & PRIMARY) === 0) {
-						this.error_parsing(this.pos, "unexpected number");
-					}
-					var token = new Token(TNUMBER, 0, 0, this.tokennumber);
-					tokenstack.push(token);
-
-					expected = (OPERATOR | RPAREN | COMMA);
-				}
-				else if (this.isString()) {
-					if ((expected & PRIMARY) === 0) {
-						this.error_parsing(this.pos, "unexpected string");
-					}
-					var token = new Token(TNUMBER, 0, 0, this.tokennumber);
-					tokenstack.push(token);
-
-					expected = (OPERATOR | RPAREN | COMMA);
-				}
-				else if (this.isLeftParenth()) {
-					if ((expected & LPAREN) === 0) {
-						this.error_parsing(this.pos, "unexpected \"(\"");
-					}
-
-					if (expected & CALL) {
-						noperators += 2;
-						this.tokenprio = -2;
-						this.tokenindex = -1;
-						this.addfunc(tokenstack, operstack, TFUNCALL);
-					}
-
-					expected = (PRIMARY | LPAREN | FUNCTION | SIGN | NULLARY_CALL);
-				}
-				else if (this.isRightParenth()) {
-				    if (expected & NULLARY_CALL) {
-						var token = new Token(TNUMBER, 0, 0, []);
-						tokenstack.push(token);
-					}
-					else if ((expected & RPAREN) === 0) {
-						this.error_parsing(this.pos, "unexpected \")\"");
-					}
-
-					expected = (OPERATOR | RPAREN | COMMA | LPAREN | CALL);
-				}
-				else if (this.isComma()) {
-					if ((expected & COMMA) === 0) {
-						this.error_parsing(this.pos, "unexpected \",\"");
-					}
-					this.addfunc(tokenstack, operstack, TOP2);
-					noperators += 2;
-					expected = (PRIMARY | LPAREN | FUNCTION | SIGN);
-				}
-				else if (this.isConst()) {
-					if ((expected & PRIMARY) === 0) {
-						this.error_parsing(this.pos, "unexpected constant");
-					}
-					var consttoken = new Token(TNUMBER, 0, 0, this.tokennumber);
-					tokenstack.push(consttoken);
-					expected = (OPERATOR | RPAREN | COMMA);
-				}
-				else if (this.isOp2()) {
-					if ((expected & FUNCTION) === 0) {
-						this.error_parsing(this.pos, "unexpected function");
-					}
-					this.addfunc(tokenstack, operstack, TOP2);
-					noperators += 2;
-					expected = (LPAREN);
-				}
-				else if (this.isOp1()) {
-					if ((expected & FUNCTION) === 0) {
-						this.error_parsing(this.pos, "unexpected function");
-					}
-					this.addfunc(tokenstack, operstack, TOP1);
-					noperators++;
-					expected = (LPAREN);
-				}
-				else if (this.isVar()) {
-					if ((expected & PRIMARY) === 0) {
-						this.error_parsing(this.pos, "unexpected variable");
-					}
-					var vartoken = new Token(TVAR, this.tokenindex, 0, 0);
-					tokenstack.push(vartoken);
-
-					expected = (OPERATOR | RPAREN | COMMA | LPAREN | CALL);
-				}
-				else if (this.isWhite()) {
-				}
-				else {
-					if (this.errormsg === "") {
-						this.error_parsing(this.pos, "unknown character");
-					}
-					else {
-						this.error_parsing(this.pos, this.errormsg);
-					}
-				}
-			}
-			if (this.tmpprio < 0 || this.tmpprio >= 10) {
-				this.error_parsing(this.pos, "unmatched \"()\"");
-			}
-			while (operstack.length > 0) {
-				var tmp = operstack.pop();
-				tokenstack.push(tmp);
-			}
-			if (noperators + 1 !== tokenstack.length) {
-				//print(noperators + 1);
-				//print(tokenstack);
-				this.error_parsing(this.pos, "parity");
-			}
-
-			return new Expression(tokenstack, object(this.ops1), object(this.ops2), object(this.functions));
-		},
-
-		evaluate: function (expr, variables) {
-			return this.parse(expr).evaluate(variables);
-		},
-
-		error_parsing: function (column, msg) {
-			this.success = false;
-			this.errormsg = "parse error [column " + (column) + "]: " + msg;
-			throw new Error(this.errormsg);
-		},
-
-//\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
-
-		addfunc: function (tokenstack, operstack, type_) {
-			var operator = new Token(type_, this.tokenindex, this.tokenprio + this.tmpprio, 0);
-			while (operstack.length > 0) {
-				if (operator.prio_ <= operstack[operstack.length - 1].prio_) {
-					tokenstack.push(operstack.pop());
-				}
-				else {
-					break;
-				}
-			}
-			operstack.push(operator);
-		},
-
-		isNumber: function () {
-			var r = false;
-			var str = "";
-			while (this.pos < this.expression.length) {
-				var code = this.expression.charCodeAt(this.pos);
-				if ((code >= 48 && code <= 57) || code === 46) {
-					str += this.expression.charAt(this.pos);
-					this.pos++;
-					this.tokennumber = parseFloat(str);
-					r = true;
-				}
-				else {
-					break;
-				}
-			}
-			return r;
-		},
-
-		// Ported from the yajjl JSON parser at http://code.google.com/p/yajjl/
-		unescape: function(v, pos) {
-			var buffer = [];
-			var escaping = false;
-
-			for (var i = 0; i < v.length; i++) {
-				var c = v.charAt(i);
-	
-				if (escaping) {
-					switch (c) {
-					case "'":
-						buffer.push("'");
-						break;
-					case '\\':
-						buffer.push('\\');
-						break;
-					case '/':
-						buffer.push('/');
-						break;
-					case 'b':
-						buffer.push('\b');
-						break;
-					case 'f':
-						buffer.push('\f');
-						break;
-					case 'n':
-						buffer.push('\n');
-						break;
-					case 'r':
-						buffer.push('\r');
-						break;
-					case 't':
-						buffer.push('\t');
-						break;
-					case 'u':
-						// interpret the following 4 characters as the hex of the unicode code point
-						var codePoint = parseInt(v.substring(i + 1, i + 5), 16);
-						buffer.push(String.fromCharCode(codePoint));
-						i += 4;
-						break;
-					default:
-						throw this.error_parsing(pos + i, "Illegal escape sequence: '\\" + c + "'");
-					}
-					escaping = false;
-				} else {
-					if (c == '\\') {
-						escaping = true;
-					} else {
-						buffer.push(c);
-					}
-				}
-			}
-	
-			return buffer.join('');
-		},
-
-		isString: function () {
-			var r = false;
-			var str = "";
-			var startpos = this.pos;
-			if (this.pos < this.expression.length && this.expression.charAt(this.pos) == "'") {
-				this.pos++;
-				while (this.pos < this.expression.length) {
-					var code = this.expression.charAt(this.pos);
-					if (code != "'" || str.slice(-1) == "\\") {
-						str += this.expression.charAt(this.pos);
-						this.pos++;
-					}
-					else {
-						this.pos++;
-						this.tokennumber = this.unescape(str, startpos);
-						r = true;
-						break;
-					}
-				}
-			}
-			return r;
-		},
-
-		isConst: function () {
-			var str;
-			for (var i in this.consts) {
-				if (true) {
-					var L = i.length;
-					str = this.expression.substr(this.pos, L);
-					if (i === str) {
-						this.tokennumber = this.consts[i];
-						this.pos += L;
-						return true;
-					}
-				}
-			}
-			return false;
-		},
-
-		isOperator: function () {
-			var code = this.expression.charCodeAt(this.pos);
-			if (code === 43) { // +
-				this.tokenprio = 0;
-				this.tokenindex = "+";
-			}
-			else if (code === 45) { // -
-				this.tokenprio = 0;
-				this.tokenindex = "-";
-			}
-			else if (code === 124) { // |
-				if (this.expression.charCodeAt(this.pos + 1) === 124) {
-					this.pos++;
-					this.tokenprio = 0;
-					this.tokenindex = "||";
-				}
-				else {
-					return false;
-				}
-			}
-			else if (code === 42) { // *
-				this.tokenprio = 1;
-				this.tokenindex = "*";
-			}
-			else if (code === 47) { // /
-				this.tokenprio = 2;
-				this.tokenindex = "/";
-			}
-			else if (code === 37) { // %
-				this.tokenprio = 2;
-				this.tokenindex = "%";
-			}
-			else if (code === 94) { // ^
-				this.tokenprio = 3;
-				this.tokenindex = "^";
-			}
-			else {
-				return false;
-			}
-			this.pos++;
-			return true;
-		},
-
-		isSign: function () {
-			var code = this.expression.charCodeAt(this.pos - 1);
-			if (code === 45 || code === 43) { // -
-				return true;
-			}
-			return false;
-		},
-
-		isPositiveSign: function () {
-			var code = this.expression.charCodeAt(this.pos - 1);
-			if (code === 43) { // -
-				return true;
-			}
-			return false;
-		},
-
-		isNegativeSign: function () {
-			var code = this.expression.charCodeAt(this.pos - 1);
-			if (code === 45) { // -
-				return true;
-			}
-			return false;
-		},
-
-		isLeftParenth: function () {
-			var code = this.expression.charCodeAt(this.pos);
-			if (code === 40) { // (
-				this.pos++;
-				this.tmpprio += 10;
-				return true;
-			}
-			return false;
-		},
-
-		isRightParenth: function () {
-			var code = this.expression.charCodeAt(this.pos);
-			if (code === 41) { // )
-				this.pos++;
-				this.tmpprio -= 10;
-				return true;
-			}
-			return false;
-		},
-
-		isComma: function () {
-			var code = this.expression.charCodeAt(this.pos);
-			if (code === 44) { // ,
-				this.pos++;
-				this.tokenprio = -1;
-				this.tokenindex = ",";
-				return true;
-			}
-			return false;
-		},
-
-		isWhite: function () {
-			var code = this.expression.charCodeAt(this.pos);
-			if (code === 32 || code === 9 || code === 10 || code === 13) {
-				this.pos++;
-				return true;
-			}
-			return false;
-		},
-
-		isOp1: function () {
-			var str = "";
-			for (var i = this.pos; i < this.expression.length; i++) {
-				var c = this.expression.charAt(i);
-				if (c.toUpperCase() === c.toLowerCase()) {
-					if (i === this.pos || (c != '_' && (c < '0' || c > '9'))) {
-						break;
-					}
-				}
-				str += c;
-			}
-			if (str.length > 0 && (str in this.ops1)) {
-				this.tokenindex = str;
-				this.tokenprio = 5;
-				this.pos += str.length;
-				return true;
-			}
-			return false;
-		},
-
-		isOp2: function () {
-			var str = "";
-			for (var i = this.pos; i < this.expression.length; i++) {
-				var c = this.expression.charAt(i);
-				if (c.toUpperCase() === c.toLowerCase()) {
-					if (i === this.pos || (c != '_' && (c < '0' || c > '9'))) {
-						break;
-					}
-				}
-				str += c;
-			}
-			if (str.length > 0 && (str in this.ops2)) {
-				this.tokenindex = str;
-				this.tokenprio = 5;
-				this.pos += str.length;
-				return true;
-			}
-			return false;
-		},
-
-		isVar: function () {
-			var str = "";
-			for (var i = this.pos; i < this.expression.length; i++) {
-				var c = this.expression.charAt(i);
-				if (c.toUpperCase() === c.toLowerCase()) {
-					if (i === this.pos || (c != '_' && (c < '0' || c > '9'))) {
-						break;
-					}
-				}
-				str += c;
-			}
-			if (str.length > 0) {
-				this.tokenindex = str;
-				this.tokenprio = 4;
-				this.pos += str.length;
-				return true;
-			}
-			return false;
-		},
-
-		isComment: function () {
-			var code = this.expression.charCodeAt(this.pos - 1);
-			if (code === 47 && this.expression.charCodeAt(this.pos) === 42) {
-				this.pos = this.expression.indexOf("*/", this.pos) + 2;
-				if (this.pos === 1) {
-					this.pos = this.expression.length;
-				}
-				return true;
-			}
-			return false;
-		}
-	};
-
-	return Parser;
-});
-},{}],77:[function(require,module,exports){
-/**
- * A very simple, ERB-style templating. Basically, just as string substitution.
- * The reason to not use default Lo-dash’es `_.template()` implementation
- * is because it fails to run in CSP-enabled environments (Chrome extension, Atom)
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var stringStream = require('../assets/stringStream');
-	var utils = require('./common');
-
-	function parseArgs(str) {
-		var args = [];
-		var stream = stringStream(str);
-
-		while (!stream.eol()) {
-			if (stream.peek() == ',') {
-				args.push(utils.trim(stream.current()));
-				stream.next();
-				stream.start = stream.pos;
-			}
-			stream.next();
-		}
-
-		args.push(utils.trim(stream.current()));
-		return args.filter(function(a) {
-			return !!a;
-		});
-	}
-
-	function parseFunctionCall(str) {
-		var fnName = null, args;
-		var stream = stringStream(str);
-		while (!stream.eol()) {
-			if (stream.peek() == '(') {
-				fnName = stream.current();
-				stream.start = stream.pos;
-				stream.skipToPair('(', ')', true);
-				args = stream.current();
-				args = parseArgs(args.substring(1, args.length - 1));
-				break;
-			}
-
-			stream.next();
-		}
-
-		return fnName && {
-			name: fnName,
-			args: args
-		};
-	}
-
-	function evalArg(arg, context) {
-		if (/^['"]/.test(arg)) {
-			// plain string
-			return arg.replace(/^(['"])(.+?)\1$/, '$2');
-		}
-
-		if (!isNaN(+arg)) {
-			// a number
-			return +arg;
-		}
-
-		// otherwise, treat argument as a property name
-		if (arg) {
-			var parts = arg.split('.');
-			var prop = context;
-			while (parts.length) {
-				prop = prop[parts.shift()];
-			}
-
-			return prop;
-		}
-	}
-
-	function process(template, context) {
-		return template.replace(/<%[=\-](.+?)%>/g, function(str, match) {
-			match = utils.trim(match);
-			var fn = parseFunctionCall(match);
-			if (fn) {
-				var fnArgs = fn.args.map(function(arg) {
-					return evalArg(arg, context);
-				});
-				return context[fn.name].apply(context, fnArgs);
-			}
-
-			return evalArg(match, context);
-		});
-	}
-
-	return function(template, context) {
-		return context ? process(template, context) : function(context) {
-			return process(template, context);
-		};
-	};
-});
-},{"../assets/stringStream":32,"./common":73}],78:[function(require,module,exports){
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	var utils = require('../utils/common');
-
-	/**
-	 * Shared empty constructor function to aid in prototype-chain creation.
-	 */
-	var ctor = function(){};
-
-	/**
-	 * Helper function to correctly set up the prototype chain, for subclasses.
-	 * Similar to `goog.inherits`, but uses a hash of prototype properties and
-	 * class properties to be extended.
-	 * Took it from Backbone.
-	 * @param {Object} parent
-	 * @param {Object} protoProps
-	 * @param {Object} staticProps
-	 * @returns {Object}
-	 */
-	function inherits(parent, protoProps, staticProps) {
-		var child;
-
-		// The constructor function for the new subclass is either defined by
-		// you (the "constructor" property in your `extend` definition), or
-		// defaulted by us to simply call the parent's constructor.
-		if (protoProps && protoProps.hasOwnProperty('constructor')) {
-			child = protoProps.constructor;
-		} else {
-			child = function() {
-				parent.apply(this, arguments);
-			};
-		}
-
-		// Inherit class (static) properties from parent.
-		utils.extend(child, parent);
-
-		// Set the prototype chain to inherit from `parent`, without calling
-		// `parent`'s constructor function.
-		ctor.prototype = parent.prototype;
-		child.prototype = new ctor();
-
-		// Add prototype properties (instance properties) to the subclass,
-		// if supplied.
-		if (protoProps)
-			utils.extend(child.prototype, protoProps);
-
-		// Add static properties to the constructor function, if supplied.
-		if (staticProps)
-			utils.extend(child, staticProps);
-
-		// Correctly set child's `prototype.constructor`.
-		child.prototype.constructor = child;
-
-		// Set a convenience property in case the parent's prototype is needed
-		// later.
-		child.__super__ = parent.prototype;
-
-		return child;
-	}
-
-	return {
-		/**
-		 * The self-propagating extend function for classes.
-		 * Took it from Backbone 
-		 * @param {Object} protoProps
-		 * @param {Object} classProps
-		 * @returns {Object}
-		 */
-		extend: function(protoProps, classProps) {
-			var child = inherits(this, protoProps, classProps);
-			child.extend = this.extend;
-			// a hack required to WSH inherit `toString` method
-			if (protoProps.hasOwnProperty('toString'))
-				child.prototype.toString = protoProps.toString;
-			return child;
-		}
-	};
-});
-},{"../utils/common":73}],79:[function(require,module,exports){
-/*!
- * string_score.js: String Scoring Algorithm 0.1.10 
- *
- * http://joshaven.com/string_score
- * https://github.com/joshaven/string_score
- *
- * Copyright (C) 2009-2011 Joshaven Potter <yourtech@gmail.com>
- * Special thanks to all of the contributors listed here https://github.com/joshaven/string_score
- * MIT license: http://www.opensource.org/licenses/mit-license.php
- *
- * Date: Tue Mar 1 2011
-*/
-
-/**
- * Scores a string against another string.
- *  'Hello World'.score('he');     //=> 0.5931818181818181
- *  'Hello World'.score('Hello');  //=> 0.7318181818181818
- */
-if (typeof module === 'object' && typeof define !== 'function') {
-	var define = function (factory) {
-		module.exports = factory(require, exports, module);
-	};
-}
-
-define(function(require, exports, module) {
-	return {
-		score: function(string, abbreviation, fuzziness) {
-			// If the string is equal to the abbreviation, perfect match.
-			  if (string == abbreviation) {return 1;}
-			  //if it's not a perfect match and is empty return 0
-			  if(abbreviation == "") {return 0;}
-
-			  var total_character_score = 0,
-			      abbreviation_length = abbreviation.length,
-			      string_length = string.length,
-			      start_of_string_bonus,
-			      abbreviation_score,
-			      fuzzies=1,
-			      final_score;
-			  
-			  // Walk through abbreviation and add up scores.
-			  for (var i = 0,
-			         character_score/* = 0*/,
-			         index_in_string/* = 0*/,
-			         c/* = ''*/,
-			         index_c_lowercase/* = 0*/,
-			         index_c_uppercase/* = 0*/,
-			         min_index/* = 0*/;
-			     i < abbreviation_length;
-			     ++i) {
-			    
-			    // Find the first case-insensitive match of a character.
-			    c = abbreviation.charAt(i);
-			    
-			    index_c_lowercase = string.indexOf(c.toLowerCase());
-			    index_c_uppercase = string.indexOf(c.toUpperCase());
-			    min_index = Math.min(index_c_lowercase, index_c_uppercase);
-			    index_in_string = (min_index > -1) ? min_index : Math.max(index_c_lowercase, index_c_uppercase);
-			    
-			    if (index_in_string === -1) { 
-			      if (fuzziness) {
-			        fuzzies += 1-fuzziness;
-			        continue;
-			      } else {
-			        return 0;
-			      }
-			    } else {
-			      character_score = 0.1;
-			    }
-			    
-			    // Set base score for matching 'c'.
-			    
-			    // Same case bonus.
-			    if (string[index_in_string] === c) { 
-			      character_score += 0.1; 
-			    }
-			    
-			    // Consecutive letter & start-of-string Bonus
-			    if (index_in_string === 0) {
-			      // Increase the score when matching first character of the remainder of the string
-			      character_score += 0.6;
-			      if (i === 0) {
-			        // If match is the first character of the string
-			        // & the first character of abbreviation, add a
-			        // start-of-string match bonus.
-			        start_of_string_bonus = 1; //true;
-			      }
-			    }
-			    else {
-			  // Acronym Bonus
-			  // Weighing Logic: Typing the first character of an acronym is as if you
-			  // preceded it with two perfect character matches.
-			  if (string.charAt(index_in_string - 1) === ' ') {
-			    character_score += 0.8; // * Math.min(index_in_string, 5); // Cap bonus at 0.4 * 5
-			  }
-			    }
-			    
-			    // Left trim the already matched part of the string
-			    // (forces sequential matching).
-			    string = string.substring(index_in_string + 1, string_length);
-			    
-			    total_character_score += character_score;
-			  } // end of for loop
-			  
-			  // Uncomment to weigh smaller words higher.
-			  // return total_character_score / string_length;
-			  
-			  abbreviation_score = total_character_score / abbreviation_length;
-			  //percentage_of_matched_string = abbreviation_length / string_length;
-			  //word_score = abbreviation_score * percentage_of_matched_string;
-			  
-			  // Reduce penalty for longer strings.
-			  //final_score = (word_score + abbreviation_score) / 2;
-			  final_score = ((abbreviation_score * (abbreviation_length / string_length)) + abbreviation_score) / 2;
-			  
-			  final_score = final_score / fuzzies;
-			  
-			  if (start_of_string_bonus && (final_score + 0.15 < 1)) {
-			    final_score += 0.15;
-			  }
-			  
-			  return final_score;
-		}
-	};
-});
-},{}],80:[function(require,module,exports){
-"use strict";
-
-var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
-
-/**
- * Setup Emmet on given CodeMirror editor instance
- * @param  {CodeMirror} cm
- * @param  {Object} keymap
- */
-module.exports = main;
-/**
- * Emmet plugin for CodeMirror
- */
-
-var EmmetEditor = _interopRequire(require("./editor"));
-
-var emmet = _interopRequire(require("./emmet"));
-
-var defaultKeymap = {
-	"Cmd-E": "emmet.expand_abbreviation",
-	Tab: "emmet.expand_abbreviation_with_tab",
-	"Cmd-D": "emmet.balance_outward",
-	"Shift-Cmd-D": "emmet.balance_inward",
-	"Cmd-M": "emmet.matching_pair",
-	"Shift-Cmd-A": "emmet.wrap_with_abbreviation",
-	"Ctrl-Alt-Right": "emmet.next_edit_point",
-	"Ctrl-Alt-Left": "emmet.prev_edit_point",
-	"Cmd-L": "emmet.select_line",
-	"Cmd-Shift-M": "emmet.merge_lines",
-	"Cmd-/": "emmet.toggle_comment",
-	"Cmd-J": "emmet.split_join_tag",
-	"Cmd-K": "emmet.remove_tag",
-	"Shift-Cmd-Y": "emmet.evaluate_math_expression",
-
-	"Ctrl-Up": "emmet.increment_number_by_1",
-	"Ctrl-Down": "emmet.decrement_number_by_1",
-	"Ctrl-Alt-Up": "emmet.increment_number_by_01",
-	"Ctrl-Alt-Down": "emmet.decrement_number_by_01",
-	"Shift-Ctrl-Up": "emmet.increment_number_by_10",
-	"Shift-Ctrl-Down": "emmet.decrement_number_by_10",
-
-	"Shift-Cmd-.": "emmet.select_next_item",
-	"Shift-Cmd-,": "emmet.select_previous_item",
-	"Cmd-B": "emmet.reflect_css_value",
-
-	Enter: "emmet.insert_formatted_line_break_only"
-};
-
-// actions that should be performed in single selection mode
-var singleSelectionActions = ["prev_edit_point", "next_edit_point", "merge_lines", "reflect_css_value", "select_next_item", "select_previous_item", "wrap_with_abbreviation", "update_tag", "insert_formatted_line_break_only"];
-function main(cm) {
-	var keymap = arguments[1] === undefined ? defaultKeymap : arguments[1];
-
-	keymap = systemKeymap(keymap);
-	cm.__emmetKeymap = keymap;
-	cm.addKeyMap(keymap);
-	return cm;
-}
-
-main.dispose = function (cm) {
-	if (cm.__emmetKeymap) {
-		cm.removeKeyMap(cm.__emmetKeymap);
-		delete cm.__emmetKeymap;
-	}
-};
-
-main.defaultKeymap = defaultKeymap;
-main.systemKeymap = systemKeymap;
-main.emmet = emmet;
-main.EmmetEditor = EmmetEditor;
-main.setup = function (CodeMirror) {
-	// setup default Emmet actions
-	emmet.actions.getList().forEach(function (obj) {
-		var action = obj.name;
-		var command = "emmet." + action;
-
-		if (!CodeMirror.commands[command]) {
-			CodeMirror.commands[command] = ~singleSelectionActions.indexOf(action) ? actionDecorator(action) : multiSelectionActionDecorator(action);
-		}
-	});
-
-	// add “profile” property to CodeMirror defaults so in won’t be lost
-	// then CM instance is instantiated with “profile” property
-	if (CodeMirror.defineOption) {
-		CodeMirror.defineOption("profile", "html");
-	} else {
-		CodeMirror.defaults.profile = "html";
-	}
-};
-
-if (typeof CodeMirror !== "undefined") {
-	main.setup(CodeMirror);
-}
-
-function noop() {
-	if (CodeMirror.version >= "3.1") {
-		return CodeMirror.Pass;
-	}
-
-	throw CodeMirror.Pass;
-}
-
-/**
- * Emmet action decorator: creates a command function
- * for CodeMirror and executes Emmet action as single
- * undo command
- * @param  {String} name Action name
- * @return {Function}
- */
-function actionDecorator(name) {
-	return function (cm) {
-		var result;
-		cm.operation(function () {
-			return result = runAction(name, new EmmetEditor(cm));
-		});
-		return result;
-	};
-}
-
-/**
- * Same as `actionDecorator()` but executes action
- * with multiple selections
- * @param  {String} name Action name
- * @return {Function}
- */
-function multiSelectionActionDecorator(name) {
-	return function (cm) {
-		var editor = new EmmetEditor(cm);
-		var selections = editor.selectionList();
-		var result = null;
-		cm.operation(function () {
-			for (var i = 0, il = selections.length; i < il; i++) {
-				editor.selectionIndex = i;
-				result = runAction(name, editor);
-				if (result === CodeMirror.Pass) {
-					break;
-				}
-			}
-		});
-		return result;
-	};
-}
-
-/**
- * Runs Emmet action
- * @param  {String}      name Action name
- * @param  {EmmetEditor} editor EmmetEditor instance
- * @return {Boolean}    Returns `true` if action is performed
- * successfully
- */
-function runAction(name, editor) {
-	if (name == "expand_abbreviation_with_tab" && (editor.context.somethingSelected() || !editor.isValidSyntax())) {
-		// pass through Tab key handler if there's a selection
-		return noop();
-	}
-
-	var result = false;
-	try {
-		result = emmet.run(name, editor);
-		if (!result && name == "insert_formatted_line_break_only") {
-			return noop();
-		}
-	} catch (e) {
-		console.error(e);
-	}
-
-	return result;
-}
-
-function systemKeymap(keymap) {
-	var mac = /Mac/.test(navigator.platform);
-	var out = {};
-	Object.keys(keymap).forEach(function (key) {
-		return out[!mac ? key.replace("Cmd", "Ctrl") : key] = keymap[key];
-	});
-	return out;
-}
-},{"./editor":1,"./emmet":2}]},{},[80])(80)
-});
\ No newline at end of file
diff --git a/public/js/lib/codemirror/addon/fold/brace-fold.js b/public/js/lib/codemirror/addon/fold/brace-fold.js
deleted file mode 100644
index 1605f6c..0000000
--- a/public/js/lib/codemirror/addon/fold/brace-fold.js
+++ /dev/null
@@ -1,105 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.registerHelper("fold", "brace", function(cm, start) {
-  var line = start.line, lineText = cm.getLine(line);
-  var startCh, tokenType;
-
-  function findOpening(openCh) {
-    for (var at = start.ch, pass = 0;;) {
-      var found = at <= 0 ? -1 : lineText.lastIndexOf(openCh, at - 1);
-      if (found == -1) {
-        if (pass == 1) break;
-        pass = 1;
-        at = lineText.length;
-        continue;
-      }
-      if (pass == 1 && found < start.ch) break;
-      tokenType = cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1));
-      if (!/^(comment|string)/.test(tokenType)) return found + 1;
-      at = found - 1;
-    }
-  }
-
-  var startToken = "{", endToken = "}", startCh = findOpening("{");
-  if (startCh == null) {
-    startToken = "[", endToken = "]";
-    startCh = findOpening("[");
-  }
-
-  if (startCh == null) return;
-  var count = 1, lastLine = cm.lastLine(), end, endCh;
-  outer: for (var i = line; i <= lastLine; ++i) {
-    var text = cm.getLine(i), pos = i == line ? startCh : 0;
-    for (;;) {
-      var nextOpen = text.indexOf(startToken, pos), nextClose = text.indexOf(endToken, pos);
-      if (nextOpen < 0) nextOpen = text.length;
-      if (nextClose < 0) nextClose = text.length;
-      pos = Math.min(nextOpen, nextClose);
-      if (pos == text.length) break;
-      if (cm.getTokenTypeAt(CodeMirror.Pos(i, pos + 1)) == tokenType) {
-        if (pos == nextOpen) ++count;
-        else if (!--count) { end = i; endCh = pos; break outer; }
-      }
-      ++pos;
-    }
-  }
-  if (end == null || line == end && endCh == startCh) return;
-  return {from: CodeMirror.Pos(line, startCh),
-          to: CodeMirror.Pos(end, endCh)};
-});
-
-CodeMirror.registerHelper("fold", "import", function(cm, start) {
-  function hasImport(line) {
-    if (line < cm.firstLine() || line > cm.lastLine()) return null;
-    var start = cm.getTokenAt(CodeMirror.Pos(line, 1));
-    if (!/\S/.test(start.string)) start = cm.getTokenAt(CodeMirror.Pos(line, start.end + 1));
-    if (start.type != "keyword" || start.string != "import") return null;
-    // Now find closing semicolon, return its position
-    for (var i = line, e = Math.min(cm.lastLine(), line + 10); i <= e; ++i) {
-      var text = cm.getLine(i), semi = text.indexOf(";");
-      if (semi != -1) return {startCh: start.end, end: CodeMirror.Pos(i, semi)};
-    }
-  }
-
-  var start = start.line, has = hasImport(start), prev;
-  if (!has || hasImport(start - 1) || ((prev = hasImport(start - 2)) && prev.end.line == start - 1))
-    return null;
-  for (var end = has.end;;) {
-    var next = hasImport(end.line + 1);
-    if (next == null) break;
-    end = next.end;
-  }
-  return {from: cm.clipPos(CodeMirror.Pos(start, has.startCh + 1)), to: end};
-});
-
-CodeMirror.registerHelper("fold", "include", function(cm, start) {
-  function hasInclude(line) {
-    if (line < cm.firstLine() || line > cm.lastLine()) return null;
-    var start = cm.getTokenAt(CodeMirror.Pos(line, 1));
-    if (!/\S/.test(start.string)) start = cm.getTokenAt(CodeMirror.Pos(line, start.end + 1));
-    if (start.type == "meta" && start.string.slice(0, 8) == "#include") return start.start + 8;
-  }
-
-  var start = start.line, has = hasInclude(start);
-  if (has == null || hasInclude(start - 1) != null) return null;
-  for (var end = start;;) {
-    var next = hasInclude(end + 1);
-    if (next == null) break;
-    ++end;
-  }
-  return {from: CodeMirror.Pos(start, has + 1),
-          to: cm.clipPos(CodeMirror.Pos(end))};
-});
-
-});
diff --git a/public/js/lib/codemirror/addon/fold/comment-fold.js b/public/js/lib/codemirror/addon/fold/comment-fold.js
deleted file mode 100644
index b75db7e..0000000
--- a/public/js/lib/codemirror/addon/fold/comment-fold.js
+++ /dev/null
@@ -1,57 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.registerGlobalHelper("fold", "comment", function(mode) {
-  return mode.blockCommentStart && mode.blockCommentEnd;
-}, function(cm, start) {
-  var mode = cm.getModeAt(start), startToken = mode.blockCommentStart, endToken = mode.blockCommentEnd;
-  if (!startToken || !endToken) return;
-  var line = start.line, lineText = cm.getLine(line);
-
-  var startCh;
-  for (var at = start.ch, pass = 0;;) {
-    var found = at <= 0 ? -1 : lineText.lastIndexOf(startToken, at - 1);
-    if (found == -1) {
-      if (pass == 1) return;
-      pass = 1;
-      at = lineText.length;
-      continue;
-    }
-    if (pass == 1 && found < start.ch) return;
-    if (/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1)))) {
-      startCh = found + startToken.length;
-      break;
-    }
-    at = found - 1;
-  }
-
-  var depth = 1, lastLine = cm.lastLine(), end, endCh;
-  outer: for (var i = line; i <= lastLine; ++i) {
-    var text = cm.getLine(i), pos = i == line ? startCh : 0;
-    for (;;) {
-      var nextOpen = text.indexOf(startToken, pos), nextClose = text.indexOf(endToken, pos);
-      if (nextOpen < 0) nextOpen = text.length;
-      if (nextClose < 0) nextClose = text.length;
-      pos = Math.min(nextOpen, nextClose);
-      if (pos == text.length) break;
-      if (pos == nextOpen) ++depth;
-      else if (!--depth) { end = i; endCh = pos; break outer; }
-      ++pos;
-    }
-  }
-  if (end == null || line == end && endCh == startCh) return;
-  return {from: CodeMirror.Pos(line, startCh),
-          to: CodeMirror.Pos(end, endCh)};
-});
-
-});
diff --git a/public/js/lib/codemirror/addon/fold/foldcode.js b/public/js/lib/codemirror/addon/fold/foldcode.js
deleted file mode 100644
index 3abeb83..0000000
--- a/public/js/lib/codemirror/addon/fold/foldcode.js
+++ /dev/null
@@ -1,145 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  function doFold(cm, pos, options, force) {
-    if (options && options.call) {
-      var finder = options;
-      options = null;
-    } else {
-      var finder = getOption(cm, options, "rangeFinder");
-    }
-    if (typeof pos == "number") pos = CodeMirror.Pos(pos, 0);
-    var minSize = getOption(cm, options, "minFoldSize");
-
-    function getRange(allowFolded) {
-      var range = finder(cm, pos);
-      if (!range || range.to.line - range.from.line < minSize) return null;
-      var marks = cm.findMarksAt(range.from);
-      for (var i = 0; i < marks.length; ++i) {
-        if (marks[i].__isFold && force !== "fold") {
-          if (!allowFolded) return null;
-          range.cleared = true;
-          marks[i].clear();
-        }
-      }
-      return range;
-    }
-
-    var range = getRange(true);
-    if (getOption(cm, options, "scanUp")) while (!range && pos.line > cm.firstLine()) {
-      pos = CodeMirror.Pos(pos.line - 1, 0);
-      range = getRange(false);
-    }
-    if (!range || range.cleared || force === "unfold") return;
-
-    var myWidget = makeWidget(cm, options);
-    CodeMirror.on(myWidget, "mousedown", function(e) {
-      myRange.clear();
-      CodeMirror.e_preventDefault(e);
-    });
-    var myRange = cm.markText(range.from, range.to, {
-      replacedWith: myWidget,
-      clearOnEnter: true,
-      __isFold: true
-    });
-    myRange.on("clear", function(from, to) {
-      CodeMirror.signal(cm, "unfold", cm, from, to);
-    });
-    CodeMirror.signal(cm, "fold", cm, range.from, range.to);
-  }
-
-  function makeWidget(cm, options) {
-    var widget = getOption(cm, options, "widget");
-    if (typeof widget == "string") {
-      var text = document.createTextNode(widget);
-      widget = document.createElement("span");
-      widget.appendChild(text);
-      widget.className = "CodeMirror-foldmarker";
-    }
-    return widget;
-  }
-
-  // Clumsy backwards-compatible interface
-  CodeMirror.newFoldFunction = function(rangeFinder, widget) {
-    return function(cm, pos) { doFold(cm, pos, {rangeFinder: rangeFinder, widget: widget}); };
-  };
-
-  // New-style interface
-  CodeMirror.defineExtension("foldCode", function(pos, options, force) {
-    doFold(this, pos, options, force);
-  });
-
-  CodeMirror.defineExtension("isFolded", function(pos) {
-    var marks = this.findMarksAt(pos);
-    for (var i = 0; i < marks.length; ++i)
-      if (marks[i].__isFold) return true;
-  });
-
-  CodeMirror.commands.toggleFold = function(cm) {
-    cm.foldCode(cm.getCursor());
-  };
-  CodeMirror.commands.fold = function(cm) {
-    cm.foldCode(cm.getCursor(), null, "fold");
-  };
-  CodeMirror.commands.unfold = function(cm) {
-    cm.foldCode(cm.getCursor(), null, "unfold");
-  };
-  CodeMirror.commands.foldAll = function(cm) {
-    cm.operation(function() {
-      for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++)
-        cm.foldCode(CodeMirror.Pos(i, 0), null, "fold");
-    });
-  };
-  CodeMirror.commands.unfoldAll = function(cm) {
-    cm.operation(function() {
-      for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++)
-        cm.foldCode(CodeMirror.Pos(i, 0), null, "unfold");
-    });
-  };
-
-  CodeMirror.registerHelper("fold", "combine", function() {
-    var funcs = Array.prototype.slice.call(arguments, 0);
-    return function(cm, start) {
-      for (var i = 0; i < funcs.length; ++i) {
-        var found = funcs[i](cm, start);
-        if (found) return found;
-      }
-    };
-  });
-
-  CodeMirror.registerHelper("fold", "auto", function(cm, start) {
-    var helpers = cm.getHelpers(start, "fold");
-    for (var i = 0; i < helpers.length; i++) {
-      var cur = helpers[i](cm, start);
-      if (cur) return cur;
-    }
-  });
-
-  var defaultOptions = {
-    rangeFinder: CodeMirror.fold.auto,
-    widget: "\u2194",
-    minFoldSize: 0,
-    scanUp: false
-  };
-
-  CodeMirror.defineOption("foldOptions", null);
-
-  function getOption(cm, options, name) {
-    if (options && options[name] !== undefined)
-      return options[name];
-    var editorOptions = cm.options.foldOptions;
-    if (editorOptions && editorOptions[name] !== undefined)
-      return editorOptions[name];
-    return defaultOptions[name];
-  }
-});
diff --git a/public/js/lib/codemirror/addon/fold/foldgutter.css b/public/js/lib/codemirror/addon/fold/foldgutter.css
deleted file mode 100644
index ad19ae2..0000000
--- a/public/js/lib/codemirror/addon/fold/foldgutter.css
+++ /dev/null
@@ -1,20 +0,0 @@
-.CodeMirror-foldmarker {
-  color: blue;
-  text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px;
-  font-family: arial;
-  line-height: .3;
-  cursor: pointer;
-}
-.CodeMirror-foldgutter {
-  width: .7em;
-}
-.CodeMirror-foldgutter-open,
-.CodeMirror-foldgutter-folded {
-  cursor: pointer;
-}
-.CodeMirror-foldgutter-open:after {
-  content: "\25BE";
-}
-.CodeMirror-foldgutter-folded:after {
-  content: "\25B8";
-}
diff --git a/public/js/lib/codemirror/addon/fold/foldgutter.js b/public/js/lib/codemirror/addon/fold/foldgutter.js
deleted file mode 100644
index bd31ec4..0000000
--- a/public/js/lib/codemirror/addon/fold/foldgutter.js
+++ /dev/null
@@ -1,134 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"), require("./foldcode"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror", "./foldcode"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  CodeMirror.defineOption("foldGutter", false, function(cm, val, old) {
-    if (old && old != CodeMirror.Init) {
-      cm.clearGutter(cm.state.foldGutter.options.gutter);
-      cm.state.foldGutter = null;
-      cm.off("gutterClick", onGutterClick);
-      cm.off("change", onChange);
-      cm.off("viewportChange", onViewportChange);
-      cm.off("fold", onFold);
-      cm.off("unfold", onFold);
-      cm.off("swapDoc", updateInViewport);
-    }
-    if (val) {
-      cm.state.foldGutter = new State(parseOptions(val));
-      updateInViewport(cm);
-      cm.on("gutterClick", onGutterClick);
-      cm.on("change", onChange);
-      cm.on("viewportChange", onViewportChange);
-      cm.on("fold", onFold);
-      cm.on("unfold", onFold);
-      cm.on("swapDoc", updateInViewport);
-    }
-  });
-
-  var Pos = CodeMirror.Pos;
-
-  function State(options) {
-    this.options = options;
-    this.from = this.to = 0;
-  }
-
-  function parseOptions(opts) {
-    if (opts === true) opts = {};
-    if (opts.gutter == null) opts.gutter = "CodeMirror-foldgutter";
-    if (opts.indicatorOpen == null) opts.indicatorOpen = "CodeMirror-foldgutter-open";
-    if (opts.indicatorFolded == null) opts.indicatorFolded = "CodeMirror-foldgutter-folded";
-    return opts;
-  }
-
-  function isFolded(cm, line) {
-    var marks = cm.findMarksAt(Pos(line));
-    for (var i = 0; i < marks.length; ++i)
-      if (marks[i].__isFold && marks[i].find().from.line == line) return true;
-  }
-
-  function marker(spec) {
-    if (typeof spec == "string") {
-      var elt = document.createElement("div");
-      elt.className = spec + " CodeMirror-guttermarker-subtle";
-      return elt;
-    } else {
-      return spec.cloneNode(true);
-    }
-  }
-
-  function updateFoldInfo(cm, from, to) {
-    var opts = cm.state.foldGutter.options, cur = from;
-    cm.eachLine(from, to, function(line) {
-      var mark = null;
-      if (isFolded(cm, cur)) {
-        mark = marker(opts.indicatorFolded);
-      } else {
-        var pos = Pos(cur, 0), func = opts.rangeFinder || CodeMirror.fold.auto;
-        var range = func && func(cm, pos);
-        if (range && range.from.line + 1 < range.to.line)
-          mark = marker(opts.indicatorOpen);
-      }
-      cm.setGutterMarker(line, opts.gutter, mark);
-      ++cur;
-    });
-  }
-
-  function updateInViewport(cm) {
-    var vp = cm.getViewport(), state = cm.state.foldGutter;
-    if (!state) return;
-    cm.operation(function() {
-      updateFoldInfo(cm, vp.from, vp.to);
-    });
-    state.from = vp.from; state.to = vp.to;
-  }
-
-  function onGutterClick(cm, line, gutter) {
-    var opts = cm.state.foldGutter.options;
-    if (gutter != opts.gutter) return;
-    cm.foldCode(Pos(line, 0), opts.rangeFinder);
-  }
-
-  function onChange(cm) {
-    var state = cm.state.foldGutter, opts = cm.state.foldGutter.options;
-    state.from = state.to = 0;
-    clearTimeout(state.changeUpdate);
-    state.changeUpdate = setTimeout(function() { updateInViewport(cm); }, opts.foldOnChangeTimeSpan || 600);
-  }
-
-  function onViewportChange(cm) {
-    var state = cm.state.foldGutter, opts = cm.state.foldGutter.options;
-    clearTimeout(state.changeUpdate);
-    state.changeUpdate = setTimeout(function() {
-      var vp = cm.getViewport();
-      if (state.from == state.to || vp.from - state.to > 20 || state.from - vp.to > 20) {
-        updateInViewport(cm);
-      } else {
-        cm.operation(function() {
-          if (vp.from < state.from) {
-            updateFoldInfo(cm, vp.from, state.from);
-            state.from = vp.from;
-          }
-          if (vp.to > state.to) {
-            updateFoldInfo(cm, state.to, vp.to);
-            state.to = vp.to;
-          }
-        });
-      }
-    }, opts.updateViewportTimeSpan || 400);
-  }
-
-  function onFold(cm, from) {
-    var state = cm.state.foldGutter, line = from.line;
-    if (line >= state.from && line < state.to)
-      updateFoldInfo(cm, line, line + 1);
-  }
-});
diff --git a/public/js/lib/codemirror/addon/fold/indent-fold.js b/public/js/lib/codemirror/addon/fold/indent-fold.js
deleted file mode 100644
index e29f15e..0000000
--- a/public/js/lib/codemirror/addon/fold/indent-fold.js
+++ /dev/null
@@ -1,44 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.registerHelper("fold", "indent", function(cm, start) {
-  var tabSize = cm.getOption("tabSize"), firstLine = cm.getLine(start.line);
-  if (!/\S/.test(firstLine)) return;
-  var getIndent = function(line) {
-    return CodeMirror.countColumn(line, null, tabSize);
-  };
-  var myIndent = getIndent(firstLine);
-  var lastLineInFold = null;
-  // Go through lines until we find a line that definitely doesn't belong in
-  // the block we're folding, or to the end.
-  for (var i = start.line + 1, end = cm.lastLine(); i <= end; ++i) {
-    var curLine = cm.getLine(i);
-    var curIndent = getIndent(curLine);
-    if (curIndent > myIndent) {
-      // Lines with a greater indent are considered part of the block.
-      lastLineInFold = i;
-    } else if (!/\S/.test(curLine)) {
-      // Empty lines might be breaks within the block we're trying to fold.
-    } else {
-      // A non-empty line at an indent equal to or less than ours marks the
-      // start of another block.
-      break;
-    }
-  }
-  if (lastLineInFold) return {
-    from: CodeMirror.Pos(start.line, firstLine.length),
-    to: CodeMirror.Pos(lastLineInFold, cm.getLine(lastLineInFold).length)
-  };
-});
-
-});
diff --git a/public/js/lib/codemirror/addon/fold/markdown-fold.js b/public/js/lib/codemirror/addon/fold/markdown-fold.js
deleted file mode 100644
index ce84c94..0000000
--- a/public/js/lib/codemirror/addon/fold/markdown-fold.js
+++ /dev/null
@@ -1,49 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.registerHelper("fold", "markdown", function(cm, start) {
-  var maxDepth = 100;
-
-  function isHeader(lineNo) {
-    var tokentype = cm.getTokenTypeAt(CodeMirror.Pos(lineNo, 0));
-    return tokentype && /\bheader\b/.test(tokentype);
-  }
-
-  function headerLevel(lineNo, line, nextLine) {
-    var match = line && line.match(/^#+/);
-    if (match && isHeader(lineNo)) return match[0].length;
-    match = nextLine && nextLine.match(/^[=\-]+\s*$/);
-    if (match && isHeader(lineNo + 1)) return nextLine[0] == "=" ? 1 : 2;
-    return maxDepth;
-  }
-
-  var firstLine = cm.getLine(start.line), nextLine = cm.getLine(start.line + 1);
-  var level = headerLevel(start.line, firstLine, nextLine);
-  if (level === maxDepth) return undefined;
-
-  var lastLineNo = cm.lastLine();
-  var end = start.line, nextNextLine = cm.getLine(end + 2);
-  while (end < lastLineNo) {
-    if (headerLevel(end + 1, nextLine, nextNextLine) <= level) break;
-    ++end;
-    nextLine = nextNextLine;
-    nextNextLine = cm.getLine(end + 2);
-  }
-
-  return {
-    from: CodeMirror.Pos(start.line, firstLine.length),
-    to: CodeMirror.Pos(end, cm.getLine(end).length)
-  };
-});
-
-});
diff --git a/public/js/lib/codemirror/addon/fold/xml-fold.js b/public/js/lib/codemirror/addon/fold/xml-fold.js
deleted file mode 100644
index 504727f..0000000
--- a/public/js/lib/codemirror/addon/fold/xml-fold.js
+++ /dev/null
@@ -1,182 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  var Pos = CodeMirror.Pos;
-  function cmp(a, b) { return a.line - b.line || a.ch - b.ch; }
-
-  var nameStartChar = "A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
-  var nameChar = nameStartChar + "\-\:\.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
-  var xmlTagStart = new RegExp("<(/?)([" + nameStartChar + "][" + nameChar + "]*)", "g");
-
-  function Iter(cm, line, ch, range) {
-    this.line = line; this.ch = ch;
-    this.cm = cm; this.text = cm.getLine(line);
-    this.min = range ? range.from : cm.firstLine();
-    this.max = range ? range.to - 1 : cm.lastLine();
-  }
-
-  function tagAt(iter, ch) {
-    var type = iter.cm.getTokenTypeAt(Pos(iter.line, ch));
-    return type && /\btag\b/.test(type);
-  }
-
-  function nextLine(iter) {
-    if (iter.line >= iter.max) return;
-    iter.ch = 0;
-    iter.text = iter.cm.getLine(++iter.line);
-    return true;
-  }
-  function prevLine(iter) {
-    if (iter.line <= iter.min) return;
-    iter.text = iter.cm.getLine(--iter.line);
-    iter.ch = iter.text.length;
-    return true;
-  }
-
-  function toTagEnd(iter) {
-    for (;;) {
-      var gt = iter.text.indexOf(">", iter.ch);
-      if (gt == -1) { if (nextLine(iter)) continue; else return; }
-      if (!tagAt(iter, gt + 1)) { iter.ch = gt + 1; continue; }
-      var lastSlash = iter.text.lastIndexOf("/", gt);
-      var selfClose = lastSlash > -1 && !/\S/.test(iter.text.slice(lastSlash + 1, gt));
-      iter.ch = gt + 1;
-      return selfClose ? "selfClose" : "regular";
-    }
-  }
-  function toTagStart(iter) {
-    for (;;) {
-      var lt = iter.ch ? iter.text.lastIndexOf("<", iter.ch - 1) : -1;
-      if (lt == -1) { if (prevLine(iter)) continue; else return; }
-      if (!tagAt(iter, lt + 1)) { iter.ch = lt; continue; }
-      xmlTagStart.lastIndex = lt;
-      iter.ch = lt;
-      var match = xmlTagStart.exec(iter.text);
-      if (match && match.index == lt) return match;
-    }
-  }
-
-  function toNextTag(iter) {
-    for (;;) {
-      xmlTagStart.lastIndex = iter.ch;
-      var found = xmlTagStart.exec(iter.text);
-      if (!found) { if (nextLine(iter)) continue; else return; }
-      if (!tagAt(iter, found.index + 1)) { iter.ch = found.index + 1; continue; }
-      iter.ch = found.index + found[0].length;
-      return found;
-    }
-  }
-  function toPrevTag(iter) {
-    for (;;) {
-      var gt = iter.ch ? iter.text.lastIndexOf(">", iter.ch - 1) : -1;
-      if (gt == -1) { if (prevLine(iter)) continue; else return; }
-      if (!tagAt(iter, gt + 1)) { iter.ch = gt; continue; }
-      var lastSlash = iter.text.lastIndexOf("/", gt);
-      var selfClose = lastSlash > -1 && !/\S/.test(iter.text.slice(lastSlash + 1, gt));
-      iter.ch = gt + 1;
-      return selfClose ? "selfClose" : "regular";
-    }
-  }
-
-  function findMatchingClose(iter, tag) {
-    var stack = [];
-    for (;;) {
-      var next = toNextTag(iter), end, startLine = iter.line, startCh = iter.ch - (next ? next[0].length : 0);
-      if (!next || !(end = toTagEnd(iter))) return;
-      if (end == "selfClose") continue;
-      if (next[1]) { // closing tag
-        for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == next[2]) {
-          stack.length = i;
-          break;
-        }
-        if (i < 0 && (!tag || tag == next[2])) return {
-          tag: next[2],
-          from: Pos(startLine, startCh),
-          to: Pos(iter.line, iter.ch)
-        };
-      } else { // opening tag
-        stack.push(next[2]);
-      }
-    }
-  }
-  function findMatchingOpen(iter, tag) {
-    var stack = [];
-    for (;;) {
-      var prev = toPrevTag(iter);
-      if (!prev) return;
-      if (prev == "selfClose") { toTagStart(iter); continue; }
-      var endLine = iter.line, endCh = iter.ch;
-      var start = toTagStart(iter);
-      if (!start) return;
-      if (start[1]) { // closing tag
-        stack.push(start[2]);
-      } else { // opening tag
-        for (var i = stack.length - 1; i >= 0; --i) if (stack[i] == start[2]) {
-          stack.length = i;
-          break;
-        }
-        if (i < 0 && (!tag || tag == start[2])) return {
-          tag: start[2],
-          from: Pos(iter.line, iter.ch),
-          to: Pos(endLine, endCh)
-        };
-      }
-    }
-  }
-
-  CodeMirror.registerHelper("fold", "xml", function(cm, start) {
-    var iter = new Iter(cm, start.line, 0);
-    for (;;) {
-      var openTag = toNextTag(iter), end;
-      if (!openTag || iter.line != start.line || !(end = toTagEnd(iter))) return;
-      if (!openTag[1] && end != "selfClose") {
-        var start = Pos(iter.line, iter.ch);
-        var close = findMatchingClose(iter, openTag[2]);
-        return close && {from: start, to: close.from};
-      }
-    }
-  });
-  CodeMirror.findMatchingTag = function(cm, pos, range) {
-    var iter = new Iter(cm, pos.line, pos.ch, range);
-    if (iter.text.indexOf(">") == -1 && iter.text.indexOf("<") == -1) return;
-    var end = toTagEnd(iter), to = end && Pos(iter.line, iter.ch);
-    var start = end && toTagStart(iter);
-    if (!end || !start || cmp(iter, pos) > 0) return;
-    var here = {from: Pos(iter.line, iter.ch), to: to, tag: start[2]};
-    if (end == "selfClose") return {open: here, close: null, at: "open"};
-
-    if (start[1]) { // closing tag
-      return {open: findMatchingOpen(iter, start[2]), close: here, at: "close"};
-    } else { // opening tag
-      iter = new Iter(cm, to.line, to.ch, range);
-      return {open: here, close: findMatchingClose(iter, start[2]), at: "open"};
-    }
-  };
-
-  CodeMirror.findEnclosingTag = function(cm, pos, range) {
-    var iter = new Iter(cm, pos.line, pos.ch, range);
-    for (;;) {
-      var open = findMatchingOpen(iter);
-      if (!open) break;
-      var forward = new Iter(cm, pos.line, pos.ch, range);
-      var close = findMatchingClose(forward, open.tag);
-      if (close) return {open: open, close: close};
-    }
-  };
-
-  // Used by addon/edit/closetag.js
-  CodeMirror.scanForClosingTag = function(cm, pos, name, end) {
-    var iter = new Iter(cm, pos.line, pos.ch, end ? {from: 0, to: end} : null);
-    return findMatchingClose(iter, name);
-  };
-});
diff --git a/public/js/lib/codemirror/addon/hint/anyword-hint.js b/public/js/lib/codemirror/addon/hint/anyword-hint.js
deleted file mode 100644
index 8e74a92..0000000
--- a/public/js/lib/codemirror/addon/hint/anyword-hint.js
+++ /dev/null
@@ -1,41 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  var WORD = /[\w$]+/, RANGE = 500;
-
-  CodeMirror.registerHelper("hint", "anyword", function(editor, options) {
-    var word = options && options.word || WORD;
-    var range = options && options.range || RANGE;
-    var cur = editor.getCursor(), curLine = editor.getLine(cur.line);
-    var end = cur.ch, start = end;
-    while (start && word.test(curLine.charAt(start - 1))) --start;
-    var curWord = start != end && curLine.slice(start, end);
-
-    var list = [], seen = {};
-    var re = new RegExp(word.source, "g");
-    for (var dir = -1; dir <= 1; dir += 2) {
-      var line = cur.line, endLine = Math.min(Math.max(line + dir * range, editor.firstLine()), editor.lastLine()) + dir;
-      for (; line != endLine; line += dir) {
-        var text = editor.getLine(line), m;
-        while (m = re.exec(text)) {
-          if (line == cur.line && m[0] === curWord) continue;
-          if ((!curWord || m[0].lastIndexOf(curWord, 0) == 0) && !Object.prototype.hasOwnProperty.call(seen, m[0])) {
-            seen[m[0]] = true;
-            list.push(m[0]);
-          }
-        }
-      }
-    }
-    return {list: list, from: CodeMirror.Pos(cur.line, start), to: CodeMirror.Pos(cur.line, end)};
-  });
-});
diff --git a/public/js/lib/codemirror/addon/hint/css-hint.js b/public/js/lib/codemirror/addon/hint/css-hint.js
deleted file mode 100644
index 488da34..0000000
--- a/public/js/lib/codemirror/addon/hint/css-hint.js
+++ /dev/null
@@ -1,56 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"), require("../../mode/css/css"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror", "../../mode/css/css"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  var pseudoClasses = {link: 1, visited: 1, active: 1, hover: 1, focus: 1,
-                       "first-letter": 1, "first-line": 1, "first-child": 1,
-                       before: 1, after: 1, lang: 1};
-
-  CodeMirror.registerHelper("hint", "css", function(cm) {
-    var cur = cm.getCursor(), token = cm.getTokenAt(cur);
-    var inner = CodeMirror.innerMode(cm.getMode(), token.state);
-    if (inner.mode.name != "css") return;
-
-    var start = token.start, end = cur.ch, word = token.string.slice(0, end - start);
-    if (/[^\w$_-]/.test(word)) {
-      word = ""; start = end = cur.ch;
-    }
-
-    var spec = CodeMirror.resolveMode("text/css");
-
-    var result = [];
-    function add(keywords) {
-      for (var name in keywords)
-        if (!word || name.lastIndexOf(word, 0) == 0)
-          result.push(name);
-    }
-
-    var st = inner.state.state;
-    if (st == "pseudo" || token.type == "variable-3") {
-      add(pseudoClasses);
-    } else if (st == "block" || st == "maybeprop") {
-      add(spec.propertyKeywords);
-    } else if (st == "prop" || st == "parens" || st == "at" || st == "params") {
-      add(spec.valueKeywords);
-      add(spec.colorKeywords);
-    } else if (st == "media" || st == "media_parens") {
-      add(spec.mediaTypes);
-      add(spec.mediaFeatures);
-    }
-
-    if (result.length) return {
-      list: result,
-      from: CodeMirror.Pos(cur.line, start),
-      to: CodeMirror.Pos(cur.line, end)
-    };
-  });
-});
diff --git a/public/js/lib/codemirror/addon/hint/html-hint.js b/public/js/lib/codemirror/addon/hint/html-hint.js
deleted file mode 100644
index c6769bc..0000000
--- a/public/js/lib/codemirror/addon/hint/html-hint.js
+++ /dev/null
@@ -1,348 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"), require("./xml-hint"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror", "./xml-hint"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  var langs = "ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu".split(" ");
-  var targets = ["_blank", "_self", "_top", "_parent"];
-  var charsets = ["ascii", "utf-8", "utf-16", "latin1", "latin1"];
-  var methods = ["get", "post", "put", "delete"];
-  var encs = ["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"];
-  var media = ["all", "screen", "print", "embossed", "braille", "handheld", "print", "projection", "screen", "tty", "tv", "speech",
-               "3d-glasses", "resolution [>][<][=] [X]", "device-aspect-ratio: X/Y", "orientation:portrait",
-               "orientation:landscape", "device-height: [X]", "device-width: [X]"];
-  var s = { attrs: {} }; // Simple tag, reused for a whole lot of tags
-
-  var data = {
-    a: {
-      attrs: {
-        href: null, ping: null, type: null,
-        media: media,
-        target: targets,
-        hreflang: langs
-      }
-    },
-    abbr: s,
-    acronym: s,
-    address: s,
-    applet: s,
-    area: {
-      attrs: {
-        alt: null, coords: null, href: null, target: null, ping: null,
-        media: media, hreflang: langs, type: null,
-        shape: ["default", "rect", "circle", "poly"]
-      }
-    },
-    article: s,
-    aside: s,
-    audio: {
-      attrs: {
-        src: null, mediagroup: null,
-        crossorigin: ["anonymous", "use-credentials"],
-        preload: ["none", "metadata", "auto"],
-        autoplay: ["", "autoplay"],
-        loop: ["", "loop"],
-        controls: ["", "controls"]
-      }
-    },
-    b: s,
-    base: { attrs: { href: null, target: targets } },
-    basefont: s,
-    bdi: s,
-    bdo: s,
-    big: s,
-    blockquote: { attrs: { cite: null } },
-    body: s,
-    br: s,
-    button: {
-      attrs: {
-        form: null, formaction: null, name: null, value: null,
-        autofocus: ["", "autofocus"],
-        disabled: ["", "autofocus"],
-        formenctype: encs,
-        formmethod: methods,
-        formnovalidate: ["", "novalidate"],
-        formtarget: targets,
-        type: ["submit", "reset", "button"]
-      }
-    },
-    canvas: { attrs: { width: null, height: null } },
-    caption: s,
-    center: s,
-    cite: s,
-    code: s,
-    col: { attrs: { span: null } },
-    colgroup: { attrs: { span: null } },
-    command: {
-      attrs: {
-        type: ["command", "checkbox", "radio"],
-        label: null, icon: null, radiogroup: null, command: null, title: null,
-        disabled: ["", "disabled"],
-        checked: ["", "checked"]
-      }
-    },
-    data: { attrs: { value: null } },
-    datagrid: { attrs: { disabled: ["", "disabled"], multiple: ["", "multiple"] } },
-    datalist: { attrs: { data: null } },
-    dd: s,
-    del: { attrs: { cite: null, datetime: null } },
-    details: { attrs: { open: ["", "open"] } },
-    dfn: s,
-    dir: s,
-    div: s,
-    dl: s,
-    dt: s,
-    em: s,
-    embed: { attrs: { src: null, type: null, width: null, height: null } },
-    eventsource: { attrs: { src: null } },
-    fieldset: { attrs: { disabled: ["", "disabled"], form: null, name: null } },
-    figcaption: s,
-    figure: s,
-    font: s,
-    footer: s,
-    form: {
-      attrs: {
-        action: null, name: null,
-        "accept-charset": charsets,
-        autocomplete: ["on", "off"],
-        enctype: encs,
-        method: methods,
-        novalidate: ["", "novalidate"],
-        target: targets
-      }
-    },
-    frame: s,
-    frameset: s,
-    h1: s, h2: s, h3: s, h4: s, h5: s, h6: s,
-    head: {
-      attrs: {},
-      children: ["title", "base", "link", "style", "meta", "script", "noscript", "command"]
-    },
-    header: s,
-    hgroup: s,
-    hr: s,
-    html: {
-      attrs: { manifest: null },
-      children: ["head", "body"]
-    },
-    i: s,
-    iframe: {
-      attrs: {
-        src: null, srcdoc: null, name: null, width: null, height: null,
-        sandbox: ["allow-top-navigation", "allow-same-origin", "allow-forms", "allow-scripts"],
-        seamless: ["", "seamless"]
-      }
-    },
-    img: {
-      attrs: {
-        alt: null, src: null, ismap: null, usemap: null, width: null, height: null,
-        crossorigin: ["anonymous", "use-credentials"]
-      }
-    },
-    input: {
-      attrs: {
-        alt: null, dirname: null, form: null, formaction: null,
-        height: null, list: null, max: null, maxlength: null, min: null,
-        name: null, pattern: null, placeholder: null, size: null, src: null,
-        step: null, value: null, width: null,
-        accept: ["audio/*", "video/*", "image/*"],
-        autocomplete: ["on", "off"],
-        autofocus: ["", "autofocus"],
-        checked: ["", "checked"],
-        disabled: ["", "disabled"],
-        formenctype: encs,
-        formmethod: methods,
-        formnovalidate: ["", "novalidate"],
-        formtarget: targets,
-        multiple: ["", "multiple"],
-        readonly: ["", "readonly"],
-        required: ["", "required"],
-        type: ["hidden", "text", "search", "tel", "url", "email", "password", "datetime", "date", "month",
-               "week", "time", "datetime-local", "number", "range", "color", "checkbox", "radio",
-               "file", "submit", "image", "reset", "button"]
-      }
-    },
-    ins: { attrs: { cite: null, datetime: null } },
-    kbd: s,
-    keygen: {
-      attrs: {
-        challenge: null, form: null, name: null,
-        autofocus: ["", "autofocus"],
-        disabled: ["", "disabled"],
-        keytype: ["RSA"]
-      }
-    },
-    label: { attrs: { "for": null, form: null } },
-    legend: s,
-    li: { attrs: { value: null } },
-    link: {
-      attrs: {
-        href: null, type: null,
-        hreflang: langs,
-        media: media,
-        sizes: ["all", "16x16", "16x16 32x32", "16x16 32x32 64x64"]
-      }
-    },
-    map: { attrs: { name: null } },
-    mark: s,
-    menu: { attrs: { label: null, type: ["list", "context", "toolbar"] } },
-    meta: {
-      attrs: {
-        content: null,
-        charset: charsets,
-        name: ["viewport", "application-name", "author", "description", "generator", "keywords"],
-        "http-equiv": ["content-language", "content-type", "default-style", "refresh"]
-      }
-    },
-    meter: { attrs: { value: null, min: null, low: null, high: null, max: null, optimum: null } },
-    nav: s,
-    noframes: s,
-    noscript: s,
-    object: {
-      attrs: {
-        data: null, type: null, name: null, usemap: null, form: null, width: null, height: null,
-        typemustmatch: ["", "typemustmatch"]
-      }
-    },
-    ol: { attrs: { reversed: ["", "reversed"], start: null, type: ["1", "a", "A", "i", "I"] } },
-    optgroup: { attrs: { disabled: ["", "disabled"], label: null } },
-    option: { attrs: { disabled: ["", "disabled"], label: null, selected: ["", "selected"], value: null } },
-    output: { attrs: { "for": null, form: null, name: null } },
-    p: s,
-    param: { attrs: { name: null, value: null } },
-    pre: s,
-    progress: { attrs: { value: null, max: null } },
-    q: { attrs: { cite: null } },
-    rp: s,
-    rt: s,
-    ruby: s,
-    s: s,
-    samp: s,
-    script: {
-      attrs: {
-        type: ["text/javascript"],
-        src: null,
-        async: ["", "async"],
-        defer: ["", "defer"],
-        charset: charsets
-      }
-    },
-    section: s,
-    select: {
-      attrs: {
-        form: null, name: null, size: null,
-        autofocus: ["", "autofocus"],
-        disabled: ["", "disabled"],
-        multiple: ["", "multiple"]
-      }
-    },
-    small: s,
-    source: { attrs: { src: null, type: null, media: null } },
-    span: s,
-    strike: s,
-    strong: s,
-    style: {
-      attrs: {
-        type: ["text/css"],
-        media: media,
-        scoped: null
-      }
-    },
-    sub: s,
-    summary: s,
-    sup: s,
-    table: s,
-    tbody: s,
-    td: { attrs: { colspan: null, rowspan: null, headers: null } },
-    textarea: {
-      attrs: {
-        dirname: null, form: null, maxlength: null, name: null, placeholder: null,
-        rows: null, cols: null,
-        autofocus: ["", "autofocus"],
-        disabled: ["", "disabled"],
-        readonly: ["", "readonly"],
-        required: ["", "required"],
-        wrap: ["soft", "hard"]
-      }
-    },
-    tfoot: s,
-    th: { attrs: { colspan: null, rowspan: null, headers: null, scope: ["row", "col", "rowgroup", "colgroup"] } },
-    thead: s,
-    time: { attrs: { datetime: null } },
-    title: s,
-    tr: s,
-    track: {
-      attrs: {
-        src: null, label: null, "default": null,
-        kind: ["subtitles", "captions", "descriptions", "chapters", "metadata"],
-        srclang: langs
-      }
-    },
-    tt: s,
-    u: s,
-    ul: s,
-    "var": s,
-    video: {
-      attrs: {
-        src: null, poster: null, width: null, height: null,
-        crossorigin: ["anonymous", "use-credentials"],
-        preload: ["auto", "metadata", "none"],
-        autoplay: ["", "autoplay"],
-        mediagroup: ["movie"],
-        muted: ["", "muted"],
-        controls: ["", "controls"]
-      }
-    },
-    wbr: s
-  };
-
-  var globalAttrs = {
-    accesskey: ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
-    "class": null,
-    contenteditable: ["true", "false"],
-    contextmenu: null,
-    dir: ["ltr", "rtl", "auto"],
-    draggable: ["true", "false", "auto"],
-    dropzone: ["copy", "move", "link", "string:", "file:"],
-    hidden: ["hidden"],
-    id: null,
-    inert: ["inert"],
-    itemid: null,
-    itemprop: null,
-    itemref: null,
-    itemscope: ["itemscope"],
-    itemtype: null,
-    lang: ["en", "es"],
-    spellcheck: ["true", "false"],
-    style: null,
-    tabindex: ["1", "2", "3", "4", "5", "6", "7", "8", "9"],
-    title: null,
-    translate: ["yes", "no"],
-    onclick: null,
-    rel: ["stylesheet", "alternate", "author", "bookmark", "help", "license", "next", "nofollow", "noreferrer", "prefetch", "prev", "search", "tag"]
-  };
-  function populate(obj) {
-    for (var attr in globalAttrs) if (globalAttrs.hasOwnProperty(attr))
-      obj.attrs[attr] = globalAttrs[attr];
-  }
-
-  populate(s);
-  for (var tag in data) if (data.hasOwnProperty(tag) && data[tag] != s)
-    populate(data[tag]);
-
-  CodeMirror.htmlSchema = data;
-  function htmlHint(cm, options) {
-    var local = {schemaInfo: data};
-    if (options) for (var opt in options) local[opt] = options[opt];
-    return CodeMirror.hint.xml(cm, local);
-  }
-  CodeMirror.registerHelper("hint", "html", htmlHint);
-});
diff --git a/public/js/lib/codemirror/addon/hint/javascript-hint.js b/public/js/lib/codemirror/addon/hint/javascript-hint.js
deleted file mode 100644
index 7bcbf4a..0000000
--- a/public/js/lib/codemirror/addon/hint/javascript-hint.js
+++ /dev/null
@@ -1,146 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  var Pos = CodeMirror.Pos;
-
-  function forEach(arr, f) {
-    for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]);
-  }
-
-  function arrayContains(arr, item) {
-    if (!Array.prototype.indexOf) {
-      var i = arr.length;
-      while (i--) {
-        if (arr[i] === item) {
-          return true;
-        }
-      }
-      return false;
-    }
-    return arr.indexOf(item) != -1;
-  }
-
-  function scriptHint(editor, keywords, getToken, options) {
-    // Find the token at the cursor
-    var cur = editor.getCursor(), token = getToken(editor, cur);
-    if (/\b(?:string|comment)\b/.test(token.type)) return;
-    token.state = CodeMirror.innerMode(editor.getMode(), token.state).state;
-
-    // If it's not a 'word-style' token, ignore the token.
-    if (!/^[\w$_]*$/.test(token.string)) {
-      token = {start: cur.ch, end: cur.ch, string: "", state: token.state,
-               type: token.string == "." ? "property" : null};
-    } else if (token.end > cur.ch) {
-      token.end = cur.ch;
-      token.string = token.string.slice(0, cur.ch - token.start);
-    }
-
-    var tprop = token;
-    // If it is a property, find out what it is a property of.
-    while (tprop.type == "property") {
-      tprop = getToken(editor, Pos(cur.line, tprop.start));
-      if (tprop.string != ".") return;
-      tprop = getToken(editor, Pos(cur.line, tprop.start));
-      if (!context) var context = [];
-      context.push(tprop);
-    }
-    return {list: getCompletions(token, context, keywords, options),
-            from: Pos(cur.line, token.start),
-            to: Pos(cur.line, token.end)};
-  }
-
-  function javascriptHint(editor, options) {
-    return scriptHint(editor, javascriptKeywords,
-                      function (e, cur) {return e.getTokenAt(cur);},
-                      options);
-  };
-  CodeMirror.registerHelper("hint", "javascript", javascriptHint);
-
-  function getCoffeeScriptToken(editor, cur) {
-  // This getToken, it is for coffeescript, imitates the behavior of
-  // getTokenAt method in javascript.js, that is, returning "property"
-  // type and treat "." as indepenent token.
-    var token = editor.getTokenAt(cur);
-    if (cur.ch == token.start + 1 && token.string.charAt(0) == '.') {
-      token.end = token.start;
-      token.string = '.';
-      token.type = "property";
-    }
-    else if (/^\.[\w$_]*$/.test(token.string)) {
-      token.type = "property";
-      token.start++;
-      token.string = token.string.replace(/\./, '');
-    }
-    return token;
-  }
-
-  function coffeescriptHint(editor, options) {
-    return scriptHint(editor, coffeescriptKeywords, getCoffeeScriptToken, options);
-  }
-  CodeMirror.registerHelper("hint", "coffeescript", coffeescriptHint);
-
-  var stringProps = ("charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight " +
-                     "toUpperCase toLowerCase split concat match replace search").split(" ");
-  var arrayProps = ("length concat join splice push pop shift unshift slice reverse sort indexOf " +
-                    "lastIndexOf every some filter forEach map reduce reduceRight ").split(" ");
-  var funcProps = "prototype apply call bind".split(" ");
-  var javascriptKeywords = ("break case catch continue debugger default delete do else false finally for function " +
-                  "if in instanceof new null return switch throw true try typeof var void while with").split(" ");
-  var coffeescriptKeywords = ("and break catch class continue delete do else extends false finally for " +
-                  "if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes").split(" ");
-
-  function getCompletions(token, context, keywords, options) {
-    var found = [], start = token.string, global = options && options.globalScope || window;
-    function maybeAdd(str) {
-      if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) found.push(str);
-    }
-    function gatherCompletions(obj) {
-      if (typeof obj == "string") forEach(stringProps, maybeAdd);
-      else if (obj instanceof Array) forEach(arrayProps, maybeAdd);
-      else if (obj instanceof Function) forEach(funcProps, maybeAdd);
-      for (var name in obj) maybeAdd(name);
-    }
-
-    if (context && context.length) {
-      // If this is a property, see if it belongs to some object we can
-      // find in the current environment.
-      var obj = context.pop(), base;
-      if (obj.type && obj.type.indexOf("variable") === 0) {
-        if (options && options.additionalContext)
-          base = options.additionalContext[obj.string];
-        if (!options || options.useGlobalScope !== false)
-          base = base || global[obj.string];
-      } else if (obj.type == "string") {
-        base = "";
-      } else if (obj.type == "atom") {
-        base = 1;
-      } else if (obj.type == "function") {
-        if (global.jQuery != null && (obj.string == '$' || obj.string == 'jQuery') &&
-            (typeof global.jQuery == 'function'))
-          base = global.jQuery();
-        else if (global._ != null && (obj.string == '_') && (typeof global._ == 'function'))
-          base = global._();
-      }
-      while (base != null && context.length)
-        base = base[context.pop().string];
-      if (base != null) gatherCompletions(base);
-    } else {
-      // If not, just look in the global object and any local scope
-      // (reading into JS mode internals to get at the local and global variables)
-      for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);
-      for (var v = token.state.globalVars; v; v = v.next) maybeAdd(v.name);
-      if (!options || options.useGlobalScope !== false)
-        gatherCompletions(global);
-      forEach(keywords, maybeAdd);
-    }
-    return found;
-  }
-});
diff --git a/public/js/lib/codemirror/addon/hint/show-hint.css b/public/js/lib/codemirror/addon/hint/show-hint.css
deleted file mode 100644
index 924e638..0000000
--- a/public/js/lib/codemirror/addon/hint/show-hint.css
+++ /dev/null
@@ -1,38 +0,0 @@
-.CodeMirror-hints {
-  position: absolute;
-  z-index: 10;
-  overflow: hidden;
-  list-style: none;
-
-  margin: 0;
-  padding: 2px;
-
-  -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
-  -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
-  box-shadow: 2px 3px 5px rgba(0,0,0,.2);
-  border-radius: 3px;
-  border: 1px solid silver;
-
-  background: white;
-  font-size: 90%;
-  font-family: monospace;
-
-  max-height: 20em;
-  overflow-y: auto;
-}
-
-.CodeMirror-hint {
-  margin: 0;
-  padding: 0 4px;
-  border-radius: 2px;
-  max-width: 19em;
-  overflow: hidden;
-  white-space: pre;
-  color: black;
-  cursor: pointer;
-}
-
-li.CodeMirror-hint-active {
-  background: #08f;
-  color: white;
-}
diff --git a/public/js/lib/codemirror/addon/hint/show-hint.js b/public/js/lib/codemirror/addon/hint/show-hint.js
deleted file mode 100644
index fda5ffa..0000000
--- a/public/js/lib/codemirror/addon/hint/show-hint.js
+++ /dev/null
@@ -1,389 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  var HINT_ELEMENT_CLASS        = "CodeMirror-hint";
-  var ACTIVE_HINT_ELEMENT_CLASS = "CodeMirror-hint-active";
-
-  // This is the old interface, kept around for now to stay
-  // backwards-compatible.
-  CodeMirror.showHint = function(cm, getHints, options) {
-    if (!getHints) return cm.showHint(options);
-    if (options && options.async) getHints.async = true;
-    var newOpts = {hint: getHints};
-    if (options) for (var prop in options) newOpts[prop] = options[prop];
-    return cm.showHint(newOpts);
-  };
-
-  CodeMirror.defineExtension("showHint", function(options) {
-    // We want a single cursor position.
-    if (this.listSelections().length > 1 || this.somethingSelected()) return;
-
-    if (this.state.completionActive) this.state.completionActive.close();
-    var completion = this.state.completionActive = new Completion(this, options);
-    var getHints = completion.options.hint;
-    if (!getHints) return;
-
-    CodeMirror.signal(this, "startCompletion", this);
-    if (getHints.async)
-      getHints(this, function(hints) { completion.showHints(hints); }, completion.options);
-    else
-      return completion.showHints(getHints(this, completion.options));
-  });
-
-  function Completion(cm, options) {
-    this.cm = cm;
-    this.options = this.buildOptions(options);
-    this.widget = this.onClose = null;
-  }
-
-  Completion.prototype = {
-    close: function() {
-      if (!this.active()) return;
-      this.cm.state.completionActive = null;
-
-      if (this.widget) this.widget.close();
-      if (this.onClose) this.onClose();
-      CodeMirror.signal(this.cm, "endCompletion", this.cm);
-    },
-
-    active: function() {
-      return this.cm.state.completionActive == this;
-    },
-
-    pick: function(data, i) {
-      var completion = data.list[i];
-      if (completion.hint) completion.hint(this.cm, data, completion);
-      else this.cm.replaceRange(getText(completion), completion.from || data.from,
-                                completion.to || data.to, "complete");
-      CodeMirror.signal(data, "pick", completion);
-      this.close();
-    },
-
-    showHints: function(data) {
-      if (!data || !data.list.length || !this.active()) return this.close();
-
-      if (this.options.completeSingle && data.list.length == 1)
-        this.pick(data, 0);
-      else
-        this.showWidget(data);
-    },
-
-    showWidget: function(data) {
-      this.widget = new Widget(this, data);
-      CodeMirror.signal(data, "shown");
-
-      var debounce = 0, completion = this, finished;
-      var closeOn = this.options.closeCharacters;
-      var startPos = this.cm.getCursor(), startLen = this.cm.getLine(startPos.line).length;
-
-      var requestAnimationFrame = window.requestAnimationFrame || function(fn) {
-        return setTimeout(fn, 1000/60);
-      };
-      var cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout;
-
-      function done() {
-        if (finished) return;
-        finished = true;
-        completion.close();
-        completion.cm.off("cursorActivity", activity);
-        if (data) CodeMirror.signal(data, "close");
-      }
-
-      function update() {
-        if (finished) return;
-        CodeMirror.signal(data, "update");
-        var getHints = completion.options.hint;
-        if (getHints.async)
-          getHints(completion.cm, finishUpdate, completion.options);
-        else
-          finishUpdate(getHints(completion.cm, completion.options));
-      }
-      function finishUpdate(data_) {
-        data = data_;
-        if (finished) return;
-        if (!data || !data.list.length) return done();
-        if (completion.widget) completion.widget.close();
-        completion.widget = new Widget(completion, data);
-      }
-
-      function clearDebounce() {
-        if (debounce) {
-          cancelAnimationFrame(debounce);
-          debounce = 0;
-        }
-      }
-
-      function activity() {
-        clearDebounce();
-        var pos = completion.cm.getCursor(), line = completion.cm.getLine(pos.line);
-        if (pos.line != startPos.line || line.length - pos.ch != startLen - startPos.ch ||
-            pos.ch < startPos.ch || completion.cm.somethingSelected() ||
-            (pos.ch && closeOn.test(line.charAt(pos.ch - 1)))) {
-          completion.close();
-        } else {
-          debounce = requestAnimationFrame(update);
-          if (completion.widget) completion.widget.close();
-        }
-      }
-      this.cm.on("cursorActivity", activity);
-      this.onClose = done;
-    },
-
-    buildOptions: function(options) {
-      var editor = this.cm.options.hintOptions;
-      var out = {};
-      for (var prop in defaultOptions) out[prop] = defaultOptions[prop];
-      if (editor) for (var prop in editor)
-        if (editor[prop] !== undefined) out[prop] = editor[prop];
-      if (options) for (var prop in options)
-        if (options[prop] !== undefined) out[prop] = options[prop];
-      return out;
-    }
-  };
-
-  function getText(completion) {
-    if (typeof completion == "string") return completion;
-    else return completion.text;
-  }
-
-  function buildKeyMap(completion, handle) {
-    var baseMap = {
-      Up: function() {handle.moveFocus(-1);},
-      Down: function() {handle.moveFocus(1);},
-      PageUp: function() {handle.moveFocus(-handle.menuSize() + 1, true);},
-      PageDown: function() {handle.moveFocus(handle.menuSize() - 1, true);},
-      Home: function() {handle.setFocus(0);},
-      End: function() {handle.setFocus(handle.length - 1);},
-      Enter: handle.pick,
-      Tab: handle.pick,
-      Esc: handle.close
-    };
-    var custom = completion.options.customKeys;
-    var ourMap = custom ? {} : baseMap;
-    function addBinding(key, val) {
-      var bound;
-      if (typeof val != "string")
-        bound = function(cm) { return val(cm, handle); };
-      // This mechanism is deprecated
-      else if (baseMap.hasOwnProperty(val))
-        bound = baseMap[val];
-      else
-        bound = val;
-      ourMap[key] = bound;
-    }
-    if (custom)
-      for (var key in custom) if (custom.hasOwnProperty(key))
-        addBinding(key, custom[key]);
-    var extra = completion.options.extraKeys;
-    if (extra)
-      for (var key in extra) if (extra.hasOwnProperty(key))
-        addBinding(key, extra[key]);
-    return ourMap;
-  }
-
-  function getHintElement(hintsElement, el) {
-    while (el && el != hintsElement) {
-      if (el.nodeName.toUpperCase() === "LI" && el.parentNode == hintsElement) return el;
-      el = el.parentNode;
-    }
-  }
-
-  function Widget(completion, data) {
-    this.completion = completion;
-    this.data = data;
-    var widget = this, cm = completion.cm;
-
-    var hints = this.hints = document.createElement("ul");
-    hints.className = "CodeMirror-hints";
-    this.selectedHint = data.selectedHint || 0;
-
-    var completions = data.list;
-    for (var i = 0; i < completions.length; ++i) {
-      var elt = hints.appendChild(document.createElement("li")), cur = completions[i];
-      var className = HINT_ELEMENT_CLASS + (i != this.selectedHint ? "" : " " + ACTIVE_HINT_ELEMENT_CLASS);
-      if (cur.className != null) className = cur.className + " " + className;
-      elt.className = className;
-      if (cur.render) cur.render(elt, data, cur);
-      else elt.appendChild(document.createTextNode(cur.displayText || getText(cur)));
-      elt.hintId = i;
-    }
-
-    var pos = cm.cursorCoords(completion.options.alignWithWord ? data.from : null);
-    var left = pos.left, top = pos.bottom, below = true;
-    hints.style.left = left + "px";
-    hints.style.top = top + "px";
-    // If we're at the edge of the screen, then we want the menu to appear on the left of the cursor.
-    var winW = window.innerWidth || Math.max(document.body.offsetWidth, document.documentElement.offsetWidth);
-    var winH = window.innerHeight || Math.max(document.body.offsetHeight, document.documentElement.offsetHeight);
-    (completion.options.container || document.body).appendChild(hints);
-    var box = hints.getBoundingClientRect(), overlapY = box.bottom - winH;
-    if (overlapY > 0) {
-      var height = box.bottom - box.top, curTop = pos.top - (pos.bottom - box.top);
-      if (curTop - height > 0) { // Fits above cursor
-        hints.style.top = (top = pos.top - height) + "px";
-        below = false;
-      } else if (height > winH) {
-        hints.style.height = (winH - 5) + "px";
-        hints.style.top = (top = pos.bottom - box.top) + "px";
-        var cursor = cm.getCursor();
-        if (data.from.ch != cursor.ch) {
-          pos = cm.cursorCoords(cursor);
-          hints.style.left = (left = pos.left) + "px";
-          box = hints.getBoundingClientRect();
-        }
-      }
-    }
-    var overlapX = box.right - winW;
-    if (overlapX > 0) {
-      if (box.right - box.left > winW) {
-        hints.style.width = (winW - 5) + "px";
-        overlapX -= (box.right - box.left) - winW;
-      }
-      hints.style.left = (left = pos.left - overlapX) + "px";
-    }
-
-    cm.addKeyMap(this.keyMap = buildKeyMap(completion, {
-      moveFocus: function(n, avoidWrap) { widget.changeActive(widget.selectedHint + n, avoidWrap); },
-      setFocus: function(n) { widget.changeActive(n); },
-      menuSize: function() { return widget.screenAmount(); },
-      length: completions.length,
-      close: function() { completion.close(); },
-      pick: function() { widget.pick(); },
-      data: data
-    }));
-
-    if (completion.options.closeOnUnfocus) {
-      var closingOnBlur;
-      cm.on("blur", this.onBlur = function() { closingOnBlur = setTimeout(function() { completion.close(); }, 100); });
-      cm.on("focus", this.onFocus = function() { clearTimeout(closingOnBlur); });
-    }
-
-    var startScroll = cm.getScrollInfo();
-    cm.on("scroll", this.onScroll = function() {
-      var curScroll = cm.getScrollInfo(), editor = cm.getWrapperElement().getBoundingClientRect();
-      var newTop = top + startScroll.top - curScroll.top;
-      var point = newTop - (window.pageYOffset || (document.documentElement || document.body).scrollTop);
-      if (!below) point += hints.offsetHeight;
-      if (point <= editor.top || point >= editor.bottom) return completion.close();
-      hints.style.top = newTop + "px";
-      hints.style.left = (left + startScroll.left - curScroll.left) + "px";
-    });
-
-    CodeMirror.on(hints, "dblclick", function(e) {
-      var t = getHintElement(hints, e.target || e.srcElement);
-      if (t && t.hintId != null) {widget.changeActive(t.hintId); widget.pick();}
-    });
-
-    CodeMirror.on(hints, "click", function(e) {
-      var t = getHintElement(hints, e.target || e.srcElement);
-      if (t && t.hintId != null) {
-        widget.changeActive(t.hintId);
-        if (completion.options.completeOnSingleClick) widget.pick();
-      }
-    });
-
-    CodeMirror.on(hints, "mousedown", function() {
-      setTimeout(function(){cm.focus();}, 20);
-    });
-
-    CodeMirror.signal(data, "select", completions[0], hints.firstChild);
-    return true;
-  }
-
-  Widget.prototype = {
-    close: function() {
-      if (this.completion.widget != this) return;
-      this.completion.widget = null;
-      this.hints.parentNode.removeChild(this.hints);
-      this.completion.cm.removeKeyMap(this.keyMap);
-
-      var cm = this.completion.cm;
-      if (this.completion.options.closeOnUnfocus) {
-        cm.off("blur", this.onBlur);
-        cm.off("focus", this.onFocus);
-      }
-      cm.off("scroll", this.onScroll);
-    },
-
-    pick: function() {
-      this.completion.pick(this.data, this.selectedHint);
-    },
-
-    changeActive: function(i, avoidWrap) {
-      if (i >= this.data.list.length)
-        i = avoidWrap ? this.data.list.length - 1 : 0;
-      else if (i < 0)
-        i = avoidWrap ? 0  : this.data.list.length - 1;
-      if (this.selectedHint == i) return;
-      var node = this.hints.childNodes[this.selectedHint];
-      node.className = node.className.replace(" " + ACTIVE_HINT_ELEMENT_CLASS, "");
-      node = this.hints.childNodes[this.selectedHint = i];
-      node.className += " " + ACTIVE_HINT_ELEMENT_CLASS;
-      if (node.offsetTop < this.hints.scrollTop)
-        this.hints.scrollTop = node.offsetTop - 3;
-      else if (node.offsetTop + node.offsetHeight > this.hints.scrollTop + this.hints.clientHeight)
-        this.hints.scrollTop = node.offsetTop + node.offsetHeight - this.hints.clientHeight + 3;
-      CodeMirror.signal(this.data, "select", this.data.list[this.selectedHint], node);
-    },
-
-    screenAmount: function() {
-      return Math.floor(this.hints.clientHeight / this.hints.firstChild.offsetHeight) || 1;
-    }
-  };
-
-  CodeMirror.registerHelper("hint", "auto", function(cm, options) {
-    var helpers = cm.getHelpers(cm.getCursor(), "hint"), words;
-    if (helpers.length) {
-      for (var i = 0; i < helpers.length; i++) {
-        var cur = helpers[i](cm, options);
-        if (cur && cur.list.length) return cur;
-      }
-    } else if (words = cm.getHelper(cm.getCursor(), "hintWords")) {
-      if (words) return CodeMirror.hint.fromList(cm, {words: words});
-    } else if (CodeMirror.hint.anyword) {
-      return CodeMirror.hint.anyword(cm, options);
-    }
-  });
-
-  CodeMirror.registerHelper("hint", "fromList", function(cm, options) {
-    var cur = cm.getCursor(), token = cm.getTokenAt(cur);
-    var found = [];
-    for (var i = 0; i < options.words.length; i++) {
-      var word = options.words[i];
-      if (word.slice(0, token.string.length) == token.string)
-        found.push(word);
-    }
-
-    if (found.length) return {
-      list: found,
-      from: CodeMirror.Pos(cur.line, token.start),
-            to: CodeMirror.Pos(cur.line, token.end)
-    };
-  });
-
-  CodeMirror.commands.autocomplete = CodeMirror.showHint;
-
-  var defaultOptions = {
-    hint: CodeMirror.hint.auto,
-    completeSingle: true,
-    alignWithWord: true,
-    closeCharacters: /[\s()\[\]{};:>,]/,
-    closeOnUnfocus: true,
-    completeOnSingleClick: false,
-    container: null,
-    customKeys: null,
-    extraKeys: null
-  };
-
-  CodeMirror.defineOption("hintOptions", null);
-});
diff --git a/public/js/lib/codemirror/addon/hint/sql-hint.js b/public/js/lib/codemirror/addon/hint/sql-hint.js
deleted file mode 100644
index 92c889e..0000000
--- a/public/js/lib/codemirror/addon/hint/sql-hint.js
+++ /dev/null
@@ -1,197 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"), require("../../mode/sql/sql"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror", "../../mode/sql/sql"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  var tables;
-  var defaultTable;
-  var keywords;
-  var CONS = {
-    QUERY_DIV: ";",
-    ALIAS_KEYWORD: "AS"
-  };
-  var Pos = CodeMirror.Pos;
-
-  function getKeywords(editor) {
-    var mode = editor.doc.modeOption;
-    if (mode === "sql") mode = "text/x-sql";
-    return CodeMirror.resolveMode(mode).keywords;
-  }
-
-  function match(string, word) {
-    var len = string.length;
-    var sub = word.substr(0, len);
-    return string.toUpperCase() === sub.toUpperCase();
-  }
-
-  function addMatches(result, search, wordlist, formatter) {
-    for (var word in wordlist) {
-      if (!wordlist.hasOwnProperty(word)) continue;
-      if (Array.isArray(wordlist)) {
-        word = wordlist[word];
-      }
-      if (match(search, word)) {
-        result.push(formatter(word));
-      }
-    }
-  }
-
-  function nameCompletion(cur, token, result, editor) {
-    var useBacktick = (token.string.charAt(0) == "`");
-    var string = token.string.substr(1);
-    var prevToken = editor.getTokenAt(Pos(cur.line, token.start));
-    if (token.string.charAt(0) == "." || prevToken.string == "."){
-      //Suggest colunm names
-      if (prevToken.string == ".") {
-        var prevToken = editor.getTokenAt(Pos(cur.line, token.start - 1));
-      }
-      var table = prevToken.string;
-      //Check if backtick is used in table name. If yes, use it for columns too.
-      var useBacktickTable = false;
-      if (table.match(/`/g)) {
-        useBacktickTable = true;
-        table = table.replace(/`/g, "");
-      }
-      //Check if table is available. If not, find table by Alias
-      if (!tables.hasOwnProperty(table))
-        table = findTableByAlias(table, editor);
-      var columns = tables[table];
-      if (!columns) return;
-
-      if (useBacktick) {
-        addMatches(result, string, columns, function(w) {return "`" + w + "`";});
-      }
-      else if(useBacktickTable) {
-        addMatches(result, string, columns, function(w) {return ".`" + w + "`";});
-      }
-      else {
-        addMatches(result, string, columns, function(w) {return "." + w;});
-      }
-    }
-    else {
-      //Suggest table names or colums in defaultTable
-      while (token.start && string.charAt(0) == ".") {
-        token = editor.getTokenAt(Pos(cur.line, token.start - 1));
-        string = token.string + string;
-      }
-      if (useBacktick) {
-        addMatches(result, string, tables, function(w) {return "`" + w + "`";});
-        addMatches(result, string, defaultTable, function(w) {return "`" + w + "`";});
-      }
-      else {
-        addMatches(result, string, tables, function(w) {return w;});
-        addMatches(result, string, defaultTable, function(w) {return w;});
-      }
-    }
-  }
-
-  function eachWord(lineText, f) {
-    if (!lineText) return;
-    var excepted = /[,;]/g;
-    var words = lineText.split(" ");
-    for (var i = 0; i < words.length; i++) {
-      f(words[i]?words[i].replace(excepted, '') : '');
-    }
-  }
-
-  function convertCurToNumber(cur) {
-    // max characters of a line is 999,999.
-    return cur.line + cur.ch / Math.pow(10, 6);
-  }
-
-  function convertNumberToCur(num) {
-    return Pos(Math.floor(num), +num.toString().split('.').pop());
-  }
-
-  function findTableByAlias(alias, editor) {
-    var doc = editor.doc;
-    var fullQuery = doc.getValue();
-    var aliasUpperCase = alias.toUpperCase();
-    var previousWord = "";
-    var table = "";
-    var separator = [];
-    var validRange = {
-      start: Pos(0, 0),
-      end: Pos(editor.lastLine(), editor.getLineHandle(editor.lastLine()).length)
-    };
-
-    //add separator
-    var indexOfSeparator = fullQuery.indexOf(CONS.QUERY_DIV);
-    while(indexOfSeparator != -1) {
-      separator.push(doc.posFromIndex(indexOfSeparator));
-      indexOfSeparator = fullQuery.indexOf(CONS.QUERY_DIV, indexOfSeparator+1);
-    }
-    separator.unshift(Pos(0, 0));
-    separator.push(Pos(editor.lastLine(), editor.getLineHandle(editor.lastLine()).text.length));
-
-    //find valid range
-    var prevItem = 0;
-    var current = convertCurToNumber(editor.getCursor());
-    for (var i=0; i< separator.length; i++) {
-      var _v = convertCurToNumber(separator[i]);
-      if (current > prevItem && current <= _v) {
-        validRange = { start: convertNumberToCur(prevItem), end: convertNumberToCur(_v) };
-        break;
-      }
-      prevItem = _v;
-    }
-
-    var query = doc.getRange(validRange.start, validRange.end, false);
-
-    for (var i = 0; i < query.length; i++) {
-      var lineText = query[i];
-      eachWord(lineText, function(word) {
-        var wordUpperCase = word.toUpperCase();
-        if (wordUpperCase === aliasUpperCase && tables.hasOwnProperty(previousWord)) {
-            table = previousWord;
-        }
-        if (wordUpperCase !== CONS.ALIAS_KEYWORD) {
-          previousWord = word;
-        }
-      });
-      if (table) break;
-    }
-    return table;
-  }
-
-  CodeMirror.registerHelper("hint", "sql", function(editor, options) {
-    tables = (options && options.tables) || {};
-    var defaultTableName = options && options.defaultTable;
-    defaultTable = (defaultTableName && tables[defaultTableName] || []);
-    keywords = keywords || getKeywords(editor);
-
-    var cur = editor.getCursor();
-    var result = [];
-    var token = editor.getTokenAt(cur), start, end, search;
-    if (token.end > cur.ch) {
-      token.end = cur.ch;
-      token.string = token.string.slice(0, cur.ch - token.start);
-    }
-
-    if (token.string.match(/^[.`\w@]\w*$/)) {
-      search = token.string;
-      start = token.start;
-      end = token.end;
-    } else {
-      start = end = cur.ch;
-      search = "";
-    }
-    if (search.charAt(0) == "." || search.charAt(0) == "`") {
-      nameCompletion(cur, token, result, editor);
-    } else {
-      addMatches(result, search, tables, function(w) {return w;});
-      addMatches(result, search, defaultTable, function(w) {return w;});
-      addMatches(result, search, keywords, function(w) {return w.toUpperCase();});
-    }
-
-    return {list: result, from: Pos(cur.line, start), to: Pos(cur.line, end)};
-  });
-});
diff --git a/public/js/lib/codemirror/addon/hint/xml-hint.js b/public/js/lib/codemirror/addon/hint/xml-hint.js
deleted file mode 100644
index 9b9baa0..0000000
--- a/public/js/lib/codemirror/addon/hint/xml-hint.js
+++ /dev/null
@@ -1,110 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  var Pos = CodeMirror.Pos;
-
-  function getHints(cm, options) {
-    var tags = options && options.schemaInfo;
-    var quote = (options && options.quoteChar) || '"';
-    if (!tags) return;
-    var cur = cm.getCursor(), token = cm.getTokenAt(cur);
-    if (token.end > cur.ch) {
-      token.end = cur.ch;
-      token.string = token.string.slice(0, cur.ch - token.start);
-    }
-    var inner = CodeMirror.innerMode(cm.getMode(), token.state);
-    if (inner.mode.name != "xml") return;
-    var result = [], replaceToken = false, prefix;
-    var tag = /\btag\b/.test(token.type) && !/>$/.test(token.string);
-    var tagName = tag && /^\w/.test(token.string), tagStart;
-
-    if (tagName) {
-      var before = cm.getLine(cur.line).slice(Math.max(0, token.start - 2), token.start);
-      var tagType = /<\/$/.test(before) ? "close" : /<$/.test(before) ? "open" : null;
-      if (tagType) tagStart = token.start - (tagType == "close" ? 2 : 1);
-    } else if (tag && token.string == "<") {
-      tagType = "open";
-    } else if (tag && token.string == "</") {
-      tagType = "close";
-    }
-
-    if (!tag && !inner.state.tagName || tagType) {
-      if (tagName)
-        prefix = token.string;
-      replaceToken = tagType;
-      var cx = inner.state.context, curTag = cx && tags[cx.tagName];
-      var childList = cx ? curTag && curTag.children : tags["!top"];
-      if (childList && tagType != "close") {
-        for (var i = 0; i < childList.length; ++i) if (!prefix || childList[i].lastIndexOf(prefix, 0) == 0)
-          result.push("<" + childList[i]);
-      } else if (tagType != "close") {
-        for (var name in tags)
-          if (tags.hasOwnProperty(name) && name != "!top" && name != "!attrs" && (!prefix || name.lastIndexOf(prefix, 0) == 0))
-            result.push("<" + name);
-      }
-      if (cx && (!prefix || tagType == "close" && cx.tagName.lastIndexOf(prefix, 0) == 0))
-        result.push("</" + cx.tagName + ">");
-    } else {
-      // Attribute completion
-      var curTag = tags[inner.state.tagName], attrs = curTag && curTag.attrs;
-      var globalAttrs = tags["!attrs"];
-      if (!attrs && !globalAttrs) return;
-      if (!attrs) {
-        attrs = globalAttrs;
-      } else if (globalAttrs) { // Combine tag-local and global attributes
-        var set = {};
-        for (var nm in globalAttrs) if (globalAttrs.hasOwnProperty(nm)) set[nm] = globalAttrs[nm];
-        for (var nm in attrs) if (attrs.hasOwnProperty(nm)) set[nm] = attrs[nm];
-        attrs = set;
-      }
-      if (token.type == "string" || token.string == "=") { // A value
-        var before = cm.getRange(Pos(cur.line, Math.max(0, cur.ch - 60)),
-                                 Pos(cur.line, token.type == "string" ? token.start : token.end));
-        var atName = before.match(/([^\s\u00a0=<>\"\']+)=$/), atValues;
-        if (!atName || !attrs.hasOwnProperty(atName[1]) || !(atValues = attrs[atName[1]])) return;
-        if (typeof atValues == 'function') atValues = atValues.call(this, cm); // Functions can be used to supply values for autocomplete widget
-        if (token.type == "string") {
-          prefix = token.string;
-          var n = 0;
-          if (/['"]/.test(token.string.charAt(0))) {
-            quote = token.string.charAt(0);
-            prefix = token.string.slice(1);
-            n++;
-          }
-          var len = token.string.length;
-          if (/['"]/.test(token.string.charAt(len - 1))) {
-            quote = token.string.charAt(len - 1);
-            prefix = token.string.substr(n, len - 2);
-          }
-          replaceToken = true;
-        }
-        for (var i = 0; i < atValues.length; ++i) if (!prefix || atValues[i].lastIndexOf(prefix, 0) == 0)
-          result.push(quote + atValues[i] + quote);
-      } else { // An attribute name
-        if (token.type == "attribute") {
-          prefix = token.string;
-          replaceToken = true;
-        }
-        for (var attr in attrs) if (attrs.hasOwnProperty(attr) && (!prefix || attr.lastIndexOf(prefix, 0) == 0))
-          result.push(attr);
-      }
-    }
-    return {
-      list: result,
-      from: replaceToken ? Pos(cur.line, tagStart == null ? token.start : tagStart) : cur,
-      to: replaceToken ? Pos(cur.line, token.end) : cur
-    };
-  }
-
-  CodeMirror.registerHelper("hint", "xml", getHints);
-});
diff --git a/public/js/lib/codemirror/addon/lint/coffeescript-lint.js b/public/js/lib/codemirror/addon/lint/coffeescript-lint.js
deleted file mode 100644
index 7e39428..0000000
--- a/public/js/lib/codemirror/addon/lint/coffeescript-lint.js
+++ /dev/null
@@ -1,41 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// Depends on coffeelint.js from http://www.coffeelint.org/js/coffeelint.js
-
-// declare global: coffeelint
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.registerHelper("lint", "coffeescript", function(text) {
-  var found = [];
-  var parseError = function(err) {
-    var loc = err.lineNumber;
-    found.push({from: CodeMirror.Pos(loc-1, 0),
-                to: CodeMirror.Pos(loc, 0),
-                severity: err.level,
-                message: err.message});
-  };
-  try {
-    var res = coffeelint.lint(text);
-    for(var i = 0; i < res.length; i++) {
-      parseError(res[i]);
-    }
-  } catch(e) {
-    found.push({from: CodeMirror.Pos(e.location.first_line, 0),
-                to: CodeMirror.Pos(e.location.last_line, e.location.last_column),
-                severity: 'error',
-                message: e.message});
-  }
-  return found;
-});
-
-});
diff --git a/public/js/lib/codemirror/addon/lint/css-lint.js b/public/js/lib/codemirror/addon/lint/css-lint.js
deleted file mode 100644
index 1f61b47..0000000
--- a/public/js/lib/codemirror/addon/lint/css-lint.js
+++ /dev/null
@@ -1,35 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// Depends on csslint.js from https://github.com/stubbornella/csslint
-
-// declare global: CSSLint
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.registerHelper("lint", "css", function(text) {
-  var found = [];
-  if (!window.CSSLint) return found;
-  var results = CSSLint.verify(text), messages = results.messages, message = null;
-  for ( var i = 0; i < messages.length; i++) {
-    message = messages[i];
-    var startLine = message.line -1, endLine = message.line -1, startCol = message.col -1, endCol = message.col;
-    found.push({
-      from: CodeMirror.Pos(startLine, startCol),
-      to: CodeMirror.Pos(endLine, endCol),
-      message: message.message,
-      severity : message.type
-    });
-  }
-  return found;
-});
-
-});
diff --git a/public/js/lib/codemirror/addon/lint/javascript-lint.js b/public/js/lib/codemirror/addon/lint/javascript-lint.js
deleted file mode 100644
index 3d65ba6..0000000
--- a/public/js/lib/codemirror/addon/lint/javascript-lint.js
+++ /dev/null
@@ -1,136 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-  // declare global: JSHINT
-
-  var bogus = [ "Dangerous comment" ];
-
-  var warnings = [ [ "Expected '{'",
-                     "Statement body should be inside '{ }' braces." ] ];
-
-  var errors = [ "Missing semicolon", "Extra comma", "Missing property name",
-                 "Unmatched ", " and instead saw", " is not defined",
-                 "Unclosed string", "Stopping, unable to continue" ];
-
-  function validator(text, options) {
-    if (!window.JSHINT) return [];
-    JSHINT(text, options);
-    var errors = JSHINT.data().errors, result = [];
-    if (errors) parseErrors(errors, result);
-    return result;
-  }
-
-  CodeMirror.registerHelper("lint", "javascript", validator);
-
-  function cleanup(error) {
-    // All problems are warnings by default
-    fixWith(error, warnings, "warning", true);
-    fixWith(error, errors, "error");
-
-    return isBogus(error) ? null : error;
-  }
-
-  function fixWith(error, fixes, severity, force) {
-    var description, fix, find, replace, found;
-
-    description = error.description;
-
-    for ( var i = 0; i < fixes.length; i++) {
-      fix = fixes[i];
-      find = (typeof fix === "string" ? fix : fix[0]);
-      replace = (typeof fix === "string" ? null : fix[1]);
-      found = description.indexOf(find) !== -1;
-
-      if (force || found) {
-        error.severity = severity;
-      }
-      if (found && replace) {
-        error.description = replace;
-      }
-    }
-  }
-
-  function isBogus(error) {
-    var description = error.description;
-    for ( var i = 0; i < bogus.length; i++) {
-      if (description.indexOf(bogus[i]) !== -1) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  function parseErrors(errors, output) {
-    for ( var i = 0; i < errors.length; i++) {
-      var error = errors[i];
-      if (error) {
-        var linetabpositions, index;
-
-        linetabpositions = [];
-
-        // This next block is to fix a problem in jshint. Jshint
-        // replaces
-        // all tabs with spaces then performs some checks. The error
-        // positions (character/space) are then reported incorrectly,
-        // not taking the replacement step into account. Here we look
-        // at the evidence line and try to adjust the character position
-        // to the correct value.
-        if (error.evidence) {
-          // Tab positions are computed once per line and cached
-          var tabpositions = linetabpositions[error.line];
-          if (!tabpositions) {
-            var evidence = error.evidence;
-            tabpositions = [];
-            // ugggh phantomjs does not like this
-            // forEachChar(evidence, function(item, index) {
-            Array.prototype.forEach.call(evidence, function(item,
-                                                            index) {
-              if (item === '\t') {
-                // First col is 1 (not 0) to match error
-                // positions
-                tabpositions.push(index + 1);
-              }
-            });
-            linetabpositions[error.line] = tabpositions;
-          }
-          if (tabpositions.length > 0) {
-            var pos = error.character;
-            tabpositions.forEach(function(tabposition) {
-              if (pos > tabposition) pos -= 1;
-            });
-            error.character = pos;
-          }
-        }
-
-        var start = error.character - 1, end = start + 1;
-        if (error.evidence) {
-          index = error.evidence.substring(start).search(/.\b/);
-          if (index > -1) {
-            end += index;
-          }
-        }
-
-        // Convert to format expected by validation service
-        error.description = error.reason;// + "(jshint)";
-        error.start = error.character;
-        error.end = end;
-        error = cleanup(error);
-
-        if (error)
-          output.push({message: error.description,
-                       severity: error.severity,
-                       from: CodeMirror.Pos(error.line - 1, start),
-                       to: CodeMirror.Pos(error.line - 1, end)});
-      }
-    }
-  }
-});
diff --git a/public/js/lib/codemirror/addon/lint/json-lint.js b/public/js/lib/codemirror/addon/lint/json-lint.js
deleted file mode 100644
index 9dbb616..0000000
--- a/public/js/lib/codemirror/addon/lint/json-lint.js
+++ /dev/null
@@ -1,31 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// Depends on jsonlint.js from https://github.com/zaach/jsonlint
-
-// declare global: jsonlint
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.registerHelper("lint", "json", function(text) {
-  var found = [];
-  jsonlint.parseError = function(str, hash) {
-    var loc = hash.loc;
-    found.push({from: CodeMirror.Pos(loc.first_line - 1, loc.first_column),
-                to: CodeMirror.Pos(loc.last_line - 1, loc.last_column),
-                message: str});
-  };
-  try { jsonlint.parse(text); }
-  catch(e) {}
-  return found;
-});
-
-});
diff --git a/public/js/lib/codemirror/addon/lint/lint.css b/public/js/lib/codemirror/addon/lint/lint.css
deleted file mode 100644
index 414a9a0..0000000
--- a/public/js/lib/codemirror/addon/lint/lint.css
+++ /dev/null
@@ -1,73 +0,0 @@
-/* The lint marker gutter */
-.CodeMirror-lint-markers {
-  width: 16px;
-}
-
-.CodeMirror-lint-tooltip {
-  background-color: infobackground;
-  border: 1px solid black;
-  border-radius: 4px 4px 4px 4px;
-  color: infotext;
-  font-family: monospace;
-  font-size: 10pt;
-  overflow: hidden;
-  padding: 2px 5px;
-  position: fixed;
-  white-space: pre;
-  white-space: pre-wrap;
-  z-index: 100;
-  max-width: 600px;
-  opacity: 0;
-  transition: opacity .4s;
-  -moz-transition: opacity .4s;
-  -webkit-transition: opacity .4s;
-  -o-transition: opacity .4s;
-  -ms-transition: opacity .4s;
-}
-
-.CodeMirror-lint-mark-error, .CodeMirror-lint-mark-warning {
-  background-position: left bottom;
-  background-repeat: repeat-x;
-}
-
-.CodeMirror-lint-mark-error {
-  background-image:
-  url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==")
-  ;
-}
-
-.CodeMirror-lint-mark-warning {
-  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=");
-}
-
-.CodeMirror-lint-marker-error, .CodeMirror-lint-marker-warning {
-  background-position: center center;
-  background-repeat: no-repeat;
-  cursor: pointer;
-  display: inline-block;
-  height: 16px;
-  width: 16px;
-  vertical-align: middle;
-  position: relative;
-}
-
-.CodeMirror-lint-message-error, .CodeMirror-lint-message-warning {
-  padding-left: 18px;
-  background-position: top left;
-  background-repeat: no-repeat;
-}
-
-.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error {
-  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=");
-}
-
-.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning {
-  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=");
-}
-
-.CodeMirror-lint-marker-multiple {
-  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC");
-  background-repeat: no-repeat;
-  background-position: right bottom;
-  width: 100%; height: 100%;
-}
diff --git a/public/js/lib/codemirror/addon/lint/lint.js b/public/js/lib/codemirror/addon/lint/lint.js
deleted file mode 100644
index 66f187e..0000000
--- a/public/js/lib/codemirror/addon/lint/lint.js
+++ /dev/null
@@ -1,204 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-  var GUTTER_ID = "CodeMirror-lint-markers";
-
-  function showTooltip(e, content) {
-    var tt = document.createElement("div");
-    tt.className = "CodeMirror-lint-tooltip";
-    tt.appendChild(content.cloneNode(true));
-    document.body.appendChild(tt);
-
-    function position(e) {
-      if (!tt.parentNode) return CodeMirror.off(document, "mousemove", position);
-      tt.style.top = Math.max(0, e.clientY - tt.offsetHeight - 5) + "px";
-      tt.style.left = (e.clientX + 5) + "px";
-    }
-    CodeMirror.on(document, "mousemove", position);
-    position(e);
-    if (tt.style.opacity != null) tt.style.opacity = 1;
-    return tt;
-  }
-  function rm(elt) {
-    if (elt.parentNode) elt.parentNode.removeChild(elt);
-  }
-  function hideTooltip(tt) {
-    if (!tt.parentNode) return;
-    if (tt.style.opacity == null) rm(tt);
-    tt.style.opacity = 0;
-    setTimeout(function() { rm(tt); }, 600);
-  }
-
-  function showTooltipFor(e, content, node) {
-    var tooltip = showTooltip(e, content);
-    function hide() {
-      CodeMirror.off(node, "mouseout", hide);
-      if (tooltip) { hideTooltip(tooltip); tooltip = null; }
-    }
-    var poll = setInterval(function() {
-      if (tooltip) for (var n = node;; n = n.parentNode) {
-        if (n == document.body) return;
-        if (!n) { hide(); break; }
-      }
-      if (!tooltip) return clearInterval(poll);
-    }, 400);
-    CodeMirror.on(node, "mouseout", hide);
-  }
-
-  function LintState(cm, options, hasGutter) {
-    this.marked = [];
-    this.options = options;
-    this.timeout = null;
-    this.hasGutter = hasGutter;
-    this.onMouseOver = function(e) { onMouseOver(cm, e); };
-  }
-
-  function parseOptions(cm, options) {
-    if (options instanceof Function) return {getAnnotations: options};
-    if (!options || options === true) options = {};
-    if (!options.getAnnotations) options.getAnnotations = cm.getHelper(CodeMirror.Pos(0, 0), "lint");
-    if (!options.getAnnotations) throw new Error("Required option 'getAnnotations' missing (lint addon)");
-    return options;
-  }
-
-  function clearMarks(cm) {
-    var state = cm.state.lint;
-    if (state.hasGutter) cm.clearGutter(GUTTER_ID);
-    for (var i = 0; i < state.marked.length; ++i)
-      state.marked[i].clear();
-    state.marked.length = 0;
-  }
-
-  function makeMarker(labels, severity, multiple, tooltips) {
-    var marker = document.createElement("div"), inner = marker;
-    marker.className = "CodeMirror-lint-marker-" + severity;
-    if (multiple) {
-      inner = marker.appendChild(document.createElement("div"));
-      inner.className = "CodeMirror-lint-marker-multiple";
-    }
-
-    if (tooltips != false) CodeMirror.on(inner, "mouseover", function(e) {
-      showTooltipFor(e, labels, inner);
-    });
-
-    return marker;
-  }
-
-  function getMaxSeverity(a, b) {
-    if (a == "error") return a;
-    else return b;
-  }
-
-  function groupByLine(annotations) {
-    var lines = [];
-    for (var i = 0; i < annotations.length; ++i) {
-      var ann = annotations[i], line = ann.from.line;
-      (lines[line] || (lines[line] = [])).push(ann);
-    }
-    return lines;
-  }
-
-  function annotationTooltip(ann) {
-    var severity = ann.severity;
-    if (!severity) severity = "error";
-    var tip = document.createElement("div");
-    tip.className = "CodeMirror-lint-message-" + severity;
-    tip.appendChild(document.createTextNode(ann.message));
-    return tip;
-  }
-
-  function startLinting(cm) {
-    var state = cm.state.lint, options = state.options;
-    var passOptions = options.options || options; // Support deprecated passing of `options` property in options
-    if (options.async)
-      options.getAnnotations(cm.getValue(), updateLinting, passOptions, cm);
-    else
-      updateLinting(cm, options.getAnnotations(cm.getValue(), passOptions, cm));
-  }
-
-  function updateLinting(cm, annotationsNotSorted) {
-    clearMarks(cm);
-    var state = cm.state.lint, options = state.options;
-
-    var annotations = groupByLine(annotationsNotSorted);
-
-    for (var line = 0; line < annotations.length; ++line) {
-      var anns = annotations[line];
-      if (!anns) continue;
-
-      var maxSeverity = null;
-      var tipLabel = state.hasGutter && document.createDocumentFragment();
-
-      for (var i = 0; i < anns.length; ++i) {
-        var ann = anns[i];
-        var severity = ann.severity;
-        if (!severity) severity = "error";
-        maxSeverity = getMaxSeverity(maxSeverity, severity);
-
-        if (options.formatAnnotation) ann = options.formatAnnotation(ann);
-        if (state.hasGutter) tipLabel.appendChild(annotationTooltip(ann));
-
-        if (ann.to) state.marked.push(cm.markText(ann.from, ann.to, {
-          className: "CodeMirror-lint-mark-" + severity,
-          __annotation: ann
-        }));
-      }
-
-      if (state.hasGutter)
-        cm.setGutterMarker(line, GUTTER_ID, makeMarker(tipLabel, maxSeverity, anns.length > 1,
-                                                       state.options.tooltips));
-    }
-    if (options.onUpdateLinting) options.onUpdateLinting(annotationsNotSorted, annotations, cm);
-  }
-
-  function onChange(cm) {
-    var state = cm.state.lint;
-    clearTimeout(state.timeout);
-    state.timeout = setTimeout(function(){startLinting(cm);}, state.options.delay || 500);
-  }
-
-  function popupSpanTooltip(ann, e) {
-    var target = e.target || e.srcElement;
-    showTooltipFor(e, annotationTooltip(ann), target);
-  }
-
-  function onMouseOver(cm, e) {
-    var target = e.target || e.srcElement;
-    if (!/\bCodeMirror-lint-mark-/.test(target.className)) return;
-    var box = target.getBoundingClientRect(), x = (box.left + box.right) / 2, y = (box.top + box.bottom) / 2;
-    var spans = cm.findMarksAt(cm.coordsChar({left: x, top: y}, "client"));
-    for (var i = 0; i < spans.length; ++i) {
-      var ann = spans[i].__annotation;
-      if (ann) return popupSpanTooltip(ann, e);
-    }
-  }
-
-  CodeMirror.defineOption("lint", false, function(cm, val, old) {
-    if (old && old != CodeMirror.Init) {
-      clearMarks(cm);
-      cm.off("change", onChange);
-      CodeMirror.off(cm.getWrapperElement(), "mouseover", cm.state.lint.onMouseOver);
-      delete cm.state.lint;
-    }
-
-    if (val) {
-      var gutters = cm.getOption("gutters"), hasLintGutter = false;
-      for (var i = 0; i < gutters.length; ++i) if (gutters[i] == GUTTER_ID) hasLintGutter = true;
-      var state = cm.state.lint = new LintState(cm, parseOptions(cm, val), hasLintGutter);
-      cm.on("change", onChange);
-      if (state.options.tooltips != false)
-        CodeMirror.on(cm.getWrapperElement(), "mouseover", state.onMouseOver);
-
-      startLinting(cm);
-    }
-  });
-});
diff --git a/public/js/lib/codemirror/addon/lint/yaml-lint.js b/public/js/lib/codemirror/addon/lint/yaml-lint.js
deleted file mode 100644
index 3f77e52..0000000
--- a/public/js/lib/codemirror/addon/lint/yaml-lint.js
+++ /dev/null
@@ -1,28 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-// Depends on js-yaml.js from https://github.com/nodeca/js-yaml
-
-// declare global: jsyaml
-
-CodeMirror.registerHelper("lint", "yaml", function(text) {
-  var found = [];
-  try { jsyaml.load(text); }
-  catch(e) {
-      var loc = e.mark;
-      found.push({ from: CodeMirror.Pos(loc.line, loc.column), to: CodeMirror.Pos(loc.line, loc.column), message: e.message });
-  }
-  return found;
-});
-
-});
diff --git a/public/js/lib/codemirror/addon/merge/merge.css b/public/js/lib/codemirror/addon/merge/merge.css
deleted file mode 100644
index a6a80e4..0000000
--- a/public/js/lib/codemirror/addon/merge/merge.css
+++ /dev/null
@@ -1,112 +0,0 @@
-.CodeMirror-merge {
-  position: relative;
-  border: 1px solid #ddd;
-  white-space: pre;
-}
-
-.CodeMirror-merge, .CodeMirror-merge .CodeMirror {
-  height: 350px;
-}
-
-.CodeMirror-merge-2pane .CodeMirror-merge-pane { width: 47%; }
-.CodeMirror-merge-2pane .CodeMirror-merge-gap { width: 6%; }
-.CodeMirror-merge-3pane .CodeMirror-merge-pane { width: 31%; }
-.CodeMirror-merge-3pane .CodeMirror-merge-gap { width: 3.5%; }
-
-.CodeMirror-merge-pane {
-  display: inline-block;
-  white-space: normal;
-  vertical-align: top;
-}
-.CodeMirror-merge-pane-rightmost {
-  position: absolute;
-  right: 0px;
-  z-index: 1;
-}
-
-.CodeMirror-merge-gap {
-  z-index: 2;
-  display: inline-block;
-  height: 100%;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-  overflow: hidden;
-  border-left: 1px solid #ddd;
-  border-right: 1px solid #ddd;
-  position: relative;
-  background: #f8f8f8;
-}
-
-.CodeMirror-merge-scrolllock-wrap {
-  position: absolute;
-  bottom: 0; left: 50%;
-}
-.CodeMirror-merge-scrolllock {
-  position: relative;
-  left: -50%;
-  cursor: pointer;
-  color: #555;
-  line-height: 1;
-}
-
-.CodeMirror-merge-copybuttons-left, .CodeMirror-merge-copybuttons-right {
-  position: absolute;
-  left: 0; top: 0;
-  right: 0; bottom: 0;
-  line-height: 1;
-}
-
-.CodeMirror-merge-copy {
-  position: absolute;
-  cursor: pointer;
-  color: #44c;
-}
-
-.CodeMirror-merge-copy-reverse {
-  position: absolute;
-  cursor: pointer;
-  color: #44c;
-}
-
-.CodeMirror-merge-copybuttons-left .CodeMirror-merge-copy { left: 2px; }
-.CodeMirror-merge-copybuttons-right .CodeMirror-merge-copy { right: 2px; }
-
-.CodeMirror-merge-r-inserted, .CodeMirror-merge-l-inserted {
-  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12MwuCXy3+CWyH8GBgYGJgYkAABZbAQ9ELXurwAAAABJRU5ErkJggg==);
-  background-position: bottom left;
-  background-repeat: repeat-x;
-}
-
-.CodeMirror-merge-r-deleted, .CodeMirror-merge-l-deleted {
-  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12M4Kyb2/6yY2H8GBgYGJgYkAABURgPz6Ks7wQAAAABJRU5ErkJggg==);
-  background-position: bottom left;
-  background-repeat: repeat-x;
-}
-
-.CodeMirror-merge-r-chunk { background: #ffffe0; }
-.CodeMirror-merge-r-chunk-start { border-top: 1px solid #ee8; }
-.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #ee8; }
-.CodeMirror-merge-r-connect { fill: #ffffe0; stroke: #ee8; stroke-width: 1px; }
-
-.CodeMirror-merge-l-chunk { background: #eef; }
-.CodeMirror-merge-l-chunk-start { border-top: 1px solid #88e; }
-.CodeMirror-merge-l-chunk-end { border-bottom: 1px solid #88e; }
-.CodeMirror-merge-l-connect { fill: #eef; stroke: #88e; stroke-width: 1px; }
-
-.CodeMirror-merge-l-chunk.CodeMirror-merge-r-chunk { background: #dfd; }
-.CodeMirror-merge-l-chunk-start.CodeMirror-merge-r-chunk-start { border-top: 1px solid #4e4; }
-.CodeMirror-merge-l-chunk-end.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #4e4; }
-
-.CodeMirror-merge-collapsed-widget:before {
-  content: "(...)";
-}
-.CodeMirror-merge-collapsed-widget {
-  cursor: pointer;
-  color: #88b;
-  background: #eef;
-  border: 1px solid #ddf;
-  font-size: 90%;
-  padding: 0 3px;
-  border-radius: 4px;
-}
-.CodeMirror-merge-collapsed-line .CodeMirror-gutter-elt { display: none; }
diff --git a/public/js/lib/codemirror/addon/merge/merge.js b/public/js/lib/codemirror/addon/merge/merge.js
deleted file mode 100644
index ed22b60..0000000
--- a/public/js/lib/codemirror/addon/merge/merge.js
+++ /dev/null
@@ -1,643 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// declare global: diff_match_patch, DIFF_INSERT, DIFF_DELETE, DIFF_EQUAL
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"), require("diff_match_patch"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror", "diff_match_patch"], mod);
-  else // Plain browser env
-    mod(CodeMirror, diff_match_patch);
-})(function(CodeMirror, diff_match_patch) {
-  "use strict";
-  var Pos = CodeMirror.Pos;
-  var svgNS = "http://www.w3.org/2000/svg";
-
-  function DiffView(mv, type) {
-    this.mv = mv;
-    this.type = type;
-    this.classes = type == "left"
-      ? {chunk: "CodeMirror-merge-l-chunk",
-         start: "CodeMirror-merge-l-chunk-start",
-         end: "CodeMirror-merge-l-chunk-end",
-         insert: "CodeMirror-merge-l-inserted",
-         del: "CodeMirror-merge-l-deleted",
-         connect: "CodeMirror-merge-l-connect"}
-      : {chunk: "CodeMirror-merge-r-chunk",
-         start: "CodeMirror-merge-r-chunk-start",
-         end: "CodeMirror-merge-r-chunk-end",
-         insert: "CodeMirror-merge-r-inserted",
-         del: "CodeMirror-merge-r-deleted",
-         connect: "CodeMirror-merge-r-connect"};
-    if (mv.options.connect == "align")
-      this.aligners = [];
-  }
-
-  DiffView.prototype = {
-    constructor: DiffView,
-    init: function(pane, orig, options) {
-      this.edit = this.mv.edit;
-      this.orig = CodeMirror(pane, copyObj({value: orig, readOnly: !this.mv.options.allowEditingOriginals}, copyObj(options)));
-
-      this.diff = getDiff(asString(orig), asString(options.value));
-      this.diffOutOfDate = false;
-
-      this.showDifferences = options.showDifferences !== false;
-      this.forceUpdate = registerUpdate(this);
-      setScrollLock(this, true, false);
-      registerScroll(this);
-    },
-    setShowDifferences: function(val) {
-      val = val !== false;
-      if (val != this.showDifferences) {
-        this.showDifferences = val;
-        this.forceUpdate("full");
-      }
-    }
-  };
-
-  function ensureDiff(dv) {
-    if (dv.diffOutOfDate) {
-      dv.diff = getDiff(dv.orig.getValue(), dv.edit.getValue());
-      dv.diffOutOfDate = false;
-      CodeMirror.signal(dv.edit, "updateDiff", dv.diff);
-    }
-  }
-
-  function registerUpdate(dv) {
-    var edit = {from: 0, to: 0, marked: []};
-    var orig = {from: 0, to: 0, marked: []};
-    var debounceChange;
-    function update(mode) {
-      if (mode == "full") {
-        if (dv.svg) clear(dv.svg);
-        if (dv.copyButtons) clear(dv.copyButtons);
-        clearMarks(dv.edit, edit.marked, dv.classes);
-        clearMarks(dv.orig, orig.marked, dv.classes);
-        edit.from = edit.to = orig.from = orig.to = 0;
-      }
-      ensureDiff(dv);
-      if (dv.showDifferences) {
-        updateMarks(dv.edit, dv.diff, edit, DIFF_INSERT, dv.classes);
-        updateMarks(dv.orig, dv.diff, orig, DIFF_DELETE, dv.classes);
-      }
-      makeConnections(dv);
-    }
-    function set(slow) {
-      clearTimeout(debounceChange);
-      debounceChange = setTimeout(update, slow == true ? 250 : 100);
-    }
-    function change() {
-      if (!dv.diffOutOfDate) {
-        dv.diffOutOfDate = true;
-        edit.from = edit.to = orig.from = orig.to = 0;
-      }
-      set(true);
-    }
-    dv.edit.on("change", change);
-    dv.orig.on("change", change);
-    dv.edit.on("markerAdded", set);
-    dv.edit.on("markerCleared", set);
-    dv.orig.on("markerAdded", set);
-    dv.orig.on("markerCleared", set);
-    dv.edit.on("viewportChange", set);
-    dv.orig.on("viewportChange", set);
-    update();
-    return update;
-  }
-
-  function registerScroll(dv) {
-    dv.edit.on("scroll", function() {
-      syncScroll(dv, DIFF_INSERT) && makeConnections(dv);
-    });
-    dv.orig.on("scroll", function() {
-      syncScroll(dv, DIFF_DELETE) && makeConnections(dv);
-    });
-  }
-
-  function syncScroll(dv, type) {
-    // Change handler will do a refresh after a timeout when diff is out of date
-    if (dv.diffOutOfDate) return false;
-    if (!dv.lockScroll) return true;
-    var editor, other, now = +new Date;
-    if (type == DIFF_INSERT) { editor = dv.edit; other = dv.orig; }
-    else { editor = dv.orig; other = dv.edit; }
-    // Don't take action if the position of this editor was recently set
-    // (to prevent feedback loops)
-    if (editor.state.scrollSetBy == dv && (editor.state.scrollSetAt || 0) + 50 > now) return false;
-
-    var sInfo = editor.getScrollInfo();
-    if (dv.mv.options.connect == "align") {
-      targetPos = sInfo.top;
-    } else {
-      var halfScreen = .5 * sInfo.clientHeight, midY = sInfo.top + halfScreen;
-      var mid = editor.lineAtHeight(midY, "local");
-      var around = chunkBoundariesAround(dv.diff, mid, type == DIFF_INSERT);
-      var off = getOffsets(editor, type == DIFF_INSERT ? around.edit : around.orig);
-      var offOther = getOffsets(other, type == DIFF_INSERT ? around.orig : around.edit);
-      var ratio = (midY - off.top) / (off.bot - off.top);
-      var targetPos = (offOther.top - halfScreen) + ratio * (offOther.bot - offOther.top);
-
-      var botDist, mix;
-      // Some careful tweaking to make sure no space is left out of view
-      // when scrolling to top or bottom.
-      if (targetPos > sInfo.top && (mix = sInfo.top / halfScreen) < 1) {
-        targetPos = targetPos * mix + sInfo.top * (1 - mix);
-      } else if ((botDist = sInfo.height - sInfo.clientHeight - sInfo.top) < halfScreen) {
-        var otherInfo = other.getScrollInfo();
-        var botDistOther = otherInfo.height - otherInfo.clientHeight - targetPos;
-        if (botDistOther > botDist && (mix = botDist / halfScreen) < 1)
-          targetPos = targetPos * mix + (otherInfo.height - otherInfo.clientHeight - botDist) * (1 - mix);
-      }
-    }
-
-    other.scrollTo(sInfo.left, targetPos);
-    other.state.scrollSetAt = now;
-    other.state.scrollSetBy = dv;
-    return true;
-  }
-
-  function getOffsets(editor, around) {
-    var bot = around.after;
-    if (bot == null) bot = editor.lastLine() + 1;
-    return {top: editor.heightAtLine(around.before || 0, "local"),
-            bot: editor.heightAtLine(bot, "local")};
-  }
-
-  function setScrollLock(dv, val, action) {
-    dv.lockScroll = val;
-    if (val && action != false) syncScroll(dv, DIFF_INSERT) && makeConnections(dv);
-    dv.lockButton.innerHTML = val ? "\u21db\u21da" : "\u21db&nbsp;&nbsp;\u21da";
-  }
-
-  // Updating the marks for editor content
-
-  function clearMarks(editor, arr, classes) {
-    for (var i = 0; i < arr.length; ++i) {
-      var mark = arr[i];
-      if (mark instanceof CodeMirror.TextMarker) {
-        mark.clear();
-      } else if (mark.parent) {
-        editor.removeLineClass(mark, "background", classes.chunk);
-        editor.removeLineClass(mark, "background", classes.start);
-        editor.removeLineClass(mark, "background", classes.end);
-      }
-    }
-    arr.length = 0;
-  }
-
-  // FIXME maybe add a margin around viewport to prevent too many updates
-  function updateMarks(editor, diff, state, type, classes) {
-    var vp = editor.getViewport();
-    editor.operation(function() {
-      if (state.from == state.to || vp.from - state.to > 20 || state.from - vp.to > 20) {
-        clearMarks(editor, state.marked, classes);
-        markChanges(editor, diff, type, state.marked, vp.from, vp.to, classes);
-        state.from = vp.from; state.to = vp.to;
-      } else {
-        if (vp.from < state.from) {
-          markChanges(editor, diff, type, state.marked, vp.from, state.from, classes);
-          state.from = vp.from;
-        }
-        if (vp.to > state.to) {
-          markChanges(editor, diff, type, state.marked, state.to, vp.to, classes);
-          state.to = vp.to;
-        }
-      }
-    });
-  }
-
-  function markChanges(editor, diff, type, marks, from, to, classes) {
-    var pos = Pos(0, 0);
-    var top = Pos(from, 0), bot = editor.clipPos(Pos(to - 1));
-    var cls = type == DIFF_DELETE ? classes.del : classes.insert;
-    function markChunk(start, end) {
-      var bfrom = Math.max(from, start), bto = Math.min(to, end);
-      for (var i = bfrom; i < bto; ++i) {
-        var line = editor.addLineClass(i, "background", classes.chunk);
-        if (i == start) editor.addLineClass(line, "background", classes.start);
-        if (i == end - 1) editor.addLineClass(line, "background", classes.end);
-        marks.push(line);
-      }
-      // When the chunk is empty, make sure a horizontal line shows up
-      if (start == end && bfrom == end && bto == end) {
-        if (bfrom)
-          marks.push(editor.addLineClass(bfrom - 1, "background", classes.end));
-        else
-          marks.push(editor.addLineClass(bfrom, "background", classes.start));
-      }
-    }
-
-    var chunkStart = 0;
-    for (var i = 0; i < diff.length; ++i) {
-      var part = diff[i], tp = part[0], str = part[1];
-      if (tp == DIFF_EQUAL) {
-        var cleanFrom = pos.line + (startOfLineClean(diff, i) ? 0 : 1);
-        moveOver(pos, str);
-        var cleanTo = pos.line + (endOfLineClean(diff, i) ? 1 : 0);
-        if (cleanTo > cleanFrom) {
-          if (i) markChunk(chunkStart, cleanFrom);
-          chunkStart = cleanTo;
-        }
-      } else {
-        if (tp == type) {
-          var end = moveOver(pos, str, true);
-          var a = posMax(top, pos), b = posMin(bot, end);
-          if (!posEq(a, b))
-            marks.push(editor.markText(a, b, {className: cls}));
-          pos = end;
-        }
-      }
-    }
-    if (chunkStart <= pos.line) markChunk(chunkStart, pos.line + 1);
-  }
-
-  // Updating the gap between editor and original
-
-  function makeConnections(dv) {
-    if (!dv.showDifferences) return;
-
-    var align = dv.mv.options.connect == "align";
-    if (align) {
-      if (!dv.orig.curOp) return dv.orig.operation(function() {
-        makeConnections(dv);
-      });
-      for (var i = 0; i < dv.aligners.length; i++)
-        dv.aligners[i].clear();
-      dv.aligners.length = 0;
-      var extraSpaceAbove = {edit: 0, orig: 0};
-    }
-
-    if (dv.svg) {
-      clear(dv.svg);
-      var w = dv.gap.offsetWidth;
-      attrs(dv.svg, "width", w, "height", dv.gap.offsetHeight);
-    }
-    if (dv.copyButtons) clear(dv.copyButtons);
-
-    var vpEdit = dv.edit.getViewport(), vpOrig = dv.orig.getViewport();
-    var sTopEdit = dv.edit.getScrollInfo().top, sTopOrig = dv.orig.getScrollInfo().top;
-    iterateChunks(dv.diff, function(topOrig, botOrig, topEdit, botEdit) {
-      if (topEdit <= vpEdit.to && botEdit >= vpEdit.from &&
-          topOrig <= vpOrig.to && botOrig >= vpOrig.from)
-        drawConnectorsForChunk(dv, topOrig, botOrig, topEdit, botEdit, sTopOrig, sTopEdit, w);
-      if (align && (topEdit <= vpEdit.to || topOrig <= vpOrig.to)) {
-        var above = (botEdit < vpEdit.from && botOrig < vpOrig.from);
-        alignChunks(dv, topOrig, botOrig, topEdit, botEdit, above && extraSpaceAbove);
-      }
-    });
-    if (align) {
-      if (extraSpaceAbove.edit)
-        dv.aligners.push(padBelow(dv.edit, 0, extraSpaceAbove.edit));
-      if (extraSpaceAbove.orig)
-        dv.aligners.push(padBelow(dv.orig, 0, extraSpaceAbove.orig));
-    }
-  }
-
-  function drawConnectorsForChunk(dv, topOrig, botOrig, topEdit, botEdit, sTopOrig, sTopEdit, w) {
-    var flip = dv.type == "left";
-    var top = dv.orig.heightAtLine(topOrig, "local") - sTopOrig;
-    if (dv.svg) {
-      var topLpx = top;
-      var topRpx = dv.edit.heightAtLine(topEdit, "local") - sTopEdit;
-      if (flip) { var tmp = topLpx; topLpx = topRpx; topRpx = tmp; }
-      var botLpx = dv.orig.heightAtLine(botOrig, "local") - sTopOrig;
-      var botRpx = dv.edit.heightAtLine(botEdit, "local") - sTopEdit;
-      if (flip) { var tmp = botLpx; botLpx = botRpx; botRpx = tmp; }
-      var curveTop = " C " + w/2 + " " + topRpx + " " + w/2 + " " + topLpx + " " + (w + 2) + " " + topLpx;
-      var curveBot = " C " + w/2 + " " + botLpx + " " + w/2 + " " + botRpx + " -1 " + botRpx;
-      attrs(dv.svg.appendChild(document.createElementNS(svgNS, "path")),
-            "d", "M -1 " + topRpx + curveTop + " L " + (w + 2) + " " + botLpx + curveBot + " z",
-            "class", dv.classes.connect);
-    }
-    if (dv.copyButtons) {
-      var copy = dv.copyButtons.appendChild(elt("div", dv.type == "left" ? "\u21dd" : "\u21dc",
-                                                "CodeMirror-merge-copy"));
-      var editOriginals = dv.mv.options.allowEditingOriginals;
-      copy.title = editOriginals ? "Push to left" : "Revert chunk";
-      copy.chunk = {topEdit: topEdit, botEdit: botEdit, topOrig: topOrig, botOrig: botOrig};
-      copy.style.top = top + "px";
-
-      if (editOriginals) {
-        var topReverse = dv.orig.heightAtLine(topEdit, "local") - sTopEdit;
-        var copyReverse = dv.copyButtons.appendChild(elt("div", dv.type == "right" ? "\u21dd" : "\u21dc",
-                                                         "CodeMirror-merge-copy-reverse"));
-        copyReverse.title = "Push to right";
-        copyReverse.chunk = {topEdit: topOrig, botEdit: botOrig, topOrig: topEdit, botOrig: botEdit};
-        copyReverse.style.top = topReverse + "px";
-        dv.type == "right" ? copyReverse.style.left = "2px" : copyReverse.style.right = "2px";
-      }
-    }
-  }
-
-  function alignChunks(dv, topOrig, botOrig, topEdit, botEdit, aboveViewport) {
-    var topOrigPx = dv.orig.heightAtLine(topOrig, "local");
-    var botOrigPx = dv.orig.heightAtLine(botOrig, "local");
-    var topEditPx = dv.edit.heightAtLine(topEdit, "local");
-    var botEditPx = dv.edit.heightAtLine(botEdit, "local");
-    var origH = botOrigPx -topOrigPx, editH = botEditPx - topEditPx;
-    var diff = editH - origH;
-    if (diff > 1) {
-      if (aboveViewport) aboveViewport.orig += diff;
-      else dv.aligners.push(padBelow(dv.orig, botOrig - 1, diff));
-    } else if (diff < -1) {
-      if (aboveViewport) aboveViewport.edit -= diff;
-      else dv.aligners.push(padBelow(dv.edit, botEdit - 1, -diff));
-    }
-    return 0;
-  }
-
-  function padBelow(cm, line, size) {
-    var elt = document.createElement("div");
-    elt.style.height = size + "px"; elt.style.minWidth = "1px";
-    return cm.addLineWidget(line, elt, {height: size});
-  }
-
-  function copyChunk(dv, to, from, chunk) {
-    if (dv.diffOutOfDate) return;
-    to.replaceRange(from.getRange(Pos(chunk.topOrig, 0), Pos(chunk.botOrig, 0)),
-                         Pos(chunk.topEdit, 0), Pos(chunk.botEdit, 0));
-  }
-
-  // Merge view, containing 0, 1, or 2 diff views.
-
-  var MergeView = CodeMirror.MergeView = function(node, options) {
-    if (!(this instanceof MergeView)) return new MergeView(node, options);
-
-    this.options = options;
-    var origLeft = options.origLeft, origRight = options.origRight == null ? options.orig : options.origRight;
-    if (origLeft && origRight) {
-      if (options.connect == "align")
-        throw new Error("connect: \"align\" is not supported for three-way merge views");
-      if (options.collapseIdentical)
-        throw new Error("collapseIdentical option is not supported for three-way merge views");
-    }
-
-    var hasLeft = origLeft != null, hasRight = origRight != null;
-    var panes = 1 + (hasLeft ? 1 : 0) + (hasRight ? 1 : 0);
-    var wrap = [], left = this.left = null, right = this.right = null;
-
-    if (hasLeft) {
-      left = this.left = new DiffView(this, "left");
-      var leftPane = elt("div", null, "CodeMirror-merge-pane");
-      wrap.push(leftPane);
-      wrap.push(buildGap(left));
-    }
-
-    var editPane = elt("div", null, "CodeMirror-merge-pane");
-    wrap.push(editPane);
-
-    if (hasRight) {
-      right = this.right = new DiffView(this, "right");
-      wrap.push(buildGap(right));
-      var rightPane = elt("div", null, "CodeMirror-merge-pane");
-      wrap.push(rightPane);
-    }
-
-    (hasRight ? rightPane : editPane).className += " CodeMirror-merge-pane-rightmost";
-
-    wrap.push(elt("div", null, null, "height: 0; clear: both;"));
-
-    var wrapElt = this.wrap = node.appendChild(elt("div", wrap, "CodeMirror-merge CodeMirror-merge-" + panes + "pane"));
-    this.edit = CodeMirror(editPane, copyObj(options));
-
-    if (left) left.init(leftPane, origLeft, options);
-    if (right) right.init(rightPane, origRight, options);
-
-    if (options.collapseIdentical)
-      collapseIdenticalStretches(left || right, options.collapseIdentical);
-
-    var onResize = function() {
-      if (left) makeConnections(left);
-      if (right) makeConnections(right);
-    };
-    CodeMirror.on(window, "resize", onResize);
-    var resizeInterval = setInterval(function() {
-      for (var p = wrapElt.parentNode; p && p != document.body; p = p.parentNode) {}
-      if (!p) { clearInterval(resizeInterval); CodeMirror.off(window, "resize", onResize); }
-    }, 5000);
-  };
-
-  function buildGap(dv) {
-    var lock = dv.lockButton = elt("div", null, "CodeMirror-merge-scrolllock");
-    lock.title = "Toggle locked scrolling";
-    var lockWrap = elt("div", [lock], "CodeMirror-merge-scrolllock-wrap");
-    CodeMirror.on(lock, "click", function() { setScrollLock(dv, !dv.lockScroll); });
-    var gapElts = [lockWrap];
-    if (dv.mv.options.revertButtons !== false) {
-      dv.copyButtons = elt("div", null, "CodeMirror-merge-copybuttons-" + dv.type);
-      CodeMirror.on(dv.copyButtons, "click", function(e) {
-        var node = e.target || e.srcElement;
-        if (!node.chunk) return;
-        if (node.className == "CodeMirror-merge-copy-reverse") {
-          copyChunk(dv, dv.orig, dv.edit, node.chunk);
-          return;
-        }
-        copyChunk(dv, dv.edit, dv.orig, node.chunk);
-      });
-      gapElts.unshift(dv.copyButtons);
-    }
-    if (dv.mv.options.connect != "align") {
-      var svg = document.createElementNS && document.createElementNS(svgNS, "svg");
-      if (svg && !svg.createSVGRect) svg = null;
-      dv.svg = svg;
-      if (svg) gapElts.push(svg);
-    }
-
-    return dv.gap = elt("div", gapElts, "CodeMirror-merge-gap");
-  }
-
-  MergeView.prototype = {
-    constuctor: MergeView,
-    editor: function() { return this.edit; },
-    rightOriginal: function() { return this.right && this.right.orig; },
-    leftOriginal: function() { return this.left && this.left.orig; },
-    setShowDifferences: function(val) {
-      if (this.right) this.right.setShowDifferences(val);
-      if (this.left) this.left.setShowDifferences(val);
-    },
-    rightChunks: function() {
-      return this.right && getChunks(this.right);
-    },
-    leftChunks: function() {
-      return this.left && getChunks(this.left);
-    }
-  };
-
-  function asString(obj) {
-    if (typeof obj == "string") return obj;
-    else return obj.getValue();
-  }
-
-  // Operations on diffs
-
-  var dmp = new diff_match_patch();
-  function getDiff(a, b) {
-    var diff = dmp.diff_main(a, b);
-    dmp.diff_cleanupSemantic(diff);
-    // The library sometimes leaves in empty parts, which confuse the algorithm
-    for (var i = 0; i < diff.length; ++i) {
-      var part = diff[i];
-      if (!part[1]) {
-        diff.splice(i--, 1);
-      } else if (i && diff[i - 1][0] == part[0]) {
-        diff.splice(i--, 1);
-        diff[i][1] += part[1];
-      }
-    }
-    return diff;
-  }
-
-  function iterateChunks(diff, f) {
-    var startEdit = 0, startOrig = 0;
-    var edit = Pos(0, 0), orig = Pos(0, 0);
-    for (var i = 0; i < diff.length; ++i) {
-      var part = diff[i], tp = part[0];
-      if (tp == DIFF_EQUAL) {
-        var startOff = startOfLineClean(diff, i) ? 0 : 1;
-        var cleanFromEdit = edit.line + startOff, cleanFromOrig = orig.line + startOff;
-        moveOver(edit, part[1], null, orig);
-        var endOff = endOfLineClean(diff, i) ? 1 : 0;
-        var cleanToEdit = edit.line + endOff, cleanToOrig = orig.line + endOff;
-        if (cleanToEdit > cleanFromEdit) {
-          if (i) f(startOrig, cleanFromOrig, startEdit, cleanFromEdit);
-          startEdit = cleanToEdit; startOrig = cleanToOrig;
-        }
-      } else {
-        moveOver(tp == DIFF_INSERT ? edit : orig, part[1]);
-      }
-    }
-    if (startEdit <= edit.line || startOrig <= orig.line)
-      f(startOrig, orig.line + 1, startEdit, edit.line + 1);
-  }
-
-  function getChunks(dv) {
-    ensureDiff(dv);
-    var collect = [];
-    iterateChunks(dv.diff, function(topOrig, botOrig, topEdit, botEdit) {
-      collect.push({origFrom: topOrig, origTo: botOrig,
-                    editFrom: topEdit, editTo: botEdit});
-    });
-    return collect;
-  }
-
-  function endOfLineClean(diff, i) {
-    if (i == diff.length - 1) return true;
-    var next = diff[i + 1][1];
-    if (next.length == 1 || next.charCodeAt(0) != 10) return false;
-    if (i == diff.length - 2) return true;
-    next = diff[i + 2][1];
-    return next.length > 1 && next.charCodeAt(0) == 10;
-  }
-
-  function startOfLineClean(diff, i) {
-    if (i == 0) return true;
-    var last = diff[i - 1][1];
-    if (last.charCodeAt(last.length - 1) != 10) return false;
-    if (i == 1) return true;
-    last = diff[i - 2][1];
-    return last.charCodeAt(last.length - 1) == 10;
-  }
-
-  function chunkBoundariesAround(diff, n, nInEdit) {
-    var beforeE, afterE, beforeO, afterO;
-    iterateChunks(diff, function(fromOrig, toOrig, fromEdit, toEdit) {
-      var fromLocal = nInEdit ? fromEdit : fromOrig;
-      var toLocal = nInEdit ? toEdit : toOrig;
-      if (afterE == null) {
-        if (fromLocal > n) { afterE = fromEdit; afterO = fromOrig; }
-        else if (toLocal > n) { afterE = toEdit; afterO = toOrig; }
-      }
-      if (toLocal <= n) { beforeE = toEdit; beforeO = toOrig; }
-      else if (fromLocal <= n) { beforeE = fromEdit; beforeO = fromOrig; }
-    });
-    return {edit: {before: beforeE, after: afterE}, orig: {before: beforeO, after: afterO}};
-  }
-
-  function collapseSingle(cm, from, to) {
-    cm.addLineClass(from, "wrap", "CodeMirror-merge-collapsed-line");
-    var widget = document.createElement("span");
-    widget.className = "CodeMirror-merge-collapsed-widget";
-    widget.title = "Identical text collapsed. Click to expand.";
-    var mark = cm.markText(Pos(from, 0), Pos(to - 1), {
-      inclusiveLeft: true,
-      inclusiveRight: true,
-      replacedWith: widget,
-      clearOnEnter: true
-    });
-    function clear() {
-      mark.clear();
-      cm.removeLineClass(from, "wrap", "CodeMirror-merge-collapsed-line");
-    }
-    widget.addEventListener("click", clear);
-    return {mark: mark, clear: clear};
-  }
-
-  function collapseStretch(dv, origStart, editStart, size) {
-    var mOrig = collapseSingle(dv.orig, origStart, origStart + size);
-    var mEdit = collapseSingle(dv.edit, editStart, editStart + size);
-    mOrig.mark.on("clear", function() { mEdit.clear(); });
-    mEdit.mark.on("clear", function() { mOrig.clear(); });
-  }
-
-  function collapseIdenticalStretches(dv, margin) {
-    if (typeof margin != "number") margin = 2;
-    var lastOrig = dv.orig.firstLine(), lastEdit = dv.edit.firstLine();
-    iterateChunks(dv.diff, function(topOrig, botOrig, _topEdit, botEdit) {
-      var identicalSize = topOrig - margin - lastOrig;
-      if (identicalSize > margin)
-        collapseStretch(dv, lastOrig, lastEdit, identicalSize);
-      lastOrig = botOrig + margin; lastEdit = botEdit + margin;
-    });
-    var bottomSize = dv.orig.lastLine() + 1 - lastOrig;
-    if (bottomSize > margin)
-      collapseStretch(dv, lastOrig, lastEdit, bottomSize);
-  }
-
-  // General utilities
-
-  function elt(tag, content, className, style) {
-    var e = document.createElement(tag);
-    if (className) e.className = className;
-    if (style) e.style.cssText = style;
-    if (typeof content == "string") e.appendChild(document.createTextNode(content));
-    else if (content) for (var i = 0; i < content.length; ++i) e.appendChild(content[i]);
-    return e;
-  }
-
-  function clear(node) {
-    for (var count = node.childNodes.length; count > 0; --count)
-      node.removeChild(node.firstChild);
-  }
-
-  function attrs(elt) {
-    for (var i = 1; i < arguments.length; i += 2)
-      elt.setAttribute(arguments[i], arguments[i+1]);
-  }
-
-  function copyObj(obj, target) {
-    if (!target) target = {};
-    for (var prop in obj) if (obj.hasOwnProperty(prop)) target[prop] = obj[prop];
-    return target;
-  }
-
-  function moveOver(pos, str, copy, other) {
-    var out = copy ? Pos(pos.line, pos.ch) : pos, at = 0;
-    for (;;) {
-      var nl = str.indexOf("\n", at);
-      if (nl == -1) break;
-      ++out.line;
-      if (other) ++other.line;
-      at = nl + 1;
-    }
-    out.ch = (at ? 0 : out.ch) + (str.length - at);
-    if (other) other.ch = (at ? 0 : other.ch) + (str.length - at);
-    return out;
-  }
-
-  function posMin(a, b) { return (a.line - b.line || a.ch - b.ch) < 0 ? a : b; }
-  function posMax(a, b) { return (a.line - b.line || a.ch - b.ch) > 0 ? a : b; }
-  function posEq(a, b) { return a.line == b.line && a.ch == b.ch; }
-});
diff --git a/public/js/lib/codemirror/addon/mode/loadmode.js b/public/js/lib/codemirror/addon/mode/loadmode.js
deleted file mode 100644
index 10117ec..0000000
--- a/public/js/lib/codemirror/addon/mode/loadmode.js
+++ /dev/null
@@ -1,64 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"), "cjs");
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], function(CM) { mod(CM, "amd"); });
-  else // Plain browser env
-    mod(CodeMirror, "plain");
-})(function(CodeMirror, env) {
-  if (!CodeMirror.modeURL) CodeMirror.modeURL = "../mode/%N/%N.js";
-
-  var loading = {};
-  function splitCallback(cont, n) {
-    var countDown = n;
-    return function() { if (--countDown == 0) cont(); };
-  }
-  function ensureDeps(mode, cont) {
-    var deps = CodeMirror.modes[mode].dependencies;
-    if (!deps) return cont();
-    var missing = [];
-    for (var i = 0; i < deps.length; ++i) {
-      if (!CodeMirror.modes.hasOwnProperty(deps[i]))
-        missing.push(deps[i]);
-    }
-    if (!missing.length) return cont();
-    var split = splitCallback(cont, missing.length);
-    for (var i = 0; i < missing.length; ++i)
-      CodeMirror.requireMode(missing[i], split);
-  }
-
-  CodeMirror.requireMode = function(mode, cont) {
-    if (typeof mode != "string") mode = mode.name;
-    if (CodeMirror.modes.hasOwnProperty(mode)) return ensureDeps(mode, cont);
-    if (loading.hasOwnProperty(mode)) return loading[mode].push(cont);
-
-    var file = CodeMirror.modeURL.replace(/%N/g, mode);
-    if (env == "plain") {
-      var script = document.createElement("script");
-      script.src = file;
-      var others = document.getElementsByTagName("script")[0];
-      var list = loading[mode] = [cont];
-      CodeMirror.on(script, "load", function() {
-        ensureDeps(mode, function() {
-          for (var i = 0; i < list.length; ++i) list[i]();
-        });
-      });
-      others.parentNode.insertBefore(script, others);
-    } else if (env == "cjs") {
-      require(file);
-      cont();
-    } else if (env == "amd") {
-      requirejs([file], cont);
-    }
-  };
-
-  CodeMirror.autoLoadMode = function(instance, mode) {
-    if (!CodeMirror.modes.hasOwnProperty(mode))
-      CodeMirror.requireMode(mode, function() {
-        instance.setOption("mode", instance.getOption("mode"));
-      });
-  };
-});
diff --git a/public/js/lib/codemirror/addon/mode/multiplex.js b/public/js/lib/codemirror/addon/mode/multiplex.js
deleted file mode 100644
index 6a95b32..0000000
--- a/public/js/lib/codemirror/addon/mode/multiplex.js
+++ /dev/null
@@ -1,118 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.multiplexingMode = function(outer /*, others */) {
-  // Others should be {open, close, mode [, delimStyle] [, innerStyle]} objects
-  var others = Array.prototype.slice.call(arguments, 1);
-  var n_others = others.length;
-
-  function indexOf(string, pattern, from) {
-    if (typeof pattern == "string") return string.indexOf(pattern, from);
-    var m = pattern.exec(from ? string.slice(from) : string);
-    return m ? m.index + from : -1;
-  }
-
-  return {
-    startState: function() {
-      return {
-        outer: CodeMirror.startState(outer),
-        innerActive: null,
-        inner: null
-      };
-    },
-
-    copyState: function(state) {
-      return {
-        outer: CodeMirror.copyState(outer, state.outer),
-        innerActive: state.innerActive,
-        inner: state.innerActive && CodeMirror.copyState(state.innerActive.mode, state.inner)
-      };
-    },
-
-    token: function(stream, state) {
-      if (!state.innerActive) {
-        var cutOff = Infinity, oldContent = stream.string;
-        for (var i = 0; i < n_others; ++i) {
-          var other = others[i];
-          var found = indexOf(oldContent, other.open, stream.pos);
-          if (found == stream.pos) {
-            stream.match(other.open);
-            state.innerActive = other;
-            state.inner = CodeMirror.startState(other.mode, outer.indent ? outer.indent(state.outer, "") : 0);
-            return other.delimStyle;
-          } else if (found != -1 && found < cutOff) {
-            cutOff = found;
-          }
-        }
-        if (cutOff != Infinity) stream.string = oldContent.slice(0, cutOff);
-        var outerToken = outer.token(stream, state.outer);
-        if (cutOff != Infinity) stream.string = oldContent;
-        return outerToken;
-      } else {
-        var curInner = state.innerActive, oldContent = stream.string;
-        if (!curInner.close && stream.sol()) {
-          state.innerActive = state.inner = null;
-          return this.token(stream, state);
-        }
-        var found = curInner.close ? indexOf(oldContent, curInner.close, stream.pos) : -1;
-        if (found == stream.pos) {
-          stream.match(curInner.close);
-          state.innerActive = state.inner = null;
-          return curInner.delimStyle;
-        }
-        if (found > -1) stream.string = oldContent.slice(0, found);
-        var innerToken = curInner.mode.token(stream, state.inner);
-        if (found > -1) stream.string = oldContent;
-
-        if (curInner.innerStyle) {
-          if (innerToken) innerToken = innerToken + ' ' + curInner.innerStyle;
-          else innerToken = curInner.innerStyle;
-        }
-
-        return innerToken;
-      }
-    },
-
-    indent: function(state, textAfter) {
-      var mode = state.innerActive ? state.innerActive.mode : outer;
-      if (!mode.indent) return CodeMirror.Pass;
-      return mode.indent(state.innerActive ? state.inner : state.outer, textAfter);
-    },
-
-    blankLine: function(state) {
-      var mode = state.innerActive ? state.innerActive.mode : outer;
-      if (mode.blankLine) {
-        mode.blankLine(state.innerActive ? state.inner : state.outer);
-      }
-      if (!state.innerActive) {
-        for (var i = 0; i < n_others; ++i) {
-          var other = others[i];
-          if (other.open === "\n") {
-            state.innerActive = other;
-            state.inner = CodeMirror.startState(other.mode, mode.indent ? mode.indent(state.outer, "") : 0);
-          }
-        }
-      } else if (state.innerActive.close === "\n") {
-        state.innerActive = state.inner = null;
-      }
-    },
-
-    electricChars: outer.electricChars,
-
-    innerMode: function(state) {
-      return state.inner ? {state: state.inner, mode: state.innerActive.mode} : {state: state.outer, mode: outer};
-    }
-  };
-};
-
-});
diff --git a/public/js/lib/codemirror/addon/mode/multiplex_test.js b/public/js/lib/codemirror/addon/mode/multiplex_test.js
deleted file mode 100644
index d339434..0000000
--- a/public/js/lib/codemirror/addon/mode/multiplex_test.js
+++ /dev/null
@@ -1,33 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function() {
-  CodeMirror.defineMode("markdown_with_stex", function(){
-    var inner = CodeMirror.getMode({}, "stex");
-    var outer = CodeMirror.getMode({}, "markdown");
-
-    var innerOptions = {
-      open: '$',
-      close: '$',
-      mode: inner,
-      delimStyle: 'delim',
-      innerStyle: 'inner'
-    };
-
-    return CodeMirror.multiplexingMode(outer, innerOptions);
-  });
-
-  var mode = CodeMirror.getMode({}, "markdown_with_stex");
-
-  function MT(name) {
-    test.mode(
-      name,
-      mode,
-      Array.prototype.slice.call(arguments, 1),
-      'multiplexing');
-  }
-
-  MT(
-    "stexInsideMarkdown",
-    "[strong **Equation:**] [delim $][inner&tag \\pi][delim $]");
-})();
diff --git a/public/js/lib/codemirror/addon/mode/overlay.js b/public/js/lib/codemirror/addon/mode/overlay.js
deleted file mode 100644
index e1b9ed3..0000000
--- a/public/js/lib/codemirror/addon/mode/overlay.js
+++ /dev/null
@@ -1,85 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// Utility function that allows modes to be combined. The mode given
-// as the base argument takes care of most of the normal mode
-// functionality, but a second (typically simple) mode is used, which
-// can override the style of text. Both modes get to parse all of the
-// text, but when both assign a non-null style to a piece of code, the
-// overlay wins, unless the combine argument was true and not overridden,
-// or state.overlay.combineTokens was true, in which case the styles are
-// combined.
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.overlayMode = function(base, overlay, combine) {
-  return {
-    startState: function() {
-      return {
-        base: CodeMirror.startState(base),
-        overlay: CodeMirror.startState(overlay),
-        basePos: 0, baseCur: null,
-        overlayPos: 0, overlayCur: null,
-        streamSeen: null
-      };
-    },
-    copyState: function(state) {
-      return {
-        base: CodeMirror.copyState(base, state.base),
-        overlay: CodeMirror.copyState(overlay, state.overlay),
-        basePos: state.basePos, baseCur: null,
-        overlayPos: state.overlayPos, overlayCur: null
-      };
-    },
-
-    token: function(stream, state) {
-      if (stream != state.streamSeen ||
-          Math.min(state.basePos, state.overlayPos) < stream.start) {
-        state.streamSeen = stream;
-        state.basePos = state.overlayPos = stream.start;
-      }
-
-      if (stream.start == state.basePos) {
-        state.baseCur = base.token(stream, state.base);
-        state.basePos = stream.pos;
-      }
-      if (stream.start == state.overlayPos) {
-        stream.pos = stream.start;
-        state.overlayCur = overlay.token(stream, state.overlay);
-        state.overlayPos = stream.pos;
-      }
-      stream.pos = Math.min(state.basePos, state.overlayPos);
-
-      // state.overlay.combineTokens always takes precedence over combine,
-      // unless set to null
-      if (state.overlayCur == null) return state.baseCur;
-      else if (state.baseCur != null &&
-               state.overlay.combineTokens ||
-               combine && state.overlay.combineTokens == null)
-        return state.baseCur + " " + state.overlayCur;
-      else return state.overlayCur;
-    },
-
-    indent: base.indent && function(state, textAfter) {
-      return base.indent(state.base, textAfter);
-    },
-    electricChars: base.electricChars,
-
-    innerMode: function(state) { return {state: state.base, mode: base}; },
-
-    blankLine: function(state) {
-      if (base.blankLine) base.blankLine(state.base);
-      if (overlay.blankLine) overlay.blankLine(state.overlay);
-    }
-  };
-};
-
-});
diff --git a/public/js/lib/codemirror/addon/mode/simple.js b/public/js/lib/codemirror/addon/mode/simple.js
deleted file mode 100644
index 0a48a95..0000000
--- a/public/js/lib/codemirror/addon/mode/simple.js
+++ /dev/null
@@ -1,213 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  CodeMirror.defineSimpleMode = function(name, states) {
-    CodeMirror.defineMode(name, function(config) {
-      return CodeMirror.simpleMode(config, states);
-    });
-  };
-
-  CodeMirror.simpleMode = function(config, states) {
-    ensureState(states, "start");
-    var states_ = {}, meta = states.meta || {}, hasIndentation = false;
-    for (var state in states) if (state != meta && states.hasOwnProperty(state)) {
-      var list = states_[state] = [], orig = states[state];
-      for (var i = 0; i < orig.length; i++) {
-        var data = orig[i];
-        list.push(new Rule(data, states));
-        if (data.indent || data.dedent) hasIndentation = true;
-      }
-    }
-    var mode = {
-      startState: function() {
-        return {state: "start", pending: null,
-                local: null, localState: null,
-                indent: hasIndentation ? [] : null};
-      },
-      copyState: function(state) {
-        var s = {state: state.state, pending: state.pending,
-                 local: state.local, localState: null,
-                 indent: state.indent && state.indent.slice(0)};
-        if (state.localState)
-          s.localState = CodeMirror.copyState(state.local.mode, state.localState);
-        if (state.stack)
-          s.stack = state.stack.slice(0);
-        for (var pers = state.persistentStates; pers; pers = pers.next)
-          s.persistentStates = {mode: pers.mode,
-                                spec: pers.spec,
-                                state: pers.state == state.localState ? s.localState : CodeMirror.copyState(pers.mode, pers.state),
-                                next: s.persistentStates};
-        return s;
-      },
-      token: tokenFunction(states_, config),
-      innerMode: function(state) { return state.local && {mode: state.local.mode, state: state.localState}; },
-      indent: indentFunction(states_, meta)
-    };
-    if (meta) for (var prop in meta) if (meta.hasOwnProperty(prop))
-      mode[prop] = meta[prop];
-    return mode;
-  };
-
-  function ensureState(states, name) {
-    if (!states.hasOwnProperty(name))
-      throw new Error("Undefined state " + name + "in simple mode");
-  }
-
-  function toRegex(val, caret) {
-    if (!val) return /(?:)/;
-    var flags = "";
-    if (val instanceof RegExp) {
-      if (val.ignoreCase) flags = "i";
-      val = val.source;
-    } else {
-      val = String(val);
-    }
-    return new RegExp((caret === false ? "" : "^") + "(?:" + val + ")", flags);
-  }
-
-  function asToken(val) {
-    if (!val) return null;
-    if (typeof val == "string") return val.replace(/\./g, " ");
-    var result = [];
-    for (var i = 0; i < val.length; i++)
-      result.push(val[i] && val[i].replace(/\./g, " "));
-    return result;
-  }
-
-  function Rule(data, states) {
-    if (data.next || data.push) ensureState(states, data.next || data.push);
-    this.regex = toRegex(data.regex);
-    this.token = asToken(data.token);
-    this.data = data;
-  }
-
-  function tokenFunction(states, config) {
-    return function(stream, state) {
-      if (state.pending) {
-        var pend = state.pending.shift();
-        if (state.pending.length == 0) state.pending = null;
-        stream.pos += pend.text.length;
-        return pend.token;
-      }
-
-      if (state.local) {
-        if (state.local.end && stream.match(state.local.end)) {
-          var tok = state.local.endToken || null;
-          state.local = state.localState = null;
-          return tok;
-        } else {
-          var tok = state.local.mode.token(stream, state.localState), m;
-          if (state.local.endScan && (m = state.local.endScan.exec(stream.current())))
-            stream.pos = stream.start + m.index;
-          return tok;
-        }
-      }
-
-      var curState = states[state.state];
-      for (var i = 0; i < curState.length; i++) {
-        var rule = curState[i];
-        var matches = stream.match(rule.regex);
-        if (matches) {
-          if (rule.data.next) {
-            state.state = rule.data.next;
-          } else if (rule.data.push) {
-            (state.stack || (state.stack = [])).push(state.state);
-            state.state = rule.data.push;
-          } else if (rule.data.pop && state.stack && state.stack.length) {
-            state.state = state.stack.pop();
-          }
-
-          if (rule.data.mode)
-            enterLocalMode(config, state, rule.data.mode, rule.token);
-          if (rule.data.indent)
-            state.indent.push(stream.indentation() + config.indentUnit);
-          if (rule.data.dedent)
-            state.indent.pop();
-          if (matches.length > 2) {
-            state.pending = [];
-            for (var j = 2; j < matches.length; j++)
-              if (matches[j])
-                state.pending.push({text: matches[j], token: rule.token[j - 1]});
-            stream.backUp(matches[0].length - (matches[1] ? matches[1].length : 0));
-            return rule.token[0];
-          } else if (rule.token && rule.token.join) {
-            return rule.token[0];
-          } else {
-            return rule.token;
-          }
-        }
-      }
-      stream.next();
-      return null;
-    };
-  }
-
-  function cmp(a, b) {
-    if (a === b) return true;
-    if (!a || typeof a != "object" || !b || typeof b != "object") return false;
-    var props = 0;
-    for (var prop in a) if (a.hasOwnProperty(prop)) {
-      if (!b.hasOwnProperty(prop) || !cmp(a[prop], b[prop])) return false;
-      props++;
-    }
-    for (var prop in b) if (b.hasOwnProperty(prop)) props--;
-    return props == 0;
-  }
-
-  function enterLocalMode(config, state, spec, token) {
-    var pers;
-    if (spec.persistent) for (var p = state.persistentStates; p && !pers; p = p.next)
-      if (spec.spec ? cmp(spec.spec, p.spec) : spec.mode == p.mode) pers = p;
-    var mode = pers ? pers.mode : spec.mode || CodeMirror.getMode(config, spec.spec);
-    var lState = pers ? pers.state : CodeMirror.startState(mode);
-    if (spec.persistent && !pers)
-      state.persistentStates = {mode: mode, spec: spec.spec, state: lState, next: state.persistentStates};
-
-    state.localState = lState;
-    state.local = {mode: mode,
-                   end: spec.end && toRegex(spec.end),
-                   endScan: spec.end && spec.forceEnd !== false && toRegex(spec.end, false),
-                   endToken: token && token.join ? token[token.length - 1] : token};
-  }
-
-  function indexOf(val, arr) {
-    for (var i = 0; i < arr.length; i++) if (arr[i] === val) return true;
-  }
-
-  function indentFunction(states, meta) {
-    return function(state, textAfter, line) {
-      if (state.local && state.local.mode.indent)
-        return state.local.mode.indent(state.localState, textAfter, line);
-      if (state.indent == null || state.local || meta.dontIndentStates && indexOf(state.state, meta.dontIndentStates) > -1)
-        return CodeMirror.Pass;
-
-      var pos = state.indent.length - 1, rules = states[state.state];
-      scan: for (;;) {
-        for (var i = 0; i < rules.length; i++) {
-          var rule = rules[i];
-          if (rule.data.dedent && rule.data.dedentIfLineStart !== false) {
-            var m = rule.regex.exec(textAfter);
-            if (m && m[0]) {
-              pos--;
-              if (rule.next || rule.push) rules = states[rule.next || rule.push];
-              textAfter = textAfter.slice(m[0].length);
-              continue scan;
-            }
-          }
-        }
-        break;
-      }
-      return pos < 0 ? 0 : state.indent[pos];
-    };
-  }
-});
diff --git a/public/js/lib/codemirror/addon/runmode/colorize.js b/public/js/lib/codemirror/addon/runmode/colorize.js
deleted file mode 100644
index eb7060d..0000000
--- a/public/js/lib/codemirror/addon/runmode/colorize.js
+++ /dev/null
@@ -1,40 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"), require("./runmode"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror", "./runmode"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  var isBlock = /^(p|li|div|h\\d|pre|blockquote|td)$/;
-
-  function textContent(node, out) {
-    if (node.nodeType == 3) return out.push(node.nodeValue);
-    for (var ch = node.firstChild; ch; ch = ch.nextSibling) {
-      textContent(ch, out);
-      if (isBlock.test(node.nodeType)) out.push("\n");
-    }
-  }
-
-  CodeMirror.colorize = function(collection, defaultMode) {
-    if (!collection) collection = document.body.getElementsByTagName("pre");
-
-    for (var i = 0; i < collection.length; ++i) {
-      var node = collection[i];
-      var mode = node.getAttribute("data-lang") || defaultMode;
-      if (!mode) continue;
-
-      var text = [];
-      textContent(node, text);
-      node.innerHTML = "";
-      CodeMirror.runMode(text.join(""), mode, node);
-
-      node.className += " cm-s-default";
-    }
-  };
-});
diff --git a/public/js/lib/codemirror/addon/runmode/runmode-standalone.js b/public/js/lib/codemirror/addon/runmode/runmode-standalone.js
deleted file mode 100644
index f4f352c..0000000
--- a/public/js/lib/codemirror/addon/runmode/runmode-standalone.js
+++ /dev/null
@@ -1,157 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-window.CodeMirror = {};
-
-(function() {
-"use strict";
-
-function splitLines(string){ return string.split(/\r?\n|\r/); };
-
-function StringStream(string) {
-  this.pos = this.start = 0;
-  this.string = string;
-  this.lineStart = 0;
-}
-StringStream.prototype = {
-  eol: function() {return this.pos >= this.string.length;},
-  sol: function() {return this.pos == 0;},
-  peek: function() {return this.string.charAt(this.pos) || null;},
-  next: function() {
-    if (this.pos < this.string.length)
-      return this.string.charAt(this.pos++);
-  },
-  eat: function(match) {
-    var ch = this.string.charAt(this.pos);
-    if (typeof match == "string") var ok = ch == match;
-    else var ok = ch && (match.test ? match.test(ch) : match(ch));
-    if (ok) {++this.pos; return ch;}
-  },
-  eatWhile: function(match) {
-    var start = this.pos;
-    while (this.eat(match)){}
-    return this.pos > start;
-  },
-  eatSpace: function() {
-    var start = this.pos;
-    while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos;
-    return this.pos > start;
-  },
-  skipToEnd: function() {this.pos = this.string.length;},
-  skipTo: function(ch) {
-    var found = this.string.indexOf(ch, this.pos);
-    if (found > -1) {this.pos = found; return true;}
-  },
-  backUp: function(n) {this.pos -= n;},
-  column: function() {return this.start - this.lineStart;},
-  indentation: function() {return 0;},
-  match: function(pattern, consume, caseInsensitive) {
-    if (typeof pattern == "string") {
-      var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;};
-      var substr = this.string.substr(this.pos, pattern.length);
-      if (cased(substr) == cased(pattern)) {
-        if (consume !== false) this.pos += pattern.length;
-        return true;
-      }
-    } else {
-      var match = this.string.slice(this.pos).match(pattern);
-      if (match && match.index > 0) return null;
-      if (match && consume !== false) this.pos += match[0].length;
-      return match;
-    }
-  },
-  current: function(){return this.string.slice(this.start, this.pos);},
-  hideFirstChars: function(n, inner) {
-    this.lineStart += n;
-    try { return inner(); }
-    finally { this.lineStart -= n; }
-  }
-};
-CodeMirror.StringStream = StringStream;
-
-CodeMirror.startState = function (mode, a1, a2) {
-  return mode.startState ? mode.startState(a1, a2) : true;
-};
-
-var modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {};
-CodeMirror.defineMode = function (name, mode) {
-  if (arguments.length > 2)
-    mode.dependencies = Array.prototype.slice.call(arguments, 2);
-  modes[name] = mode;
-};
-CodeMirror.defineMIME = function (mime, spec) { mimeModes[mime] = spec; };
-CodeMirror.resolveMode = function(spec) {
-  if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) {
-    spec = mimeModes[spec];
-  } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) {
-    spec = mimeModes[spec.name];
-  }
-  if (typeof spec == "string") return {name: spec};
-  else return spec || {name: "null"};
-};
-CodeMirror.getMode = function (options, spec) {
-  spec = CodeMirror.resolveMode(spec);
-  var mfactory = modes[spec.name];
-  if (!mfactory) throw new Error("Unknown mode: " + spec);
-  return mfactory(options, spec);
-};
-CodeMirror.registerHelper = CodeMirror.registerGlobalHelper = Math.min;
-CodeMirror.defineMode("null", function() {
-  return {token: function(stream) {stream.skipToEnd();}};
-});
-CodeMirror.defineMIME("text/plain", "null");
-
-CodeMirror.runMode = function (string, modespec, callback, options) {
-  var mode = CodeMirror.getMode({ indentUnit: 2 }, modespec);
-
-  if (callback.nodeType == 1) {
-    var tabSize = (options && options.tabSize) || 4;
-    var node = callback, col = 0;
-    node.innerHTML = "";
-    callback = function (text, style) {
-      if (text == "\n") {
-        node.appendChild(document.createElement("br"));
-        col = 0;
-        return;
-      }
-      var content = "";
-      // replace tabs
-      for (var pos = 0; ;) {
-        var idx = text.indexOf("\t", pos);
-        if (idx == -1) {
-          content += text.slice(pos);
-          col += text.length - pos;
-          break;
-        } else {
-          col += idx - pos;
-          content += text.slice(pos, idx);
-          var size = tabSize - col % tabSize;
-          col += size;
-          for (var i = 0; i < size; ++i) content += " ";
-          pos = idx + 1;
-        }
-      }
-
-      if (style) {
-        var sp = node.appendChild(document.createElement("span"));
-        sp.className = "cm-" + style.replace(/ +/g, " cm-");
-        sp.appendChild(document.createTextNode(content));
-      } else {
-        node.appendChild(document.createTextNode(content));
-      }
-    };
-  }
-
-  var lines = splitLines(string), state = (options && options.state) || CodeMirror.startState(mode);
-  for (var i = 0, e = lines.length; i < e; ++i) {
-    if (i) callback("\n");
-    var stream = new CodeMirror.StringStream(lines[i]);
-    if (!stream.string && mode.blankLine) mode.blankLine(state);
-    while (!stream.eol()) {
-      var style = mode.token(stream, state);
-      callback(stream.current(), style, i, stream.start, state);
-      stream.start = stream.pos;
-    }
-  }
-};
-})();
diff --git a/public/js/lib/codemirror/addon/runmode/runmode.js b/public/js/lib/codemirror/addon/runmode/runmode.js
deleted file mode 100644
index 07d2279..0000000
--- a/public/js/lib/codemirror/addon/runmode/runmode.js
+++ /dev/null
@@ -1,72 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.runMode = function(string, modespec, callback, options) {
-  var mode = CodeMirror.getMode(CodeMirror.defaults, modespec);
-  var ie = /MSIE \d/.test(navigator.userAgent);
-  var ie_lt9 = ie && (document.documentMode == null || document.documentMode < 9);
-
-  if (callback.nodeType == 1) {
-    var tabSize = (options && options.tabSize) || CodeMirror.defaults.tabSize;
-    var node = callback, col = 0;
-    node.innerHTML = "";
-    callback = function(text, style) {
-      if (text == "\n") {
-        // Emitting LF or CRLF on IE8 or earlier results in an incorrect display.
-        // Emitting a carriage return makes everything ok.
-        node.appendChild(document.createTextNode(ie_lt9 ? '\r' : text));
-        col = 0;
-        return;
-      }
-      var content = "";
-      // replace tabs
-      for (var pos = 0;;) {
-        var idx = text.indexOf("\t", pos);
-        if (idx == -1) {
-          content += text.slice(pos);
-          col += text.length - pos;
-          break;
-        } else {
-          col += idx - pos;
-          content += text.slice(pos, idx);
-          var size = tabSize - col % tabSize;
-          col += size;
-          for (var i = 0; i < size; ++i) content += " ";
-          pos = idx + 1;
-        }
-      }
-
-      if (style) {
-        var sp = node.appendChild(document.createElement("span"));
-        sp.className = "cm-" + style.replace(/ +/g, " cm-");
-        sp.appendChild(document.createTextNode(content));
-      } else {
-        node.appendChild(document.createTextNode(content));
-      }
-    };
-  }
-
-  var lines = CodeMirror.splitLines(string), state = (options && options.state) || CodeMirror.startState(mode);
-  for (var i = 0, e = lines.length; i < e; ++i) {
-    if (i) callback("\n");
-    var stream = new CodeMirror.StringStream(lines[i]);
-    if (!stream.string && mode.blankLine) mode.blankLine(state);
-    while (!stream.eol()) {
-      var style = mode.token(stream, state);
-      callback(stream.current(), style, i, stream.start, state);
-      stream.start = stream.pos;
-    }
-  }
-};
-
-});
diff --git a/public/js/lib/codemirror/addon/runmode/runmode.node.js b/public/js/lib/codemirror/addon/runmode/runmode.node.js
deleted file mode 100644
index 8b8140b..0000000
--- a/public/js/lib/codemirror/addon/runmode/runmode.node.js
+++ /dev/null
@@ -1,120 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-/* Just enough of CodeMirror to run runMode under node.js */
-
-// declare global: StringStream
-
-function splitLines(string){ return string.split(/\r?\n|\r/); };
-
-function StringStream(string) {
-  this.pos = this.start = 0;
-  this.string = string;
-  this.lineStart = 0;
-}
-StringStream.prototype = {
-  eol: function() {return this.pos >= this.string.length;},
-  sol: function() {return this.pos == 0;},
-  peek: function() {return this.string.charAt(this.pos) || null;},
-  next: function() {
-    if (this.pos < this.string.length)
-      return this.string.charAt(this.pos++);
-  },
-  eat: function(match) {
-    var ch = this.string.charAt(this.pos);
-    if (typeof match == "string") var ok = ch == match;
-    else var ok = ch && (match.test ? match.test(ch) : match(ch));
-    if (ok) {++this.pos; return ch;}
-  },
-  eatWhile: function(match) {
-    var start = this.pos;
-    while (this.eat(match)){}
-    return this.pos > start;
-  },
-  eatSpace: function() {
-    var start = this.pos;
-    while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos;
-    return this.pos > start;
-  },
-  skipToEnd: function() {this.pos = this.string.length;},
-  skipTo: function(ch) {
-    var found = this.string.indexOf(ch, this.pos);
-    if (found > -1) {this.pos = found; return true;}
-  },
-  backUp: function(n) {this.pos -= n;},
-  column: function() {return this.start - this.lineStart;},
-  indentation: function() {return 0;},
-  match: function(pattern, consume, caseInsensitive) {
-    if (typeof pattern == "string") {
-      var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;};
-      var substr = this.string.substr(this.pos, pattern.length);
-      if (cased(substr) == cased(pattern)) {
-        if (consume !== false) this.pos += pattern.length;
-        return true;
-      }
-    } else {
-      var match = this.string.slice(this.pos).match(pattern);
-      if (match && match.index > 0) return null;
-      if (match && consume !== false) this.pos += match[0].length;
-      return match;
-    }
-  },
-  current: function(){return this.string.slice(this.start, this.pos);},
-  hideFirstChars: function(n, inner) {
-    this.lineStart += n;
-    try { return inner(); }
-    finally { this.lineStart -= n; }
-  }
-};
-exports.StringStream = StringStream;
-
-exports.startState = function(mode, a1, a2) {
-  return mode.startState ? mode.startState(a1, a2) : true;
-};
-
-var modes = exports.modes = {}, mimeModes = exports.mimeModes = {};
-exports.defineMode = function(name, mode) {
-  if (arguments.length > 2)
-    mode.dependencies = Array.prototype.slice.call(arguments, 2);
-  modes[name] = mode;
-};
-exports.defineMIME = function(mime, spec) { mimeModes[mime] = spec; };
-
-exports.defineMode("null", function() {
-  return {token: function(stream) {stream.skipToEnd();}};
-});
-exports.defineMIME("text/plain", "null");
-
-exports.resolveMode = function(spec) {
-  if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) {
-    spec = mimeModes[spec];
-  } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) {
-    spec = mimeModes[spec.name];
-  }
-  if (typeof spec == "string") return {name: spec};
-  else return spec || {name: "null"};
-};
-exports.getMode = function(options, spec) {
-  spec = exports.resolveMode(spec);
-  var mfactory = modes[spec.name];
-  if (!mfactory) throw new Error("Unknown mode: " + spec);
-  return mfactory(options, spec);
-};
-exports.registerHelper = exports.registerGlobalHelper = Math.min;
-
-exports.runMode = function(string, modespec, callback, options) {
-  var mode = exports.getMode({indentUnit: 2}, modespec);
-  var lines = splitLines(string), state = (options && options.state) || exports.startState(mode);
-  for (var i = 0, e = lines.length; i < e; ++i) {
-    if (i) callback("\n");
-    var stream = new exports.StringStream(lines[i]);
-    if (!stream.string && mode.blankLine) mode.blankLine(state);
-    while (!stream.eol()) {
-      var style = mode.token(stream, state);
-      callback(stream.current(), style, i, stream.start, state);
-      stream.start = stream.pos;
-    }
-  }
-};
-
-require.cache[require.resolve("../../lib/codemirror")] = require.cache[require.resolve("./runmode.node")];
diff --git a/public/js/lib/codemirror/addon/scroll/annotatescrollbar.js b/public/js/lib/codemirror/addon/scroll/annotatescrollbar.js
deleted file mode 100644
index 6dfff1a..0000000
--- a/public/js/lib/codemirror/addon/scroll/annotatescrollbar.js
+++ /dev/null
@@ -1,76 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  CodeMirror.defineExtension("annotateScrollbar", function(className) {
-    return new Annotation(this, className);
-  });
-
-  function Annotation(cm, className) {
-    this.cm = cm;
-    this.className = className;
-    this.annotations = [];
-    this.div = cm.getWrapperElement().appendChild(document.createElement("div"));
-    this.div.style.cssText = "position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none";
-    this.computeScale();
-
-    var self = this;
-    cm.on("refresh", this.resizeHandler = function(){
-      if (self.computeScale()) self.redraw();
-    });
-  }
-
-  Annotation.prototype.computeScale = function() {
-    var cm = this.cm;
-    var hScale = (cm.getWrapperElement().clientHeight - cm.display.barHeight) /
-      cm.heightAtLine(cm.lastLine() + 1, "local");
-    if (hScale != this.hScale) {
-      this.hScale = hScale;
-      return true;
-    }
-  };
-
-  Annotation.prototype.update = function(annotations) {
-    this.annotations = annotations;
-    this.redraw();
-  };
-
-  Annotation.prototype.redraw = function() {
-    var cm = this.cm, hScale = this.hScale;
-    if (!cm.display.barWidth) return;
-
-    var frag = document.createDocumentFragment(), anns = this.annotations;
-    for (var i = 0, nextTop; i < anns.length; i++) {
-      var ann = anns[i];
-      var top = nextTop || cm.charCoords(ann.from, "local").top * hScale;
-      var bottom = cm.charCoords(ann.to, "local").bottom * hScale;
-      while (i < anns.length - 1) {
-        nextTop = cm.charCoords(anns[i + 1].from, "local").top * hScale;
-        if (nextTop > bottom + .9) break;
-        ann = anns[++i];
-        bottom = cm.charCoords(ann.to, "local").bottom * hScale;
-      }
-      var height = Math.max(bottom - top, 3);
-
-      var elt = frag.appendChild(document.createElement("div"));
-      elt.style.cssText = "position: absolute; right: 0px; width: " + Math.max(cm.display.barWidth - 1, 2) + "px; top: " + top + "px; height: " + height + "px";
-      elt.className = this.className;
-    }
-    this.div.textContent = "";
-    this.div.appendChild(frag);
-  };
-
-  Annotation.prototype.clear = function() {
-    this.cm.off("refresh", this.resizeHandler);
-    this.div.parentNode.removeChild(this.div);
-  };
-});
diff --git a/public/js/lib/codemirror/addon/scroll/scrollpastend.js b/public/js/lib/codemirror/addon/scroll/scrollpastend.js
deleted file mode 100644
index 008ae4c..0000000
--- a/public/js/lib/codemirror/addon/scroll/scrollpastend.js
+++ /dev/null
@@ -1,46 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  CodeMirror.defineOption("scrollPastEnd", false, function(cm, val, old) {
-    if (old && old != CodeMirror.Init) {
-      cm.off("change", onChange);
-      cm.off("refresh", updateBottomMargin);
-      cm.display.lineSpace.parentNode.style.paddingBottom = "";
-      cm.state.scrollPastEndPadding = null;
-    }
-    if (val) {
-      cm.on("change", onChange);
-      cm.on("refresh", updateBottomMargin);
-      updateBottomMargin(cm);
-    }
-  });
-
-  function onChange(cm, change) {
-    if (CodeMirror.changeEnd(change).line == cm.lastLine())
-      updateBottomMargin(cm);
-  }
-
-  function updateBottomMargin(cm) {
-    var padding = "";
-    if (cm.lineCount() > 1) {
-      var totalH = cm.display.scroller.clientHeight - 30,
-          lastLineH = cm.getLineHandle(cm.lastLine()).height;
-      padding = (totalH - lastLineH) + "px";
-    }
-    if (cm.state.scrollPastEndPadding != padding) {
-      cm.state.scrollPastEndPadding = padding;
-      cm.display.lineSpace.parentNode.style.paddingBottom = padding;
-      cm.setSize();
-    }
-  }
-});
diff --git a/public/js/lib/codemirror/addon/scroll/simplescrollbars.css b/public/js/lib/codemirror/addon/scroll/simplescrollbars.css
deleted file mode 100644
index 5eea7aa..0000000
--- a/public/js/lib/codemirror/addon/scroll/simplescrollbars.css
+++ /dev/null
@@ -1,66 +0,0 @@
-.CodeMirror-simplescroll-horizontal div, .CodeMirror-simplescroll-vertical div {
-  position: absolute;
-  background: #ccc;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-  border: 1px solid #bbb;
-  border-radius: 2px;
-}
-
-.CodeMirror-simplescroll-horizontal, .CodeMirror-simplescroll-vertical {
-  position: absolute;
-  z-index: 6;
-  background: #eee;
-}
-
-.CodeMirror-simplescroll-horizontal {
-  bottom: 0; left: 0;
-  height: 8px;
-}
-.CodeMirror-simplescroll-horizontal div {
-  bottom: 0;
-  height: 100%;
-}
-
-.CodeMirror-simplescroll-vertical {
-  right: 0; top: 0;
-  width: 8px;
-}
-.CodeMirror-simplescroll-vertical div {
-  right: 0;
-  width: 100%;
-}
-
-
-.CodeMirror-overlayscroll .CodeMirror-scrollbar-filler, .CodeMirror-overlayscroll .CodeMirror-gutter-filler {
-  display: none;
-}
-
-.CodeMirror-overlayscroll-horizontal div, .CodeMirror-overlayscroll-vertical div {
-  position: absolute;
-  background: #bcd;
-  border-radius: 3px;
-}
-
-.CodeMirror-overlayscroll-horizontal, .CodeMirror-overlayscroll-vertical {
-  position: absolute;
-  z-index: 6;
-}
-
-.CodeMirror-overlayscroll-horizontal {
-  bottom: 0; left: 0;
-  height: 6px;
-}
-.CodeMirror-overlayscroll-horizontal div {
-  bottom: 0;
-  height: 100%;
-}
-
-.CodeMirror-overlayscroll-vertical {
-  right: 0; top: 0;
-  width: 6px;
-}
-.CodeMirror-overlayscroll-vertical div {
-  right: 0;
-  width: 100%;
-}
diff --git a/public/js/lib/codemirror/addon/scroll/simplescrollbars.js b/public/js/lib/codemirror/addon/scroll/simplescrollbars.js
deleted file mode 100644
index 739aa7b..0000000
--- a/public/js/lib/codemirror/addon/scroll/simplescrollbars.js
+++ /dev/null
@@ -1,139 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  function Bar(cls, orientation, scroll) {
-    this.orientation = orientation;
-    this.scroll = scroll;
-    this.screen = this.total = this.size = 1;
-    this.pos = 0;
-
-    this.node = document.createElement("div");
-    this.node.className = cls + "-" + orientation;
-    this.inner = this.node.appendChild(document.createElement("div"));
-
-    var self = this;
-    CodeMirror.on(this.inner, "mousedown", function(e) {
-      if (e.which != 1) return;
-      CodeMirror.e_preventDefault(e);
-      var axis = self.orientation == "horizontal" ? "pageX" : "pageY";
-      var start = e[axis], startpos = self.pos;
-      function move(e) {
-        if (e.which != 1) {
-          CodeMirror.off(document, "mousemove", move);
-          return;
-        }
-        self.moveTo(startpos + (e[axis] - start) * (self.total / self.size));
-      }
-      CodeMirror.on(document, "mousemove", move);
-    });
-
-    CodeMirror.on(this.node, "click", function(e) {
-      CodeMirror.e_preventDefault(e);
-      var innerBox = self.inner.getBoundingClientRect(), where;
-      if (self.orientation == "horizontal")
-        where = e.clientX < innerBox.left ? -1 : e.clientX > innerBox.right ? 1 : 0;
-      else
-        where = e.clientY < innerBox.top ? -1 : e.clientY > innerBox.bottom ? 1 : 0;
-      self.moveTo(self.pos + where * self.screen);
-    });
-
-    function onWheel(e) {
-      var moved = CodeMirror.wheelEventPixels(e)[self.orientation == "horizontal" ? "x" : "y"];
-      var oldPos = self.pos;
-      self.moveTo(self.pos + moved);
-      if (self.pos != oldPos) CodeMirror.e_preventDefault(e);
-    }
-    CodeMirror.on(this.node, "mousewheel", onWheel);
-    CodeMirror.on(this.node, "DOMMouseScroll", onWheel);
-  }
-
-  Bar.prototype.moveTo = function(pos, update) {
-    if (pos < 0) pos = 0;
-    if (pos > this.total - this.screen) pos = this.total - this.screen;
-    if (pos == this.pos) return;
-    this.pos = pos;
-    this.inner.style[this.orientation == "horizontal" ? "left" : "top"] =
-      (pos * (this.size / this.total)) + "px";
-    if (update !== false) this.scroll(pos, this.orientation);
-  };
-
-  Bar.prototype.update = function(scrollSize, clientSize, barSize) {
-    this.screen = clientSize;
-    this.total = scrollSize;
-    this.size = barSize;
-
-    // FIXME clip to min size?
-    this.inner.style[this.orientation == "horizontal" ? "width" : "height"] =
-      this.screen * (this.size / this.total) + "px";
-    this.inner.style[this.orientation == "horizontal" ? "left" : "top"] =
-      this.pos * (this.size / this.total) + "px";
-  };
-
-  function SimpleScrollbars(cls, place, scroll) {
-    this.addClass = cls;
-    this.horiz = new Bar(cls, "horizontal", scroll);
-    place(this.horiz.node);
-    this.vert = new Bar(cls, "vertical", scroll);
-    place(this.vert.node);
-    this.width = null;
-  }
-
-  SimpleScrollbars.prototype.update = function(measure) {
-    if (this.width == null) {
-      var style = window.getComputedStyle ? window.getComputedStyle(this.horiz.node) : this.horiz.node.currentStyle;
-      if (style) this.width = parseInt(style.height);
-    }
-    var width = this.width || 0;
-
-    var needsH = measure.scrollWidth > measure.clientWidth + 1;
-    var needsV = measure.scrollHeight > measure.clientHeight + 1;
-    this.vert.node.style.display = needsV ? "block" : "none";
-    this.horiz.node.style.display = needsH ? "block" : "none";
-
-    if (needsV) {
-      this.vert.update(measure.scrollHeight, measure.clientHeight,
-                       measure.viewHeight - (needsH ? width : 0));
-      this.vert.node.style.display = "block";
-      this.vert.node.style.bottom = needsH ? width + "px" : "0";
-    }
-    if (needsH) {
-      this.horiz.update(measure.scrollWidth, measure.clientWidth,
-                        measure.viewWidth - (needsV ? width : 0) - measure.barLeft);
-      this.horiz.node.style.right = needsV ? width + "px" : "0";
-      this.horiz.node.style.left = measure.barLeft + "px";
-    }
-
-    return {right: needsV ? width : 0, bottom: needsH ? width : 0};
-  };
-
-  SimpleScrollbars.prototype.setScrollTop = function(pos) {
-    this.vert.moveTo(pos, false);
-  };
-
-  SimpleScrollbars.prototype.setScrollLeft = function(pos) {
-    this.horiz.moveTo(pos, false);
-  };
-
-  SimpleScrollbars.prototype.clear = function() {
-    var parent = this.horiz.node.parentNode;
-    parent.removeChild(this.horiz.node);
-    parent.removeChild(this.vert.node);
-  };
-
-  CodeMirror.scrollbarModel.simple = function(place, scroll) {
-    return new SimpleScrollbars("CodeMirror-simplescroll", place, scroll);
-  };
-  CodeMirror.scrollbarModel.overlay = function(place, scroll) {
-    return new SimpleScrollbars("CodeMirror-overlayscroll", place, scroll);
-  };
-});
diff --git a/public/js/lib/codemirror/addon/search/match-highlighter.js b/public/js/lib/codemirror/addon/search/match-highlighter.js
deleted file mode 100644
index e9a2272..0000000
--- a/public/js/lib/codemirror/addon/search/match-highlighter.js
+++ /dev/null
@@ -1,128 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// Highlighting text that matches the selection
-//
-// Defines an option highlightSelectionMatches, which, when enabled,
-// will style strings that match the selection throughout the
-// document.
-//
-// The option can be set to true to simply enable it, or to a
-// {minChars, style, wordsOnly, showToken, delay} object to explicitly
-// configure it. minChars is the minimum amount of characters that should be
-// selected for the behavior to occur, and style is the token style to
-// apply to the matches. This will be prefixed by "cm-" to create an
-// actual CSS class name. If wordsOnly is enabled, the matches will be
-// highlighted only if the selected text is a word. showToken, when enabled,
-// will cause the current token to be highlighted when nothing is selected.
-// delay is used to specify how much time to wait, in milliseconds, before
-// highlighting the matches.
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  var DEFAULT_MIN_CHARS = 2;
-  var DEFAULT_TOKEN_STYLE = "matchhighlight";
-  var DEFAULT_DELAY = 100;
-  var DEFAULT_WORDS_ONLY = false;
-
-  function State(options) {
-    if (typeof options == "object") {
-      this.minChars = options.minChars;
-      this.style = options.style;
-      this.showToken = options.showToken;
-      this.delay = options.delay;
-      this.wordsOnly = options.wordsOnly;
-    }
-    if (this.style == null) this.style = DEFAULT_TOKEN_STYLE;
-    if (this.minChars == null) this.minChars = DEFAULT_MIN_CHARS;
-    if (this.delay == null) this.delay = DEFAULT_DELAY;
-    if (this.wordsOnly == null) this.wordsOnly = DEFAULT_WORDS_ONLY;
-    this.overlay = this.timeout = null;
-  }
-
-  CodeMirror.defineOption("highlightSelectionMatches", false, function(cm, val, old) {
-    if (old && old != CodeMirror.Init) {
-      var over = cm.state.matchHighlighter.overlay;
-      if (over) cm.removeOverlay(over);
-      clearTimeout(cm.state.matchHighlighter.timeout);
-      cm.state.matchHighlighter = null;
-      cm.off("cursorActivity", cursorActivity);
-    }
-    if (val) {
-      cm.state.matchHighlighter = new State(val);
-      highlightMatches(cm);
-      cm.on("cursorActivity", cursorActivity);
-    }
-  });
-
-  function cursorActivity(cm) {
-    var state = cm.state.matchHighlighter;
-    clearTimeout(state.timeout);
-    state.timeout = setTimeout(function() {highlightMatches(cm);}, state.delay);
-  }
-
-  function highlightMatches(cm) {
-    cm.operation(function() {
-      var state = cm.state.matchHighlighter;
-      if (state.overlay) {
-        cm.removeOverlay(state.overlay);
-        state.overlay = null;
-      }
-      if (!cm.somethingSelected() && state.showToken) {
-        var re = state.showToken === true ? /[\w$]/ : state.showToken;
-        var cur = cm.getCursor(), line = cm.getLine(cur.line), start = cur.ch, end = start;
-        while (start && re.test(line.charAt(start - 1))) --start;
-        while (end < line.length && re.test(line.charAt(end))) ++end;
-        if (start < end)
-          cm.addOverlay(state.overlay = makeOverlay(line.slice(start, end), re, state.style));
-        return;
-      }
-      var from = cm.getCursor("from"), to = cm.getCursor("to");
-      if (from.line != to.line) return;
-      if (state.wordsOnly && !isWord(cm, from, to)) return;
-      var selection = cm.getRange(from, to).replace(/^\s+|\s+$/g, "");
-      if (selection.length >= state.minChars)
-        cm.addOverlay(state.overlay = makeOverlay(selection, false, state.style));
-    });
-  }
-
-  function isWord(cm, from, to) {
-    var str = cm.getRange(from, to);
-    if (str.match(/^\w+$/) !== null) {
-        if (from.ch > 0) {
-            var pos = {line: from.line, ch: from.ch - 1};
-            var chr = cm.getRange(pos, from);
-            if (chr.match(/\W/) === null) return false;
-        }
-        if (to.ch < cm.getLine(from.line).length) {
-            var pos = {line: to.line, ch: to.ch + 1};
-            var chr = cm.getRange(to, pos);
-            if (chr.match(/\W/) === null) return false;
-        }
-        return true;
-    } else return false;
-  }
-
-  function boundariesAround(stream, re) {
-    return (!stream.start || !re.test(stream.string.charAt(stream.start - 1))) &&
-      (stream.pos == stream.string.length || !re.test(stream.string.charAt(stream.pos)));
-  }
-
-  function makeOverlay(query, hasBoundary, style) {
-    return {token: function(stream) {
-      if (stream.match(query) &&
-          (!hasBoundary || boundariesAround(stream, hasBoundary)))
-        return style;
-      stream.next();
-      stream.skipTo(query.charAt(0)) || stream.skipToEnd();
-    }};
-  }
-});
diff --git a/public/js/lib/codemirror/addon/search/matchesonscrollbar.css b/public/js/lib/codemirror/addon/search/matchesonscrollbar.css
deleted file mode 100644
index 77932cc..0000000
--- a/public/js/lib/codemirror/addon/search/matchesonscrollbar.css
+++ /dev/null
@@ -1,8 +0,0 @@
-.CodeMirror-search-match {
-  background: gold;
-  border-top: 1px solid orange;
-  border-bottom: 1px solid orange;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-  opacity: .5;
-}
diff --git a/public/js/lib/codemirror/addon/search/matchesonscrollbar.js b/public/js/lib/codemirror/addon/search/matchesonscrollbar.js
deleted file mode 100644
index 937d3f7..0000000
--- a/public/js/lib/codemirror/addon/search/matchesonscrollbar.js
+++ /dev/null
@@ -1,90 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"), require("./searchcursor"), require("../scroll/annotatescrollbar"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror", "./searchcursor", "../scroll/annotatescrollbar"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  CodeMirror.defineExtension("showMatchesOnScrollbar", function(query, caseFold, className) {
-    return new SearchAnnotation(this, query, caseFold, className);
-  });
-
-  function SearchAnnotation(cm, query, caseFold, className) {
-    this.cm = cm;
-    this.annotation = cm.annotateScrollbar(className || "CodeMirror-search-match");
-    this.query = query;
-    this.caseFold = caseFold;
-    this.gap = {from: cm.firstLine(), to: cm.lastLine() + 1};
-    this.matches = [];
-    this.update = null;
-
-    this.findMatches();
-    this.annotation.update(this.matches);
-
-    var self = this;
-    cm.on("change", this.changeHandler = function(_cm, change) { self.onChange(change); });
-  }
-
-  var MAX_MATCHES = 1000;
-
-  SearchAnnotation.prototype.findMatches = function() {
-    if (!this.gap) return;
-    for (var i = 0; i < this.matches.length; i++) {
-      var match = this.matches[i];
-      if (match.from.line >= this.gap.to) break;
-      if (match.to.line >= this.gap.from) this.matches.splice(i--, 1);
-    }
-    var cursor = this.cm.getSearchCursor(this.query, CodeMirror.Pos(this.gap.from, 0), this.caseFold);
-    while (cursor.findNext()) {
-      var match = {from: cursor.from(), to: cursor.to()};
-      if (match.from.line >= this.gap.to) break;
-      this.matches.splice(i++, 0, match);
-      if (this.matches.length > MAX_MATCHES) break;
-    }
-    this.gap = null;
-  };
-
-  function offsetLine(line, changeStart, sizeChange) {
-    if (line <= changeStart) return line;
-    return Math.max(changeStart, line + sizeChange);
-  }
-
-  SearchAnnotation.prototype.onChange = function(change) {
-    var startLine = change.from.line;
-    var endLine = CodeMirror.changeEnd(change).line;
-    var sizeChange = endLine - change.to.line;
-    if (this.gap) {
-      this.gap.from = Math.min(offsetLine(this.gap.from, startLine, sizeChange), change.from.line);
-      this.gap.to = Math.max(offsetLine(this.gap.to, startLine, sizeChange), change.from.line);
-    } else {
-      this.gap = {from: change.from.line, to: endLine + 1};
-    }
-
-    if (sizeChange) for (var i = 0; i < this.matches.length; i++) {
-      var match = this.matches[i];
-      var newFrom = offsetLine(match.from.line, startLine, sizeChange);
-      if (newFrom != match.from.line) match.from = CodeMirror.Pos(newFrom, match.from.ch);
-      var newTo = offsetLine(match.to.line, startLine, sizeChange);
-      if (newTo != match.to.line) match.to = CodeMirror.Pos(newTo, match.to.ch);
-    }
-    clearTimeout(this.update);
-    var self = this;
-    this.update = setTimeout(function() { self.updateAfterChange(); }, 250);
-  };
-
-  SearchAnnotation.prototype.updateAfterChange = function() {
-    this.findMatches();
-    this.annotation.update(this.matches);
-  };
-
-  SearchAnnotation.prototype.clear = function() {
-    this.cm.off("change", this.changeHandler);
-    this.annotation.clear();
-  };
-});
diff --git a/public/js/lib/codemirror/addon/search/search.js b/public/js/lib/codemirror/addon/search/search.js
deleted file mode 100644
index 0251067..0000000
--- a/public/js/lib/codemirror/addon/search/search.js
+++ /dev/null
@@ -1,164 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// Define search commands. Depends on dialog.js or another
-// implementation of the openDialog method.
-
-// Replace works a little oddly -- it will do the replace on the next
-// Ctrl-G (or whatever is bound to findNext) press. You prevent a
-// replace by making sure the match is no longer selected when hitting
-// Ctrl-G.
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"), require("./searchcursor"), require("../dialog/dialog"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror", "./searchcursor", "../dialog/dialog"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-  function searchOverlay(query, caseInsensitive) {
-    if (typeof query == "string")
-      query = new RegExp(query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), caseInsensitive ? "gi" : "g");
-    else if (!query.global)
-      query = new RegExp(query.source, query.ignoreCase ? "gi" : "g");
-
-    return {token: function(stream) {
-      query.lastIndex = stream.pos;
-      var match = query.exec(stream.string);
-      if (match && match.index == stream.pos) {
-        stream.pos += match[0].length;
-        return "searching";
-      } else if (match) {
-        stream.pos = match.index;
-      } else {
-        stream.skipToEnd();
-      }
-    }};
-  }
-
-  function SearchState() {
-    this.posFrom = this.posTo = this.query = null;
-    this.overlay = null;
-  }
-  function getSearchState(cm) {
-    return cm.state.search || (cm.state.search = new SearchState());
-  }
-  function queryCaseInsensitive(query) {
-    return typeof query == "string" && query == query.toLowerCase();
-  }
-  function getSearchCursor(cm, query, pos) {
-    // Heuristic: if the query string is all lowercase, do a case insensitive search.
-    return cm.getSearchCursor(query, pos, queryCaseInsensitive(query));
-  }
-  function dialog(cm, text, shortText, deflt, f) {
-    if (cm.openDialog) cm.openDialog(text, f, {value: deflt});
-    else f(prompt(shortText, deflt));
-  }
-  function confirmDialog(cm, text, shortText, fs) {
-    if (cm.openConfirm) cm.openConfirm(text, fs);
-    else if (confirm(shortText)) fs[0]();
-  }
-  function parseQuery(query) {
-    var isRE = query.match(/^\/(.*)\/([a-z]*)$/);
-    if (isRE) {
-      try { query = new RegExp(isRE[1], isRE[2].indexOf("i") == -1 ? "" : "i"); }
-      catch(e) {} // Not a regular expression after all, do a string search
-    }
-    if (typeof query == "string" ? query == "" : query.test(""))
-      query = /x^/;
-    return query;
-  }
-  var queryDialog =
-    'Search: <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>';
-  function doSearch(cm, rev) {
-    var state = getSearchState(cm);
-    if (state.query) return findNext(cm, rev);
-    dialog(cm, queryDialog, "Search for:", cm.getSelection(), function(query) {
-      cm.operation(function() {
-        if (!query || state.query) return;
-        state.query = parseQuery(query);
-        cm.removeOverlay(state.overlay, queryCaseInsensitive(state.query));
-        state.overlay = searchOverlay(state.query, queryCaseInsensitive(state.query));
-        cm.addOverlay(state.overlay);
-        if (cm.showMatchesOnScrollbar) {
-          if (state.annotate) { state.annotate.clear(); state.annotate = null; }
-          state.annotate = cm.showMatchesOnScrollbar(state.query, queryCaseInsensitive(state.query));
-        }
-        state.posFrom = state.posTo = cm.getCursor();
-        findNext(cm, rev);
-      });
-    });
-  }
-  function findNext(cm, rev) {cm.operation(function() {
-    var state = getSearchState(cm);
-    var cursor = getSearchCursor(cm, state.query, rev ? state.posFrom : state.posTo);
-    if (!cursor.find(rev)) {
-      cursor = getSearchCursor(cm, state.query, rev ? CodeMirror.Pos(cm.lastLine()) : CodeMirror.Pos(cm.firstLine(), 0));
-      if (!cursor.find(rev)) return;
-    }
-    cm.setSelection(cursor.from(), cursor.to());
-    cm.scrollIntoView({from: cursor.from(), to: cursor.to()});
-    state.posFrom = cursor.from(); state.posTo = cursor.to();
-  });}
-  function clearSearch(cm) {cm.operation(function() {
-    var state = getSearchState(cm);
-    if (!state.query) return;
-    state.query = null;
-    cm.removeOverlay(state.overlay);
-    if (state.annotate) { state.annotate.clear(); state.annotate = null; }
-  });}
-
-  var replaceQueryDialog =
-    'Replace: <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>';
-  var replacementQueryDialog = 'With: <input type="text" style="width: 10em" class="CodeMirror-search-field"/>';
-  var doReplaceConfirm = "Replace? <button>Yes</button> <button>No</button> <button>Stop</button>";
-  function replace(cm, all) {
-    if (cm.getOption("readOnly")) return;
-    dialog(cm, replaceQueryDialog, "Replace:", cm.getSelection(), function(query) {
-      if (!query) return;
-      query = parseQuery(query);
-      dialog(cm, replacementQueryDialog, "Replace with:", "", function(text) {
-        if (all) {
-          cm.operation(function() {
-            for (var cursor = getSearchCursor(cm, query); cursor.findNext();) {
-              if (typeof query != "string") {
-                var match = cm.getRange(cursor.from(), cursor.to()).match(query);
-                cursor.replace(text.replace(/\$(\d)/g, function(_, i) {return match[i];}));
-              } else cursor.replace(text);
-            }
-          });
-        } else {
-          clearSearch(cm);
-          var cursor = getSearchCursor(cm, query, cm.getCursor());
-          var advance = function() {
-            var start = cursor.from(), match;
-            if (!(match = cursor.findNext())) {
-              cursor = getSearchCursor(cm, query);
-              if (!(match = cursor.findNext()) ||
-                  (start && cursor.from().line == start.line && cursor.from().ch == start.ch)) return;
-            }
-            cm.setSelection(cursor.from(), cursor.to());
-            cm.scrollIntoView({from: cursor.from(), to: cursor.to()});
-            confirmDialog(cm, doReplaceConfirm, "Replace?",
-                          [function() {doReplace(match);}, advance]);
-          };
-          var doReplace = function(match) {
-            cursor.replace(typeof query == "string" ? text :
-                           text.replace(/\$(\d)/g, function(_, i) {return match[i];}));
-            advance();
-          };
-          advance();
-        }
-      });
-    });
-  }
-
-  CodeMirror.commands.find = function(cm) {clearSearch(cm); doSearch(cm);};
-  CodeMirror.commands.findNext = doSearch;
-  CodeMirror.commands.findPrev = function(cm) {doSearch(cm, true);};
-  CodeMirror.commands.clearSearch = clearSearch;
-  CodeMirror.commands.replace = replace;
-  CodeMirror.commands.replaceAll = function(cm) {replace(cm, true);};
-});
diff --git a/public/js/lib/codemirror/addon/search/searchcursor.js b/public/js/lib/codemirror/addon/search/searchcursor.js
deleted file mode 100644
index 55c108b..0000000
--- a/public/js/lib/codemirror/addon/search/searchcursor.js
+++ /dev/null
@@ -1,189 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-  var Pos = CodeMirror.Pos;
-
-  function SearchCursor(doc, query, pos, caseFold) {
-    this.atOccurrence = false; this.doc = doc;
-    if (caseFold == null && typeof query == "string") caseFold = false;
-
-    pos = pos ? doc.clipPos(pos) : Pos(0, 0);
-    this.pos = {from: pos, to: pos};
-
-    // The matches method is filled in based on the type of query.
-    // It takes a position and a direction, and returns an object
-    // describing the next occurrence of the query, or null if no
-    // more matches were found.
-    if (typeof query != "string") { // Regexp match
-      if (!query.global) query = new RegExp(query.source, query.ignoreCase ? "ig" : "g");
-      this.matches = function(reverse, pos) {
-        if (reverse) {
-          query.lastIndex = 0;
-          var line = doc.getLine(pos.line).slice(0, pos.ch), cutOff = 0, match, start;
-          for (;;) {
-            query.lastIndex = cutOff;
-            var newMatch = query.exec(line);
-            if (!newMatch) break;
-            match = newMatch;
-            start = match.index;
-            cutOff = match.index + (match[0].length || 1);
-            if (cutOff == line.length) break;
-          }
-          var matchLen = (match && match[0].length) || 0;
-          if (!matchLen) {
-            if (start == 0 && line.length == 0) {match = undefined;}
-            else if (start != doc.getLine(pos.line).length) {
-              matchLen++;
-            }
-          }
-        } else {
-          query.lastIndex = pos.ch;
-          var line = doc.getLine(pos.line), match = query.exec(line);
-          var matchLen = (match && match[0].length) || 0;
-          var start = match && match.index;
-          if (start + matchLen != line.length && !matchLen) matchLen = 1;
-        }
-        if (match && matchLen)
-          return {from: Pos(pos.line, start),
-                  to: Pos(pos.line, start + matchLen),
-                  match: match};
-      };
-    } else { // String query
-      var origQuery = query;
-      if (caseFold) query = query.toLowerCase();
-      var fold = caseFold ? function(str){return str.toLowerCase();} : function(str){return str;};
-      var target = query.split("\n");
-      // Different methods for single-line and multi-line queries
-      if (target.length == 1) {
-        if (!query.length) {
-          // Empty string would match anything and never progress, so
-          // we define it to match nothing instead.
-          this.matches = function() {};
-        } else {
-          this.matches = function(reverse, pos) {
-            if (reverse) {
-              var orig = doc.getLine(pos.line).slice(0, pos.ch), line = fold(orig);
-              var match = line.lastIndexOf(query);
-              if (match > -1) {
-                match = adjustPos(orig, line, match);
-                return {from: Pos(pos.line, match), to: Pos(pos.line, match + origQuery.length)};
-              }
-             } else {
-               var orig = doc.getLine(pos.line).slice(pos.ch), line = fold(orig);
-               var match = line.indexOf(query);
-               if (match > -1) {
-                 match = adjustPos(orig, line, match) + pos.ch;
-                 return {from: Pos(pos.line, match), to: Pos(pos.line, match + origQuery.length)};
-               }
-            }
-          };
-        }
-      } else {
-        var origTarget = origQuery.split("\n");
-        this.matches = function(reverse, pos) {
-          var last = target.length - 1;
-          if (reverse) {
-            if (pos.line - (target.length - 1) < doc.firstLine()) return;
-            if (fold(doc.getLine(pos.line).slice(0, origTarget[last].length)) != target[target.length - 1]) return;
-            var to = Pos(pos.line, origTarget[last].length);
-            for (var ln = pos.line - 1, i = last - 1; i >= 1; --i, --ln)
-              if (target[i] != fold(doc.getLine(ln))) return;
-            var line = doc.getLine(ln), cut = line.length - origTarget[0].length;
-            if (fold(line.slice(cut)) != target[0]) return;
-            return {from: Pos(ln, cut), to: to};
-          } else {
-            if (pos.line + (target.length - 1) > doc.lastLine()) return;
-            var line = doc.getLine(pos.line), cut = line.length - origTarget[0].length;
-            if (fold(line.slice(cut)) != target[0]) return;
-            var from = Pos(pos.line, cut);
-            for (var ln = pos.line + 1, i = 1; i < last; ++i, ++ln)
-              if (target[i] != fold(doc.getLine(ln))) return;
-            if (fold(doc.getLine(ln).slice(0, origTarget[last].length)) != target[last]) return;
-            return {from: from, to: Pos(ln, origTarget[last].length)};
-          }
-        };
-      }
-    }
-  }
-
-  SearchCursor.prototype = {
-    findNext: function() {return this.find(false);},
-    findPrevious: function() {return this.find(true);},
-
-    find: function(reverse) {
-      var self = this, pos = this.doc.clipPos(reverse ? this.pos.from : this.pos.to);
-      function savePosAndFail(line) {
-        var pos = Pos(line, 0);
-        self.pos = {from: pos, to: pos};
-        self.atOccurrence = false;
-        return false;
-      }
-
-      for (;;) {
-        if (this.pos = this.matches(reverse, pos)) {
-          this.atOccurrence = true;
-          return this.pos.match || true;
-        }
-        if (reverse) {
-          if (!pos.line) return savePosAndFail(0);
-          pos = Pos(pos.line-1, this.doc.getLine(pos.line-1).length);
-        }
-        else {
-          var maxLine = this.doc.lineCount();
-          if (pos.line == maxLine - 1) return savePosAndFail(maxLine);
-          pos = Pos(pos.line + 1, 0);
-        }
-      }
-    },
-
-    from: function() {if (this.atOccurrence) return this.pos.from;},
-    to: function() {if (this.atOccurrence) return this.pos.to;},
-
-    replace: function(newText) {
-      if (!this.atOccurrence) return;
-      var lines = CodeMirror.splitLines(newText);
-      this.doc.replaceRange(lines, this.pos.from, this.pos.to);
-      this.pos.to = Pos(this.pos.from.line + lines.length - 1,
-                        lines[lines.length - 1].length + (lines.length == 1 ? this.pos.from.ch : 0));
-    }
-  };
-
-  // Maps a position in a case-folded line back to a position in the original line
-  // (compensating for codepoints increasing in number during folding)
-  function adjustPos(orig, folded, pos) {
-    if (orig.length == folded.length) return pos;
-    for (var pos1 = Math.min(pos, orig.length);;) {
-      var len1 = orig.slice(0, pos1).toLowerCase().length;
-      if (len1 < pos) ++pos1;
-      else if (len1 > pos) --pos1;
-      else return pos1;
-    }
-  }
-
-  CodeMirror.defineExtension("getSearchCursor", function(query, pos, caseFold) {
-    return new SearchCursor(this.doc, query, pos, caseFold);
-  });
-  CodeMirror.defineDocExtension("getSearchCursor", function(query, pos, caseFold) {
-    return new SearchCursor(this, query, pos, caseFold);
-  });
-
-  CodeMirror.defineExtension("selectMatches", function(query, caseFold) {
-    var ranges = [], next;
-    var cur = this.getSearchCursor(query, this.getCursor("from"), caseFold);
-    while (next = cur.findNext()) {
-      if (CodeMirror.cmpPos(cur.to(), this.getCursor("to")) > 0) break;
-      ranges.push({anchor: cur.from(), head: cur.to()});
-    }
-    if (ranges.length)
-      this.setSelections(ranges, 0);
-  });
-});
diff --git a/public/js/lib/codemirror/addon/selection/active-line.js b/public/js/lib/codemirror/addon/selection/active-line.js
deleted file mode 100644
index 22da2e0..0000000
--- a/public/js/lib/codemirror/addon/selection/active-line.js
+++ /dev/null
@@ -1,71 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// Because sometimes you need to style the cursor's line.
-//
-// Adds an option 'styleActiveLine' which, when enabled, gives the
-// active line's wrapping <div> the CSS class "CodeMirror-activeline",
-// and gives its background <div> the class "CodeMirror-activeline-background".
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-  var WRAP_CLASS = "CodeMirror-activeline";
-  var BACK_CLASS = "CodeMirror-activeline-background";
-
-  CodeMirror.defineOption("styleActiveLine", false, function(cm, val, old) {
-    var prev = old && old != CodeMirror.Init;
-    if (val && !prev) {
-      cm.state.activeLines = [];
-      updateActiveLines(cm, cm.listSelections());
-      cm.on("beforeSelectionChange", selectionChange);
-    } else if (!val && prev) {
-      cm.off("beforeSelectionChange", selectionChange);
-      clearActiveLines(cm);
-      delete cm.state.activeLines;
-    }
-  });
-
-  function clearActiveLines(cm) {
-    for (var i = 0; i < cm.state.activeLines.length; i++) {
-      cm.removeLineClass(cm.state.activeLines[i], "wrap", WRAP_CLASS);
-      cm.removeLineClass(cm.state.activeLines[i], "background", BACK_CLASS);
-    }
-  }
-
-  function sameArray(a, b) {
-    if (a.length != b.length) return false;
-    for (var i = 0; i < a.length; i++)
-      if (a[i] != b[i]) return false;
-    return true;
-  }
-
-  function updateActiveLines(cm, ranges) {
-    var active = [];
-    for (var i = 0; i < ranges.length; i++) {
-      var range = ranges[i];
-      if (!range.empty()) continue;
-      var line = cm.getLineHandleVisualStart(range.head.line);
-      if (active[active.length - 1] != line) active.push(line);
-    }
-    if (sameArray(cm.state.activeLines, active)) return;
-    cm.operation(function() {
-      clearActiveLines(cm);
-      for (var i = 0; i < active.length; i++) {
-        cm.addLineClass(active[i], "wrap", WRAP_CLASS);
-        cm.addLineClass(active[i], "background", BACK_CLASS);
-      }
-      cm.state.activeLines = active;
-    });
-  }
-
-  function selectionChange(cm, sel) {
-    updateActiveLines(cm, sel.ranges);
-  }
-});
diff --git a/public/js/lib/codemirror/addon/selection/mark-selection.js b/public/js/lib/codemirror/addon/selection/mark-selection.js
deleted file mode 100644
index 5c42d21..0000000
--- a/public/js/lib/codemirror/addon/selection/mark-selection.js
+++ /dev/null
@@ -1,118 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// Because sometimes you need to mark the selected *text*.
-//
-// Adds an option 'styleSelectedText' which, when enabled, gives
-// selected text the CSS class given as option value, or
-// "CodeMirror-selectedtext" when the value is not a string.
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  CodeMirror.defineOption("styleSelectedText", false, function(cm, val, old) {
-    var prev = old && old != CodeMirror.Init;
-    if (val && !prev) {
-      cm.state.markedSelection = [];
-      cm.state.markedSelectionStyle = typeof val == "string" ? val : "CodeMirror-selectedtext";
-      reset(cm);
-      cm.on("cursorActivity", onCursorActivity);
-      cm.on("change", onChange);
-    } else if (!val && prev) {
-      cm.off("cursorActivity", onCursorActivity);
-      cm.off("change", onChange);
-      clear(cm);
-      cm.state.markedSelection = cm.state.markedSelectionStyle = null;
-    }
-  });
-
-  function onCursorActivity(cm) {
-    cm.operation(function() { update(cm); });
-  }
-
-  function onChange(cm) {
-    if (cm.state.markedSelection.length)
-      cm.operation(function() { clear(cm); });
-  }
-
-  var CHUNK_SIZE = 8;
-  var Pos = CodeMirror.Pos;
-  var cmp = CodeMirror.cmpPos;
-
-  function coverRange(cm, from, to, addAt) {
-    if (cmp(from, to) == 0) return;
-    var array = cm.state.markedSelection;
-    var cls = cm.state.markedSelectionStyle;
-    for (var line = from.line;;) {
-      var start = line == from.line ? from : Pos(line, 0);
-      var endLine = line + CHUNK_SIZE, atEnd = endLine >= to.line;
-      var end = atEnd ? to : Pos(endLine, 0);
-      var mark = cm.markText(start, end, {className: cls});
-      if (addAt == null) array.push(mark);
-      else array.splice(addAt++, 0, mark);
-      if (atEnd) break;
-      line = endLine;
-    }
-  }
-
-  function clear(cm) {
-    var array = cm.state.markedSelection;
-    for (var i = 0; i < array.length; ++i) array[i].clear();
-    array.length = 0;
-  }
-
-  function reset(cm) {
-    clear(cm);
-    var ranges = cm.listSelections();
-    for (var i = 0; i < ranges.length; i++)
-      coverRange(cm, ranges[i].from(), ranges[i].to());
-  }
-
-  function update(cm) {
-    if (!cm.somethingSelected()) return clear(cm);
-    if (cm.listSelections().length > 1) return reset(cm);
-
-    var from = cm.getCursor("start"), to = cm.getCursor("end");
-
-    var array = cm.state.markedSelection;
-    if (!array.length) return coverRange(cm, from, to);
-
-    var coverStart = array[0].find(), coverEnd = array[array.length - 1].find();
-    if (!coverStart || !coverEnd || to.line - from.line < CHUNK_SIZE ||
-        cmp(from, coverEnd.to) >= 0 || cmp(to, coverStart.from) <= 0)
-      return reset(cm);
-
-    while (cmp(from, coverStart.from) > 0) {
-      array.shift().clear();
-      coverStart = array[0].find();
-    }
-    if (cmp(from, coverStart.from) < 0) {
-      if (coverStart.to.line - from.line < CHUNK_SIZE) {
-        array.shift().clear();
-        coverRange(cm, from, coverStart.to, 0);
-      } else {
-        coverRange(cm, from, coverStart.from, 0);
-      }
-    }
-
-    while (cmp(to, coverEnd.to) < 0) {
-      array.pop().clear();
-      coverEnd = array[array.length - 1].find();
-    }
-    if (cmp(to, coverEnd.to) > 0) {
-      if (to.line - coverEnd.from.line < CHUNK_SIZE) {
-        array.pop().clear();
-        coverRange(cm, coverEnd.from, to);
-      } else {
-        coverRange(cm, coverEnd.to, to);
-      }
-    }
-  }
-});
diff --git a/public/js/lib/codemirror/addon/tern/tern.css b/public/js/lib/codemirror/addon/tern/tern.css
deleted file mode 100644
index 76fba33..0000000
--- a/public/js/lib/codemirror/addon/tern/tern.css
+++ /dev/null
@@ -1,86 +0,0 @@
-.CodeMirror-Tern-completion {
-  padding-left: 22px;
-  position: relative;
-}
-.CodeMirror-Tern-completion:before {
-  position: absolute;
-  left: 2px;
-  bottom: 2px;
-  border-radius: 50%;
-  font-size: 12px;
-  font-weight: bold;
-  height: 15px;
-  width: 15px;
-  line-height: 16px;
-  text-align: center;
-  color: white;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-.CodeMirror-Tern-completion-unknown:before {
-  content: "?";
-  background: #4bb;
-}
-.CodeMirror-Tern-completion-object:before {
-  content: "O";
-  background: #77c;
-}
-.CodeMirror-Tern-completion-fn:before {
-  content: "F";
-  background: #7c7;
-}
-.CodeMirror-Tern-completion-array:before {
-  content: "A";
-  background: #c66;
-}
-.CodeMirror-Tern-completion-number:before {
-  content: "1";
-  background: #999;
-}
-.CodeMirror-Tern-completion-string:before {
-  content: "S";
-  background: #999;
-}
-.CodeMirror-Tern-completion-bool:before {
-  content: "B";
-  background: #999;
-}
-
-.CodeMirror-Tern-completion-guess {
-  color: #999;
-}
-
-.CodeMirror-Tern-tooltip {
-  border: 1px solid silver;
-  border-radius: 3px;
-  color: #444;
-  padding: 2px 5px;
-  font-size: 90%;
-  font-family: monospace;
-  background-color: white;
-  white-space: pre-wrap;
-
-  max-width: 40em;
-  position: absolute;
-  z-index: 10;
-  -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
-  -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
-  box-shadow: 2px 3px 5px rgba(0,0,0,.2);
-
-  transition: opacity 1s;
-  -moz-transition: opacity 1s;
-  -webkit-transition: opacity 1s;
-  -o-transition: opacity 1s;
-  -ms-transition: opacity 1s;
-}
-
-.CodeMirror-Tern-hint-doc {
-  max-width: 25em;
-  margin-top: -3px;
-}
-
-.CodeMirror-Tern-fname { color: black; }
-.CodeMirror-Tern-farg { color: #70a; }
-.CodeMirror-Tern-farg-current { text-decoration: underline; }
-.CodeMirror-Tern-type { color: #07c; }
-.CodeMirror-Tern-fhint-guess { opacity: .7; }
diff --git a/public/js/lib/codemirror/addon/tern/tern.js b/public/js/lib/codemirror/addon/tern/tern.js
deleted file mode 100644
index 86729e2..0000000
--- a/public/js/lib/codemirror/addon/tern/tern.js
+++ /dev/null
@@ -1,670 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// Glue code between CodeMirror and Tern.
-//
-// Create a CodeMirror.TernServer to wrap an actual Tern server,
-// register open documents (CodeMirror.Doc instances) with it, and
-// call its methods to activate the assisting functions that Tern
-// provides.
-//
-// Options supported (all optional):
-// * defs: An array of JSON definition data structures.
-// * plugins: An object mapping plugin names to configuration
-//   options.
-// * getFile: A function(name, c) that can be used to access files in
-//   the project that haven't been loaded yet. Simply do c(null) to
-//   indicate that a file is not available.
-// * fileFilter: A function(value, docName, doc) that will be applied
-//   to documents before passing them on to Tern.
-// * switchToDoc: A function(name, doc) that should, when providing a
-//   multi-file view, switch the view or focus to the named file.
-// * showError: A function(editor, message) that can be used to
-//   override the way errors are displayed.
-// * completionTip: Customize the content in tooltips for completions.
-//   Is passed a single argument—the completion's data as returned by
-//   Tern—and may return a string, DOM node, or null to indicate that
-//   no tip should be shown. By default the docstring is shown.
-// * typeTip: Like completionTip, but for the tooltips shown for type
-//   queries.
-// * responseFilter: A function(doc, query, request, error, data) that
-//   will be applied to the Tern responses before treating them
-//
-//
-// It is possible to run the Tern server in a web worker by specifying
-// these additional options:
-// * useWorker: Set to true to enable web worker mode. You'll probably
-//   want to feature detect the actual value you use here, for example
-//   !!window.Worker.
-// * workerScript: The main script of the worker. Point this to
-//   wherever you are hosting worker.js from this directory.
-// * workerDeps: An array of paths pointing (relative to workerScript)
-//   to the Acorn and Tern libraries and any Tern plugins you want to
-//   load. Or, if you minified those into a single script and included
-//   them in the workerScript, simply leave this undefined.
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-  // declare global: tern
-
-  CodeMirror.TernServer = function(options) {
-    var self = this;
-    this.options = options || {};
-    var plugins = this.options.plugins || (this.options.plugins = {});
-    if (!plugins.doc_comment) plugins.doc_comment = true;
-    if (this.options.useWorker) {
-      this.server = new WorkerServer(this);
-    } else {
-      this.server = new tern.Server({
-        getFile: function(name, c) { return getFile(self, name, c); },
-        async: true,
-        defs: this.options.defs || [],
-        plugins: plugins
-      });
-    }
-    this.docs = Object.create(null);
-    this.trackChange = function(doc, change) { trackChange(self, doc, change); };
-
-    this.cachedArgHints = null;
-    this.activeArgHints = null;
-    this.jumpStack = [];
-
-    this.getHint = function(cm, c) { return hint(self, cm, c); };
-    this.getHint.async = true;
-  };
-
-  CodeMirror.TernServer.prototype = {
-    addDoc: function(name, doc) {
-      var data = {doc: doc, name: name, changed: null};
-      this.server.addFile(name, docValue(this, data));
-      CodeMirror.on(doc, "change", this.trackChange);
-      return this.docs[name] = data;
-    },
-
-    delDoc: function(id) {
-      var found = resolveDoc(this, id);
-      if (!found) return;
-      CodeMirror.off(found.doc, "change", this.trackChange);
-      delete this.docs[found.name];
-      this.server.delFile(found.name);
-    },
-
-    hideDoc: function(id) {
-      closeArgHints(this);
-      var found = resolveDoc(this, id);
-      if (found && found.changed) sendDoc(this, found);
-    },
-
-    complete: function(cm) {
-      cm.showHint({hint: this.getHint});
-    },
-
-    showType: function(cm, pos, c) { showContextInfo(this, cm, pos, "type", c); },
-
-    showDocs: function(cm, pos, c) { showContextInfo(this, cm, pos, "documentation", c); },
-
-    updateArgHints: function(cm) { updateArgHints(this, cm); },
-
-    jumpToDef: function(cm) { jumpToDef(this, cm); },
-
-    jumpBack: function(cm) { jumpBack(this, cm); },
-
-    rename: function(cm) { rename(this, cm); },
-
-    selectName: function(cm) { selectName(this, cm); },
-
-    request: function (cm, query, c, pos) {
-      var self = this;
-      var doc = findDoc(this, cm.getDoc());
-      var request = buildRequest(this, doc, query, pos);
-
-      this.server.request(request, function (error, data) {
-        if (!error && self.options.responseFilter)
-          data = self.options.responseFilter(doc, query, request, error, data);
-        c(error, data);
-      });
-    }
-  };
-
-  var Pos = CodeMirror.Pos;
-  var cls = "CodeMirror-Tern-";
-  var bigDoc = 250;
-
-  function getFile(ts, name, c) {
-    var buf = ts.docs[name];
-    if (buf)
-      c(docValue(ts, buf));
-    else if (ts.options.getFile)
-      ts.options.getFile(name, c);
-    else
-      c(null);
-  }
-
-  function findDoc(ts, doc, name) {
-    for (var n in ts.docs) {
-      var cur = ts.docs[n];
-      if (cur.doc == doc) return cur;
-    }
-    if (!name) for (var i = 0;; ++i) {
-      n = "[doc" + (i || "") + "]";
-      if (!ts.docs[n]) { name = n; break; }
-    }
-    return ts.addDoc(name, doc);
-  }
-
-  function resolveDoc(ts, id) {
-    if (typeof id == "string") return ts.docs[id];
-    if (id instanceof CodeMirror) id = id.getDoc();
-    if (id instanceof CodeMirror.Doc) return findDoc(ts, id);
-  }
-
-  function trackChange(ts, doc, change) {
-    var data = findDoc(ts, doc);
-
-    var argHints = ts.cachedArgHints;
-    if (argHints && argHints.doc == doc && cmpPos(argHints.start, change.to) <= 0)
-      ts.cachedArgHints = null;
-
-    var changed = data.changed;
-    if (changed == null)
-      data.changed = changed = {from: change.from.line, to: change.from.line};
-    var end = change.from.line + (change.text.length - 1);
-    if (change.from.line < changed.to) changed.to = changed.to - (change.to.line - end);
-    if (end >= changed.to) changed.to = end + 1;
-    if (changed.from > change.from.line) changed.from = change.from.line;
-
-    if (doc.lineCount() > bigDoc && change.to - changed.from > 100) setTimeout(function() {
-      if (data.changed && data.changed.to - data.changed.from > 100) sendDoc(ts, data);
-    }, 200);
-  }
-
-  function sendDoc(ts, doc) {
-    ts.server.request({files: [{type: "full", name: doc.name, text: docValue(ts, doc)}]}, function(error) {
-      if (error) window.console.error(error);
-      else doc.changed = null;
-    });
-  }
-
-  // Completion
-
-  function hint(ts, cm, c) {
-    ts.request(cm, {type: "completions", types: true, docs: true, urls: true}, function(error, data) {
-      if (error) return showError(ts, cm, error);
-      var completions = [], after = "";
-      var from = data.start, to = data.end;
-      if (cm.getRange(Pos(from.line, from.ch - 2), from) == "[\"" &&
-          cm.getRange(to, Pos(to.line, to.ch + 2)) != "\"]")
-        after = "\"]";
-
-      for (var i = 0; i < data.completions.length; ++i) {
-        var completion = data.completions[i], className = typeToIcon(completion.type);
-        if (data.guess) className += " " + cls + "guess";
-        completions.push({text: completion.name + after,
-                          displayText: completion.name,
-                          className: className,
-                          data: completion});
-      }
-
-      var obj = {from: from, to: to, list: completions};
-      var tooltip = null;
-      CodeMirror.on(obj, "close", function() { remove(tooltip); });
-      CodeMirror.on(obj, "update", function() { remove(tooltip); });
-      CodeMirror.on(obj, "select", function(cur, node) {
-        remove(tooltip);
-        var content = ts.options.completionTip ? ts.options.completionTip(cur.data) : cur.data.doc;
-        if (content) {
-          tooltip = makeTooltip(node.parentNode.getBoundingClientRect().right + window.pageXOffset,
-                                node.getBoundingClientRect().top + window.pageYOffset, content);
-          tooltip.className += " " + cls + "hint-doc";
-        }
-      });
-      c(obj);
-    });
-  }
-
-  function typeToIcon(type) {
-    var suffix;
-    if (type == "?") suffix = "unknown";
-    else if (type == "number" || type == "string" || type == "bool") suffix = type;
-    else if (/^fn\(/.test(type)) suffix = "fn";
-    else if (/^\[/.test(type)) suffix = "array";
-    else suffix = "object";
-    return cls + "completion " + cls + "completion-" + suffix;
-  }
-
-  // Type queries
-
-  function showContextInfo(ts, cm, pos, queryName, c) {
-    ts.request(cm, queryName, function(error, data) {
-      if (error) return showError(ts, cm, error);
-      if (ts.options.typeTip) {
-        var tip = ts.options.typeTip(data);
-      } else {
-        var tip = elt("span", null, elt("strong", null, data.type || "not found"));
-        if (data.doc)
-          tip.appendChild(document.createTextNode(" — " + data.doc));
-        if (data.url) {
-          tip.appendChild(document.createTextNode(" "));
-          tip.appendChild(elt("a", null, "[docs]")).href = data.url;
-        }
-      }
-      tempTooltip(cm, tip);
-      if (c) c();
-    }, pos);
-  }
-
-  // Maintaining argument hints
-
-  function updateArgHints(ts, cm) {
-    closeArgHints(ts);
-
-    if (cm.somethingSelected()) return;
-    var state = cm.getTokenAt(cm.getCursor()).state;
-    var inner = CodeMirror.innerMode(cm.getMode(), state);
-    if (inner.mode.name != "javascript") return;
-    var lex = inner.state.lexical;
-    if (lex.info != "call") return;
-
-    var ch, argPos = lex.pos || 0, tabSize = cm.getOption("tabSize");
-    for (var line = cm.getCursor().line, e = Math.max(0, line - 9), found = false; line >= e; --line) {
-      var str = cm.getLine(line), extra = 0;
-      for (var pos = 0;;) {
-        var tab = str.indexOf("\t", pos);
-        if (tab == -1) break;
-        extra += tabSize - (tab + extra) % tabSize - 1;
-        pos = tab + 1;
-      }
-      ch = lex.column - extra;
-      if (str.charAt(ch) == "(") {found = true; break;}
-    }
-    if (!found) return;
-
-    var start = Pos(line, ch);
-    var cache = ts.cachedArgHints;
-    if (cache && cache.doc == cm.getDoc() && cmpPos(start, cache.start) == 0)
-      return showArgHints(ts, cm, argPos);
-
-    ts.request(cm, {type: "type", preferFunction: true, end: start}, function(error, data) {
-      if (error || !data.type || !(/^fn\(/).test(data.type)) return;
-      ts.cachedArgHints = {
-        start: pos,
-        type: parseFnType(data.type),
-        name: data.exprName || data.name || "fn",
-        guess: data.guess,
-        doc: cm.getDoc()
-      };
-      showArgHints(ts, cm, argPos);
-    });
-  }
-
-  function showArgHints(ts, cm, pos) {
-    closeArgHints(ts);
-
-    var cache = ts.cachedArgHints, tp = cache.type;
-    var tip = elt("span", cache.guess ? cls + "fhint-guess" : null,
-                  elt("span", cls + "fname", cache.name), "(");
-    for (var i = 0; i < tp.args.length; ++i) {
-      if (i) tip.appendChild(document.createTextNode(", "));
-      var arg = tp.args[i];
-      tip.appendChild(elt("span", cls + "farg" + (i == pos ? " " + cls + "farg-current" : ""), arg.name || "?"));
-      if (arg.type != "?") {
-        tip.appendChild(document.createTextNode(":\u00a0"));
-        tip.appendChild(elt("span", cls + "type", arg.type));
-      }
-    }
-    tip.appendChild(document.createTextNode(tp.rettype ? ") ->\u00a0" : ")"));
-    if (tp.rettype) tip.appendChild(elt("span", cls + "type", tp.rettype));
-    var place = cm.cursorCoords(null, "page");
-    ts.activeArgHints = makeTooltip(place.right + 1, place.bottom, tip);
-  }
-
-  function parseFnType(text) {
-    var args = [], pos = 3;
-
-    function skipMatching(upto) {
-      var depth = 0, start = pos;
-      for (;;) {
-        var next = text.charAt(pos);
-        if (upto.test(next) && !depth) return text.slice(start, pos);
-        if (/[{\[\(]/.test(next)) ++depth;
-        else if (/[}\]\)]/.test(next)) --depth;
-        ++pos;
-      }
-    }
-
-    // Parse arguments
-    if (text.charAt(pos) != ")") for (;;) {
-      var name = text.slice(pos).match(/^([^, \(\[\{]+): /);
-      if (name) {
-        pos += name[0].length;
-        name = name[1];
-      }
-      args.push({name: name, type: skipMatching(/[\),]/)});
-      if (text.charAt(pos) == ")") break;
-      pos += 2;
-    }
-
-    var rettype = text.slice(pos).match(/^\) -> (.*)$/);
-
-    return {args: args, rettype: rettype && rettype[1]};
-  }
-
-  // Moving to the definition of something
-
-  function jumpToDef(ts, cm) {
-    function inner(varName) {
-      var req = {type: "definition", variable: varName || null};
-      var doc = findDoc(ts, cm.getDoc());
-      ts.server.request(buildRequest(ts, doc, req), function(error, data) {
-        if (error) return showError(ts, cm, error);
-        if (!data.file && data.url) { window.open(data.url); return; }
-
-        if (data.file) {
-          var localDoc = ts.docs[data.file], found;
-          if (localDoc && (found = findContext(localDoc.doc, data))) {
-            ts.jumpStack.push({file: doc.name,
-                               start: cm.getCursor("from"),
-                               end: cm.getCursor("to")});
-            moveTo(ts, doc, localDoc, found.start, found.end);
-            return;
-          }
-        }
-        showError(ts, cm, "Could not find a definition.");
-      });
-    }
-
-    if (!atInterestingExpression(cm))
-      dialog(cm, "Jump to variable", function(name) { if (name) inner(name); });
-    else
-      inner();
-  }
-
-  function jumpBack(ts, cm) {
-    var pos = ts.jumpStack.pop(), doc = pos && ts.docs[pos.file];
-    if (!doc) return;
-    moveTo(ts, findDoc(ts, cm.getDoc()), doc, pos.start, pos.end);
-  }
-
-  function moveTo(ts, curDoc, doc, start, end) {
-    doc.doc.setSelection(start, end);
-    if (curDoc != doc && ts.options.switchToDoc) {
-      closeArgHints(ts);
-      ts.options.switchToDoc(doc.name, doc.doc);
-    }
-  }
-
-  // The {line,ch} representation of positions makes this rather awkward.
-  function findContext(doc, data) {
-    var before = data.context.slice(0, data.contextOffset).split("\n");
-    var startLine = data.start.line - (before.length - 1);
-    var start = Pos(startLine, (before.length == 1 ? data.start.ch : doc.getLine(startLine).length) - before[0].length);
-
-    var text = doc.getLine(startLine).slice(start.ch);
-    for (var cur = startLine + 1; cur < doc.lineCount() && text.length < data.context.length; ++cur)
-      text += "\n" + doc.getLine(cur);
-    if (text.slice(0, data.context.length) == data.context) return data;
-
-    var cursor = doc.getSearchCursor(data.context, 0, false);
-    var nearest, nearestDist = Infinity;
-    while (cursor.findNext()) {
-      var from = cursor.from(), dist = Math.abs(from.line - start.line) * 10000;
-      if (!dist) dist = Math.abs(from.ch - start.ch);
-      if (dist < nearestDist) { nearest = from; nearestDist = dist; }
-    }
-    if (!nearest) return null;
-
-    if (before.length == 1)
-      nearest.ch += before[0].length;
-    else
-      nearest = Pos(nearest.line + (before.length - 1), before[before.length - 1].length);
-    if (data.start.line == data.end.line)
-      var end = Pos(nearest.line, nearest.ch + (data.end.ch - data.start.ch));
-    else
-      var end = Pos(nearest.line + (data.end.line - data.start.line), data.end.ch);
-    return {start: nearest, end: end};
-  }
-
-  function atInterestingExpression(cm) {
-    var pos = cm.getCursor("end"), tok = cm.getTokenAt(pos);
-    if (tok.start < pos.ch && (tok.type == "comment" || tok.type == "string")) return false;
-    return /\w/.test(cm.getLine(pos.line).slice(Math.max(pos.ch - 1, 0), pos.ch + 1));
-  }
-
-  // Variable renaming
-
-  function rename(ts, cm) {
-    var token = cm.getTokenAt(cm.getCursor());
-    if (!/\w/.test(token.string)) return showError(ts, cm, "Not at a variable");
-    dialog(cm, "New name for " + token.string, function(newName) {
-      ts.request(cm, {type: "rename", newName: newName, fullDocs: true}, function(error, data) {
-        if (error) return showError(ts, cm, error);
-        applyChanges(ts, data.changes);
-      });
-    });
-  }
-
-  function selectName(ts, cm) {
-    var name = findDoc(ts, cm.doc).name;
-    ts.request(cm, {type: "refs"}, function(error, data) {
-      if (error) return showError(ts, cm, error);
-      var ranges = [], cur = 0;
-      for (var i = 0; i < data.refs.length; i++) {
-        var ref = data.refs[i];
-        if (ref.file == name) {
-          ranges.push({anchor: ref.start, head: ref.end});
-          if (cmpPos(cur, ref.start) >= 0 && cmpPos(cur, ref.end) <= 0)
-            cur = ranges.length - 1;
-        }
-      }
-      cm.setSelections(ranges, cur);
-    });
-  }
-
-  var nextChangeOrig = 0;
-  function applyChanges(ts, changes) {
-    var perFile = Object.create(null);
-    for (var i = 0; i < changes.length; ++i) {
-      var ch = changes[i];
-      (perFile[ch.file] || (perFile[ch.file] = [])).push(ch);
-    }
-    for (var file in perFile) {
-      var known = ts.docs[file], chs = perFile[file];;
-      if (!known) continue;
-      chs.sort(function(a, b) { return cmpPos(b.start, a.start); });
-      var origin = "*rename" + (++nextChangeOrig);
-      for (var i = 0; i < chs.length; ++i) {
-        var ch = chs[i];
-        known.doc.replaceRange(ch.text, ch.start, ch.end, origin);
-      }
-    }
-  }
-
-  // Generic request-building helper
-
-  function buildRequest(ts, doc, query, pos) {
-    var files = [], offsetLines = 0, allowFragments = !query.fullDocs;
-    if (!allowFragments) delete query.fullDocs;
-    if (typeof query == "string") query = {type: query};
-    query.lineCharPositions = true;
-    if (query.end == null) {
-      query.end = pos || doc.doc.getCursor("end");
-      if (doc.doc.somethingSelected())
-        query.start = doc.doc.getCursor("start");
-    }
-    var startPos = query.start || query.end;
-
-    if (doc.changed) {
-      if (doc.doc.lineCount() > bigDoc && allowFragments !== false &&
-          doc.changed.to - doc.changed.from < 100 &&
-          doc.changed.from <= startPos.line && doc.changed.to > query.end.line) {
-        files.push(getFragmentAround(doc, startPos, query.end));
-        query.file = "#0";
-        var offsetLines = files[0].offsetLines;
-        if (query.start != null) query.start = Pos(query.start.line - -offsetLines, query.start.ch);
-        query.end = Pos(query.end.line - offsetLines, query.end.ch);
-      } else {
-        files.push({type: "full",
-                    name: doc.name,
-                    text: docValue(ts, doc)});
-        query.file = doc.name;
-        doc.changed = null;
-      }
-    } else {
-      query.file = doc.name;
-    }
-    for (var name in ts.docs) {
-      var cur = ts.docs[name];
-      if (cur.changed && cur != doc) {
-        files.push({type: "full", name: cur.name, text: docValue(ts, cur)});
-        cur.changed = null;
-      }
-    }
-
-    return {query: query, files: files};
-  }
-
-  function getFragmentAround(data, start, end) {
-    var doc = data.doc;
-    var minIndent = null, minLine = null, endLine, tabSize = 4;
-    for (var p = start.line - 1, min = Math.max(0, p - 50); p >= min; --p) {
-      var line = doc.getLine(p), fn = line.search(/\bfunction\b/);
-      if (fn < 0) continue;
-      var indent = CodeMirror.countColumn(line, null, tabSize);
-      if (minIndent != null && minIndent <= indent) continue;
-      minIndent = indent;
-      minLine = p;
-    }
-    if (minLine == null) minLine = min;
-    var max = Math.min(doc.lastLine(), end.line + 20);
-    if (minIndent == null || minIndent == CodeMirror.countColumn(doc.getLine(start.line), null, tabSize))
-      endLine = max;
-    else for (endLine = end.line + 1; endLine < max; ++endLine) {
-      var indent = CodeMirror.countColumn(doc.getLine(endLine), null, tabSize);
-      if (indent <= minIndent) break;
-    }
-    var from = Pos(minLine, 0);
-
-    return {type: "part",
-            name: data.name,
-            offsetLines: from.line,
-            text: doc.getRange(from, Pos(endLine, 0))};
-  }
-
-  // Generic utilities
-
-  var cmpPos = CodeMirror.cmpPos;
-
-  function elt(tagname, cls /*, ... elts*/) {
-    var e = document.createElement(tagname);
-    if (cls) e.className = cls;
-    for (var i = 2; i < arguments.length; ++i) {
-      var elt = arguments[i];
-      if (typeof elt == "string") elt = document.createTextNode(elt);
-      e.appendChild(elt);
-    }
-    return e;
-  }
-
-  function dialog(cm, text, f) {
-    if (cm.openDialog)
-      cm.openDialog(text + ": <input type=text>", f);
-    else
-      f(prompt(text, ""));
-  }
-
-  // Tooltips
-
-  function tempTooltip(cm, content) {
-    var where = cm.cursorCoords();
-    var tip = makeTooltip(where.right + 1, where.bottom, content);
-    function clear() {
-      if (!tip.parentNode) return;
-      cm.off("cursorActivity", clear);
-      fadeOut(tip);
-    }
-    setTimeout(clear, 1700);
-    cm.on("cursorActivity", clear);
-  }
-
-  function makeTooltip(x, y, content) {
-    var node = elt("div", cls + "tooltip", content);
-    node.style.left = x + "px";
-    node.style.top = y + "px";
-    document.body.appendChild(node);
-    return node;
-  }
-
-  function remove(node) {
-    var p = node && node.parentNode;
-    if (p) p.removeChild(node);
-  }
-
-  function fadeOut(tooltip) {
-    tooltip.style.opacity = "0";
-    setTimeout(function() { remove(tooltip); }, 1100);
-  }
-
-  function showError(ts, cm, msg) {
-    if (ts.options.showError)
-      ts.options.showError(cm, msg);
-    else
-      tempTooltip(cm, String(msg));
-  }
-
-  function closeArgHints(ts) {
-    if (ts.activeArgHints) { remove(ts.activeArgHints); ts.activeArgHints = null; }
-  }
-
-  function docValue(ts, doc) {
-    var val = doc.doc.getValue();
-    if (ts.options.fileFilter) val = ts.options.fileFilter(val, doc.name, doc.doc);
-    return val;
-  }
-
-  // Worker wrapper
-
-  function WorkerServer(ts) {
-    var worker = new Worker(ts.options.workerScript);
-    worker.postMessage({type: "init",
-                        defs: ts.options.defs,
-                        plugins: ts.options.plugins,
-                        scripts: ts.options.workerDeps});
-    var msgId = 0, pending = {};
-
-    function send(data, c) {
-      if (c) {
-        data.id = ++msgId;
-        pending[msgId] = c;
-      }
-      worker.postMessage(data);
-    }
-    worker.onmessage = function(e) {
-      var data = e.data;
-      if (data.type == "getFile") {
-        getFile(ts, data.name, function(err, text) {
-          send({type: "getFile", err: String(err), text: text, id: data.id});
-        });
-      } else if (data.type == "debug") {
-        window.console.log(data.message);
-      } else if (data.id && pending[data.id]) {
-        pending[data.id](data.err, data.body);
-        delete pending[data.id];
-      }
-    };
-    worker.onerror = function(e) {
-      for (var id in pending) pending[id](e);
-      pending = {};
-    };
-
-    this.addFile = function(name, text) { send({type: "add", name: name, text: text}); };
-    this.delFile = function(name) { send({type: "del", name: name}); };
-    this.request = function(body, c) { send({type: "req", body: body}, c); };
-  }
-});
diff --git a/public/js/lib/codemirror/addon/tern/worker.js b/public/js/lib/codemirror/addon/tern/worker.js
deleted file mode 100644
index 48277af..0000000
--- a/public/js/lib/codemirror/addon/tern/worker.js
+++ /dev/null
@@ -1,44 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// declare global: tern, server
-
-var server;
-
-this.onmessage = function(e) {
-  var data = e.data;
-  switch (data.type) {
-  case "init": return startServer(data.defs, data.plugins, data.scripts);
-  case "add": return server.addFile(data.name, data.text);
-  case "del": return server.delFile(data.name);
-  case "req": return server.request(data.body, function(err, reqData) {
-    postMessage({id: data.id, body: reqData, err: err && String(err)});
-  });
-  case "getFile":
-    var c = pending[data.id];
-    delete pending[data.id];
-    return c(data.err, data.text);
-  default: throw new Error("Unknown message type: " + data.type);
-  }
-};
-
-var nextId = 0, pending = {};
-function getFile(file, c) {
-  postMessage({type: "getFile", name: file, id: ++nextId});
-  pending[nextId] = c;
-}
-
-function startServer(defs, plugins, scripts) {
-  if (scripts) importScripts.apply(null, scripts);
-
-  server = new tern.Server({
-    getFile: getFile,
-    async: true,
-    defs: defs,
-    plugins: plugins
-  });
-}
-
-var console = {
-  log: function(v) { postMessage({type: "debug", message: v}); }
-};
diff --git a/public/js/lib/codemirror/addon/wrap/hardwrap.js b/public/js/lib/codemirror/addon/wrap/hardwrap.js
deleted file mode 100644
index fe9b4dd..0000000
--- a/public/js/lib/codemirror/addon/wrap/hardwrap.js
+++ /dev/null
@@ -1,139 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  var Pos = CodeMirror.Pos;
-
-  function findParagraph(cm, pos, options) {
-    var startRE = options.paragraphStart || cm.getHelper(pos, "paragraphStart");
-    for (var start = pos.line, first = cm.firstLine(); start > first; --start) {
-      var line = cm.getLine(start);
-      if (startRE && startRE.test(line)) break;
-      if (!/\S/.test(line)) { ++start; break; }
-    }
-    var endRE = options.paragraphEnd || cm.getHelper(pos, "paragraphEnd");
-    for (var end = pos.line + 1, last = cm.lastLine(); end <= last; ++end) {
-      var line = cm.getLine(end);
-      if (endRE && endRE.test(line)) { ++end; break; }
-      if (!/\S/.test(line)) break;
-    }
-    return {from: start, to: end};
-  }
-
-  function findBreakPoint(text, column, wrapOn, killTrailingSpace) {
-    for (var at = column; at > 0; --at)
-      if (wrapOn.test(text.slice(at - 1, at + 1))) break;
-    if (at == 0) at = column;
-    var endOfText = at;
-    if (killTrailingSpace)
-      while (text.charAt(endOfText - 1) == " ") --endOfText;
-    return {from: endOfText, to: at};
-  }
-
-  function wrapRange(cm, from, to, options) {
-    from = cm.clipPos(from); to = cm.clipPos(to);
-    var column = options.column || 80;
-    var wrapOn = options.wrapOn || /\s\S|-[^\.\d]/;
-    var killTrailing = options.killTrailingSpace !== false;
-    var changes = [], curLine = "", curNo = from.line;
-    var lines = cm.getRange(from, to, false);
-    if (!lines.length) return null;
-    var leadingSpace = lines[0].match(/^[ \t]*/)[0];
-
-    for (var i = 0; i < lines.length; ++i) {
-      var text = lines[i], oldLen = curLine.length, spaceInserted = 0;
-      if (curLine && text && !wrapOn.test(curLine.charAt(curLine.length - 1) + text.charAt(0))) {
-        curLine += " ";
-        spaceInserted = 1;
-      }
-      var spaceTrimmed = "";
-      if (i) {
-        spaceTrimmed = text.match(/^\s*/)[0];
-        text = text.slice(spaceTrimmed.length);
-      }
-      curLine += text;
-      if (i) {
-        var firstBreak = curLine.length > column && leadingSpace == spaceTrimmed &&
-          findBreakPoint(curLine, column, wrapOn, killTrailing);
-        // If this isn't broken, or is broken at a different point, remove old break
-        if (!firstBreak || firstBreak.from != oldLen || firstBreak.to != oldLen + spaceInserted) {
-          changes.push({text: [spaceInserted ? " " : ""],
-                        from: Pos(curNo, oldLen),
-                        to: Pos(curNo + 1, spaceTrimmed.length)});
-        } else {
-          curLine = leadingSpace + text;
-          ++curNo;
-        }
-      }
-      while (curLine.length > column) {
-        var bp = findBreakPoint(curLine, column, wrapOn, killTrailing);
-        changes.push({text: ["", leadingSpace],
-                      from: Pos(curNo, bp.from),
-                      to: Pos(curNo, bp.to)});
-        curLine = leadingSpace + curLine.slice(bp.to);
-        ++curNo;
-      }
-    }
-    if (changes.length) cm.operation(function() {
-      for (var i = 0; i < changes.length; ++i) {
-        var change = changes[i];
-        cm.replaceRange(change.text, change.from, change.to);
-      }
-    });
-    return changes.length ? {from: changes[0].from, to: CodeMirror.changeEnd(changes[changes.length - 1])} : null;
-  }
-
-  CodeMirror.defineExtension("wrapParagraph", function(pos, options) {
-    options = options || {};
-    if (!pos) pos = this.getCursor();
-    var para = findParagraph(this, pos, options);
-    return wrapRange(this, Pos(para.from, 0), Pos(para.to - 1), options);
-  });
-
-  CodeMirror.commands.wrapLines = function(cm) {
-    cm.operation(function() {
-      var ranges = cm.listSelections(), at = cm.lastLine() + 1;
-      for (var i = ranges.length - 1; i >= 0; i--) {
-        var range = ranges[i], span;
-        if (range.empty()) {
-          var para = findParagraph(cm, range.head, {});
-          span = {from: Pos(para.from, 0), to: Pos(para.to - 1)};
-        } else {
-          span = {from: range.from(), to: range.to()};
-        }
-        if (span.to.line >= at) continue;
-        at = span.from.line;
-        wrapRange(cm, span.from, span.to, {});
-      }
-    });
-  };
-
-  CodeMirror.defineExtension("wrapRange", function(from, to, options) {
-    return wrapRange(this, from, to, options || {});
-  });
-
-  CodeMirror.defineExtension("wrapParagraphsInRange", function(from, to, options) {
-    options = options || {};
-    var cm = this, paras = [];
-    for (var line = from.line; line <= to.line;) {
-      var para = findParagraph(cm, Pos(line, 0), options);
-      paras.push(para);
-      line = para.to;
-    }
-    var madeChange = false;
-    if (paras.length) cm.operation(function() {
-      for (var i = paras.length - 1; i >= 0; --i)
-        madeChange = madeChange || wrapRange(cm, Pos(paras[i].from, 0), Pos(paras[i].to - 1), options);
-    });
-    return madeChange;
-  });
-});
diff --git a/public/js/lib/codemirror/bin/authors.sh b/public/js/lib/codemirror/bin/authors.sh
deleted file mode 100755
index b3ee99c..0000000
--- a/public/js/lib/codemirror/bin/authors.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-# Combine existing list of authors with everyone known in git, sort, add header.
-tail --lines=+3 AUTHORS > AUTHORS.tmp
-git log --format='%aN' >> AUTHORS.tmp
-echo -e "List of CodeMirror contributors. Updated before every release.\n" > AUTHORS
-sort -u AUTHORS.tmp >> AUTHORS
-rm -f AUTHORS.tmp
diff --git a/public/js/lib/codemirror/bin/compress b/public/js/lib/codemirror/bin/compress
deleted file mode 100755
index 809fbe8..0000000
--- a/public/js/lib/codemirror/bin/compress
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/usr/bin/env node
-
-// Compression helper for CodeMirror
-//
-// Example:
-//
-//   bin/compress codemirror runmode javascript xml
-//
-// Will take lib/codemirror.js, addon/runmode/runmode.js,
-// mode/javascript/javascript.js, and mode/xml/xml.js, run them though
-// the online minifier at http://marijnhaverbeke.nl/uglifyjs, and spit
-// out the result.
-//
-//   bin/compress codemirror --local /path/to/bin/UglifyJS
-//
-// Will use a local minifier instead of the online default one.
-//
-// Script files are specified without .js ending. Prefixing them with
-// their full (local) path is optional. So you may say lib/codemirror
-// or mode/xml/xml to be more precise. In fact, even the .js suffix
-// may be speficied, if wanted.
-
-"use strict";
-
-var fs = require("fs");
-
-function help(ok) {
-  console.log("usage: " + process.argv[1] + " [--local /path/to/uglifyjs] files...");
-  process.exit(ok ? 0 : 1);
-}
-
-var local = null, args = [], extraArgs = null, files = [], blob = "";
-
-for (var i = 2; i < process.argv.length; ++i) {
-  var arg = process.argv[i];
-  if (arg == "--local" && i + 1 < process.argv.length) {
-    var parts = process.argv[++i].split(/\s+/);
-    local = parts[0];
-    extraArgs = parts.slice(1);
-    if (!extraArgs.length) extraArgs = ["-c", "-m"];
-  } else if (arg == "--help") {
-    help(true);
-  } else if (arg[0] != "-") {
-    files.push({name: arg, re: new RegExp("(?:\\/|^)" + arg + (/\.js$/.test(arg) ? "$" : "\\.js$"))});
-  } else help(false);
-}
-
-function walk(dir) {
-  fs.readdirSync(dir).forEach(function(fname) {
-    if (/^[_\.]/.test(fname)) return;
-    var file = dir + fname;
-    if (fs.statSync(file).isDirectory()) return walk(file + "/");
-    if (files.some(function(spec, i) {
-      var match = spec.re.test(file);
-      if (match) files.splice(i, 1);
-      return match;
-    })) {
-      if (local) args.push(file);
-      else blob += fs.readFileSync(file, "utf8");
-    }
-  });
-}
-
-walk("lib/");
-walk("addon/");
-walk("mode/");
-
-if (!local && !blob) help(false);
-
-if (files.length) {
-  console.log("Some speficied files were not found: " +
-              files.map(function(a){return a.name;}).join(", "));
-  process.exit(1);
-}
-  
-if (local) {
-  require("child_process").spawn(local, args.concat(extraArgs), {stdio: ["ignore", process.stdout, process.stderr]});
-} else {
-  var data = new Buffer("js_code=" + require("querystring").escape(blob), "utf8");
-  var req = require("http").request({
-    host: "marijnhaverbeke.nl",
-    port: 80,
-    method: "POST",
-    path: "/uglifyjs",
-    headers: {"content-type": "application/x-www-form-urlencoded",
-              "content-length": data.length}
-  });
-  req.on("response", function(resp) {
-    resp.on("data", function (chunk) { process.stdout.write(chunk); });
-  });
-  req.end(data);
-}
diff --git a/public/js/lib/codemirror/bin/lint b/public/js/lib/codemirror/bin/lint
deleted file mode 100755
index 4f70994..0000000
--- a/public/js/lib/codemirror/bin/lint
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env node
-
-var lint = require("../test/lint/lint"),
-    path = require("path");
-
-if (process.argv.length > 2) {
-  lint.checkDir(process.argv[2]);
-} else {
-  process.chdir(path.resolve(__dirname, ".."));
-  lint.checkDir("lib");
-  lint.checkDir("mode");
-  lint.checkDir("addon");
-  lint.checkDir("keymap");
-}
-
-process.exit(lint.success() ? 0 : 1);
diff --git a/public/js/lib/codemirror/bin/release b/public/js/lib/codemirror/bin/release
deleted file mode 100755
index ba6630a..0000000
--- a/public/js/lib/codemirror/bin/release
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env node
-
-var fs = require("fs"), child = require("child_process");
-
-var number, bumpOnly;
-
-for (var i = 2; i < process.argv.length; i++) {
-  if (process.argv[i] == "-bump") bumpOnly = true;
-  else if (/^\d+\.\d+\.\d+$/.test(process.argv[i])) number = process.argv[i];
-  else { console.log("Bogus command line arg: " + process.argv[i]); process.exit(1); }
-}
-
-if (!number) { console.log("Must give a version"); process.exit(1); }
-
-function rewrite(file, f) {
-  fs.writeFileSync(file, f(fs.readFileSync(file, "utf8")), "utf8");
-}
-
-rewrite("lib/codemirror.js", function(lib) {
-  return lib.replace(/CodeMirror\.version = "\d+\.\d+\.\d+"/,
-                     "CodeMirror.version = \"" + number + "\"");
-});
-function rewriteJSON(pack) {
-  return pack.replace(/"version":"\d+\.\d+\.\d+"/, "\"version\":\"" + number + "\"");
-}
-rewrite("package.json", rewriteJSON);
-rewrite("bower.json", rewriteJSON);
-rewrite("doc/manual.html", function(manual) {
-  return manual.replace(/>version \d+\.\d+\.\d+<\/span>/, ">version " + number + "</span>");
-});
-
-if (bumpOnly) process.exit(0);
-
-child.exec("bash bin/authors.sh", function(){});
-
-var simple = number.slice(0, number.lastIndexOf("."));
-
-rewrite("doc/compress.html", function(cmp) {
-  return cmp.replace(/<option value="http:\/\/codemirror.net\/">HEAD<\/option>/,
-                     "<option value=\"http://codemirror.net/\">HEAD</option>\n        <option value=\"http://marijnhaverbeke.nl/git/codemirror?a=blob_plain;hb=" + number + ";f=\">" + simple + "</option>");
-});
-
-rewrite("index.html", function(index) {
-  return index.replace(/<strong>version \d+\.\d+<\/strong>/,
-                       "<strong>version " + simple + "</strong>");
-});
diff --git a/public/js/lib/codemirror/bin/source-highlight b/public/js/lib/codemirror/bin/source-highlight
deleted file mode 100755
index 6d15f1a..0000000
--- a/public/js/lib/codemirror/bin/source-highlight
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/env node
-
-// Simple command-line code highlighting tool. Reads code from stdin,
-// spits html to stdout. For example:
-//
-//   echo 'function foo(a) { return a; }' | bin/source-highlight -s javascript
-//   bin/source-highlight -s 
-
-var fs = require("fs");
-
-var CodeMirror = require("../addon/runmode/runmode.node.js");
-require("../mode/meta.js");
-
-var sPos = process.argv.indexOf("-s");
-if (sPos == -1 || sPos == process.argv.length - 1) {
-   console.error("Usage: source-highlight -s language");
-   process.exit(1);
-}
-var lang = process.argv[sPos + 1].toLowerCase(), modeName = lang;
-CodeMirror.modeInfo.forEach(function(info) {
-  if (info.mime == lang) {
-    modeName = info.mode;
-  } else if (info.name.toLowerCase() == lang) {
-    modeName = info.mode;
-    lang = info.mime;
-  }
-});
-
-if (!CodeMirror.modes[modeName])
-  require("../mode/" + modeName + "/" + modeName + ".js");
-
-function esc(str) {
-  return str.replace(/[<&]/g, function(ch) { return ch == "&" ? "&amp;" : "&lt;"; });
-}
-
-var code = fs.readFileSync("/dev/stdin", "utf8");
-var curStyle = null, accum = "";
-function flush() {
-  if (curStyle) process.stdout.write("<span class=\"" + curStyle.replace(/(^|\s+)/g, "$1cm-") + "\">" + esc(accum) + "</span>");
-  else process.stdout.write(esc(accum));
-}
-
-CodeMirror.runMode(code, lang, function(text, style) {
-  if (style != curStyle) {
-    flush();
-    curStyle = style; accum = text;
-  } else {
-    accum += text;
-  }
-});
-flush();
diff --git a/public/js/lib/codemirror/bower.json b/public/js/lib/codemirror/bower.json
deleted file mode 100644
index d896ce0..0000000
--- a/public/js/lib/codemirror/bower.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "name": "codemirror",
-  "version":"4.10.0",
-  "main": ["lib/codemirror.js", "lib/codemirror.css"],
-  "ignore": [
-    "**/.*",
-    "node_modules",
-    "components",
-    "bin",
-    "demo",
-    "doc",
-    "test",
-    "index.html",
-    "package.json"
-  ]
-}
diff --git a/public/js/lib/codemirror/index.html b/public/js/lib/codemirror/index.html
deleted file mode 100644
index 1278430..0000000
--- a/public/js/lib/codemirror/index.html
+++ /dev/null
@@ -1,200 +0,0 @@
-<!doctype html>
-
-<title>CodeMirror</title>
-<meta charset="utf-8"/>
-
-<link rel=stylesheet href="lib/codemirror.css">
-<link rel=stylesheet href="doc/docs.css">
-<script src="lib/codemirror.js"></script>
-<script src="mode/xml/xml.js"></script>
-<script src="mode/javascript/javascript.js"></script>
-<script src="mode/css/css.js"></script>
-<script src="mode/htmlmixed/htmlmixed.js"></script>
-<script src="addon/edit/matchbrackets.js"></script>
-
-<script src="doc/activebookmark.js"></script>
-
-<style>
-  .CodeMirror { height: auto; border: 1px solid #ddd; }
-  .CodeMirror-scroll { max-height: 200px; }
-  .CodeMirror pre { padding-left: 7px; line-height: 1.25; }
-</style>
-
-<div id=nav>
-  <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="doc/logo.png"></a>
-
-  <ul>
-    <li><a class=active data-default="true" href="#description">Home</a>
-    <li><a href="doc/manual.html">Manual</a>
-    <li><a href="https://github.com/codemirror/codemirror">Code</a>
-  </ul>
-  <ul>
-    <li><a href="#features">Features</a>
-    <li><a href="#community">Community</a>
-    <li><a href="#browsersupport">Browser support</a>
-  </ul>
-</div>
-
-<article>
-
-<section id=description class=first>
-  <p><strong>CodeMirror</strong> is a versatile text editor
-  implemented in JavaScript for the browser. It is specialized for
-  editing code, and comes with a number of <a href="mode/index.html">language modes</a> and <a href="doc/manual.html#addons">addons</a>
-  that implement more advanced editing functionality.</p>
-
-  <p>A rich <a href="doc/manual.html#api">programming API</a> and a
-  CSS <a href="doc/manual.html#styling">theming</a> system are
-  available for customizing CodeMirror to fit your application, and
-  extending it with new functionality.</p>
-</section>
-
-<section id=demo>
-  <h2>This is CodeMirror</h2>
-  <form style="position: relative; margin-top: .5em;"><textarea id=demotext>
-<!-- Create a simple CodeMirror instance -->
-<link rel="stylesheet" href="lib/codemirror.css">
-<script src="lib/codemirror.js"></script>
-<script>
-  var editor = CodeMirror.fromTextArea(myTextarea, {
-    lineNumbers: true
-  });
-</script></textarea>
-  <select id="demolist" onchange="document.location = this.options[this.selectedIndex].value;">
-    <option value="#">Other demos...</option>
-    <option value="demo/complete.html">Autocompletion</option>
-    <option value="demo/folding.html">Code folding</option>
-    <option value="demo/theme.html">Themes</option>
-    <option value="mode/htmlmixed/index.html">Mixed language modes</option>
-    <option value="demo/bidi.html">Bi-directional text</option>
-    <option value="demo/variableheight.html">Variable font sizes</option>
-    <option value="demo/search.html">Search interface</option>
-    <option value="demo/vim.html">Vim bindings</option>
-    <option value="demo/emacs.html">Emacs bindings</option>
-    <option value="demo/sublime.html">Sublime Text bindings</option>
-    <option value="demo/tern.html">Tern integration</option>
-    <option value="demo/merge.html">Merge/diff interface</option>
-    <option value="demo/fullscreen.html">Full-screen editor</option>
-    <option value="demo/simplescrollbars.html">Custom scrollbars</option>
-  </select></form>
-  <script>
-    var editor = CodeMirror.fromTextArea(document.getElementById("demotext"), {
-      lineNumbers: true,
-      mode: "text/html",
-      matchBrackets: true
-    });
-  </script>
-  <div style="position: relative; margin: 1em 0;">
-    <a class="bigbutton left" href="http://codemirror.net/codemirror.zip">DOWNLOAD LATEST RELEASE</a>
-    <div><strong>version 4.10</strong> (<a href="doc/releases.html">Release notes</a>)</div>
-    <div>or use the <a href="doc/compress.html">minification helper</a></div>
-    <div style="position: absolute; top: 0; right: 0; text-align: right">
-      <span class="bigbutton right" onclick="document.getElementById('paypal').submit();">DONATE WITH PAYPAL</span>
-      <div style="position: relative">
-        or <span onclick="document.getElementById('bankinfo').style.display = 'block';" class=quasilink>Bank</span>,
-        <span onclick="document.getElementById('bcinfo').style.display = 'block';" class=quasilink>Bitcoin</span>,
-        <a href="http://www.patreon.com/marijn">Patreon</a><br>
-        <a href="https://gratipay.com/marijnh/">Gratipay</a><br>
-        <div id=bankinfo class=bankinfo>
-          <span class=bankinfo_close onclick="document.getElementById('bankinfo').style.display = '';">×</span>
-          Bank: <i>Rabobank</i><br/>
-          Country: <i>Netherlands</i><br/>
-          SWIFT: <i>RABONL2U</i><br/>
-          Account: <i>147850770</i><br/>
-          Name: <i>Marijn Haverbeke</i><br/>
-          IBAN: <i>NL26 RABO 0147 8507 70</i>
-        </div>
-        <div id=bcinfo class=bankinfo>
-          <span class=bankinfo_close onclick="document.getElementById('bcinfo').style.display = '';">×</span>
-          Bitcoin address: 1HVnnU8E9yLPeFyNgNtUPB5deXBvUmZ6Nx
-        </div>
-        <form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="paypal">
-          <input type="hidden" name="cmd" value="_s-xclick"/>
-          <input type="hidden" name="hosted_button_id" value="3FVHS5FGUY7CC"/>
-        </form>
-      </div>
-      <div>
-        Purchase <a href="http://codemirror.com">commercial support</a>
-      </div>
-    </div>
-  </div>
-</section>
-
-<section id=features>
-  <h2>Features</h2>
-  <ul>
-    <li>Support for <a href="mode/index.html">over 60 languages</a> out of the box
-    <li>A powerful, <a href="mode/htmlmixed/index.html">composable</a> language mode <a href="doc/manual.html#modeapi">system</a>
-    <li><a href="doc/manual.html#addon_show-hint">Autocompletion</a> (<a href="demo/xmlcomplete.html">XML</a>)
-    <li><a href="doc/manual.html#addon_foldcode">Code folding</a>
-    <li><a href="doc/manual.html#option_extraKeys">Configurable</a> keybindings
-    <li><a href="demo/vim.html">Vim</a>, <a href="demo/emacs.html">Emacs</a>, and <a href="demo/sublime.html">Sublime Text</a> bindings
-    <li><a href="doc/manual.html#addon_search">Search and replace</a> interface
-    <li><a href="doc/manual.html#addon_matchbrackets">Bracket</a> and <a href="doc/manual.html#addon_matchtags">tag</a> matching
-    <li>Support for <a href="demo/buffers.html">split views</a>
-    <li><a href="doc/manual.html#addon_lint">Linter integration</a>
-    <li><a href="demo/variableheight.html">Mixing font sizes and styles</a>
-    <li><a href="demo/theme.html">Various themes</a>
-    <li>Able to <a href="demo/resize.html">resize to fit content</a>
-    <li><a href="doc/manual.html#mark_replacedWith">Inline</a> and <a href="doc/manual.html#addLineWidget">block</a> widgets
-    <li>Programmable <a href="demo/marker.html">gutters</a>
-    <li>Making ranges of text <a href="doc/manual.html#markText">styled, read-only, or atomic</a>
-    <li><a href="demo/bidi.html">Bi-directional text</a> support
-    <li>Many other <a href="doc/manual.html#api">methods</a> and <a href="doc/manual.html#addons">addons</a>...
-  </ul>
-</section>
-
-<section id=community>
-  <h2>Community</h2>
-
-  <p>CodeMirror is an open-source project shared under
-  an <a href="LICENSE">MIT license</a>. It is the editor used in the
-  dev tools for
-  both <a href="https://hacks.mozilla.org/2013/11/firefox-developer-tools-episode-27-edit-as-html-codemirror-more/">Firefox</a>
-  and <a href="https://developers.google.com/chrome-developer-tools/">Chrome</a>, <a href="http://www.lighttable.com/">Light
-  Table</a>, <a href="http://brackets.io/">Adobe
-  Brackets</a>, <a href="http://blog.bitbucket.org/2013/05/14/edit-your-code-in-the-cloud-with-bitbucket/">Bitbucket</a>,
-  and <a href="doc/realworld.html">many other projects</a>.</p>
-
-  <p>Development and bug tracking happens
-  on <a href="https://github.com/codemirror/CodeMirror/">github</a>
-  (<a href="http://marijnhaverbeke.nl/git/codemirror">alternate git
-  repository</a>).
-  Please <a href="http://codemirror.net/doc/reporting.html">read these
-  pointers</a> before submitting a bug. Use pull requests to submit
-  patches. All contributions must be released under the same MIT
-  license that CodeMirror uses.</p>
-
-  <p>Discussion around the project is done on
-  a <a href="http://discuss.codemirror.net">discussion forum</a>.
-  There is also
-  the <a href="http://groups.google.com/group/codemirror-announce">codemirror-announce</a>
-  list, which is only used for major announcements (such as new
-  versions). If needed, you can
-  contact <a href="mailto:marijnh@gmail.com">the maintainer</a>
-  directly.</p>
-
-  <p>A list of CodeMirror-related software that is not part of the
-  main distribution is maintained
-  on <a href="https://github.com/codemirror/CodeMirror/wiki/CodeMirror-addons">our
-  wiki</a>. Feel free to add your project.</p>
-</section>
-
-<section id=browsersupport>
-  <h2>Browser support</h2>
-  <p>The <em>desktop</em> versions of the following browsers,
-  in <em>standards mode</em> (HTML5 <code>&lt;!doctype html></code>
-  recommended) are supported:</p>
-  <table style="margin-bottom: 1em">
-    <tr><th>Firefox</th><td>version 4 and up</td></tr>
-    <tr><th>Chrome</th><td>any version</td></tr>
-    <tr><th>Safari</th><td>version 5.2 and up</td></tr>
-    <tr><th style="padding-right: 1em;">Internet Explorer</th><td>version 8 and up</td></tr>
-    <tr><th>Opera</th><td>version 9 and up</td></tr>
-  </table>
-  <p>Modern mobile browsers tend to partly work. Bug reports and
-  patches for mobile support are welcome, but the maintainer does not
-  have the time or budget to actually work on it himself.</p>
-</section>
-
-</article>
diff --git a/public/js/lib/codemirror/keymap/emacs.js b/public/js/lib/codemirror/keymap/emacs.js
deleted file mode 100644
index 6a8bb4a..0000000
--- a/public/js/lib/codemirror/keymap/emacs.js
+++ /dev/null
@@ -1,411 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  var Pos = CodeMirror.Pos;
-  function posEq(a, b) { return a.line == b.line && a.ch == b.ch; }
-
-  // Kill 'ring'
-
-  var killRing = [];
-  function addToRing(str) {
-    killRing.push(str);
-    if (killRing.length > 50) killRing.shift();
-  }
-  function growRingTop(str) {
-    if (!killRing.length) return addToRing(str);
-    killRing[killRing.length - 1] += str;
-  }
-  function getFromRing(n) { return killRing[killRing.length - (n ? Math.min(n, 1) : 1)] || ""; }
-  function popFromRing() { if (killRing.length > 1) killRing.pop(); return getFromRing(); }
-
-  var lastKill = null;
-
-  function kill(cm, from, to, mayGrow, text) {
-    if (text == null) text = cm.getRange(from, to);
-
-    if (mayGrow && lastKill && lastKill.cm == cm && posEq(from, lastKill.pos) && cm.isClean(lastKill.gen))
-      growRingTop(text);
-    else
-      addToRing(text);
-    cm.replaceRange("", from, to, "+delete");
-
-    if (mayGrow) lastKill = {cm: cm, pos: from, gen: cm.changeGeneration()};
-    else lastKill = null;
-  }
-
-  // Boundaries of various units
-
-  function byChar(cm, pos, dir) {
-    return cm.findPosH(pos, dir, "char", true);
-  }
-
-  function byWord(cm, pos, dir) {
-    return cm.findPosH(pos, dir, "word", true);
-  }
-
-  function byLine(cm, pos, dir) {
-    return cm.findPosV(pos, dir, "line", cm.doc.sel.goalColumn);
-  }
-
-  function byPage(cm, pos, dir) {
-    return cm.findPosV(pos, dir, "page", cm.doc.sel.goalColumn);
-  }
-
-  function byParagraph(cm, pos, dir) {
-    var no = pos.line, line = cm.getLine(no);
-    var sawText = /\S/.test(dir < 0 ? line.slice(0, pos.ch) : line.slice(pos.ch));
-    var fst = cm.firstLine(), lst = cm.lastLine();
-    for (;;) {
-      no += dir;
-      if (no < fst || no > lst)
-        return cm.clipPos(Pos(no - dir, dir < 0 ? 0 : null));
-      line = cm.getLine(no);
-      var hasText = /\S/.test(line);
-      if (hasText) sawText = true;
-      else if (sawText) return Pos(no, 0);
-    }
-  }
-
-  function bySentence(cm, pos, dir) {
-    var line = pos.line, ch = pos.ch;
-    var text = cm.getLine(pos.line), sawWord = false;
-    for (;;) {
-      var next = text.charAt(ch + (dir < 0 ? -1 : 0));
-      if (!next) { // End/beginning of line reached
-        if (line == (dir < 0 ? cm.firstLine() : cm.lastLine())) return Pos(line, ch);
-        text = cm.getLine(line + dir);
-        if (!/\S/.test(text)) return Pos(line, ch);
-        line += dir;
-        ch = dir < 0 ? text.length : 0;
-        continue;
-      }
-      if (sawWord && /[!?.]/.test(next)) return Pos(line, ch + (dir > 0 ? 1 : 0));
-      if (!sawWord) sawWord = /\w/.test(next);
-      ch += dir;
-    }
-  }
-
-  function byExpr(cm, pos, dir) {
-    var wrap;
-    if (cm.findMatchingBracket && (wrap = cm.findMatchingBracket(pos, true))
-        && wrap.match && (wrap.forward ? 1 : -1) == dir)
-      return dir > 0 ? Pos(wrap.to.line, wrap.to.ch + 1) : wrap.to;
-
-    for (var first = true;; first = false) {
-      var token = cm.getTokenAt(pos);
-      var after = Pos(pos.line, dir < 0 ? token.start : token.end);
-      if (first && dir > 0 && token.end == pos.ch || !/\w/.test(token.string)) {
-        var newPos = cm.findPosH(after, dir, "char");
-        if (posEq(after, newPos)) return pos;
-        else pos = newPos;
-      } else {
-        return after;
-      }
-    }
-  }
-
-  // Prefixes (only crudely supported)
-
-  function getPrefix(cm, precise) {
-    var digits = cm.state.emacsPrefix;
-    if (!digits) return precise ? null : 1;
-    clearPrefix(cm);
-    return digits == "-" ? -1 : Number(digits);
-  }
-
-  function repeated(cmd) {
-    var f = typeof cmd == "string" ? function(cm) { cm.execCommand(cmd); } : cmd;
-    return function(cm) {
-      var prefix = getPrefix(cm);
-      f(cm);
-      for (var i = 1; i < prefix; ++i) f(cm);
-    };
-  }
-
-  function findEnd(cm, pos, by, dir) {
-    var prefix = getPrefix(cm);
-    if (prefix < 0) { dir = -dir; prefix = -prefix; }
-    for (var i = 0; i < prefix; ++i) {
-      var newPos = by(cm, pos, dir);
-      if (posEq(newPos, pos)) break;
-      pos = newPos;
-    }
-    return pos;
-  }
-
-  function move(by, dir) {
-    var f = function(cm) {
-      cm.extendSelection(findEnd(cm, cm.getCursor(), by, dir));
-    };
-    f.motion = true;
-    return f;
-  }
-
-  function killTo(cm, by, dir) {
-    var selections = cm.listSelections(), cursor;
-    var i = selections.length;
-    while (i--) {
-      cursor = selections[i].head;
-      kill(cm, cursor, findEnd(cm, cursor, by, dir), true);
-    }
-  }
-
-  function killRegion(cm) {
-    if (cm.somethingSelected()) {
-      var selections = cm.listSelections(), selection;
-      var i = selections.length;
-      while (i--) {
-        selection = selections[i];
-        kill(cm, selection.anchor, selection.head);
-      }
-      return true;
-    }
-  }
-
-  function addPrefix(cm, digit) {
-    if (cm.state.emacsPrefix) {
-      if (digit != "-") cm.state.emacsPrefix += digit;
-      return;
-    }
-    // Not active yet
-    cm.state.emacsPrefix = digit;
-    cm.on("keyHandled", maybeClearPrefix);
-    cm.on("inputRead", maybeDuplicateInput);
-  }
-
-  var prefixPreservingKeys = {"Alt-G": true, "Ctrl-X": true, "Ctrl-Q": true, "Ctrl-U": true};
-
-  function maybeClearPrefix(cm, arg) {
-    if (!cm.state.emacsPrefixMap && !prefixPreservingKeys.hasOwnProperty(arg))
-      clearPrefix(cm);
-  }
-
-  function clearPrefix(cm) {
-    cm.state.emacsPrefix = null;
-    cm.off("keyHandled", maybeClearPrefix);
-    cm.off("inputRead", maybeDuplicateInput);
-  }
-
-  function maybeDuplicateInput(cm, event) {
-    var dup = getPrefix(cm);
-    if (dup > 1 && event.origin == "+input") {
-      var one = event.text.join("\n"), txt = "";
-      for (var i = 1; i < dup; ++i) txt += one;
-      cm.replaceSelection(txt);
-    }
-  }
-
-  function addPrefixMap(cm) {
-    cm.state.emacsPrefixMap = true;
-    cm.addKeyMap(prefixMap);
-    cm.on("keyHandled", maybeRemovePrefixMap);
-    cm.on("inputRead", maybeRemovePrefixMap);
-  }
-
-  function maybeRemovePrefixMap(cm, arg) {
-    if (typeof arg == "string" && (/^\d$/.test(arg) || arg == "Ctrl-U")) return;
-    cm.removeKeyMap(prefixMap);
-    cm.state.emacsPrefixMap = false;
-    cm.off("keyHandled", maybeRemovePrefixMap);
-    cm.off("inputRead", maybeRemovePrefixMap);
-  }
-
-  // Utilities
-
-  function setMark(cm) {
-    cm.setCursor(cm.getCursor());
-    cm.setExtending(!cm.getExtending());
-    cm.on("change", function() { cm.setExtending(false); });
-  }
-
-  function clearMark(cm) {
-    cm.setExtending(false);
-    cm.setCursor(cm.getCursor());
-  }
-
-  function getInput(cm, msg, f) {
-    if (cm.openDialog)
-      cm.openDialog(msg + ": <input type=\"text\" style=\"width: 10em\"/>", f, {bottom: true});
-    else
-      f(prompt(msg, ""));
-  }
-
-  function operateOnWord(cm, op) {
-    var start = cm.getCursor(), end = cm.findPosH(start, 1, "word");
-    cm.replaceRange(op(cm.getRange(start, end)), start, end);
-    cm.setCursor(end);
-  }
-
-  function toEnclosingExpr(cm) {
-    var pos = cm.getCursor(), line = pos.line, ch = pos.ch;
-    var stack = [];
-    while (line >= cm.firstLine()) {
-      var text = cm.getLine(line);
-      for (var i = ch == null ? text.length : ch; i > 0;) {
-        var ch = text.charAt(--i);
-        if (ch == ")")
-          stack.push("(");
-        else if (ch == "]")
-          stack.push("[");
-        else if (ch == "}")
-          stack.push("{");
-        else if (/[\(\{\[]/.test(ch) && (!stack.length || stack.pop() != ch))
-          return cm.extendSelection(Pos(line, i));
-      }
-      --line; ch = null;
-    }
-  }
-
-  function quit(cm) {
-    cm.execCommand("clearSearch");
-    clearMark(cm);
-  }
-
-  // Actual keymap
-
-  var keyMap = CodeMirror.keyMap.emacs = CodeMirror.normalizeKeyMap({
-    "Ctrl-W": function(cm) {kill(cm, cm.getCursor("start"), cm.getCursor("end"));},
-    "Ctrl-K": repeated(function(cm) {
-      var start = cm.getCursor(), end = cm.clipPos(Pos(start.line));
-      var text = cm.getRange(start, end);
-      if (!/\S/.test(text)) {
-        text += "\n";
-        end = Pos(start.line + 1, 0);
-      }
-      kill(cm, start, end, true, text);
-    }),
-    "Alt-W": function(cm) {
-      addToRing(cm.getSelection());
-      clearMark(cm);
-    },
-    "Ctrl-Y": function(cm) {
-      var start = cm.getCursor();
-      cm.replaceRange(getFromRing(getPrefix(cm)), start, start, "paste");
-      cm.setSelection(start, cm.getCursor());
-    },
-    "Alt-Y": function(cm) {cm.replaceSelection(popFromRing(), "around", "paste");},
-
-    "Ctrl-Space": setMark, "Ctrl-Shift-2": setMark,
-
-    "Ctrl-F": move(byChar, 1), "Ctrl-B": move(byChar, -1),
-    "Right": move(byChar, 1), "Left": move(byChar, -1),
-    "Ctrl-D": function(cm) { killTo(cm, byChar, 1); },
-    "Delete": function(cm) { killRegion(cm) || killTo(cm, byChar, 1); },
-    "Ctrl-H": function(cm) { killTo(cm, byChar, -1); },
-    "Backspace": function(cm) { killRegion(cm) || killTo(cm, byChar, -1); },
-
-    "Alt-F": move(byWord, 1), "Alt-B": move(byWord, -1),
-    "Alt-D": function(cm) { killTo(cm, byWord, 1); },
-    "Alt-Backspace": function(cm) { killTo(cm, byWord, -1); },
-
-    "Ctrl-N": move(byLine, 1), "Ctrl-P": move(byLine, -1),
-    "Down": move(byLine, 1), "Up": move(byLine, -1),
-    "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd",
-    "End": "goLineEnd", "Home": "goLineStart",
-
-    "Alt-V": move(byPage, -1), "Ctrl-V": move(byPage, 1),
-    "PageUp": move(byPage, -1), "PageDown": move(byPage, 1),
-
-    "Ctrl-Up": move(byParagraph, -1), "Ctrl-Down": move(byParagraph, 1),
-
-    "Alt-A": move(bySentence, -1), "Alt-E": move(bySentence, 1),
-    "Alt-K": function(cm) { killTo(cm, bySentence, 1); },
-
-    "Ctrl-Alt-K": function(cm) { killTo(cm, byExpr, 1); },
-    "Ctrl-Alt-Backspace": function(cm) { killTo(cm, byExpr, -1); },
-    "Ctrl-Alt-F": move(byExpr, 1), "Ctrl-Alt-B": move(byExpr, -1),
-
-    "Shift-Ctrl-Alt-2": function(cm) {
-      var cursor = cm.getCursor();
-      cm.setSelection(findEnd(cm, cursor, byExpr, 1), cursor);
-    },
-    "Ctrl-Alt-T": function(cm) {
-      var leftStart = byExpr(cm, cm.getCursor(), -1), leftEnd = byExpr(cm, leftStart, 1);
-      var rightEnd = byExpr(cm, leftEnd, 1), rightStart = byExpr(cm, rightEnd, -1);
-      cm.replaceRange(cm.getRange(rightStart, rightEnd) + cm.getRange(leftEnd, rightStart) +
-                      cm.getRange(leftStart, leftEnd), leftStart, rightEnd);
-    },
-    "Ctrl-Alt-U": repeated(toEnclosingExpr),
-
-    "Alt-Space": function(cm) {
-      var pos = cm.getCursor(), from = pos.ch, to = pos.ch, text = cm.getLine(pos.line);
-      while (from && /\s/.test(text.charAt(from - 1))) --from;
-      while (to < text.length && /\s/.test(text.charAt(to))) ++to;
-      cm.replaceRange(" ", Pos(pos.line, from), Pos(pos.line, to));
-    },
-    "Ctrl-O": repeated(function(cm) { cm.replaceSelection("\n", "start"); }),
-    "Ctrl-T": repeated(function(cm) {
-      cm.execCommand("transposeChars");
-    }),
-
-    "Alt-C": repeated(function(cm) {
-      operateOnWord(cm, function(w) {
-        var letter = w.search(/\w/);
-        if (letter == -1) return w;
-        return w.slice(0, letter) + w.charAt(letter).toUpperCase() + w.slice(letter + 1).toLowerCase();
-      });
-    }),
-    "Alt-U": repeated(function(cm) {
-      operateOnWord(cm, function(w) { return w.toUpperCase(); });
-    }),
-    "Alt-L": repeated(function(cm) {
-      operateOnWord(cm, function(w) { return w.toLowerCase(); });
-    }),
-
-    "Alt-;": "toggleComment",
-
-    "Ctrl-/": repeated("undo"), "Shift-Ctrl--": repeated("undo"),
-    "Ctrl-Z": repeated("undo"), "Cmd-Z": repeated("undo"),
-    "Shift-Alt-,": "goDocStart", "Shift-Alt-.": "goDocEnd",
-    "Ctrl-S": "findNext", "Ctrl-R": "findPrev", "Ctrl-G": quit, "Shift-Alt-5": "replace",
-    "Alt-/": "autocomplete",
-    "Ctrl-J": "newlineAndIndent", "Enter": false, "Tab": "indentAuto",
-
-    "Alt-G G": function(cm) {
-      var prefix = getPrefix(cm, true);
-      if (prefix != null && prefix > 0) return cm.setCursor(prefix - 1);
-
-      getInput(cm, "Goto line", function(str) {
-        var num;
-        if (str && !isNaN(num = Number(str)) && num == num|0 && num > 0)
-          cm.setCursor(num - 1);
-      });
-    },
-
-    "Ctrl-X Tab": function(cm) {
-      cm.indentSelection(getPrefix(cm, true) || cm.getOption("indentUnit"));
-    },
-    "Ctrl-X Ctrl-X": function(cm) {
-      cm.setSelection(cm.getCursor("head"), cm.getCursor("anchor"));
-    },
-    "Ctrl-X Ctrl-S": "save",
-    "Ctrl-X Ctrl-W": "save",
-    "Ctrl-X S": "saveAll",
-    "Ctrl-X F": "open",
-    "Ctrl-X U": repeated("undo"),
-    "Ctrl-X K": "close",
-    "Ctrl-X Delete": function(cm) { kill(cm, cm.getCursor(), bySentence(cm, cm.getCursor(), 1), true); },
-
-    "Ctrl-Q Tab": repeated("insertTab"),
-    "Ctrl-U": addPrefixMap
-  });
-
-  var prefixMap = {"Ctrl-G": clearPrefix};
-  function regPrefix(d) {
-    prefixMap[d] = function(cm) { addPrefix(cm, d); };
-    keyMap["Ctrl-" + d] = function(cm) { addPrefix(cm, d); };
-    prefixPreservingKeys["Ctrl-" + d] = true;
-  }
-  for (var i = 0; i < 10; ++i) regPrefix(String(i));
-  regPrefix("-");
-});
diff --git a/public/js/lib/codemirror/keymap/sublime.js b/public/js/lib/codemirror/keymap/sublime.js
deleted file mode 100644
index 45936c3..0000000
--- a/public/js/lib/codemirror/keymap/sublime.js
+++ /dev/null
@@ -1,540 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// A rough approximation of Sublime Text's keybindings
-// Depends on addon/search/searchcursor.js and optionally addon/dialog/dialogs.js
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../lib/codemirror"), require("../addon/search/searchcursor"), require("../addon/edit/matchbrackets"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../lib/codemirror", "../addon/search/searchcursor", "../addon/edit/matchbrackets"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  var map = CodeMirror.keyMap.sublime = {fallthrough: "default"};
-  var cmds = CodeMirror.commands;
-  var Pos = CodeMirror.Pos;
-  var mac = CodeMirror.keyMap["default"] == CodeMirror.keyMap.macDefault;
-  var ctrl = mac ? "Cmd-" : "Ctrl-";
-
-  // This is not exactly Sublime's algorithm. I couldn't make heads or tails of that.
-  function findPosSubword(doc, start, dir) {
-    if (dir < 0 && start.ch == 0) return doc.clipPos(Pos(start.line - 1));
-    var line = doc.getLine(start.line);
-    if (dir > 0 && start.ch >= line.length) return doc.clipPos(Pos(start.line + 1, 0));
-    var state = "start", type;
-    for (var pos = start.ch, e = dir < 0 ? 0 : line.length, i = 0; pos != e; pos += dir, i++) {
-      var next = line.charAt(dir < 0 ? pos - 1 : pos);
-      var cat = next != "_" && CodeMirror.isWordChar(next) ? "w" : "o";
-      if (cat == "w" && next.toUpperCase() == next) cat = "W";
-      if (state == "start") {
-        if (cat != "o") { state = "in"; type = cat; }
-      } else if (state == "in") {
-        if (type != cat) {
-          if (type == "w" && cat == "W" && dir < 0) pos--;
-          if (type == "W" && cat == "w" && dir > 0) { type = "w"; continue; }
-          break;
-        }
-      }
-    }
-    return Pos(start.line, pos);
-  }
-
-  function moveSubword(cm, dir) {
-    cm.extendSelectionsBy(function(range) {
-      if (cm.display.shift || cm.doc.extend || range.empty())
-        return findPosSubword(cm.doc, range.head, dir);
-      else
-        return dir < 0 ? range.from() : range.to();
-    });
-  }
-
-  cmds[map["Alt-Left"] = "goSubwordLeft"] = function(cm) { moveSubword(cm, -1); };
-  cmds[map["Alt-Right"] = "goSubwordRight"] = function(cm) { moveSubword(cm, 1); };
-
-  cmds[map[ctrl + "Up"] = "scrollLineUp"] = function(cm) {
-    var info = cm.getScrollInfo();
-    if (!cm.somethingSelected()) {
-      var visibleBottomLine = cm.lineAtHeight(info.top + info.clientHeight, "local");
-      if (cm.getCursor().line >= visibleBottomLine)
-        cm.execCommand("goLineUp");
-    }
-    cm.scrollTo(null, info.top - cm.defaultTextHeight());
-  };
-  cmds[map[ctrl + "Down"] = "scrollLineDown"] = function(cm) {
-    var info = cm.getScrollInfo();
-    if (!cm.somethingSelected()) {
-      var visibleTopLine = cm.lineAtHeight(info.top, "local")+1;
-      if (cm.getCursor().line <= visibleTopLine)
-        cm.execCommand("goLineDown");
-    }
-    cm.scrollTo(null, info.top + cm.defaultTextHeight());
-  };
-
-  cmds[map["Shift-" + ctrl + "L"] = "splitSelectionByLine"] = function(cm) {
-    var ranges = cm.listSelections(), lineRanges = [];
-    for (var i = 0; i < ranges.length; i++) {
-      var from = ranges[i].from(), to = ranges[i].to();
-      for (var line = from.line; line <= to.line; ++line)
-        if (!(to.line > from.line && line == to.line && to.ch == 0))
-          lineRanges.push({anchor: line == from.line ? from : Pos(line, 0),
-                           head: line == to.line ? to : Pos(line)});
-    }
-    cm.setSelections(lineRanges, 0);
-  };
-
-  map["Shift-Tab"] = "indentLess";
-
-  cmds[map["Esc"] = "singleSelectionTop"] = function(cm) {
-    var range = cm.listSelections()[0];
-    cm.setSelection(range.anchor, range.head, {scroll: false});
-  };
-
-  cmds[map[ctrl + "L"] = "selectLine"] = function(cm) {
-    var ranges = cm.listSelections(), extended = [];
-    for (var i = 0; i < ranges.length; i++) {
-      var range = ranges[i];
-      extended.push({anchor: Pos(range.from().line, 0),
-                     head: Pos(range.to().line + 1, 0)});
-    }
-    cm.setSelections(extended);
-  };
-
-  map["Shift-" + ctrl + "K"] = "deleteLine";
-
-  function insertLine(cm, above) {
-    cm.operation(function() {
-      var len = cm.listSelections().length, newSelection = [], last = -1;
-      for (var i = 0; i < len; i++) {
-        var head = cm.listSelections()[i].head;
-        if (head.line <= last) continue;
-        var at = Pos(head.line + (above ? 0 : 1), 0);
-        cm.replaceRange("\n", at, null, "+insertLine");
-        cm.indentLine(at.line, null, true);
-        newSelection.push({head: at, anchor: at});
-        last = head.line + 1;
-      }
-      cm.setSelections(newSelection);
-    });
-  }
-
-  cmds[map[ctrl + "Enter"] = "insertLineAfter"] = function(cm) { insertLine(cm, false); };
-
-  cmds[map["Shift-" + ctrl + "Enter"] = "insertLineBefore"] = function(cm) { insertLine(cm, true); };
-
-  function wordAt(cm, pos) {
-    var start = pos.ch, end = start, line = cm.getLine(pos.line);
-    while (start && CodeMirror.isWordChar(line.charAt(start - 1))) --start;
-    while (end < line.length && CodeMirror.isWordChar(line.charAt(end))) ++end;
-    return {from: Pos(pos.line, start), to: Pos(pos.line, end), word: line.slice(start, end)};
-  }
-
-  cmds[map[ctrl + "D"] = "selectNextOccurrence"] = function(cm) {
-    var from = cm.getCursor("from"), to = cm.getCursor("to");
-    var fullWord = cm.state.sublimeFindFullWord == cm.doc.sel;
-    if (CodeMirror.cmpPos(from, to) == 0) {
-      var word = wordAt(cm, from);
-      if (!word.word) return;
-      cm.setSelection(word.from, word.to);
-      fullWord = true;
-    } else {
-      var text = cm.getRange(from, to);
-      var query = fullWord ? new RegExp("\\b" + text + "\\b") : text;
-      var cur = cm.getSearchCursor(query, to);
-      if (cur.findNext()) {
-        cm.addSelection(cur.from(), cur.to());
-      } else {
-        cur = cm.getSearchCursor(query, Pos(cm.firstLine(), 0));
-        if (cur.findNext())
-          cm.addSelection(cur.from(), cur.to());
-      }
-    }
-    if (fullWord)
-      cm.state.sublimeFindFullWord = cm.doc.sel;
-  };
-
-  var mirror = "(){}[]";
-  function selectBetweenBrackets(cm) {
-    var pos = cm.getCursor(), opening = cm.scanForBracket(pos, -1);
-    if (!opening) return;
-    for (;;) {
-      var closing = cm.scanForBracket(pos, 1);
-      if (!closing) return;
-      if (closing.ch == mirror.charAt(mirror.indexOf(opening.ch) + 1)) {
-        cm.setSelection(Pos(opening.pos.line, opening.pos.ch + 1), closing.pos, false);
-        return true;
-      }
-      pos = Pos(closing.pos.line, closing.pos.ch + 1);
-    }
-  }
-
-  cmds[map["Shift-" + ctrl + "Space"] = "selectScope"] = function(cm) {
-    selectBetweenBrackets(cm) || cm.execCommand("selectAll");
-  };
-  cmds[map["Shift-" + ctrl + "M"] = "selectBetweenBrackets"] = function(cm) {
-    if (!selectBetweenBrackets(cm)) return CodeMirror.Pass;
-  };
-
-  cmds[map[ctrl + "M"] = "goToBracket"] = function(cm) {
-    cm.extendSelectionsBy(function(range) {
-      var next = cm.scanForBracket(range.head, 1);
-      if (next && CodeMirror.cmpPos(next.pos, range.head) != 0) return next.pos;
-      var prev = cm.scanForBracket(range.head, -1);
-      return prev && Pos(prev.pos.line, prev.pos.ch + 1) || range.head;
-    });
-  };
-
-  var swapLineCombo = mac ? "Cmd-Ctrl-" : "Shift-Ctrl-";
-
-  cmds[map[swapLineCombo + "Up"] = "swapLineUp"] = function(cm) {
-    var ranges = cm.listSelections(), linesToMove = [], at = cm.firstLine() - 1, newSels = [];
-    for (var i = 0; i < ranges.length; i++) {
-      var range = ranges[i], from = range.from().line - 1, to = range.to().line;
-      newSels.push({anchor: Pos(range.anchor.line - 1, range.anchor.ch),
-                    head: Pos(range.head.line - 1, range.head.ch)});
-      if (range.to().ch == 0 && !range.empty()) --to;
-      if (from > at) linesToMove.push(from, to);
-      else if (linesToMove.length) linesToMove[linesToMove.length - 1] = to;
-      at = to;
-    }
-    cm.operation(function() {
-      for (var i = 0; i < linesToMove.length; i += 2) {
-        var from = linesToMove[i], to = linesToMove[i + 1];
-        var line = cm.getLine(from);
-        cm.replaceRange("", Pos(from, 0), Pos(from + 1, 0), "+swapLine");
-        if (to > cm.lastLine())
-          cm.replaceRange("\n" + line, Pos(cm.lastLine()), null, "+swapLine");
-        else
-          cm.replaceRange(line + "\n", Pos(to, 0), null, "+swapLine");
-      }
-      cm.setSelections(newSels);
-      cm.scrollIntoView();
-    });
-  };
-
-  cmds[map[swapLineCombo + "Down"] = "swapLineDown"] = function(cm) {
-    var ranges = cm.listSelections(), linesToMove = [], at = cm.lastLine() + 1;
-    for (var i = ranges.length - 1; i >= 0; i--) {
-      var range = ranges[i], from = range.to().line + 1, to = range.from().line;
-      if (range.to().ch == 0 && !range.empty()) from--;
-      if (from < at) linesToMove.push(from, to);
-      else if (linesToMove.length) linesToMove[linesToMove.length - 1] = to;
-      at = to;
-    }
-    cm.operation(function() {
-      for (var i = linesToMove.length - 2; i >= 0; i -= 2) {
-        var from = linesToMove[i], to = linesToMove[i + 1];
-        var line = cm.getLine(from);
-        if (from == cm.lastLine())
-          cm.replaceRange("", Pos(from - 1), Pos(from), "+swapLine");
-        else
-          cm.replaceRange("", Pos(from, 0), Pos(from + 1, 0), "+swapLine");
-        cm.replaceRange(line + "\n", Pos(to, 0), null, "+swapLine");
-      }
-      cm.scrollIntoView();
-    });
-  };
-
-  map[ctrl + "/"] = "toggleComment";
-
-  cmds[map[ctrl + "J"] = "joinLines"] = function(cm) {
-    var ranges = cm.listSelections(), joined = [];
-    for (var i = 0; i < ranges.length; i++) {
-      var range = ranges[i], from = range.from();
-      var start = from.line, end = range.to().line;
-      while (i < ranges.length - 1 && ranges[i + 1].from().line == end)
-        end = ranges[++i].to().line;
-      joined.push({start: start, end: end, anchor: !range.empty() && from});
-    }
-    cm.operation(function() {
-      var offset = 0, ranges = [];
-      for (var i = 0; i < joined.length; i++) {
-        var obj = joined[i];
-        var anchor = obj.anchor && Pos(obj.anchor.line - offset, obj.anchor.ch), head;
-        for (var line = obj.start; line <= obj.end; line++) {
-          var actual = line - offset;
-          if (line == obj.end) head = Pos(actual, cm.getLine(actual).length + 1);
-          if (actual < cm.lastLine()) {
-            cm.replaceRange(" ", Pos(actual), Pos(actual + 1, /^\s*/.exec(cm.getLine(actual + 1))[0].length));
-            ++offset;
-          }
-        }
-        ranges.push({anchor: anchor || head, head: head});
-      }
-      cm.setSelections(ranges, 0);
-    });
-  };
-
-  cmds[map["Shift-" + ctrl + "D"] = "duplicateLine"] = function(cm) {
-    cm.operation(function() {
-      var rangeCount = cm.listSelections().length;
-      for (var i = 0; i < rangeCount; i++) {
-        var range = cm.listSelections()[i];
-        if (range.empty())
-          cm.replaceRange(cm.getLine(range.head.line) + "\n", Pos(range.head.line, 0));
-        else
-          cm.replaceRange(cm.getRange(range.from(), range.to()), range.from());
-      }
-      cm.scrollIntoView();
-    });
-  };
-
-  map[ctrl + "T"] = "transposeChars";
-
-  function sortLines(cm, caseSensitive) {
-    var ranges = cm.listSelections(), toSort = [], selected;
-    for (var i = 0; i < ranges.length; i++) {
-      var range = ranges[i];
-      if (range.empty()) continue;
-      var from = range.from().line, to = range.to().line;
-      while (i < ranges.length - 1 && ranges[i + 1].from().line == to)
-        to = range[++i].to().line;
-      toSort.push(from, to);
-    }
-    if (toSort.length) selected = true;
-    else toSort.push(cm.firstLine(), cm.lastLine());
-
-    cm.operation(function() {
-      var ranges = [];
-      for (var i = 0; i < toSort.length; i += 2) {
-        var from = toSort[i], to = toSort[i + 1];
-        var start = Pos(from, 0), end = Pos(to);
-        var lines = cm.getRange(start, end, false);
-        if (caseSensitive)
-          lines.sort();
-        else
-          lines.sort(function(a, b) {
-            var au = a.toUpperCase(), bu = b.toUpperCase();
-            if (au != bu) { a = au; b = bu; }
-            return a < b ? -1 : a == b ? 0 : 1;
-          });
-        cm.replaceRange(lines, start, end);
-        if (selected) ranges.push({anchor: start, head: end});
-      }
-      if (selected) cm.setSelections(ranges, 0);
-    });
-  }
-
-  cmds[map["F9"] = "sortLines"] = function(cm) { sortLines(cm, true); };
-  cmds[map[ctrl + "F9"] = "sortLinesInsensitive"] = function(cm) { sortLines(cm, false); };
-
-  cmds[map["F2"] = "nextBookmark"] = function(cm) {
-    var marks = cm.state.sublimeBookmarks;
-    if (marks) while (marks.length) {
-      var current = marks.shift();
-      var found = current.find();
-      if (found) {
-        marks.push(current);
-        return cm.setSelection(found.from, found.to);
-      }
-    }
-  };
-
-  cmds[map["Shift-F2"] = "prevBookmark"] = function(cm) {
-    var marks = cm.state.sublimeBookmarks;
-    if (marks) while (marks.length) {
-      marks.unshift(marks.pop());
-      var found = marks[marks.length - 1].find();
-      if (!found)
-        marks.pop();
-      else
-        return cm.setSelection(found.from, found.to);
-    }
-  };
-
-  cmds[map[ctrl + "F2"] = "toggleBookmark"] = function(cm) {
-    var ranges = cm.listSelections();
-    var marks = cm.state.sublimeBookmarks || (cm.state.sublimeBookmarks = []);
-    for (var i = 0; i < ranges.length; i++) {
-      var from = ranges[i].from(), to = ranges[i].to();
-      var found = cm.findMarks(from, to);
-      for (var j = 0; j < found.length; j++) {
-        if (found[j].sublimeBookmark) {
-          found[j].clear();
-          for (var k = 0; k < marks.length; k++)
-            if (marks[k] == found[j])
-              marks.splice(k--, 1);
-          break;
-        }
-      }
-      if (j == found.length)
-        marks.push(cm.markText(from, to, {sublimeBookmark: true, clearWhenEmpty: false}));
-    }
-  };
-
-  cmds[map["Shift-" + ctrl + "F2"] = "clearBookmarks"] = function(cm) {
-    var marks = cm.state.sublimeBookmarks;
-    if (marks) for (var i = 0; i < marks.length; i++) marks[i].clear();
-    marks.length = 0;
-  };
-
-  cmds[map["Alt-F2"] = "selectBookmarks"] = function(cm) {
-    var marks = cm.state.sublimeBookmarks, ranges = [];
-    if (marks) for (var i = 0; i < marks.length; i++) {
-      var found = marks[i].find();
-      if (!found)
-        marks.splice(i--, 0);
-      else
-        ranges.push({anchor: found.from, head: found.to});
-    }
-    if (ranges.length)
-      cm.setSelections(ranges, 0);
-  };
-
-  map["Alt-Q"] = "wrapLines";
-
-  var cK = ctrl + "K ";
-
-  function modifyWordOrSelection(cm, mod) {
-    cm.operation(function() {
-      var ranges = cm.listSelections(), indices = [], replacements = [];
-      for (var i = 0; i < ranges.length; i++) {
-        var range = ranges[i];
-        if (range.empty()) { indices.push(i); replacements.push(""); }
-        else replacements.push(mod(cm.getRange(range.from(), range.to())));
-      }
-      cm.replaceSelections(replacements, "around", "case");
-      for (var i = indices.length - 1, at; i >= 0; i--) {
-        var range = ranges[indices[i]];
-        if (at && CodeMirror.cmpPos(range.head, at) > 0) continue;
-        var word = wordAt(cm, range.head);
-        at = word.from;
-        cm.replaceRange(mod(word.word), word.from, word.to);
-      }
-    });
-  }
-
-  map[cK + ctrl + "Backspace"] = "delLineLeft";
-
-  cmds[map[cK + ctrl + "K"] = "delLineRight"] = function(cm) {
-    cm.operation(function() {
-      var ranges = cm.listSelections();
-      for (var i = ranges.length - 1; i >= 0; i--)
-        cm.replaceRange("", ranges[i].anchor, Pos(ranges[i].to().line), "+delete");
-      cm.scrollIntoView();
-    });
-  };
-
-  cmds[map[cK + ctrl + "U"] = "upcaseAtCursor"] = function(cm) {
-    modifyWordOrSelection(cm, function(str) { return str.toUpperCase(); });
-  };
-  cmds[map[cK + ctrl + "L"] = "downcaseAtCursor"] = function(cm) {
-    modifyWordOrSelection(cm, function(str) { return str.toLowerCase(); });
-  };
-
-  cmds[map[cK + ctrl + "Space"] = "setSublimeMark"] = function(cm) {
-    if (cm.state.sublimeMark) cm.state.sublimeMark.clear();
-    cm.state.sublimeMark = cm.setBookmark(cm.getCursor());
-  };
-  cmds[map[cK + ctrl + "A"] = "selectToSublimeMark"] = function(cm) {
-    var found = cm.state.sublimeMark && cm.state.sublimeMark.find();
-    if (found) cm.setSelection(cm.getCursor(), found);
-  };
-  cmds[map[cK + ctrl + "W"] = "deleteToSublimeMark"] = function(cm) {
-    var found = cm.state.sublimeMark && cm.state.sublimeMark.find();
-    if (found) {
-      var from = cm.getCursor(), to = found;
-      if (CodeMirror.cmpPos(from, to) > 0) { var tmp = to; to = from; from = tmp; }
-      cm.state.sublimeKilled = cm.getRange(from, to);
-      cm.replaceRange("", from, to);
-    }
-  };
-  cmds[map[cK + ctrl + "X"] = "swapWithSublimeMark"] = function(cm) {
-    var found = cm.state.sublimeMark && cm.state.sublimeMark.find();
-    if (found) {
-      cm.state.sublimeMark.clear();
-      cm.state.sublimeMark = cm.setBookmark(cm.getCursor());
-      cm.setCursor(found);
-    }
-  };
-  cmds[map[cK + ctrl + "Y"] = "sublimeYank"] = function(cm) {
-    if (cm.state.sublimeKilled != null)
-      cm.replaceSelection(cm.state.sublimeKilled, null, "paste");
-  };
-
-  map[cK + ctrl + "G"] = "clearBookmarks";
-  cmds[map[cK + ctrl + "C"] = "showInCenter"] = function(cm) {
-    var pos = cm.cursorCoords(null, "local");
-    cm.scrollTo(null, (pos.top + pos.bottom) / 2 - cm.getScrollInfo().clientHeight / 2);
-  };
-
-  cmds[map["Shift-Alt-Up"] = "selectLinesUpward"] = function(cm) {
-    cm.operation(function() {
-      var ranges = cm.listSelections();
-      for (var i = 0; i < ranges.length; i++) {
-        var range = ranges[i];
-        if (range.head.line > cm.firstLine())
-          cm.addSelection(Pos(range.head.line - 1, range.head.ch));
-      }
-    });
-  };
-  cmds[map["Shift-Alt-Down"] = "selectLinesDownward"] = function(cm) {
-    cm.operation(function() {
-      var ranges = cm.listSelections();
-      for (var i = 0; i < ranges.length; i++) {
-        var range = ranges[i];
-        if (range.head.line < cm.lastLine())
-          cm.addSelection(Pos(range.head.line + 1, range.head.ch));
-      }
-    });
-  };
-
-  function getTarget(cm) {
-    var from = cm.getCursor("from"), to = cm.getCursor("to");
-    if (CodeMirror.cmpPos(from, to) == 0) {
-      var word = wordAt(cm, from);
-      if (!word.word) return;
-      from = word.from;
-      to = word.to;
-    }
-    return {from: from, to: to, query: cm.getRange(from, to), word: word};
-  }
-
-  function findAndGoTo(cm, forward) {
-    var target = getTarget(cm);
-    if (!target) return;
-    var query = target.query;
-    var cur = cm.getSearchCursor(query, forward ? target.to : target.from);
-
-    if (forward ? cur.findNext() : cur.findPrevious()) {
-      cm.setSelection(cur.from(), cur.to());
-    } else {
-      cur = cm.getSearchCursor(query, forward ? Pos(cm.firstLine(), 0)
-                                              : cm.clipPos(Pos(cm.lastLine())));
-      if (forward ? cur.findNext() : cur.findPrevious())
-        cm.setSelection(cur.from(), cur.to());
-      else if (target.word)
-        cm.setSelection(target.from, target.to);
-    }
-  };
-  cmds[map[ctrl + "F3"] = "findUnder"] = function(cm) { findAndGoTo(cm, true); };
-  cmds[map["Shift-" + ctrl + "F3"] = "findUnderPrevious"] = function(cm) { findAndGoTo(cm,false); };
-  cmds[map["Alt-F3"] = "findAllUnder"] = function(cm) {
-    var target = getTarget(cm);
-    if (!target) return;
-    var cur = cm.getSearchCursor(target.query);
-    var matches = [];
-    var primaryIndex = -1;
-    while (cur.findNext()) {
-      matches.push({anchor: cur.from(), head: cur.to()});
-      if (cur.from().line <= target.from.line && cur.from().ch <= target.from.ch)
-        primaryIndex++;
-    }
-    cm.setSelections(matches, primaryIndex);
-  };
-
-  map["Shift-" + ctrl + "["] = "fold";
-  map["Shift-" + ctrl + "]"] = "unfold";
-  map[cK + ctrl + "0"] = map[cK + ctrl + "j"] = "unfoldAll";
-
-  map[ctrl + "I"] = "findIncremental";
-  map["Shift-" + ctrl + "I"] = "findIncrementalReverse";
-  map[ctrl + "H"] = "replace";
-  map["F3"] = "findNext";
-  map["Shift-F3"] = "findPrev";
-
-  CodeMirror.normalizeKeyMap(map);
-});
diff --git a/public/js/lib/codemirror/keymap/vim.js b/public/js/lib/codemirror/keymap/vim.js
deleted file mode 100644
index 5743a0d..0000000
--- a/public/js/lib/codemirror/keymap/vim.js
+++ /dev/null
@@ -1,4901 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-/**
- * Supported keybindings:
- *
- *   Motion:
- *   h, j, k, l
- *   gj, gk
- *   e, E, w, W, b, B, ge, gE
- *   f<character>, F<character>, t<character>, T<character>
- *   $, ^, 0, -, +, _
- *   gg, G
- *   %
- *   '<character>, `<character>
- *
- *   Operator:
- *   d, y, c
- *   dd, yy, cc
- *   g~, g~g~
- *   >, <, >>, <<
- *
- *   Operator-Motion:
- *   x, X, D, Y, C, ~
- *
- *   Action:
- *   a, i, s, A, I, S, o, O
- *   zz, z., z<CR>, zt, zb, z-
- *   J
- *   u, Ctrl-r
- *   m<character>
- *   r<character>
- *
- *   Modes:
- *   ESC - leave insert mode, visual mode, and clear input state.
- *   Ctrl-[, Ctrl-c - same as ESC.
- *
- * Registers: unnamed, -, a-z, A-Z, 0-9
- *   (Does not respect the special case for number registers when delete
- *    operator is made with these commands: %, (, ),  , /, ?, n, N, {, } )
- *   TODO: Implement the remaining registers.
- * Marks: a-z, A-Z, and 0-9
- *   TODO: Implement the remaining special marks. They have more complex
- *       behavior.
- *
- * Events:
- *  'vim-mode-change' - raised on the editor anytime the current mode changes,
- *                      Event object: {mode: "visual", subMode: "linewise"}
- *
- * Code structure:
- *  1. Default keymap
- *  2. Variable declarations and short basic helpers
- *  3. Instance (External API) implementation
- *  4. Internal state tracking objects (input state, counter) implementation
- *     and instanstiation
- *  5. Key handler (the main command dispatcher) implementation
- *  6. Motion, operator, and action implementations
- *  7. Helper functions for the key handler, motions, operators, and actions
- *  8. Set up Vim to work as a keymap for CodeMirror.
- */
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../lib/codemirror"), require("../addon/search/searchcursor"), require("../addon/dialog/dialog"), require("../addon/edit/matchbrackets.js"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../lib/codemirror", "../addon/search/searchcursor", "../addon/dialog/dialog", "../addon/edit/matchbrackets"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  'use strict';
-
-  var defaultKeymap = [
-    // Key to key mapping. This goes first to make it possible to override
-    // existing mappings.
-    { keys: '<Left>', type: 'keyToKey', toKeys: 'h' },
-    { keys: '<Right>', type: 'keyToKey', toKeys: 'l' },
-    { keys: '<Up>', type: 'keyToKey', toKeys: 'k' },
-    { keys: '<Down>', type: 'keyToKey', toKeys: 'j' },
-    { keys: '<Space>', type: 'keyToKey', toKeys: 'l' },
-    { keys: '<BS>', type: 'keyToKey', toKeys: 'h', context: 'normal'},
-    { keys: '<C-Space>', type: 'keyToKey', toKeys: 'W' },
-    { keys: '<C-BS>', type: 'keyToKey', toKeys: 'B', context: 'normal' },
-    { keys: '<S-Space>', type: 'keyToKey', toKeys: 'w' },
-    { keys: '<S-BS>', type: 'keyToKey', toKeys: 'b', context: 'normal' },
-    { keys: '<C-n>', type: 'keyToKey', toKeys: 'j' },
-    { keys: '<C-p>', type: 'keyToKey', toKeys: 'k' },
-    { keys: '<C-[>', type: 'keyToKey', toKeys: '<Esc>' },
-    { keys: '<C-c>', type: 'keyToKey', toKeys: '<Esc>' },
-    { keys: '<C-[>', type: 'keyToKey', toKeys: '<Esc>', context: 'insert' },
-    { keys: '<C-c>', type: 'keyToKey', toKeys: '<Esc>', context: 'insert' },
-    { keys: 's', type: 'keyToKey', toKeys: 'cl', context: 'normal' },
-    { keys: 's', type: 'keyToKey', toKeys: 'xi', context: 'visual'},
-    { keys: 'S', type: 'keyToKey', toKeys: 'cc', context: 'normal' },
-    { keys: 'S', type: 'keyToKey', toKeys: 'dcc', context: 'visual' },
-    { keys: '<Home>', type: 'keyToKey', toKeys: '0' },
-    { keys: '<End>', type: 'keyToKey', toKeys: '$' },
-    { keys: '<PageUp>', type: 'keyToKey', toKeys: '<C-b>' },
-    { keys: '<PageDown>', type: 'keyToKey', toKeys: '<C-f>' },
-    { keys: '<CR>', type: 'keyToKey', toKeys: 'j^', context: 'normal' },
-    // Motions
-    { keys: 'H', type: 'motion', motion: 'moveToTopLine', motionArgs: { linewise: true, toJumplist: true }},
-    { keys: 'M', type: 'motion', motion: 'moveToMiddleLine', motionArgs: { linewise: true, toJumplist: true }},
-    { keys: 'L', type: 'motion', motion: 'moveToBottomLine', motionArgs: { linewise: true, toJumplist: true }},
-    { keys: 'h', type: 'motion', motion: 'moveByCharacters', motionArgs: { forward: false }},
-    { keys: 'l', type: 'motion', motion: 'moveByCharacters', motionArgs: { forward: true }},
-    { keys: 'j', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, linewise: true }},
-    { keys: 'k', type: 'motion', motion: 'moveByLines', motionArgs: { forward: false, linewise: true }},
-    { keys: 'gj', type: 'motion', motion: 'moveByDisplayLines', motionArgs: { forward: true }},
-    { keys: 'gk', type: 'motion', motion: 'moveByDisplayLines', motionArgs: { forward: false }},
-    { keys: 'w', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: false }},
-    { keys: 'W', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: false, bigWord: true }},
-    { keys: 'e', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: true, inclusive: true }},
-    { keys: 'E', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: true, bigWord: true, inclusive: true }},
-    { keys: 'b', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false }},
-    { keys: 'B', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false, bigWord: true }},
-    { keys: 'ge', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: true, inclusive: true }},
-    { keys: 'gE', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: true, bigWord: true, inclusive: true }},
-    { keys: '{', type: 'motion', motion: 'moveByParagraph', motionArgs: { forward: false, toJumplist: true }},
-    { keys: '}', type: 'motion', motion: 'moveByParagraph', motionArgs: { forward: true, toJumplist: true }},
-    { keys: '<C-f>', type: 'motion', motion: 'moveByPage', motionArgs: { forward: true }},
-    { keys: '<C-b>', type: 'motion', motion: 'moveByPage', motionArgs: { forward: false }},
-    { keys: '<C-d>', type: 'motion', motion: 'moveByScroll', motionArgs: { forward: true, explicitRepeat: true }},
-    { keys: '<C-u>', type: 'motion', motion: 'moveByScroll', motionArgs: { forward: false, explicitRepeat: true }},
-    { keys: 'gg', type: 'motion', motion: 'moveToLineOrEdgeOfDocument', motionArgs: { forward: false, explicitRepeat: true, linewise: true, toJumplist: true }},
-    { keys: 'G', type: 'motion', motion: 'moveToLineOrEdgeOfDocument', motionArgs: { forward: true, explicitRepeat: true, linewise: true, toJumplist: true }},
-    { keys: '0', type: 'motion', motion: 'moveToStartOfLine' },
-    { keys: '^', type: 'motion', motion: 'moveToFirstNonWhiteSpaceCharacter' },
-    { keys: '+', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, toFirstChar:true }},
-    { keys: '-', type: 'motion', motion: 'moveByLines', motionArgs: { forward: false, toFirstChar:true }},
-    { keys: '_', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, toFirstChar:true, repeatOffset:-1 }},
-    { keys: '$', type: 'motion', motion: 'moveToEol', motionArgs: { inclusive: true }},
-    { keys: '%', type: 'motion', motion: 'moveToMatchedSymbol', motionArgs: { inclusive: true, toJumplist: true }},
-    { keys: 'f<character>', type: 'motion', motion: 'moveToCharacter', motionArgs: { forward: true , inclusive: true }},
-    { keys: 'F<character>', type: 'motion', motion: 'moveToCharacter', motionArgs: { forward: false }},
-    { keys: 't<character>', type: 'motion', motion: 'moveTillCharacter', motionArgs: { forward: true, inclusive: true }},
-    { keys: 'T<character>', type: 'motion', motion: 'moveTillCharacter', motionArgs: { forward: false }},
-    { keys: ';', type: 'motion', motion: 'repeatLastCharacterSearch', motionArgs: { forward: true }},
-    { keys: ',', type: 'motion', motion: 'repeatLastCharacterSearch', motionArgs: { forward: false }},
-    { keys: '\'<character>', type: 'motion', motion: 'goToMark', motionArgs: {toJumplist: true, linewise: true}},
-    { keys: '`<character>', type: 'motion', motion: 'goToMark', motionArgs: {toJumplist: true}},
-    { keys: ']`', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: true } },
-    { keys: '[`', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: false } },
-    { keys: ']\'', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: true, linewise: true } },
-    { keys: '[\'', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: false, linewise: true } },
-    // the next two aren't motions but must come before more general motion declarations
-    { keys: ']p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: true, isEdit: true, matchIndent: true}},
-    { keys: '[p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: false, isEdit: true, matchIndent: true}},
-    { keys: ']<character>', type: 'motion', motion: 'moveToSymbol', motionArgs: { forward: true, toJumplist: true}},
-    { keys: '[<character>', type: 'motion', motion: 'moveToSymbol', motionArgs: { forward: false, toJumplist: true}},
-    { keys: '|', type: 'motion', motion: 'moveToColumn'},
-    { keys: 'o', type: 'motion', motion: 'moveToOtherHighlightedEnd', context:'visual'},
-    { keys: 'O', type: 'motion', motion: 'moveToOtherHighlightedEnd', motionArgs: {sameLine: true}, context:'visual'},
-    // Operators
-    { keys: 'd', type: 'operator', operator: 'delete' },
-    { keys: 'y', type: 'operator', operator: 'yank' },
-    { keys: 'c', type: 'operator', operator: 'change' },
-    { keys: '>', type: 'operator', operator: 'indent', operatorArgs: { indentRight: true }},
-    { keys: '<', type: 'operator', operator: 'indent', operatorArgs: { indentRight: false }},
-    { keys: 'g~', type: 'operator', operator: 'changeCase' },
-    { keys: 'gu', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: true}, isEdit: true },
-    { keys: 'gU', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: false}, isEdit: true },
-    { keys: 'n', type: 'motion', motion: 'findNext', motionArgs: { forward: true, toJumplist: true }},
-    { keys: 'N', type: 'motion', motion: 'findNext', motionArgs: { forward: false, toJumplist: true }},
-    // Operator-Motion dual commands
-    { keys: 'x', type: 'operatorMotion', operator: 'delete', motion: 'moveByCharacters', motionArgs: { forward: true }, operatorMotionArgs: { visualLine: false }},
-    { keys: 'X', type: 'operatorMotion', operator: 'delete', motion: 'moveByCharacters', motionArgs: { forward: false }, operatorMotionArgs: { visualLine: true }},
-    { keys: 'D', type: 'operatorMotion', operator: 'delete', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'},
-    { keys: 'D', type: 'operator', operator: 'delete', operatorArgs: { linewise: true }, context: 'visual'},
-    { keys: 'Y', type: 'operatorMotion', operator: 'yank', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'},
-    { keys: 'Y', type: 'operator', operator: 'yank', operatorArgs: { linewise: true }, context: 'visual'},
-    { keys: 'C', type: 'operatorMotion', operator: 'change', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'},
-    { keys: 'C', type: 'operator', operator: 'change', operatorArgs: { linewise: true }, context: 'visual'},
-    { keys: '~', type: 'operatorMotion', operator: 'changeCase', motion: 'moveByCharacters', motionArgs: { forward: true }, operatorArgs: { shouldMoveCursor: true }, context: 'normal'},
-    { keys: '~', type: 'operator', operator: 'changeCase', context: 'visual'},
-    { keys: '<C-w>', type: 'operatorMotion', operator: 'delete', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false }, context: 'insert' },
-    // Actions
-    { keys: '<C-i>', type: 'action', action: 'jumpListWalk', actionArgs: { forward: true }},
-    { keys: '<C-o>', type: 'action', action: 'jumpListWalk', actionArgs: { forward: false }},
-    { keys: '<C-e>', type: 'action', action: 'scroll', actionArgs: { forward: true, linewise: true }},
-    { keys: '<C-y>', type: 'action', action: 'scroll', actionArgs: { forward: false, linewise: true }},
-    { keys: 'a', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'charAfter' }, context: 'normal' },
-    { keys: 'A', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'eol' }, context: 'normal' },
-    { keys: 'A', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'endOfSelectedArea' }, context: 'visual' },
-    { keys: 'i', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'inplace' }, context: 'normal' },
-    { keys: 'I', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'firstNonBlank'}, context: 'normal' },
-    { keys: 'I', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'startOfSelectedArea' }, context: 'visual' },
-    { keys: 'o', type: 'action', action: 'newLineAndEnterInsertMode', isEdit: true, interlaceInsertRepeat: true, actionArgs: { after: true }, context: 'normal' },
-    { keys: 'O', type: 'action', action: 'newLineAndEnterInsertMode', isEdit: true, interlaceInsertRepeat: true, actionArgs: { after: false }, context: 'normal' },
-    { keys: 'v', type: 'action', action: 'toggleVisualMode' },
-    { keys: 'V', type: 'action', action: 'toggleVisualMode', actionArgs: { linewise: true }},
-    { keys: '<C-v>', type: 'action', action: 'toggleVisualMode', actionArgs: { blockwise: true }},
-    { keys: 'gv', type: 'action', action: 'reselectLastSelection' },
-    { keys: 'J', type: 'action', action: 'joinLines', isEdit: true },
-    { keys: 'p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: true, isEdit: true }},
-    { keys: 'P', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: false, isEdit: true }},
-    { keys: 'r<character>', type: 'action', action: 'replace', isEdit: true },
-    { keys: '@<character>', type: 'action', action: 'replayMacro' },
-    { keys: 'q<character>', type: 'action', action: 'enterMacroRecordMode' },
-    // Handle Replace-mode as a special case of insert mode.
-    { keys: 'R', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { replace: true }},
-    { keys: 'u', type: 'action', action: 'undo', context: 'normal' },
-    { keys: 'u', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: true}, context: 'visual', isEdit: true },
-    { keys: 'U', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: false}, context: 'visual', isEdit: true },
-    { keys: '<C-r>', type: 'action', action: 'redo' },
-    { keys: 'm<character>', type: 'action', action: 'setMark' },
-    { keys: '"<character>', type: 'action', action: 'setRegister' },
-    { keys: 'zz', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'center' }},
-    { keys: 'z.', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'center' }, motion: 'moveToFirstNonWhiteSpaceCharacter' },
-    { keys: 'zt', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'top' }},
-    { keys: 'z<CR>', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'top' }, motion: 'moveToFirstNonWhiteSpaceCharacter' },
-    { keys: 'z-', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'bottom' }},
-    { keys: 'zb', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'bottom' }, motion: 'moveToFirstNonWhiteSpaceCharacter' },
-    { keys: '.', type: 'action', action: 'repeatLastEdit' },
-    { keys: '<C-a>', type: 'action', action: 'incrementNumberToken', isEdit: true, actionArgs: {increase: true, backtrack: false}},
-    { keys: '<C-x>', type: 'action', action: 'incrementNumberToken', isEdit: true, actionArgs: {increase: false, backtrack: false}},
-    // Text object motions
-    { keys: 'a<character>', type: 'motion', motion: 'textObjectManipulation' },
-    { keys: 'i<character>', type: 'motion', motion: 'textObjectManipulation', motionArgs: { textObjectInner: true }},
-    // Search
-    { keys: '/', type: 'search', searchArgs: { forward: true, querySrc: 'prompt', toJumplist: true }},
-    { keys: '?', type: 'search', searchArgs: { forward: false, querySrc: 'prompt', toJumplist: true }},
-    { keys: '*', type: 'search', searchArgs: { forward: true, querySrc: 'wordUnderCursor', wholeWordOnly: true, toJumplist: true }},
-    { keys: '#', type: 'search', searchArgs: { forward: false, querySrc: 'wordUnderCursor', wholeWordOnly: true, toJumplist: true }},
-    { keys: 'g*', type: 'search', searchArgs: { forward: true, querySrc: 'wordUnderCursor', toJumplist: true }},
-    { keys: 'g#', type: 'search', searchArgs: { forward: false, querySrc: 'wordUnderCursor', toJumplist: true }},
-    // Ex command
-    { keys: ':', type: 'ex' }
-  ];
-
-  var Pos = CodeMirror.Pos;
-
-  var Vim = function() {
-    function enterVimMode(cm) {
-      cm.setOption('disableInput', true);
-      cm.setOption('showCursorWhenSelecting', false);
-      CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"});
-      cm.on('cursorActivity', onCursorActivity);
-      maybeInitVimState(cm);
-      CodeMirror.on(cm.getInputField(), 'paste', getOnPasteFn(cm));
-    }
-
-    function leaveVimMode(cm) {
-      cm.setOption('disableInput', false);
-      cm.off('cursorActivity', onCursorActivity);
-      CodeMirror.off(cm.getInputField(), 'paste', getOnPasteFn(cm));
-      cm.state.vim = null;
-    }
-
-    function detachVimMap(cm, next) {
-      if (this == CodeMirror.keyMap.vim)
-        CodeMirror.rmClass(cm.getWrapperElement(), "cm-fat-cursor");
-
-      if (!next || next.attach != attachVimMap)
-        leaveVimMode(cm, false);
-    }
-    function attachVimMap(cm, prev) {
-      if (this == CodeMirror.keyMap.vim)
-        CodeMirror.addClass(cm.getWrapperElement(), "cm-fat-cursor");
-
-      if (!prev || prev.attach != attachVimMap)
-        enterVimMode(cm);
-    }
-
-    // Deprecated, simply setting the keymap works again.
-    CodeMirror.defineOption('vimMode', false, function(cm, val, prev) {
-      if (val && cm.getOption("keyMap") != "vim")
-        cm.setOption("keyMap", "vim");
-      else if (!val && prev != CodeMirror.Init && /^vim/.test(cm.getOption("keyMap")))
-        cm.setOption("keyMap", "default");
-    });
-
-    function cmKey(key, cm) {
-      if (!cm) { return undefined; }
-      var vimKey = cmKeyToVimKey(key);
-      if (!vimKey) {
-        return false;
-      }
-      var cmd = CodeMirror.Vim.findKey(cm, vimKey);
-      if (typeof cmd == 'function') {
-        CodeMirror.signal(cm, 'vim-keypress', vimKey);
-      }
-      return cmd;
-    }
-
-    var modifiers = {'Shift': 'S', 'Ctrl': 'C', 'Alt': 'A', 'Cmd': 'D', 'Mod': 'A'};
-    var specialKeys = {Enter:'CR',Backspace:'BS',Delete:'Del'};
-    function cmKeyToVimKey(key) {
-      if (key.charAt(0) == '\'') {
-        // Keypress character binding of format "'a'"
-        return key.charAt(1);
-      }
-      var pieces = key.split('-');
-      if (/-$/.test(key)) {
-        // If the - key was typed, split will result in 2 extra empty strings
-        // in the array. Replace them with 1 '-'.
-        pieces.splice(-2, 2, '-');
-      }
-      var lastPiece = pieces[pieces.length - 1];
-      if (pieces.length == 1 && pieces[0].length == 1) {
-        // No-modifier bindings use literal character bindings above. Skip.
-        return false;
-      } else if (pieces.length == 2 && pieces[0] == 'Shift' && lastPiece.length == 1) {
-        // Ignore Shift+char bindings as they should be handled by literal character.
-        return false;
-      }
-      var hasCharacter = false;
-      for (var i = 0; i < pieces.length; i++) {
-        var piece = pieces[i];
-        if (piece in modifiers) { pieces[i] = modifiers[piece]; }
-        else { hasCharacter = true; }
-        if (piece in specialKeys) { pieces[i] = specialKeys[piece]; }
-      }
-      if (!hasCharacter) {
-        // Vim does not support modifier only keys.
-        return false;
-      }
-      // TODO: Current bindings expect the character to be lower case, but
-      // it looks like vim key notation uses upper case.
-      if (isUpperCase(lastPiece)) {
-        pieces[pieces.length - 1] = lastPiece.toLowerCase();
-      }
-      return '<' + pieces.join('-') + '>';
-    }
-
-    function getOnPasteFn(cm) {
-      var vim = cm.state.vim;
-      if (!vim.onPasteFn) {
-        vim.onPasteFn = function() {
-          if (!vim.insertMode) {
-            cm.setCursor(offsetCursor(cm.getCursor(), 0, 1));
-            actions.enterInsertMode(cm, {}, vim);
-          }
-        };
-      }
-      return vim.onPasteFn;
-    }
-
-    var numberRegex = /[\d]/;
-    var wordRegexp = [(/\w/), (/[^\w\s]/)], bigWordRegexp = [(/\S/)];
-    function makeKeyRange(start, size) {
-      var keys = [];
-      for (var i = start; i < start + size; i++) {
-        keys.push(String.fromCharCode(i));
-      }
-      return keys;
-    }
-    var upperCaseAlphabet = makeKeyRange(65, 26);
-    var lowerCaseAlphabet = makeKeyRange(97, 26);
-    var numbers = makeKeyRange(48, 10);
-    var validMarks = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['<', '>']);
-    var validRegisters = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['-', '"', '.', ':', '/']);
-
-    function isLine(cm, line) {
-      return line >= cm.firstLine() && line <= cm.lastLine();
-    }
-    function isLowerCase(k) {
-      return (/^[a-z]$/).test(k);
-    }
-    function isMatchableSymbol(k) {
-      return '()[]{}'.indexOf(k) != -1;
-    }
-    function isNumber(k) {
-      return numberRegex.test(k);
-    }
-    function isUpperCase(k) {
-      return (/^[A-Z]$/).test(k);
-    }
-    function isWhiteSpaceString(k) {
-      return (/^\s*$/).test(k);
-    }
-    function inArray(val, arr) {
-      for (var i = 0; i < arr.length; i++) {
-        if (arr[i] == val) {
-          return true;
-        }
-      }
-      return false;
-    }
-
-    var options = {};
-    function defineOption(name, defaultValue, type) {
-      if (defaultValue === undefined) { throw Error('defaultValue is required'); }
-      if (!type) { type = 'string'; }
-      options[name] = {
-        type: type,
-        defaultValue: defaultValue
-      };
-      setOption(name, defaultValue);
-    }
-
-    function setOption(name, value) {
-      var option = options[name];
-      if (!option) {
-        throw Error('Unknown option: ' + name);
-      }
-      if (option.type == 'boolean') {
-        if (value && value !== true) {
-          throw Error('Invalid argument: ' + name + '=' + value);
-        } else if (value !== false) {
-          // Boolean options are set to true if value is not defined.
-          value = true;
-        }
-      }
-      option.value = option.type == 'boolean' ? !!value : value;
-    }
-
-    function getOption(name) {
-      var option = options[name];
-      if (!option) {
-        throw Error('Unknown option: ' + name);
-      }
-      return option.value;
-    }
-
-    var createCircularJumpList = function() {
-      var size = 100;
-      var pointer = -1;
-      var head = 0;
-      var tail = 0;
-      var buffer = new Array(size);
-      function add(cm, oldCur, newCur) {
-        var current = pointer % size;
-        var curMark = buffer[current];
-        function useNextSlot(cursor) {
-          var next = ++pointer % size;
-          var trashMark = buffer[next];
-          if (trashMark) {
-            trashMark.clear();
-          }
-          buffer[next] = cm.setBookmark(cursor);
-        }
-        if (curMark) {
-          var markPos = curMark.find();
-          // avoid recording redundant cursor position
-          if (markPos && !cursorEqual(markPos, oldCur)) {
-            useNextSlot(oldCur);
-          }
-        } else {
-          useNextSlot(oldCur);
-        }
-        useNextSlot(newCur);
-        head = pointer;
-        tail = pointer - size + 1;
-        if (tail < 0) {
-          tail = 0;
-        }
-      }
-      function move(cm, offset) {
-        pointer += offset;
-        if (pointer > head) {
-          pointer = head;
-        } else if (pointer < tail) {
-          pointer = tail;
-        }
-        var mark = buffer[(size + pointer) % size];
-        // skip marks that are temporarily removed from text buffer
-        if (mark && !mark.find()) {
-          var inc = offset > 0 ? 1 : -1;
-          var newCur;
-          var oldCur = cm.getCursor();
-          do {
-            pointer += inc;
-            mark = buffer[(size + pointer) % size];
-            // skip marks that are the same as current position
-            if (mark &&
-                (newCur = mark.find()) &&
-                !cursorEqual(oldCur, newCur)) {
-              break;
-            }
-          } while (pointer < head && pointer > tail);
-        }
-        return mark;
-      }
-      return {
-        cachedCursor: undefined, //used for # and * jumps
-        add: add,
-        move: move
-      };
-    };
-
-    // Returns an object to track the changes associated insert mode.  It
-    // clones the object that is passed in, or creates an empty object one if
-    // none is provided.
-    var createInsertModeChanges = function(c) {
-      if (c) {
-        // Copy construction
-        return {
-          changes: c.changes,
-          expectCursorActivityForChange: c.expectCursorActivityForChange
-        };
-      }
-      return {
-        // Change list
-        changes: [],
-        // Set to true on change, false on cursorActivity.
-        expectCursorActivityForChange: false
-      };
-    };
-
-    function MacroModeState() {
-      this.latestRegister = undefined;
-      this.isPlaying = false;
-      this.isRecording = false;
-      this.replaySearchQueries = [];
-      this.onRecordingDone = undefined;
-      this.lastInsertModeChanges = createInsertModeChanges();
-    }
-    MacroModeState.prototype = {
-      exitMacroRecordMode: function() {
-        var macroModeState = vimGlobalState.macroModeState;
-        if (macroModeState.onRecordingDone) {
-          macroModeState.onRecordingDone(); // close dialog
-        }
-        macroModeState.onRecordingDone = undefined;
-        macroModeState.isRecording = false;
-      },
-      enterMacroRecordMode: function(cm, registerName) {
-        var register =
-            vimGlobalState.registerController.getRegister(registerName);
-        if (register) {
-          register.clear();
-          this.latestRegister = registerName;
-          if (cm.openDialog) {
-            this.onRecordingDone = cm.openDialog(
-                '(recording)['+registerName+']', null, {bottom:true});
-          }
-          this.isRecording = true;
-        }
-      }
-    };
-
-    function maybeInitVimState(cm) {
-      if (!cm.state.vim) {
-        // Store instance state in the CodeMirror object.
-        cm.state.vim = {
-          inputState: new InputState(),
-          // Vim's input state that triggered the last edit, used to repeat
-          // motions and operators with '.'.
-          lastEditInputState: undefined,
-          // Vim's action command before the last edit, used to repeat actions
-          // with '.' and insert mode repeat.
-          lastEditActionCommand: undefined,
-          // When using jk for navigation, if you move from a longer line to a
-          // shorter line, the cursor may clip to the end of the shorter line.
-          // If j is pressed again and cursor goes to the next line, the
-          // cursor should go back to its horizontal position on the longer
-          // line if it can. This is to keep track of the horizontal position.
-          lastHPos: -1,
-          // Doing the same with screen-position for gj/gk
-          lastHSPos: -1,
-          // The last motion command run. Cleared if a non-motion command gets
-          // executed in between.
-          lastMotion: null,
-          marks: {},
-          // Mark for rendering fake cursor for visual mode.
-          fakeCursor: null,
-          insertMode: false,
-          // Repeat count for changes made in insert mode, triggered by key
-          // sequences like 3,i. Only exists when insertMode is true.
-          insertModeRepeat: undefined,
-          visualMode: false,
-          // If we are in visual line mode. No effect if visualMode is false.
-          visualLine: false,
-          visualBlock: false,
-          lastSelection: null,
-          lastPastedText: null,
-          sel: {
-          }
-        };
-      }
-      return cm.state.vim;
-    }
-    var vimGlobalState;
-    function resetVimGlobalState() {
-      vimGlobalState = {
-        // The current search query.
-        searchQuery: null,
-        // Whether we are searching backwards.
-        searchIsReversed: false,
-        // Replace part of the last substituted pattern
-        lastSubstituteReplacePart: undefined,
-        jumpList: createCircularJumpList(),
-        macroModeState: new MacroModeState,
-        // Recording latest f, t, F or T motion command.
-        lastChararacterSearch: {increment:0, forward:true, selectedCharacter:''},
-        registerController: new RegisterController({}),
-        // search history buffer
-        searchHistoryController: new HistoryController({}),
-        // ex Command history buffer
-        exCommandHistoryController : new HistoryController({})
-      };
-      for (var optionName in options) {
-        var option = options[optionName];
-        option.value = option.defaultValue;
-      }
-    }
-
-    var lastInsertModeKeyTimer;
-    var vimApi= {
-      buildKeyMap: function() {
-        // TODO: Convert keymap into dictionary format for fast lookup.
-      },
-      // Testing hook, though it might be useful to expose the register
-      // controller anyways.
-      getRegisterController: function() {
-        return vimGlobalState.registerController;
-      },
-      // Testing hook.
-      resetVimGlobalState_: resetVimGlobalState,
-
-      // Testing hook.
-      getVimGlobalState_: function() {
-        return vimGlobalState;
-      },
-
-      // Testing hook.
-      maybeInitVimState_: maybeInitVimState,
-
-      suppressErrorLogging: false,
-
-      InsertModeKey: InsertModeKey,
-      map: function(lhs, rhs, ctx) {
-        // Add user defined key bindings.
-        exCommandDispatcher.map(lhs, rhs, ctx);
-      },
-      setOption: setOption,
-      getOption: getOption,
-      defineOption: defineOption,
-      defineEx: function(name, prefix, func){
-        if (name.indexOf(prefix) !== 0) {
-          throw new Error('(Vim.defineEx) "'+prefix+'" is not a prefix of "'+name+'", command not registered');
-        }
-        exCommands[name]=func;
-        exCommandDispatcher.commandMap_[prefix]={name:name, shortName:prefix, type:'api'};
-      },
-      handleKey: function (cm, key, origin) {
-        var command = this.findKey(cm, key, origin);
-        if (typeof command === 'function') {
-          return command();
-        }
-      },
-      /**
-       * This is the outermost function called by CodeMirror, after keys have
-       * been mapped to their Vim equivalents.
-       *
-       * Finds a command based on the key (and cached keys if there is a
-       * multi-key sequence). Returns `undefined` if no key is matched, a noop
-       * function if a partial match is found (multi-key), and a function to
-       * execute the bound command if a a key is matched. The function always
-       * returns true.
-       */
-      findKey: function(cm, key, origin) {
-        var vim = maybeInitVimState(cm);
-        function handleMacroRecording() {
-          var macroModeState = vimGlobalState.macroModeState;
-          if (macroModeState.isRecording) {
-            if (key == 'q') {
-              macroModeState.exitMacroRecordMode();
-              clearInputState(cm);
-              return true;
-            }
-            if (origin != 'mapping') {
-              logKey(macroModeState, key);
-            }
-          }
-        }
-        function handleEsc() {
-          if (key == '<Esc>') {
-            // Clear input state and get back to normal mode.
-            clearInputState(cm);
-            if (vim.visualMode) {
-              exitVisualMode(cm);
-            } else if (vim.insertMode) {
-              exitInsertMode(cm);
-            }
-            return true;
-          }
-        }
-        function doKeyToKey(keys) {
-          // TODO: prevent infinite recursion.
-          var match;
-          while (keys) {
-            // Pull off one command key, which is either a single character
-            // or a special sequence wrapped in '<' and '>', e.g. '<Space>'.
-            match = (/<\w+-.+?>|<\w+>|./).exec(keys);
-            key = match[0];
-            keys = keys.substring(match.index + key.length);
-            CodeMirror.Vim.handleKey(cm, key, 'mapping');
-          }
-        }
-
-        function handleKeyInsertMode() {
-          if (handleEsc()) { return true; }
-          var keys = vim.inputState.keyBuffer = vim.inputState.keyBuffer + key;
-          var keysAreChars = key.length == 1;
-          var match = commandDispatcher.matchCommand(keys, defaultKeymap, vim.inputState, 'insert');
-          // Need to check all key substrings in insert mode.
-          while (keys.length > 1 && match.type != 'full') {
-            var keys = vim.inputState.keyBuffer = keys.slice(1);
-            var thisMatch = commandDispatcher.matchCommand(keys, defaultKeymap, vim.inputState, 'insert');
-            if (thisMatch.type != 'none') { match = thisMatch; }
-          }
-          if (match.type == 'none') { clearInputState(cm); return false; }
-          else if (match.type == 'partial') {
-            if (lastInsertModeKeyTimer) { window.clearTimeout(lastInsertModeKeyTimer); }
-            lastInsertModeKeyTimer = window.setTimeout(
-              function() { if (vim.insertMode && vim.inputState.keyBuffer) { clearInputState(cm); } },
-              getOption('insertModeEscKeysTimeout'));
-            return !keysAreChars;
-          }
-
-          if (lastInsertModeKeyTimer) { window.clearTimeout(lastInsertModeKeyTimer); }
-          if (keysAreChars) {
-            var here = cm.getCursor();
-            cm.replaceRange('', offsetCursor(here, 0, -(keys.length - 1)), here, '+input');
-          }
-          clearInputState(cm);
-          return match.command;
-        }
-
-        function handleKeyNonInsertMode() {
-          if (handleMacroRecording() || handleEsc()) { return true; };
-
-          var keys = vim.inputState.keyBuffer = vim.inputState.keyBuffer + key;
-          if (/^[1-9]\d*$/.test(keys)) { return true; }
-
-          var keysMatcher = /^(\d*)(.*)$/.exec(keys);
-          if (!keysMatcher) { clearInputState(cm); return false; }
-          var context = vim.visualMode ? 'visual' :
-                                         'normal';
-          var match = commandDispatcher.matchCommand(keysMatcher[2] || keysMatcher[1], defaultKeymap, vim.inputState, context);
-          if (match.type == 'none') { clearInputState(cm); return false; }
-          else if (match.type == 'partial') { return true; }
-
-          vim.inputState.keyBuffer = '';
-          var keysMatcher = /^(\d*)(.*)$/.exec(keys);
-          if (keysMatcher[1] && keysMatcher[1] != '0') {
-            vim.inputState.pushRepeatDigit(keysMatcher[1]);
-          }
-          return match.command;
-        }
-
-        var command;
-        if (vim.insertMode) { command = handleKeyInsertMode(); }
-        else { command = handleKeyNonInsertMode(); }
-        if (command === false) {
-          return undefined;
-        } else if (command === true) {
-          // TODO: Look into using CodeMirror's multi-key handling.
-          // Return no-op since we are caching the key. Counts as handled, but
-          // don't want act on it just yet.
-          return function() {};
-        } else {
-          return function() {
-            return cm.operation(function() {
-              cm.curOp.isVimOp = true;
-              try {
-                if (command.type == 'keyToKey') {
-                  doKeyToKey(command.toKeys);
-                } else {
-                  commandDispatcher.processCommand(cm, vim, command);
-                }
-              } catch (e) {
-                // clear VIM state in case it's in a bad state.
-                cm.state.vim = undefined;
-                maybeInitVimState(cm);
-                if (!CodeMirror.Vim.suppressErrorLogging) {
-                  console['log'](e);
-                }
-                throw e;
-              }
-              return true;
-            });
-          };
-        }
-      },
-      handleEx: function(cm, input) {
-        exCommandDispatcher.processCommand(cm, input);
-      }
-    };
-
-    // Represents the current input state.
-    function InputState() {
-      this.prefixRepeat = [];
-      this.motionRepeat = [];
-
-      this.operator = null;
-      this.operatorArgs = null;
-      this.motion = null;
-      this.motionArgs = null;
-      this.keyBuffer = []; // For matching multi-key commands.
-      this.registerName = null; // Defaults to the unnamed register.
-    }
-    InputState.prototype.pushRepeatDigit = function(n) {
-      if (!this.operator) {
-        this.prefixRepeat = this.prefixRepeat.concat(n);
-      } else {
-        this.motionRepeat = this.motionRepeat.concat(n);
-      }
-    };
-    InputState.prototype.getRepeat = function() {
-      var repeat = 0;
-      if (this.prefixRepeat.length > 0 || this.motionRepeat.length > 0) {
-        repeat = 1;
-        if (this.prefixRepeat.length > 0) {
-          repeat *= parseInt(this.prefixRepeat.join(''), 10);
-        }
-        if (this.motionRepeat.length > 0) {
-          repeat *= parseInt(this.motionRepeat.join(''), 10);
-        }
-      }
-      return repeat;
-    };
-
-    function clearInputState(cm, reason) {
-      cm.state.vim.inputState = new InputState();
-      CodeMirror.signal(cm, 'vim-command-done', reason);
-    }
-
-    /*
-     * Register stores information about copy and paste registers.  Besides
-     * text, a register must store whether it is linewise (i.e., when it is
-     * pasted, should it insert itself into a new line, or should the text be
-     * inserted at the cursor position.)
-     */
-    function Register(text, linewise, blockwise) {
-      this.clear();
-      this.keyBuffer = [text || ''];
-      this.insertModeChanges = [];
-      this.searchQueries = [];
-      this.linewise = !!linewise;
-      this.blockwise = !!blockwise;
-    }
-    Register.prototype = {
-      setText: function(text, linewise, blockwise) {
-        this.keyBuffer = [text || ''];
-        this.linewise = !!linewise;
-        this.blockwise = !!blockwise;
-      },
-      pushText: function(text, linewise) {
-        // if this register has ever been set to linewise, use linewise.
-        if (linewise) {
-          if (!this.linewise) {
-            this.keyBuffer.push('\n');
-          }
-          this.linewise = true;
-        }
-        this.keyBuffer.push(text);
-      },
-      pushInsertModeChanges: function(changes) {
-        this.insertModeChanges.push(createInsertModeChanges(changes));
-      },
-      pushSearchQuery: function(query) {
-        this.searchQueries.push(query);
-      },
-      clear: function() {
-        this.keyBuffer = [];
-        this.insertModeChanges = [];
-        this.searchQueries = [];
-        this.linewise = false;
-      },
-      toString: function() {
-        return this.keyBuffer.join('');
-      }
-    };
-
-    /*
-     * vim registers allow you to keep many independent copy and paste buffers.
-     * See http://usevim.com/2012/04/13/registers/ for an introduction.
-     *
-     * RegisterController keeps the state of all the registers.  An initial
-     * state may be passed in.  The unnamed register '"' will always be
-     * overridden.
-     */
-    function RegisterController(registers) {
-      this.registers = registers;
-      this.unnamedRegister = registers['"'] = new Register();
-      registers['.'] = new Register();
-      registers[':'] = new Register();
-      registers['/'] = new Register();
-    }
-    RegisterController.prototype = {
-      pushText: function(registerName, operator, text, linewise, blockwise) {
-        if (linewise && text.charAt(0) == '\n') {
-          text = text.slice(1) + '\n';
-        }
-        if (linewise && text.charAt(text.length - 1) !== '\n'){
-          text += '\n';
-        }
-        // Lowercase and uppercase registers refer to the same register.
-        // Uppercase just means append.
-        var register = this.isValidRegister(registerName) ?
-            this.getRegister(registerName) : null;
-        // if no register/an invalid register was specified, things go to the
-        // default registers
-        if (!register) {
-          switch (operator) {
-            case 'yank':
-              // The 0 register contains the text from the most recent yank.
-              this.registers['0'] = new Register(text, linewise, blockwise);
-              break;
-            case 'delete':
-            case 'change':
-              if (text.indexOf('\n') == -1) {
-                // Delete less than 1 line. Update the small delete register.
-                this.registers['-'] = new Register(text, linewise);
-              } else {
-                // Shift down the contents of the numbered registers and put the
-                // deleted text into register 1.
-                this.shiftNumericRegisters_();
-                this.registers['1'] = new Register(text, linewise);
-              }
-              break;
-          }
-          // Make sure the unnamed register is set to what just happened
-          this.unnamedRegister.setText(text, linewise, blockwise);
-          return;
-        }
-
-        // If we've gotten to this point, we've actually specified a register
-        var append = isUpperCase(registerName);
-        if (append) {
-          register.pushText(text, linewise);
-        } else {
-          register.setText(text, linewise, blockwise);
-        }
-        // The unnamed register always has the same value as the last used
-        // register.
-        this.unnamedRegister.setText(register.toString(), linewise);
-      },
-      // Gets the register named @name.  If one of @name doesn't already exist,
-      // create it.  If @name is invalid, return the unnamedRegister.
-      getRegister: function(name) {
-        if (!this.isValidRegister(name)) {
-          return this.unnamedRegister;
-        }
-        name = name.toLowerCase();
-        if (!this.registers[name]) {
-          this.registers[name] = new Register();
-        }
-        return this.registers[name];
-      },
-      isValidRegister: function(name) {
-        return name && inArray(name, validRegisters);
-      },
-      shiftNumericRegisters_: function() {
-        for (var i = 9; i >= 2; i--) {
-          this.registers[i] = this.getRegister('' + (i - 1));
-        }
-      }
-    };
-    function HistoryController() {
-        this.historyBuffer = [];
-        this.iterator;
-        this.initialPrefix = null;
-    }
-    HistoryController.prototype = {
-      // the input argument here acts a user entered prefix for a small time
-      // until we start autocompletion in which case it is the autocompleted.
-      nextMatch: function (input, up) {
-        var historyBuffer = this.historyBuffer;
-        var dir = up ? -1 : 1;
-        if (this.initialPrefix === null) this.initialPrefix = input;
-        for (var i = this.iterator + dir; up ? i >= 0 : i < historyBuffer.length; i+= dir) {
-          var element = historyBuffer[i];
-          for (var j = 0; j <= element.length; j++) {
-            if (this.initialPrefix == element.substring(0, j)) {
-              this.iterator = i;
-              return element;
-            }
-          }
-        }
-        // should return the user input in case we reach the end of buffer.
-        if (i >= historyBuffer.length) {
-          this.iterator = historyBuffer.length;
-          return this.initialPrefix;
-        }
-        // return the last autocompleted query or exCommand as it is.
-        if (i < 0 ) return input;
-      },
-      pushInput: function(input) {
-        var index = this.historyBuffer.indexOf(input);
-        if (index > -1) this.historyBuffer.splice(index, 1);
-        if (input.length) this.historyBuffer.push(input);
-      },
-      reset: function() {
-        this.initialPrefix = null;
-        this.iterator = this.historyBuffer.length;
-      }
-    };
-    var commandDispatcher = {
-      matchCommand: function(keys, keyMap, inputState, context) {
-        var matches = commandMatches(keys, keyMap, context, inputState);
-        if (!matches.full && !matches.partial) {
-          return {type: 'none'};
-        } else if (!matches.full && matches.partial) {
-          return {type: 'partial'};
-        }
-
-        var bestMatch;
-        for (var i = 0; i < matches.full.length; i++) {
-          var match = matches.full[i];
-          if (!bestMatch) {
-            bestMatch = match;
-          }
-        }
-        if (bestMatch.keys.slice(-11) == '<character>') {
-          inputState.selectedCharacter = lastChar(keys);
-        }
-        return {type: 'full', command: bestMatch};
-      },
-      processCommand: function(cm, vim, command) {
-        vim.inputState.repeatOverride = command.repeatOverride;
-        switch (command.type) {
-          case 'motion':
-            this.processMotion(cm, vim, command);
-            break;
-          case 'operator':
-            this.processOperator(cm, vim, command);
-            break;
-          case 'operatorMotion':
-            this.processOperatorMotion(cm, vim, command);
-            break;
-          case 'action':
-            this.processAction(cm, vim, command);
-            break;
-          case 'search':
-            this.processSearch(cm, vim, command);
-            clearInputState(cm);
-            break;
-          case 'ex':
-          case 'keyToEx':
-            this.processEx(cm, vim, command);
-            clearInputState(cm);
-            break;
-          default:
-            break;
-        }
-      },
-      processMotion: function(cm, vim, command) {
-        vim.inputState.motion = command.motion;
-        vim.inputState.motionArgs = copyArgs(command.motionArgs);
-        this.evalInput(cm, vim);
-      },
-      processOperator: function(cm, vim, command) {
-        var inputState = vim.inputState;
-        if (inputState.operator) {
-          if (inputState.operator == command.operator) {
-            // Typing an operator twice like 'dd' makes the operator operate
-            // linewise
-            inputState.motion = 'expandToLine';
-            inputState.motionArgs = { linewise: true };
-            this.evalInput(cm, vim);
-            return;
-          } else {
-            // 2 different operators in a row doesn't make sense.
-            clearInputState(cm);
-          }
-        }
-        inputState.operator = command.operator;
-        inputState.operatorArgs = copyArgs(command.operatorArgs);
-        if (vim.visualMode) {
-          // Operating on a selection in visual mode. We don't need a motion.
-          this.evalInput(cm, vim);
-        }
-      },
-      processOperatorMotion: function(cm, vim, command) {
-        var visualMode = vim.visualMode;
-        var operatorMotionArgs = copyArgs(command.operatorMotionArgs);
-        if (operatorMotionArgs) {
-          // Operator motions may have special behavior in visual mode.
-          if (visualMode && operatorMotionArgs.visualLine) {
-            vim.visualLine = true;
-          }
-        }
-        this.processOperator(cm, vim, command);
-        if (!visualMode) {
-          this.processMotion(cm, vim, command);
-        }
-      },
-      processAction: function(cm, vim, command) {
-        var inputState = vim.inputState;
-        var repeat = inputState.getRepeat();
-        var repeatIsExplicit = !!repeat;
-        var actionArgs = copyArgs(command.actionArgs) || {};
-        if (inputState.selectedCharacter) {
-          actionArgs.selectedCharacter = inputState.selectedCharacter;
-        }
-        // Actions may or may not have motions and operators. Do these first.
-        if (command.operator) {
-          this.processOperator(cm, vim, command);
-        }
-        if (command.motion) {
-          this.processMotion(cm, vim, command);
-        }
-        if (command.motion || command.operator) {
-          this.evalInput(cm, vim);
-        }
-        actionArgs.repeat = repeat || 1;
-        actionArgs.repeatIsExplicit = repeatIsExplicit;
-        actionArgs.registerName = inputState.registerName;
-        clearInputState(cm);
-        vim.lastMotion = null;
-        if (command.isEdit) {
-          this.recordLastEdit(vim, inputState, command);
-        }
-        actions[command.action](cm, actionArgs, vim);
-      },
-      processSearch: function(cm, vim, command) {
-        if (!cm.getSearchCursor) {
-          // Search depends on SearchCursor.
-          return;
-        }
-        var forward = command.searchArgs.forward;
-        var wholeWordOnly = command.searchArgs.wholeWordOnly;
-        getSearchState(cm).setReversed(!forward);
-        var promptPrefix = (forward) ? '/' : '?';
-        var originalQuery = getSearchState(cm).getQuery();
-        var originalScrollPos = cm.getScrollInfo();
-        function handleQuery(query, ignoreCase, smartCase) {
-          vimGlobalState.searchHistoryController.pushInput(query);
-          vimGlobalState.searchHistoryController.reset();
-          try {
-            updateSearchQuery(cm, query, ignoreCase, smartCase);
-          } catch (e) {
-            showConfirm(cm, 'Invalid regex: ' + query);
-            return;
-          }
-          commandDispatcher.processMotion(cm, vim, {
-            type: 'motion',
-            motion: 'findNext',
-            motionArgs: { forward: true, toJumplist: command.searchArgs.toJumplist }
-          });
-        }
-        function onPromptClose(query) {
-          cm.scrollTo(originalScrollPos.left, originalScrollPos.top);
-          handleQuery(query, true /** ignoreCase */, true /** smartCase */);
-          var macroModeState = vimGlobalState.macroModeState;
-          if (macroModeState.isRecording) {
-            logSearchQuery(macroModeState, query);
-          }
-        }
-        function onPromptKeyUp(e, query, close) {
-          var keyName = CodeMirror.keyName(e), up;
-          if (keyName == 'Up' || keyName == 'Down') {
-            up = keyName == 'Up' ? true : false;
-            query = vimGlobalState.searchHistoryController.nextMatch(query, up) || '';
-            close(query);
-          } else {
-            if ( keyName != 'Left' && keyName != 'Right' && keyName != 'Ctrl' && keyName != 'Alt' && keyName != 'Shift')
-              vimGlobalState.searchHistoryController.reset();
-          }
-          var parsedQuery;
-          try {
-            parsedQuery = updateSearchQuery(cm, query,
-                true /** ignoreCase */, true /** smartCase */);
-          } catch (e) {
-            // Swallow bad regexes for incremental search.
-          }
-          if (parsedQuery) {
-            cm.scrollIntoView(findNext(cm, !forward, parsedQuery), 30);
-          } else {
-            clearSearchHighlight(cm);
-            cm.scrollTo(originalScrollPos.left, originalScrollPos.top);
-          }
-        }
-        function onPromptKeyDown(e, query, close) {
-          var keyName = CodeMirror.keyName(e);
-          if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[') {
-            vimGlobalState.searchHistoryController.pushInput(query);
-            vimGlobalState.searchHistoryController.reset();
-            updateSearchQuery(cm, originalQuery);
-            clearSearchHighlight(cm);
-            cm.scrollTo(originalScrollPos.left, originalScrollPos.top);
-            CodeMirror.e_stop(e);
-            close();
-            cm.focus();
-          }
-        }
-        switch (command.searchArgs.querySrc) {
-          case 'prompt':
-            var macroModeState = vimGlobalState.macroModeState;
-            if (macroModeState.isPlaying) {
-              var query = macroModeState.replaySearchQueries.shift();
-              handleQuery(query, true /** ignoreCase */, false /** smartCase */);
-            } else {
-              showPrompt(cm, {
-                  onClose: onPromptClose,
-                  prefix: promptPrefix,
-                  desc: searchPromptDesc,
-                  onKeyUp: onPromptKeyUp,
-                  onKeyDown: onPromptKeyDown
-              });
-            }
-            break;
-          case 'wordUnderCursor':
-            var word = expandWordUnderCursor(cm, false /** inclusive */,
-                true /** forward */, false /** bigWord */,
-                true /** noSymbol */);
-            var isKeyword = true;
-            if (!word) {
-              word = expandWordUnderCursor(cm, false /** inclusive */,
-                  true /** forward */, false /** bigWord */,
-                  false /** noSymbol */);
-              isKeyword = false;
-            }
-            if (!word) {
-              return;
-            }
-            var query = cm.getLine(word.start.line).substring(word.start.ch,
-                word.end.ch);
-            if (isKeyword && wholeWordOnly) {
-                query = '\\b' + query + '\\b';
-            } else {
-              query = escapeRegex(query);
-            }
-
-            // cachedCursor is used to save the old position of the cursor
-            // when * or # causes vim to seek for the nearest word and shift
-            // the cursor before entering the motion.
-            vimGlobalState.jumpList.cachedCursor = cm.getCursor();
-            cm.setCursor(word.start);
-
-            handleQuery(query, true /** ignoreCase */, false /** smartCase */);
-            break;
-        }
-      },
-      processEx: function(cm, vim, command) {
-        function onPromptClose(input) {
-          // Give the prompt some time to close so that if processCommand shows
-          // an error, the elements don't overlap.
-          vimGlobalState.exCommandHistoryController.pushInput(input);
-          vimGlobalState.exCommandHistoryController.reset();
-          exCommandDispatcher.processCommand(cm, input);
-        }
-        function onPromptKeyDown(e, input, close) {
-          var keyName = CodeMirror.keyName(e), up;
-          if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[') {
-            vimGlobalState.exCommandHistoryController.pushInput(input);
-            vimGlobalState.exCommandHistoryController.reset();
-            CodeMirror.e_stop(e);
-            close();
-            cm.focus();
-          }
-          if (keyName == 'Up' || keyName == 'Down') {
-            up = keyName == 'Up' ? true : false;
-            input = vimGlobalState.exCommandHistoryController.nextMatch(input, up) || '';
-            close(input);
-          } else {
-            if ( keyName != 'Left' && keyName != 'Right' && keyName != 'Ctrl' && keyName != 'Alt' && keyName != 'Shift')
-              vimGlobalState.exCommandHistoryController.reset();
-          }
-        }
-        if (command.type == 'keyToEx') {
-          // Handle user defined Ex to Ex mappings
-          exCommandDispatcher.processCommand(cm, command.exArgs.input);
-        } else {
-          if (vim.visualMode) {
-            showPrompt(cm, { onClose: onPromptClose, prefix: ':', value: '\'<,\'>',
-                onKeyDown: onPromptKeyDown});
-          } else {
-            showPrompt(cm, { onClose: onPromptClose, prefix: ':',
-                onKeyDown: onPromptKeyDown});
-          }
-        }
-      },
-      evalInput: function(cm, vim) {
-        // If the motion comand is set, execute both the operator and motion.
-        // Otherwise return.
-        var inputState = vim.inputState;
-        var motion = inputState.motion;
-        var motionArgs = inputState.motionArgs || {};
-        var operator = inputState.operator;
-        var operatorArgs = inputState.operatorArgs || {};
-        var registerName = inputState.registerName;
-        var sel = vim.sel;
-        // TODO: Make sure cm and vim selections are identical outside visual mode.
-        var origHead = copyCursor(vim.visualMode ? sel.head: cm.getCursor('head'));
-        var origAnchor = copyCursor(vim.visualMode ? sel.anchor : cm.getCursor('anchor'));
-        var oldHead = copyCursor(origHead);
-        var oldAnchor = copyCursor(origAnchor);
-        var newHead, newAnchor;
-        var repeat;
-        if (operator) {
-          this.recordLastEdit(vim, inputState);
-        }
-        if (inputState.repeatOverride !== undefined) {
-          // If repeatOverride is specified, that takes precedence over the
-          // input state's repeat. Used by Ex mode and can be user defined.
-          repeat = inputState.repeatOverride;
-        } else {
-          repeat = inputState.getRepeat();
-        }
-        if (repeat > 0 && motionArgs.explicitRepeat) {
-          motionArgs.repeatIsExplicit = true;
-        } else if (motionArgs.noRepeat ||
-            (!motionArgs.explicitRepeat && repeat === 0)) {
-          repeat = 1;
-          motionArgs.repeatIsExplicit = false;
-        }
-        if (inputState.selectedCharacter) {
-          // If there is a character input, stick it in all of the arg arrays.
-          motionArgs.selectedCharacter = operatorArgs.selectedCharacter =
-              inputState.selectedCharacter;
-        }
-        motionArgs.repeat = repeat;
-        clearInputState(cm);
-        if (motion) {
-          var motionResult = motions[motion](cm, origHead, motionArgs, vim);
-          vim.lastMotion = motions[motion];
-          if (!motionResult) {
-            return;
-          }
-          if (motionArgs.toJumplist) {
-            var jumpList = vimGlobalState.jumpList;
-            // if the current motion is # or *, use cachedCursor
-            var cachedCursor = jumpList.cachedCursor;
-            if (cachedCursor) {
-              recordJumpPosition(cm, cachedCursor, motionResult);
-              delete jumpList.cachedCursor;
-            } else {
-              recordJumpPosition(cm, origHead, motionResult);
-            }
-          }
-          if (motionResult instanceof Array) {
-            newAnchor = motionResult[0];
-            newHead = motionResult[1];
-          } else {
-            newHead = motionResult;
-          }
-          // TODO: Handle null returns from motion commands better.
-          if (!newHead) {
-            newHead = copyCursor(origHead);
-          }
-          if (vim.visualMode) {
-            if (!(vim.visualBlock && newHead.ch === Infinity)) {
-              newHead = clipCursorToContent(cm, newHead, vim.visualBlock);
-            }
-            if (newAnchor) {
-              newAnchor = clipCursorToContent(cm, newAnchor, true);
-            }
-            newAnchor = newAnchor || oldAnchor;
-            sel.anchor = newAnchor;
-            sel.head = newHead;
-            updateCmSelection(cm);
-            updateMark(cm, vim, '<',
-                cursorIsBefore(newAnchor, newHead) ? newAnchor
-                    : newHead);
-            updateMark(cm, vim, '>',
-                cursorIsBefore(newAnchor, newHead) ? newHead
-                    : newAnchor);
-          } else if (!operator) {
-            newHead = clipCursorToContent(cm, newHead);
-            cm.setCursor(newHead.line, newHead.ch);
-          }
-        }
-        if (operator) {
-          if (operatorArgs.lastSel) {
-            // Replaying a visual mode operation
-            newAnchor = oldAnchor;
-            var lastSel = operatorArgs.lastSel;
-            var lineOffset = Math.abs(lastSel.head.line - lastSel.anchor.line);
-            var chOffset = Math.abs(lastSel.head.ch - lastSel.anchor.ch);
-            if (lastSel.visualLine) {
-              // Linewise Visual mode: The same number of lines.
-              newHead = Pos(oldAnchor.line + lineOffset, oldAnchor.ch);
-            } else if (lastSel.visualBlock) {
-              // Blockwise Visual mode: The same number of lines and columns.
-              newHead = Pos(oldAnchor.line + lineOffset, oldAnchor.ch + chOffset);
-            } else if (lastSel.head.line == lastSel.anchor.line) {
-              // Normal Visual mode within one line: The same number of characters.
-              newHead = Pos(oldAnchor.line, oldAnchor.ch + chOffset);
-            } else {
-              // Normal Visual mode with several lines: The same number of lines, in the
-              // last line the same number of characters as in the last line the last time.
-              newHead = Pos(oldAnchor.line + lineOffset, oldAnchor.ch);
-            }
-            vim.visualMode = true;
-            vim.visualLine = lastSel.visualLine;
-            vim.visualBlock = lastSel.visualBlock;
-            sel = vim.sel = {
-              anchor: newAnchor,
-              head: newHead
-            };
-            updateCmSelection(cm);
-          } else if (vim.visualMode) {
-            operatorArgs.lastSel = {
-              anchor: copyCursor(sel.anchor),
-              head: copyCursor(sel.head),
-              visualBlock: vim.visualBlock,
-              visualLine: vim.visualLine
-            };
-          }
-          var curStart, curEnd, linewise, mode;
-          var cmSel;
-          if (vim.visualMode) {
-            // Init visual op
-            curStart = cursorMin(sel.head, sel.anchor);
-            curEnd = cursorMax(sel.head, sel.anchor);
-            linewise = vim.visualLine || operatorArgs.linewise;
-            mode = vim.visualBlock ? 'block' :
-                   linewise ? 'line' :
-                   'char';
-            cmSel = makeCmSelection(cm, {
-              anchor: curStart,
-              head: curEnd
-            }, mode);
-            if (linewise) {
-              var ranges = cmSel.ranges;
-              if (mode == 'block') {
-                // Linewise operators in visual block mode extend to end of line
-                for (var i = 0; i < ranges.length; i++) {
-                  ranges[i].head.ch = lineLength(cm, ranges[i].head.line);
-                }
-              } else if (mode == 'line') {
-                ranges[0].head = Pos(ranges[0].head.line + 1, 0);
-              }
-            }
-          } else {
-            // Init motion op
-            curStart = copyCursor(newAnchor || oldAnchor);
-            curEnd = copyCursor(newHead || oldHead);
-            if (cursorIsBefore(curEnd, curStart)) {
-              var tmp = curStart;
-              curStart = curEnd;
-              curEnd = tmp;
-            }
-            linewise = motionArgs.linewise || operatorArgs.linewise;
-            if (linewise) {
-              // Expand selection to entire line.
-              expandSelectionToLine(cm, curStart, curEnd);
-            } else if (motionArgs.forward) {
-              // Clip to trailing newlines only if the motion goes forward.
-              clipToLine(cm, curStart, curEnd);
-            }
-            mode = 'char';
-            var exclusive = !motionArgs.inclusive || linewise;
-            cmSel = makeCmSelection(cm, {
-              anchor: curStart,
-              head: curEnd
-            }, mode, exclusive);
-          }
-          cm.setSelections(cmSel.ranges, cmSel.primary);
-          vim.lastMotion = null;
-          operatorArgs.repeat = repeat; // For indent in visual mode.
-          operatorArgs.registerName = registerName;
-          // Keep track of linewise as it affects how paste and change behave.
-          operatorArgs.linewise = linewise;
-          var operatorMoveTo = operators[operator](
-            cm, operatorArgs, cmSel.ranges, oldAnchor, newHead);
-          if (vim.visualMode) {
-            exitVisualMode(cm);
-          }
-          if (operatorMoveTo) {
-            cm.setCursor(operatorMoveTo);
-          }
-        }
-      },
-      recordLastEdit: function(vim, inputState, actionCommand) {
-        var macroModeState = vimGlobalState.macroModeState;
-        if (macroModeState.isPlaying) { return; }
-        vim.lastEditInputState = inputState;
-        vim.lastEditActionCommand = actionCommand;
-        macroModeState.lastInsertModeChanges.changes = [];
-        macroModeState.lastInsertModeChanges.expectCursorActivityForChange = false;
-      }
-    };
-
-    /**
-     * typedef {Object{line:number,ch:number}} Cursor An object containing the
-     *     position of the cursor.
-     */
-    // All of the functions below return Cursor objects.
-    var motions = {
-      moveToTopLine: function(cm, _head, motionArgs) {
-        var line = getUserVisibleLines(cm).top + motionArgs.repeat -1;
-        return Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line)));
-      },
-      moveToMiddleLine: function(cm) {
-        var range = getUserVisibleLines(cm);
-        var line = Math.floor((range.top + range.bottom) * 0.5);
-        return Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line)));
-      },
-      moveToBottomLine: function(cm, _head, motionArgs) {
-        var line = getUserVisibleLines(cm).bottom - motionArgs.repeat +1;
-        return Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line)));
-      },
-      expandToLine: function(_cm, head, motionArgs) {
-        // Expands forward to end of line, and then to next line if repeat is
-        // >1. Does not handle backward motion!
-        var cur = head;
-        return Pos(cur.line + motionArgs.repeat - 1, Infinity);
-      },
-      findNext: function(cm, _head, motionArgs) {
-        var state = getSearchState(cm);
-        var query = state.getQuery();
-        if (!query) {
-          return;
-        }
-        var prev = !motionArgs.forward;
-        // If search is initiated with ? instead of /, negate direction.
-        prev = (state.isReversed()) ? !prev : prev;
-        highlightSearchMatches(cm, query);
-        return findNext(cm, prev/** prev */, query, motionArgs.repeat);
-      },
-      goToMark: function(cm, _head, motionArgs, vim) {
-        var mark = vim.marks[motionArgs.selectedCharacter];
-        if (mark) {
-          var pos = mark.find();
-          return motionArgs.linewise ? { line: pos.line, ch: findFirstNonWhiteSpaceCharacter(cm.getLine(pos.line)) } : pos;
-        }
-        return null;
-      },
-      moveToOtherHighlightedEnd: function(cm, _head, motionArgs, vim) {
-        if (vim.visualBlock && motionArgs.sameLine) {
-          var sel = vim.sel;
-          return [
-            clipCursorToContent(cm, Pos(sel.anchor.line, sel.head.ch)),
-            clipCursorToContent(cm, Pos(sel.head.line, sel.anchor.ch))
-          ];
-        } else {
-          return ([vim.sel.head, vim.sel.anchor]);
-        }
-      },
-      jumpToMark: function(cm, head, motionArgs, vim) {
-        var best = head;
-        for (var i = 0; i < motionArgs.repeat; i++) {
-          var cursor = best;
-          for (var key in vim.marks) {
-            if (!isLowerCase(key)) {
-              continue;
-            }
-            var mark = vim.marks[key].find();
-            var isWrongDirection = (motionArgs.forward) ?
-              cursorIsBefore(mark, cursor) : cursorIsBefore(cursor, mark);
-
-            if (isWrongDirection) {
-              continue;
-            }
-            if (motionArgs.linewise && (mark.line == cursor.line)) {
-              continue;
-            }
-
-            var equal = cursorEqual(cursor, best);
-            var between = (motionArgs.forward) ?
-              cursorIsBetween(cursor, mark, best) :
-              cursorIsBetween(best, mark, cursor);
-
-            if (equal || between) {
-              best = mark;
-            }
-          }
-        }
-
-        if (motionArgs.linewise) {
-          // Vim places the cursor on the first non-whitespace character of
-          // the line if there is one, else it places the cursor at the end
-          // of the line, regardless of whether a mark was found.
-          best = Pos(best.line, findFirstNonWhiteSpaceCharacter(cm.getLine(best.line)));
-        }
-        return best;
-      },
-      moveByCharacters: function(_cm, head, motionArgs) {
-        var cur = head;
-        var repeat = motionArgs.repeat;
-        var ch = motionArgs.forward ? cur.ch + repeat : cur.ch - repeat;
-        return Pos(cur.line, ch);
-      },
-      moveByLines: function(cm, head, motionArgs, vim) {
-        var cur = head;
-        var endCh = cur.ch;
-        // Depending what our last motion was, we may want to do different
-        // things. If our last motion was moving vertically, we want to
-        // preserve the HPos from our last horizontal move.  If our last motion
-        // was going to the end of a line, moving vertically we should go to
-        // the end of the line, etc.
-        switch (vim.lastMotion) {
-          case this.moveByLines:
-          case this.moveByDisplayLines:
-          case this.moveByScroll:
-          case this.moveToColumn:
-          case this.moveToEol:
-            endCh = vim.lastHPos;
-            break;
-          default:
-            vim.lastHPos = endCh;
-        }
-        var repeat = motionArgs.repeat+(motionArgs.repeatOffset||0);
-        var line = motionArgs.forward ? cur.line + repeat : cur.line - repeat;
-        var first = cm.firstLine();
-        var last = cm.lastLine();
-        // Vim cancels linewise motions that start on an edge and move beyond
-        // that edge. It does not cancel motions that do not start on an edge.
-        if ((line < first && cur.line == first) ||
-            (line > last && cur.line == last)) {
-          return;
-        }
-        if (motionArgs.toFirstChar){
-          endCh=findFirstNonWhiteSpaceCharacter(cm.getLine(line));
-          vim.lastHPos = endCh;
-        }
-        vim.lastHSPos = cm.charCoords(Pos(line, endCh),'div').left;
-        return Pos(line, endCh);
-      },
-      moveByDisplayLines: function(cm, head, motionArgs, vim) {
-        var cur = head;
-        switch (vim.lastMotion) {
-          case this.moveByDisplayLines:
-          case this.moveByScroll:
-          case this.moveByLines:
-          case this.moveToColumn:
-          case this.moveToEol:
-            break;
-          default:
-            vim.lastHSPos = cm.charCoords(cur,'div').left;
-        }
-        var repeat = motionArgs.repeat;
-        var res=cm.findPosV(cur,(motionArgs.forward ? repeat : -repeat),'line',vim.lastHSPos);
-        if (res.hitSide) {
-          if (motionArgs.forward) {
-            var lastCharCoords = cm.charCoords(res, 'div');
-            var goalCoords = { top: lastCharCoords.top + 8, left: vim.lastHSPos };
-            var res = cm.coordsChar(goalCoords, 'div');
-          } else {
-            var resCoords = cm.charCoords(Pos(cm.firstLine(), 0), 'div');
-            resCoords.left = vim.lastHSPos;
-            res = cm.coordsChar(resCoords, 'div');
-          }
-        }
-        vim.lastHPos = res.ch;
-        return res;
-      },
-      moveByPage: function(cm, head, motionArgs) {
-        // CodeMirror only exposes functions that move the cursor page down, so
-        // doing this bad hack to move the cursor and move it back. evalInput
-        // will move the cursor to where it should be in the end.
-        var curStart = head;
-        var repeat = motionArgs.repeat;
-        return cm.findPosV(curStart, (motionArgs.forward ? repeat : -repeat), 'page');
-      },
-      moveByParagraph: function(cm, head, motionArgs) {
-        var dir = motionArgs.forward ? 1 : -1;
-        return findParagraph(cm, head, motionArgs.repeat, dir);
-      },
-      moveByScroll: function(cm, head, motionArgs, vim) {
-        var scrollbox = cm.getScrollInfo();
-        var curEnd = null;
-        var repeat = motionArgs.repeat;
-        if (!repeat) {
-          repeat = scrollbox.clientHeight / (2 * cm.defaultTextHeight());
-        }
-        var orig = cm.charCoords(head, 'local');
-        motionArgs.repeat = repeat;
-        var curEnd = motions.moveByDisplayLines(cm, head, motionArgs, vim);
-        if (!curEnd) {
-          return null;
-        }
-        var dest = cm.charCoords(curEnd, 'local');
-        cm.scrollTo(null, scrollbox.top + dest.top - orig.top);
-        return curEnd;
-      },
-      moveByWords: function(cm, head, motionArgs) {
-        return moveToWord(cm, head, motionArgs.repeat, !!motionArgs.forward,
-            !!motionArgs.wordEnd, !!motionArgs.bigWord);
-      },
-      moveTillCharacter: function(cm, _head, motionArgs) {
-        var repeat = motionArgs.repeat;
-        var curEnd = moveToCharacter(cm, repeat, motionArgs.forward,
-            motionArgs.selectedCharacter);
-        var increment = motionArgs.forward ? -1 : 1;
-        recordLastCharacterSearch(increment, motionArgs);
-        if (!curEnd) return null;
-        curEnd.ch += increment;
-        return curEnd;
-      },
-      moveToCharacter: function(cm, head, motionArgs) {
-        var repeat = motionArgs.repeat;
-        recordLastCharacterSearch(0, motionArgs);
-        return moveToCharacter(cm, repeat, motionArgs.forward,
-            motionArgs.selectedCharacter) || head;
-      },
-      moveToSymbol: function(cm, head, motionArgs) {
-        var repeat = motionArgs.repeat;
-        return findSymbol(cm, repeat, motionArgs.forward,
-            motionArgs.selectedCharacter) || head;
-      },
-      moveToColumn: function(cm, head, motionArgs, vim) {
-        var repeat = motionArgs.repeat;
-        // repeat is equivalent to which column we want to move to!
-        vim.lastHPos = repeat - 1;
-        vim.lastHSPos = cm.charCoords(head,'div').left;
-        return moveToColumn(cm, repeat);
-      },
-      moveToEol: function(cm, head, motionArgs, vim) {
-        var cur = head;
-        vim.lastHPos = Infinity;
-        var retval= Pos(cur.line + motionArgs.repeat - 1, Infinity);
-        var end=cm.clipPos(retval);
-        end.ch--;
-        vim.lastHSPos = cm.charCoords(end,'div').left;
-        return retval;
-      },
-      moveToFirstNonWhiteSpaceCharacter: function(cm, head) {
-        // Go to the start of the line where the text begins, or the end for
-        // whitespace-only lines
-        var cursor = head;
-        return Pos(cursor.line,
-                   findFirstNonWhiteSpaceCharacter(cm.getLine(cursor.line)));
-      },
-      moveToMatchedSymbol: function(cm, head) {
-        var cursor = head;
-        var line = cursor.line;
-        var ch = cursor.ch;
-        var lineText = cm.getLine(line);
-        var symbol;
-        do {
-          symbol = lineText.charAt(ch++);
-          if (symbol && isMatchableSymbol(symbol)) {
-            var style = cm.getTokenTypeAt(Pos(line, ch));
-            if (style !== "string" && style !== "comment") {
-              break;
-            }
-          }
-        } while (symbol);
-        if (symbol) {
-          var matched = cm.findMatchingBracket(Pos(line, ch));
-          return matched.to;
-        } else {
-          return cursor;
-        }
-      },
-      moveToStartOfLine: function(_cm, head) {
-        return Pos(head.line, 0);
-      },
-      moveToLineOrEdgeOfDocument: function(cm, _head, motionArgs) {
-        var lineNum = motionArgs.forward ? cm.lastLine() : cm.firstLine();
-        if (motionArgs.repeatIsExplicit) {
-          lineNum = motionArgs.repeat - cm.getOption('firstLineNumber');
-        }
-        return Pos(lineNum,
-                   findFirstNonWhiteSpaceCharacter(cm.getLine(lineNum)));
-      },
-      textObjectManipulation: function(cm, head, motionArgs, vim) {
-        // TODO: lots of possible exceptions that can be thrown here. Try da(
-        //     outside of a () block.
-
-        // TODO: adding <> >< to this map doesn't work, presumably because
-        // they're operators
-        var mirroredPairs = {'(': ')', ')': '(',
-                             '{': '}', '}': '{',
-                             '[': ']', ']': '['};
-        var selfPaired = {'\'': true, '"': true};
-
-        var character = motionArgs.selectedCharacter;
-        // 'b' refers to  '()' block.
-        // 'B' refers to  '{}' block.
-        if (character == 'b') {
-          character = '(';
-        } else if (character == 'B') {
-          character = '{';
-        }
-
-        // Inclusive is the difference between a and i
-        // TODO: Instead of using the additional text object map to perform text
-        //     object operations, merge the map into the defaultKeyMap and use
-        //     motionArgs to define behavior. Define separate entries for 'aw',
-        //     'iw', 'a[', 'i[', etc.
-        var inclusive = !motionArgs.textObjectInner;
-
-        var tmp;
-        if (mirroredPairs[character]) {
-          tmp = selectCompanionObject(cm, head, character, inclusive);
-        } else if (selfPaired[character]) {
-          tmp = findBeginningAndEnd(cm, head, character, inclusive);
-        } else if (character === 'W') {
-          tmp = expandWordUnderCursor(cm, inclusive, true /** forward */,
-                                                     true /** bigWord */);
-        } else if (character === 'w') {
-          tmp = expandWordUnderCursor(cm, inclusive, true /** forward */,
-                                                     false /** bigWord */);
-        } else if (character === 'p') {
-          tmp = findParagraph(cm, head, motionArgs.repeat, 0, inclusive);
-          motionArgs.linewise = true;
-          if (vim.visualMode) {
-            if (!vim.visualLine) { vim.visualLine = true; }
-          } else {
-            var operatorArgs = vim.inputState.operatorArgs;
-            if (operatorArgs) { operatorArgs.linewise = true; }
-            tmp.end.line--;
-          }
-        } else {
-          // No text object defined for this, don't move.
-          return null;
-        }
-
-        if (!cm.state.vim.visualMode) {
-          return [tmp.start, tmp.end];
-        } else {
-          return expandSelection(cm, tmp.start, tmp.end);
-        }
-      },
-
-      repeatLastCharacterSearch: function(cm, head, motionArgs) {
-        var lastSearch = vimGlobalState.lastChararacterSearch;
-        var repeat = motionArgs.repeat;
-        var forward = motionArgs.forward === lastSearch.forward;
-        var increment = (lastSearch.increment ? 1 : 0) * (forward ? -1 : 1);
-        cm.moveH(-increment, 'char');
-        motionArgs.inclusive = forward ? true : false;
-        var curEnd = moveToCharacter(cm, repeat, forward, lastSearch.selectedCharacter);
-        if (!curEnd) {
-          cm.moveH(increment, 'char');
-          return head;
-        }
-        curEnd.ch += increment;
-        return curEnd;
-      }
-    };
-
-    function fillArray(val, times) {
-      var arr = [];
-      for (var i = 0; i < times; i++) {
-        arr.push(val);
-      }
-      return arr;
-    }
-    /**
-     * An operator acts on a text selection. It receives the list of selections
-     * as input. The corresponding CodeMirror selection is guaranteed to
-    * match the input selection.
-     */
-    var operators = {
-      change: function(cm, args, ranges) {
-        var finalHead, text;
-        var vim = cm.state.vim;
-        vimGlobalState.macroModeState.lastInsertModeChanges.inVisualBlock = vim.visualBlock;
-        if (!vim.visualMode) {
-          var anchor = ranges[0].anchor,
-              head = ranges[0].head;
-          text = cm.getRange(anchor, head);
-          if (!isWhiteSpaceString(text)) {
-            // Exclude trailing whitespace if the range is not all whitespace.
-            var match = (/\s+$/).exec(text);
-            if (match) {
-              head = offsetCursor(head, 0, - match[0].length);
-              text = text.slice(0, - match[0].length);
-            }
-          }
-          var wasLastLine = head.line - 1 == cm.lastLine();
-          cm.replaceRange('', anchor, head);
-          if (args.linewise && !wasLastLine) {
-            // Push the next line back down, if there is a next line.
-            CodeMirror.commands.newlineAndIndent(cm);
-            // null ch so setCursor moves to end of line.
-            anchor.ch = null;
-          }
-          finalHead = anchor;
-        } else {
-          text = cm.getSelection();
-          var replacement = fillArray('', ranges.length);
-          cm.replaceSelections(replacement);
-          finalHead = cursorMin(ranges[0].head, ranges[0].anchor);
-        }
-        vimGlobalState.registerController.pushText(
-            args.registerName, 'change', text,
-            args.linewise, ranges.length > 1);
-        actions.enterInsertMode(cm, {head: finalHead}, cm.state.vim);
-      },
-      // delete is a javascript keyword.
-      'delete': function(cm, args, ranges) {
-        var finalHead, text;
-        var vim = cm.state.vim;
-        if (!vim.visualBlock) {
-          var anchor = ranges[0].anchor,
-              head = ranges[0].head;
-          if (args.linewise &&
-              head.line != cm.firstLine() &&
-              anchor.line == cm.lastLine() &&
-              anchor.line == head.line - 1) {
-            // Special case for dd on last line (and first line).
-            if (anchor.line == cm.firstLine()) {
-              anchor.ch = 0;
-            } else {
-              anchor = Pos(anchor.line - 1, lineLength(cm, anchor.line - 1));
-            }
-          }
-          text = cm.getRange(anchor, head);
-          cm.replaceRange('', anchor, head);
-          finalHead = anchor;
-          if (args.linewise) {
-            finalHead = motions.moveToFirstNonWhiteSpaceCharacter(cm, anchor);
-          }
-        } else {
-          text = cm.getSelection();
-          var replacement = fillArray('', ranges.length);
-          cm.replaceSelections(replacement);
-          finalHead = ranges[0].anchor;
-        }
-        vimGlobalState.registerController.pushText(
-            args.registerName, 'delete', text,
-            args.linewise, vim.visualBlock);
-        return finalHead;
-      },
-      indent: function(cm, args, ranges) {
-        var vim = cm.state.vim;
-        var startLine = ranges[0].anchor.line;
-        var endLine = vim.visualBlock ?
-          ranges[ranges.length - 1].anchor.line :
-          ranges[0].head.line;
-        // In visual mode, n> shifts the selection right n times, instead of
-        // shifting n lines right once.
-        var repeat = (vim.visualMode) ? args.repeat : 1;
-        if (args.linewise) {
-          // The only way to delete a newline is to delete until the start of
-          // the next line, so in linewise mode evalInput will include the next
-          // line. We don't want this in indent, so we go back a line.
-          endLine--;
-        }
-        for (var i = startLine; i <= endLine; i++) {
-          for (var j = 0; j < repeat; j++) {
-            cm.indentLine(i, args.indentRight);
-          }
-        }
-        return motions.moveToFirstNonWhiteSpaceCharacter(cm, ranges[0].anchor);
-      },
-      changeCase: function(cm, args, ranges, oldAnchor, newHead) {
-        var selections = cm.getSelections();
-        var swapped = [];
-        var toLower = args.toLower;
-        for (var j = 0; j < selections.length; j++) {
-          var toSwap = selections[j];
-          var text = '';
-          if (toLower === true) {
-            text = toSwap.toLowerCase();
-          } else if (toLower === false) {
-            text = toSwap.toUpperCase();
-          } else {
-            for (var i = 0; i < toSwap.length; i++) {
-              var character = toSwap.charAt(i);
-              text += isUpperCase(character) ? character.toLowerCase() :
-                  character.toUpperCase();
-            }
-          }
-          swapped.push(text);
-        }
-        cm.replaceSelections(swapped);
-        if (args.shouldMoveCursor){
-          return newHead;
-        } else if (!cm.state.vim.visualMode && args.linewise && ranges[0].anchor.line + 1 == ranges[0].head.line) {
-          return motions.moveToFirstNonWhiteSpaceCharacter(cm, oldAnchor);
-        } else if (args.linewise){
-          return oldAnchor;
-        } else {
-          return cursorMin(ranges[0].anchor, ranges[0].head);
-        }
-      },
-      yank: function(cm, args, ranges, oldAnchor) {
-        var vim = cm.state.vim;
-        var text = cm.getSelection();
-        var endPos = vim.visualMode
-          ? cursorMin(vim.sel.anchor, vim.sel.head, ranges[0].head, ranges[0].anchor)
-          : oldAnchor;
-        vimGlobalState.registerController.pushText(
-            args.registerName, 'yank',
-            text, args.linewise, vim.visualBlock);
-        return endPos;
-      }
-    };
-
-    var actions = {
-      jumpListWalk: function(cm, actionArgs, vim) {
-        if (vim.visualMode) {
-          return;
-        }
-        var repeat = actionArgs.repeat;
-        var forward = actionArgs.forward;
-        var jumpList = vimGlobalState.jumpList;
-
-        var mark = jumpList.move(cm, forward ? repeat : -repeat);
-        var markPos = mark ? mark.find() : undefined;
-        markPos = markPos ? markPos : cm.getCursor();
-        cm.setCursor(markPos);
-      },
-      scroll: function(cm, actionArgs, vim) {
-        if (vim.visualMode) {
-          return;
-        }
-        var repeat = actionArgs.repeat || 1;
-        var lineHeight = cm.defaultTextHeight();
-        var top = cm.getScrollInfo().top;
-        var delta = lineHeight * repeat;
-        var newPos = actionArgs.forward ? top + delta : top - delta;
-        var cursor = copyCursor(cm.getCursor());
-        var cursorCoords = cm.charCoords(cursor, 'local');
-        if (actionArgs.forward) {
-          if (newPos > cursorCoords.top) {
-             cursor.line += (newPos - cursorCoords.top) / lineHeight;
-             cursor.line = Math.ceil(cursor.line);
-             cm.setCursor(cursor);
-             cursorCoords = cm.charCoords(cursor, 'local');
-             cm.scrollTo(null, cursorCoords.top);
-          } else {
-             // Cursor stays within bounds.  Just reposition the scroll window.
-             cm.scrollTo(null, newPos);
-          }
-        } else {
-          var newBottom = newPos + cm.getScrollInfo().clientHeight;
-          if (newBottom < cursorCoords.bottom) {
-             cursor.line -= (cursorCoords.bottom - newBottom) / lineHeight;
-             cursor.line = Math.floor(cursor.line);
-             cm.setCursor(cursor);
-             cursorCoords = cm.charCoords(cursor, 'local');
-             cm.scrollTo(
-                 null, cursorCoords.bottom - cm.getScrollInfo().clientHeight);
-          } else {
-             // Cursor stays within bounds.  Just reposition the scroll window.
-             cm.scrollTo(null, newPos);
-          }
-        }
-      },
-      scrollToCursor: function(cm, actionArgs) {
-        var lineNum = cm.getCursor().line;
-        var charCoords = cm.charCoords(Pos(lineNum, 0), 'local');
-        var height = cm.getScrollInfo().clientHeight;
-        var y = charCoords.top;
-        var lineHeight = charCoords.bottom - y;
-        switch (actionArgs.position) {
-          case 'center': y = y - (height / 2) + lineHeight;
-            break;
-          case 'bottom': y = y - height + lineHeight*1.4;
-            break;
-          case 'top': y = y + lineHeight*0.4;
-            break;
-        }
-        cm.scrollTo(null, y);
-      },
-      replayMacro: function(cm, actionArgs, vim) {
-        var registerName = actionArgs.selectedCharacter;
-        var repeat = actionArgs.repeat;
-        var macroModeState = vimGlobalState.macroModeState;
-        if (registerName == '@') {
-          registerName = macroModeState.latestRegister;
-        }
-        while(repeat--){
-          executeMacroRegister(cm, vim, macroModeState, registerName);
-        }
-      },
-      enterMacroRecordMode: function(cm, actionArgs) {
-        var macroModeState = vimGlobalState.macroModeState;
-        var registerName = actionArgs.selectedCharacter;
-        macroModeState.enterMacroRecordMode(cm, registerName);
-      },
-      enterInsertMode: function(cm, actionArgs, vim) {
-        if (cm.getOption('readOnly')) { return; }
-        vim.insertMode = true;
-        vim.insertModeRepeat = actionArgs && actionArgs.repeat || 1;
-        var insertAt = (actionArgs) ? actionArgs.insertAt : null;
-        var sel = vim.sel;
-        var head = actionArgs.head || cm.getCursor('head');
-        var height = cm.listSelections().length;
-        if (insertAt == 'eol') {
-          head = Pos(head.line, lineLength(cm, head.line));
-        } else if (insertAt == 'charAfter') {
-          head = offsetCursor(head, 0, 1);
-        } else if (insertAt == 'firstNonBlank') {
-          head = motions.moveToFirstNonWhiteSpaceCharacter(cm, head);
-        } else if (insertAt == 'startOfSelectedArea') {
-          if (!vim.visualBlock) {
-            if (sel.head.line < sel.anchor.line) {
-              head = sel.head;
-            } else {
-              head = Pos(sel.anchor.line, 0);
-            }
-          } else {
-            head = Pos(
-                Math.min(sel.head.line, sel.anchor.line),
-                Math.min(sel.head.ch, sel.anchor.ch));
-            height = Math.abs(sel.head.line - sel.anchor.line) + 1;
-          }
-        } else if (insertAt == 'endOfSelectedArea') {
-          if (!vim.visualBlock) {
-            if (sel.head.line >= sel.anchor.line) {
-              head = offsetCursor(sel.head, 0, 1);
-            } else {
-              head = Pos(sel.anchor.line, 0);
-            }
-          } else {
-            head = Pos(
-                Math.min(sel.head.line, sel.anchor.line),
-                Math.max(sel.head.ch + 1, sel.anchor.ch));
-            height = Math.abs(sel.head.line - sel.anchor.line) + 1;
-          }
-        } else if (insertAt == 'inplace') {
-          if (vim.visualMode){
-            return;
-          }
-        }
-        cm.setOption('keyMap', 'vim-insert');
-        cm.setOption('disableInput', false);
-        if (actionArgs && actionArgs.replace) {
-          // Handle Replace-mode as a special case of insert mode.
-          cm.toggleOverwrite(true);
-          cm.setOption('keyMap', 'vim-replace');
-          CodeMirror.signal(cm, "vim-mode-change", {mode: "replace"});
-        } else {
-          cm.setOption('keyMap', 'vim-insert');
-          CodeMirror.signal(cm, "vim-mode-change", {mode: "insert"});
-        }
-        if (!vimGlobalState.macroModeState.isPlaying) {
-          // Only record if not replaying.
-          cm.on('change', onChange);
-          CodeMirror.on(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown);
-        }
-        if (vim.visualMode) {
-          exitVisualMode(cm);
-        }
-        selectForInsert(cm, head, height);
-      },
-      toggleVisualMode: function(cm, actionArgs, vim) {
-        var repeat = actionArgs.repeat;
-        var anchor = cm.getCursor();
-        var head;
-        // TODO: The repeat should actually select number of characters/lines
-        //     equal to the repeat times the size of the previous visual
-        //     operation.
-        if (!vim.visualMode) {
-          // Entering visual mode
-          vim.visualMode = true;
-          vim.visualLine = !!actionArgs.linewise;
-          vim.visualBlock = !!actionArgs.blockwise;
-          head = clipCursorToContent(
-              cm, Pos(anchor.line, anchor.ch + repeat - 1),
-              true /** includeLineBreak */);
-          vim.sel = {
-            anchor: anchor,
-            head: head
-          };
-          CodeMirror.signal(cm, "vim-mode-change", {mode: "visual", subMode: vim.visualLine ? "linewise" : vim.visualBlock ? "blockwise" : ""});
-          updateCmSelection(cm);
-          updateMark(cm, vim, '<', cursorMin(anchor, head));
-          updateMark(cm, vim, '>', cursorMax(anchor, head));
-        } else if (vim.visualLine ^ actionArgs.linewise ||
-            vim.visualBlock ^ actionArgs.blockwise) {
-          // Toggling between modes
-          vim.visualLine = !!actionArgs.linewise;
-          vim.visualBlock = !!actionArgs.blockwise;
-          CodeMirror.signal(cm, "vim-mode-change", {mode: "visual", subMode: vim.visualLine ? "linewise" : vim.visualBlock ? "blockwise" : ""});
-          updateCmSelection(cm);
-        } else {
-          exitVisualMode(cm);
-        }
-      },
-      reselectLastSelection: function(cm, _actionArgs, vim) {
-        var lastSelection = vim.lastSelection;
-        if (vim.visualMode) {
-          updateLastSelection(cm, vim);
-        }
-        if (lastSelection) {
-          var anchor = lastSelection.anchorMark.find();
-          var head = lastSelection.headMark.find();
-          if (!anchor || !head) {
-            // If the marks have been destroyed due to edits, do nothing.
-            return;
-          }
-          vim.sel = {
-            anchor: anchor,
-            head: head
-          };
-          vim.visualMode = true;
-          vim.visualLine = lastSelection.visualLine;
-          vim.visualBlock = lastSelection.visualBlock;
-          updateCmSelection(cm);
-          updateMark(cm, vim, '<', cursorMin(anchor, head));
-          updateMark(cm, vim, '>', cursorMax(anchor, head));
-          CodeMirror.signal(cm, 'vim-mode-change', {
-            mode: 'visual',
-            subMode: vim.visualLine ? 'linewise' :
-                     vim.visualBlock ? 'blockwise' : ''});
-        }
-      },
-      joinLines: function(cm, actionArgs, vim) {
-        var curStart, curEnd;
-        if (vim.visualMode) {
-          curStart = cm.getCursor('anchor');
-          curEnd = cm.getCursor('head');
-          curEnd.ch = lineLength(cm, curEnd.line) - 1;
-        } else {
-          // Repeat is the number of lines to join. Minimum 2 lines.
-          var repeat = Math.max(actionArgs.repeat, 2);
-          curStart = cm.getCursor();
-          curEnd = clipCursorToContent(cm, Pos(curStart.line + repeat - 1,
-                                               Infinity));
-        }
-        var finalCh = 0;
-        for (var i = curStart.line; i < curEnd.line; i++) {
-          finalCh = lineLength(cm, curStart.line);
-          var tmp = Pos(curStart.line + 1,
-                        lineLength(cm, curStart.line + 1));
-          var text = cm.getRange(curStart, tmp);
-          text = text.replace(/\n\s*/g, ' ');
-          cm.replaceRange(text, curStart, tmp);
-        }
-        var curFinalPos = Pos(curStart.line, finalCh);
-        cm.setCursor(curFinalPos);
-        if (vim.visualMode) {
-          exitVisualMode(cm);
-        }
-      },
-      newLineAndEnterInsertMode: function(cm, actionArgs, vim) {
-        vim.insertMode = true;
-        var insertAt = copyCursor(cm.getCursor());
-        if (insertAt.line === cm.firstLine() && !actionArgs.after) {
-          // Special case for inserting newline before start of document.
-          cm.replaceRange('\n', Pos(cm.firstLine(), 0));
-          cm.setCursor(cm.firstLine(), 0);
-        } else {
-          insertAt.line = (actionArgs.after) ? insertAt.line :
-              insertAt.line - 1;
-          insertAt.ch = lineLength(cm, insertAt.line);
-          cm.setCursor(insertAt);
-          var newlineFn = CodeMirror.commands.newlineAndIndentContinueComment ||
-              CodeMirror.commands.newlineAndIndent;
-          newlineFn(cm);
-        }
-        this.enterInsertMode(cm, { repeat: actionArgs.repeat }, vim);
-      },
-      paste: function(cm, actionArgs, vim) {
-        var cur = copyCursor(cm.getCursor());
-        var register = vimGlobalState.registerController.getRegister(
-            actionArgs.registerName);
-        var text = register.toString();
-        if (!text) {
-          return;
-        }
-        if (actionArgs.matchIndent) {
-          var tabSize = cm.getOption("tabSize");
-          // length that considers tabs and tabSize
-          var whitespaceLength = function(str) {
-            var tabs = (str.split("\t").length - 1);
-            var spaces = (str.split(" ").length - 1);
-            return tabs * tabSize + spaces * 1;
-          };
-          var currentLine = cm.getLine(cm.getCursor().line);
-          var indent = whitespaceLength(currentLine.match(/^\s*/)[0]);
-          // chomp last newline b/c don't want it to match /^\s*/gm
-          var chompedText = text.replace(/\n$/, '');
-          var wasChomped = text !== chompedText;
-          var firstIndent = whitespaceLength(text.match(/^\s*/)[0]);
-          var text = chompedText.replace(/^\s*/gm, function(wspace) {
-            var newIndent = indent + (whitespaceLength(wspace) - firstIndent);
-            if (newIndent < 0) {
-              return "";
-            }
-            else if (cm.getOption("indentWithTabs")) {
-              var quotient = Math.floor(newIndent / tabSize);
-              return Array(quotient + 1).join('\t');
-            }
-            else {
-              return Array(newIndent + 1).join(' ');
-            }
-          });
-          text += wasChomped ? "\n" : "";
-        }
-        if (actionArgs.repeat > 1) {
-          var text = Array(actionArgs.repeat + 1).join(text);
-        }
-        var linewise = register.linewise;
-        var blockwise = register.blockwise;
-        if (linewise) {
-          if(vim.visualMode) {
-            text = vim.visualLine ? text.slice(0, -1) : '\n' + text.slice(0, text.length - 1) + '\n';
-          } else if (actionArgs.after) {
-            // Move the newline at the end to the start instead, and paste just
-            // before the newline character of the line we are on right now.
-            text = '\n' + text.slice(0, text.length - 1);
-            cur.ch = lineLength(cm, cur.line);
-          } else {
-            cur.ch = 0;
-          }
-        } else {
-          if (blockwise) {
-            text = text.split('\n');
-            for (var i = 0; i < text.length; i++) {
-              text[i] = (text[i] == '') ? ' ' : text[i];
-            }
-          }
-          cur.ch += actionArgs.after ? 1 : 0;
-        }
-        var curPosFinal;
-        var idx;
-        if (vim.visualMode) {
-          //  save the pasted text for reselection if the need arises
-          vim.lastPastedText = text;
-          var lastSelectionCurEnd;
-          var selectedArea = getSelectedAreaRange(cm, vim);
-          var selectionStart = selectedArea[0];
-          var selectionEnd = selectedArea[1];
-          var selectedText = cm.getSelection();
-          var selections = cm.listSelections();
-          var emptyStrings = new Array(selections.length).join('1').split('1');
-          // save the curEnd marker before it get cleared due to cm.replaceRange.
-          if (vim.lastSelection) {
-            lastSelectionCurEnd = vim.lastSelection.headMark.find();
-          }
-          // push the previously selected text to unnamed register
-          vimGlobalState.registerController.unnamedRegister.setText(selectedText);
-          if (blockwise) {
-            // first delete the selected text
-            cm.replaceSelections(emptyStrings);
-            // Set new selections as per the block length of the yanked text
-            selectionEnd = Pos(selectionStart.line + text.length-1, selectionStart.ch);
-            cm.setCursor(selectionStart);
-            selectBlock(cm, selectionEnd);
-            cm.replaceSelections(text);
-            curPosFinal = selectionStart;
-          } else if (vim.visualBlock) {
-            cm.replaceSelections(emptyStrings);
-            cm.setCursor(selectionStart);
-            cm.replaceRange(text, selectionStart, selectionStart);
-            curPosFinal = selectionStart;
-          } else {
-            cm.replaceRange(text, selectionStart, selectionEnd);
-            curPosFinal = cm.posFromIndex(cm.indexFromPos(selectionStart) + text.length - 1);
-          }
-          // restore the the curEnd marker
-          if(lastSelectionCurEnd) {
-            vim.lastSelection.headMark = cm.setBookmark(lastSelectionCurEnd);
-          }
-          if (linewise) {
-            curPosFinal.ch=0;
-          }
-        } else {
-          if (blockwise) {
-            cm.setCursor(cur);
-            for (var i = 0; i < text.length; i++) {
-              var line = cur.line+i;
-              if (line > cm.lastLine()) {
-                cm.replaceRange('\n',  Pos(line, 0));
-              }
-              var lastCh = lineLength(cm, line);
-              if (lastCh < cur.ch) {
-                extendLineToColumn(cm, line, cur.ch);
-              }
-            }
-            cm.setCursor(cur);
-            selectBlock(cm, Pos(cur.line + text.length-1, cur.ch));
-            cm.replaceSelections(text);
-            curPosFinal = cur;
-          } else {
-            cm.replaceRange(text, cur);
-            // Now fine tune the cursor to where we want it.
-            if (linewise && actionArgs.after) {
-              curPosFinal = Pos(
-              cur.line + 1,
-              findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line + 1)));
-            } else if (linewise && !actionArgs.after) {
-              curPosFinal = Pos(
-                cur.line,
-                findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line)));
-            } else if (!linewise && actionArgs.after) {
-              idx = cm.indexFromPos(cur);
-              curPosFinal = cm.posFromIndex(idx + text.length - 1);
-            } else {
-              idx = cm.indexFromPos(cur);
-              curPosFinal = cm.posFromIndex(idx + text.length);
-            }
-          }
-        }
-        if (vim.visualMode) {
-          exitVisualMode(cm);
-        }
-        cm.setCursor(curPosFinal);
-      },
-      undo: function(cm, actionArgs) {
-        cm.operation(function() {
-          repeatFn(cm, CodeMirror.commands.undo, actionArgs.repeat)();
-          cm.setCursor(cm.getCursor('anchor'));
-        });
-      },
-      redo: function(cm, actionArgs) {
-        repeatFn(cm, CodeMirror.commands.redo, actionArgs.repeat)();
-      },
-      setRegister: function(_cm, actionArgs, vim) {
-        vim.inputState.registerName = actionArgs.selectedCharacter;
-      },
-      setMark: function(cm, actionArgs, vim) {
-        var markName = actionArgs.selectedCharacter;
-        updateMark(cm, vim, markName, cm.getCursor());
-      },
-      replace: function(cm, actionArgs, vim) {
-        var replaceWith = actionArgs.selectedCharacter;
-        var curStart = cm.getCursor();
-        var replaceTo;
-        var curEnd;
-        var selections = cm.listSelections();
-        if (vim.visualMode) {
-          curStart = cm.getCursor('start');
-          curEnd = cm.getCursor('end');
-        } else {
-          var line = cm.getLine(curStart.line);
-          replaceTo = curStart.ch + actionArgs.repeat;
-          if (replaceTo > line.length) {
-            replaceTo=line.length;
-          }
-          curEnd = Pos(curStart.line, replaceTo);
-        }
-        if (replaceWith=='\n') {
-          if (!vim.visualMode) cm.replaceRange('', curStart, curEnd);
-          // special case, where vim help says to replace by just one line-break
-          (CodeMirror.commands.newlineAndIndentContinueComment || CodeMirror.commands.newlineAndIndent)(cm);
-        } else {
-          var replaceWithStr = cm.getRange(curStart, curEnd);
-          //replace all characters in range by selected, but keep linebreaks
-          replaceWithStr = replaceWithStr.replace(/[^\n]/g, replaceWith);
-          if (vim.visualBlock) {
-            // Tabs are split in visua block before replacing
-            var spaces = new Array(cm.getOption("tabSize")+1).join(' ');
-            replaceWithStr = cm.getSelection();
-            replaceWithStr = replaceWithStr.replace(/\t/g, spaces).replace(/[^\n]/g, replaceWith).split('\n');
-            cm.replaceSelections(replaceWithStr);
-          } else {
-            cm.replaceRange(replaceWithStr, curStart, curEnd);
-          }
-          if (vim.visualMode) {
-            curStart = cursorIsBefore(selections[0].anchor, selections[0].head) ?
-                         selections[0].anchor : selections[0].head;
-            cm.setCursor(curStart);
-            exitVisualMode(cm);
-          } else {
-            cm.setCursor(offsetCursor(curEnd, 0, -1));
-          }
-        }
-      },
-      incrementNumberToken: function(cm, actionArgs) {
-        var cur = cm.getCursor();
-        var lineStr = cm.getLine(cur.line);
-        var re = /-?\d+/g;
-        var match;
-        var start;
-        var end;
-        var numberStr;
-        var token;
-        while ((match = re.exec(lineStr)) !== null) {
-          token = match[0];
-          start = match.index;
-          end = start + token.length;
-          if (cur.ch < end)break;
-        }
-        if (!actionArgs.backtrack && (end <= cur.ch))return;
-        if (token) {
-          var increment = actionArgs.increase ? 1 : -1;
-          var number = parseInt(token) + (increment * actionArgs.repeat);
-          var from = Pos(cur.line, start);
-          var to = Pos(cur.line, end);
-          numberStr = number.toString();
-          cm.replaceRange(numberStr, from, to);
-        } else {
-          return;
-        }
-        cm.setCursor(Pos(cur.line, start + numberStr.length - 1));
-      },
-      repeatLastEdit: function(cm, actionArgs, vim) {
-        var lastEditInputState = vim.lastEditInputState;
-        if (!lastEditInputState) { return; }
-        var repeat = actionArgs.repeat;
-        if (repeat && actionArgs.repeatIsExplicit) {
-          vim.lastEditInputState.repeatOverride = repeat;
-        } else {
-          repeat = vim.lastEditInputState.repeatOverride || repeat;
-        }
-        repeatLastEdit(cm, vim, repeat, false /** repeatForInsert */);
-      },
-      exitInsertMode: exitInsertMode
-    };
-
-    /*
-     * Below are miscellaneous utility functions used by vim.js
-     */
-
-    /**
-     * Clips cursor to ensure that line is within the buffer's range
-     * If includeLineBreak is true, then allow cur.ch == lineLength.
-     */
-    function clipCursorToContent(cm, cur, includeLineBreak) {
-      var line = Math.min(Math.max(cm.firstLine(), cur.line), cm.lastLine() );
-      var maxCh = lineLength(cm, line) - 1;
-      maxCh = (includeLineBreak) ? maxCh + 1 : maxCh;
-      var ch = Math.min(Math.max(0, cur.ch), maxCh);
-      return Pos(line, ch);
-    }
-    function copyArgs(args) {
-      var ret = {};
-      for (var prop in args) {
-        if (args.hasOwnProperty(prop)) {
-          ret[prop] = args[prop];
-        }
-      }
-      return ret;
-    }
-    function offsetCursor(cur, offsetLine, offsetCh) {
-      if (typeof offsetLine === 'object') {
-        offsetCh = offsetLine.ch;
-        offsetLine = offsetLine.line;
-      }
-      return Pos(cur.line + offsetLine, cur.ch + offsetCh);
-    }
-    function getOffset(anchor, head) {
-      return {
-        line: head.line - anchor.line,
-        ch: head.line - anchor.line
-      };
-    }
-    function commandMatches(keys, keyMap, context, inputState) {
-      // Partial matches are not applied. They inform the key handler
-      // that the current key sequence is a subsequence of a valid key
-      // sequence, so that the key buffer is not cleared.
-      var match, partial = [], full = [];
-      for (var i = 0; i < keyMap.length; i++) {
-        var command = keyMap[i];
-        if (context == 'insert' && command.context != 'insert' ||
-            command.context && command.context != context ||
-            inputState.operator && command.type == 'action' ||
-            !(match = commandMatch(keys, command.keys))) { continue; }
-        if (match == 'partial') { partial.push(command); }
-        if (match == 'full') { full.push(command); }
-      }
-      return {
-        partial: partial.length && partial,
-        full: full.length && full
-      };
-    }
-    function commandMatch(pressed, mapped) {
-      if (mapped.slice(-11) == '<character>') {
-        // Last character matches anything.
-        var prefixLen = mapped.length - 11;
-        var pressedPrefix = pressed.slice(0, prefixLen);
-        var mappedPrefix = mapped.slice(0, prefixLen);
-        return pressedPrefix == mappedPrefix && pressed.length > prefixLen ? 'full' :
-               mappedPrefix.indexOf(pressedPrefix) == 0 ? 'partial' : false;
-      } else {
-        return pressed == mapped ? 'full' :
-               mapped.indexOf(pressed) == 0 ? 'partial' : false;
-      }
-    }
-    function lastChar(keys) {
-      var match = /^.*(<[\w\-]+>)$/.exec(keys);
-      var selectedCharacter = match ? match[1] : keys.slice(-1);
-      if (selectedCharacter.length > 1){
-        switch(selectedCharacter){
-          case '<CR>':
-            selectedCharacter='\n';
-            break;
-          case '<Space>':
-            selectedCharacter=' ';
-            break;
-          default:
-            break;
-        }
-      }
-      return selectedCharacter;
-    }
-    function repeatFn(cm, fn, repeat) {
-      return function() {
-        for (var i = 0; i < repeat; i++) {
-          fn(cm);
-        }
-      };
-    }
-    function copyCursor(cur) {
-      return Pos(cur.line, cur.ch);
-    }
-    function cursorEqual(cur1, cur2) {
-      return cur1.ch == cur2.ch && cur1.line == cur2.line;
-    }
-    function cursorIsBefore(cur1, cur2) {
-      if (cur1.line < cur2.line) {
-        return true;
-      }
-      if (cur1.line == cur2.line && cur1.ch < cur2.ch) {
-        return true;
-      }
-      return false;
-    }
-    function cursorMin(cur1, cur2) {
-      if (arguments.length > 2) {
-        cur2 = cursorMin.apply(undefined, Array.prototype.slice.call(arguments, 1));
-      }
-      return cursorIsBefore(cur1, cur2) ? cur1 : cur2;
-    }
-    function cursorMax(cur1, cur2) {
-      if (arguments.length > 2) {
-        cur2 = cursorMax.apply(undefined, Array.prototype.slice.call(arguments, 1));
-      }
-      return cursorIsBefore(cur1, cur2) ? cur2 : cur1;
-    }
-    function cursorIsBetween(cur1, cur2, cur3) {
-      // returns true if cur2 is between cur1 and cur3.
-      var cur1before2 = cursorIsBefore(cur1, cur2);
-      var cur2before3 = cursorIsBefore(cur2, cur3);
-      return cur1before2 && cur2before3;
-    }
-    function lineLength(cm, lineNum) {
-      return cm.getLine(lineNum).length;
-    }
-    function reverse(s){
-      return s.split('').reverse().join('');
-    }
-    function trim(s) {
-      if (s.trim) {
-        return s.trim();
-      }
-      return s.replace(/^\s+|\s+$/g, '');
-    }
-    function escapeRegex(s) {
-      return s.replace(/([.?*+$\[\]\/\\(){}|\-])/g, '\\$1');
-    }
-    function extendLineToColumn(cm, lineNum, column) {
-      var endCh = lineLength(cm, lineNum);
-      var spaces = new Array(column-endCh+1).join(' ');
-      cm.setCursor(Pos(lineNum, endCh));
-      cm.replaceRange(spaces, cm.getCursor());
-    }
-    // This functions selects a rectangular block
-    // of text with selectionEnd as any of its corner
-    // Height of block:
-    // Difference in selectionEnd.line and first/last selection.line
-    // Width of the block:
-    // Distance between selectionEnd.ch and any(first considered here) selection.ch
-    function selectBlock(cm, selectionEnd) {
-      var selections = [], ranges = cm.listSelections();
-      var head = copyCursor(cm.clipPos(selectionEnd));
-      var isClipped = !cursorEqual(selectionEnd, head);
-      var curHead = cm.getCursor('head');
-      var primIndex = getIndex(ranges, curHead);
-      var wasClipped = cursorEqual(ranges[primIndex].head, ranges[primIndex].anchor);
-      var max = ranges.length - 1;
-      var index = max - primIndex > primIndex ? max : 0;
-      var base = ranges[index].anchor;
-
-      var firstLine = Math.min(base.line, head.line);
-      var lastLine = Math.max(base.line, head.line);
-      var baseCh = base.ch, headCh = head.ch;
-
-      var dir = ranges[index].head.ch - baseCh;
-      var newDir = headCh - baseCh;
-      if (dir > 0 && newDir <= 0) {
-        baseCh++;
-        if (!isClipped) { headCh--; }
-      } else if (dir < 0 && newDir >= 0) {
-        baseCh--;
-        if (!wasClipped) { headCh++; }
-      } else if (dir < 0 && newDir == -1) {
-        baseCh--;
-        headCh++;
-      }
-      for (var line = firstLine; line <= lastLine; line++) {
-        var range = {anchor: new Pos(line, baseCh), head: new Pos(line, headCh)};
-        selections.push(range);
-      }
-      primIndex = head.line == lastLine ? selections.length - 1 : 0;
-      cm.setSelections(selections);
-      selectionEnd.ch = headCh;
-      base.ch = baseCh;
-      return base;
-    }
-    function selectForInsert(cm, head, height) {
-      var sel = [];
-      for (var i = 0; i < height; i++) {
-        var lineHead = offsetCursor(head, i, 0);
-        sel.push({anchor: lineHead, head: lineHead});
-      }
-      cm.setSelections(sel, 0);
-    }
-    // getIndex returns the index of the cursor in the selections.
-    function getIndex(ranges, cursor, end) {
-      for (var i = 0; i < ranges.length; i++) {
-        var atAnchor = end != 'head' && cursorEqual(ranges[i].anchor, cursor);
-        var atHead = end != 'anchor' && cursorEqual(ranges[i].head, cursor);
-        if (atAnchor || atHead) {
-          return i;
-        }
-      }
-      return -1;
-    }
-    function getSelectedAreaRange(cm, vim) {
-      var lastSelection = vim.lastSelection;
-      var getCurrentSelectedAreaRange = function() {
-        var selections = cm.listSelections();
-        var start =  selections[0];
-        var end = selections[selections.length-1];
-        var selectionStart = cursorIsBefore(start.anchor, start.head) ? start.anchor : start.head;
-        var selectionEnd = cursorIsBefore(end.anchor, end.head) ? end.head : end.anchor;
-        return [selectionStart, selectionEnd];
-      };
-      var getLastSelectedAreaRange = function() {
-        var selectionStart = cm.getCursor();
-        var selectionEnd = cm.getCursor();
-        var block = lastSelection.visualBlock;
-        if (block) {
-          var width = block.width;
-          var height = block.height;
-          selectionEnd = Pos(selectionStart.line + height, selectionStart.ch + width);
-          var selections = [];
-          // selectBlock creates a 'proper' rectangular block.
-          // We do not want that in all cases, so we manually set selections.
-          for (var i = selectionStart.line; i < selectionEnd.line; i++) {
-            var anchor = Pos(i, selectionStart.ch);
-            var head = Pos(i, selectionEnd.ch);
-            var range = {anchor: anchor, head: head};
-            selections.push(range);
-          }
-          cm.setSelections(selections);
-        } else {
-          var start = lastSelection.anchorMark.find();
-          var end = lastSelection.headMark.find();
-          var line = end.line - start.line;
-          var ch = end.ch - start.ch;
-          selectionEnd = {line: selectionEnd.line + line, ch: line ? selectionEnd.ch : ch + selectionEnd.ch};
-          if (lastSelection.visualLine) {
-            selectionStart = Pos(selectionStart.line, 0);
-            selectionEnd = Pos(selectionEnd.line, lineLength(cm, selectionEnd.line));
-          }
-          cm.setSelection(selectionStart, selectionEnd);
-        }
-        return [selectionStart, selectionEnd];
-      };
-      if (!vim.visualMode) {
-      // In case of replaying the action.
-        return getLastSelectedAreaRange();
-      } else {
-        return getCurrentSelectedAreaRange();
-      }
-    }
-    // Updates the previous selection with the current selection's values. This
-    // should only be called in visual mode.
-    function updateLastSelection(cm, vim) {
-      var anchor = vim.sel.anchor;
-      var head = vim.sel.head;
-      // To accommodate the effect of lastPastedText in the last selection
-      if (vim.lastPastedText) {
-        head = cm.posFromIndex(cm.indexFromPos(anchor) + vim.lastPastedText.length);
-        vim.lastPastedText = null;
-      }
-      vim.lastSelection = {'anchorMark': cm.setBookmark(anchor),
-                           'headMark': cm.setBookmark(head),
-                           'anchor': copyCursor(anchor),
-                           'head': copyCursor(head),
-                           'visualMode': vim.visualMode,
-                           'visualLine': vim.visualLine,
-                           'visualBlock': vim.visualBlock};
-    }
-    function expandSelection(cm, start, end) {
-      var sel = cm.state.vim.sel;
-      var head = sel.head;
-      var anchor = sel.anchor;
-      var tmp;
-      if (cursorIsBefore(end, start)) {
-        tmp = end;
-        end = start;
-        start = tmp;
-      }
-      if (cursorIsBefore(head, anchor)) {
-        head = cursorMin(start, head);
-        anchor = cursorMax(anchor, end);
-      } else {
-        anchor = cursorMin(start, anchor);
-        head = cursorMax(head, end);
-        head = offsetCursor(head, 0, -1);
-        if (head.ch == -1 && head.line != cm.firstLine()) {
-          head = Pos(head.line - 1, lineLength(cm, head.line - 1));
-        }
-      }
-      return [anchor, head];
-    }
-    /**
-     * Updates the CodeMirror selection to match the provided vim selection.
-     * If no arguments are given, it uses the current vim selection state.
-     */
-    function updateCmSelection(cm, sel, mode) {
-      var vim = cm.state.vim;
-      sel = sel || vim.sel;
-      var mode = mode ||
-        vim.visualLine ? 'line' : vim.visualBlock ? 'block' : 'char';
-      var cmSel = makeCmSelection(cm, sel, mode);
-      cm.setSelections(cmSel.ranges, cmSel.primary);
-      updateFakeCursor(cm);
-    }
-    function makeCmSelection(cm, sel, mode, exclusive) {
-      var head = copyCursor(sel.head);
-      var anchor = copyCursor(sel.anchor);
-      if (mode == 'char') {
-        var headOffset = !exclusive && !cursorIsBefore(sel.head, sel.anchor) ? 1 : 0;
-        var anchorOffset = cursorIsBefore(sel.head, sel.anchor) ? 1 : 0;
-        head = offsetCursor(sel.head, 0, headOffset);
-        anchor = offsetCursor(sel.anchor, 0, anchorOffset);
-        return {
-          ranges: [{anchor: anchor, head: head}],
-          primary: 0
-        };
-      } else if (mode == 'line') {
-        if (!cursorIsBefore(sel.head, sel.anchor)) {
-          anchor.ch = 0;
-
-          var lastLine = cm.lastLine();
-          if (head.line > lastLine) {
-            head.line = lastLine;
-          }
-          head.ch = lineLength(cm, head.line);
-        } else {
-          head.ch = 0;
-          anchor.ch = lineLength(cm, anchor.line);
-        }
-        return {
-          ranges: [{anchor: anchor, head: head}],
-          primary: 0
-        };
-      } else if (mode == 'block') {
-        var top = Math.min(anchor.line, head.line),
-            left = Math.min(anchor.ch, head.ch),
-            bottom = Math.max(anchor.line, head.line),
-            right = Math.max(anchor.ch, head.ch) + 1;
-        var height = bottom - top + 1;
-        var primary = head.line == top ? 0 : height - 1;
-        var ranges = [];
-        for (var i = 0; i < height; i++) {
-          ranges.push({
-            anchor: Pos(top + i, left),
-            head: Pos(top + i, right)
-          });
-        }
-        return {
-          ranges: ranges,
-          primary: primary
-        };
-      }
-    }
-    function getHead(cm) {
-      var cur = cm.getCursor('head');
-      if (cm.getSelection().length == 1) {
-        // Small corner case when only 1 character is selected. The "real"
-        // head is the left of head and anchor.
-        cur = cursorMin(cur, cm.getCursor('anchor'));
-      }
-      return cur;
-    }
-
-    /**
-     * If moveHead is set to false, the CodeMirror selection will not be
-     * touched. The caller assumes the responsibility of putting the cursor
-    * in the right place.
-     */
-    function exitVisualMode(cm, moveHead) {
-      var vim = cm.state.vim;
-      if (moveHead !== false) {
-        cm.setCursor(clipCursorToContent(cm, vim.sel.head));
-      }
-      updateLastSelection(cm, vim);
-      vim.visualMode = false;
-      vim.visualLine = false;
-      vim.visualBlock = false;
-      CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"});
-      if (vim.fakeCursor) {
-        vim.fakeCursor.clear();
-      }
-    }
-
-    // Remove any trailing newlines from the selection. For
-    // example, with the caret at the start of the last word on the line,
-    // 'dw' should word, but not the newline, while 'w' should advance the
-    // caret to the first character of the next line.
-    function clipToLine(cm, curStart, curEnd) {
-      var selection = cm.getRange(curStart, curEnd);
-      // Only clip if the selection ends with trailing newline + whitespace
-      if (/\n\s*$/.test(selection)) {
-        var lines = selection.split('\n');
-        // We know this is all whitepsace.
-        lines.pop();
-
-        // Cases:
-        // 1. Last word is an empty line - do not clip the trailing '\n'
-        // 2. Last word is not an empty line - clip the trailing '\n'
-        var line;
-        // Find the line containing the last word, and clip all whitespace up
-        // to it.
-        for (var line = lines.pop(); lines.length > 0 && line && isWhiteSpaceString(line); line = lines.pop()) {
-          curEnd.line--;
-          curEnd.ch = 0;
-        }
-        // If the last word is not an empty line, clip an additional newline
-        if (line) {
-          curEnd.line--;
-          curEnd.ch = lineLength(cm, curEnd.line);
-        } else {
-          curEnd.ch = 0;
-        }
-      }
-    }
-
-    // Expand the selection to line ends.
-    function expandSelectionToLine(_cm, curStart, curEnd) {
-      curStart.ch = 0;
-      curEnd.ch = 0;
-      curEnd.line++;
-    }
-
-    function findFirstNonWhiteSpaceCharacter(text) {
-      if (!text) {
-        return 0;
-      }
-      var firstNonWS = text.search(/\S/);
-      return firstNonWS == -1 ? text.length : firstNonWS;
-    }
-
-    function expandWordUnderCursor(cm, inclusive, _forward, bigWord, noSymbol) {
-      var cur = getHead(cm);
-      var line = cm.getLine(cur.line);
-      var idx = cur.ch;
-
-      // Seek to first word or non-whitespace character, depending on if
-      // noSymbol is true.
-      var textAfterIdx = line.substring(idx);
-      var firstMatchedChar;
-      if (noSymbol) {
-        firstMatchedChar = textAfterIdx.search(/\w/);
-      } else {
-        firstMatchedChar = textAfterIdx.search(/\S/);
-      }
-      if (firstMatchedChar == -1) {
-        return null;
-      }
-      idx += firstMatchedChar;
-      textAfterIdx = line.substring(idx);
-      var textBeforeIdx = line.substring(0, idx);
-
-      var matchRegex;
-      // Greedy matchers for the "word" we are trying to expand.
-      if (bigWord) {
-        matchRegex = /^\S+/;
-      } else {
-        if ((/\w/).test(line.charAt(idx))) {
-          matchRegex = /^\w+/;
-        } else {
-          matchRegex = /^[^\w\s]+/;
-        }
-      }
-
-      var wordAfterRegex = matchRegex.exec(textAfterIdx);
-      var wordStart = idx;
-      var wordEnd = idx + wordAfterRegex[0].length;
-      // TODO: Find a better way to do this. It will be slow on very long lines.
-      var revTextBeforeIdx = reverse(textBeforeIdx);
-      var wordBeforeRegex = matchRegex.exec(revTextBeforeIdx);
-      if (wordBeforeRegex) {
-        wordStart -= wordBeforeRegex[0].length;
-      }
-
-      if (inclusive) {
-        // If present, trim all whitespace after word.
-        // Otherwise, trim all whitespace before word.
-        var textAfterWordEnd = line.substring(wordEnd);
-        var whitespacesAfterWord = textAfterWordEnd.match(/^\s*/)[0].length;
-        if (whitespacesAfterWord > 0) {
-          wordEnd += whitespacesAfterWord;
-        } else {
-          var revTrim = revTextBeforeIdx.length - wordStart;
-          var textBeforeWordStart = revTextBeforeIdx.substring(revTrim);
-          var whitespacesBeforeWord = textBeforeWordStart.match(/^\s*/)[0].length;
-          wordStart -= whitespacesBeforeWord;
-        }
-      }
-
-      return { start: Pos(cur.line, wordStart),
-               end: Pos(cur.line, wordEnd) };
-    }
-
-    function recordJumpPosition(cm, oldCur, newCur) {
-      if (!cursorEqual(oldCur, newCur)) {
-        vimGlobalState.jumpList.add(cm, oldCur, newCur);
-      }
-    }
-
-    function recordLastCharacterSearch(increment, args) {
-        vimGlobalState.lastChararacterSearch.increment = increment;
-        vimGlobalState.lastChararacterSearch.forward = args.forward;
-        vimGlobalState.lastChararacterSearch.selectedCharacter = args.selectedCharacter;
-    }
-
-    var symbolToMode = {
-        '(': 'bracket', ')': 'bracket', '{': 'bracket', '}': 'bracket',
-        '[': 'section', ']': 'section',
-        '*': 'comment', '/': 'comment',
-        'm': 'method', 'M': 'method',
-        '#': 'preprocess'
-    };
-    var findSymbolModes = {
-      bracket: {
-        isComplete: function(state) {
-          if (state.nextCh === state.symb) {
-            state.depth++;
-            if (state.depth >= 1)return true;
-          } else if (state.nextCh === state.reverseSymb) {
-            state.depth--;
-          }
-          return false;
-        }
-      },
-      section: {
-        init: function(state) {
-          state.curMoveThrough = true;
-          state.symb = (state.forward ? ']' : '[') === state.symb ? '{' : '}';
-        },
-        isComplete: function(state) {
-          return state.index === 0 && state.nextCh === state.symb;
-        }
-      },
-      comment: {
-        isComplete: function(state) {
-          var found = state.lastCh === '*' && state.nextCh === '/';
-          state.lastCh = state.nextCh;
-          return found;
-        }
-      },
-      // TODO: The original Vim implementation only operates on level 1 and 2.
-      // The current implementation doesn't check for code block level and
-      // therefore it operates on any levels.
-      method: {
-        init: function(state) {
-          state.symb = (state.symb === 'm' ? '{' : '}');
-          state.reverseSymb = state.symb === '{' ? '}' : '{';
-        },
-        isComplete: function(state) {
-          if (state.nextCh === state.symb)return true;
-          return false;
-        }
-      },
-      preprocess: {
-        init: function(state) {
-          state.index = 0;
-        },
-        isComplete: function(state) {
-          if (state.nextCh === '#') {
-            var token = state.lineText.match(/#(\w+)/)[1];
-            if (token === 'endif') {
-              if (state.forward && state.depth === 0) {
-                return true;
-              }
-              state.depth++;
-            } else if (token === 'if') {
-              if (!state.forward && state.depth === 0) {
-                return true;
-              }
-              state.depth--;
-            }
-            if (token === 'else' && state.depth === 0)return true;
-          }
-          return false;
-        }
-      }
-    };
-    function findSymbol(cm, repeat, forward, symb) {
-      var cur = copyCursor(cm.getCursor());
-      var increment = forward ? 1 : -1;
-      var endLine = forward ? cm.lineCount() : -1;
-      var curCh = cur.ch;
-      var line = cur.line;
-      var lineText = cm.getLine(line);
-      var state = {
-        lineText: lineText,
-        nextCh: lineText.charAt(curCh),
-        lastCh: null,
-        index: curCh,
-        symb: symb,
-        reverseSymb: (forward ?  { ')': '(', '}': '{' } : { '(': ')', '{': '}' })[symb],
-        forward: forward,
-        depth: 0,
-        curMoveThrough: false
-      };
-      var mode = symbolToMode[symb];
-      if (!mode)return cur;
-      var init = findSymbolModes[mode].init;
-      var isComplete = findSymbolModes[mode].isComplete;
-      if (init) { init(state); }
-      while (line !== endLine && repeat) {
-        state.index += increment;
-        state.nextCh = state.lineText.charAt(state.index);
-        if (!state.nextCh) {
-          line += increment;
-          state.lineText = cm.getLine(line) || '';
-          if (increment > 0) {
-            state.index = 0;
-          } else {
-            var lineLen = state.lineText.length;
-            state.index = (lineLen > 0) ? (lineLen-1) : 0;
-          }
-          state.nextCh = state.lineText.charAt(state.index);
-        }
-        if (isComplete(state)) {
-          cur.line = line;
-          cur.ch = state.index;
-          repeat--;
-        }
-      }
-      if (state.nextCh || state.curMoveThrough) {
-        return Pos(line, state.index);
-      }
-      return cur;
-    }
-
-    /*
-     * Returns the boundaries of the next word. If the cursor in the middle of
-     * the word, then returns the boundaries of the current word, starting at
-     * the cursor. If the cursor is at the start/end of a word, and we are going
-     * forward/backward, respectively, find the boundaries of the next word.
-     *
-     * @param {CodeMirror} cm CodeMirror object.
-     * @param {Cursor} cur The cursor position.
-     * @param {boolean} forward True to search forward. False to search
-     *     backward.
-     * @param {boolean} bigWord True if punctuation count as part of the word.
-     *     False if only [a-zA-Z0-9] characters count as part of the word.
-     * @param {boolean} emptyLineIsWord True if empty lines should be treated
-     *     as words.
-     * @return {Object{from:number, to:number, line: number}} The boundaries of
-     *     the word, or null if there are no more words.
-     */
-    function findWord(cm, cur, forward, bigWord, emptyLineIsWord) {
-      var lineNum = cur.line;
-      var pos = cur.ch;
-      var line = cm.getLine(lineNum);
-      var dir = forward ? 1 : -1;
-      var regexps = bigWord ? bigWordRegexp : wordRegexp;
-
-      if (emptyLineIsWord && line == '') {
-        lineNum += dir;
-        line = cm.getLine(lineNum);
-        if (!isLine(cm, lineNum)) {
-          return null;
-        }
-        pos = (forward) ? 0 : line.length;
-      }
-
-      while (true) {
-        if (emptyLineIsWord && line == '') {
-          return { from: 0, to: 0, line: lineNum };
-        }
-        var stop = (dir > 0) ? line.length : -1;
-        var wordStart = stop, wordEnd = stop;
-        // Find bounds of next word.
-        while (pos != stop) {
-          var foundWord = false;
-          for (var i = 0; i < regexps.length && !foundWord; ++i) {
-            if (regexps[i].test(line.charAt(pos))) {
-              wordStart = pos;
-              // Advance to end of word.
-              while (pos != stop && regexps[i].test(line.charAt(pos))) {
-                pos += dir;
-              }
-              wordEnd = pos;
-              foundWord = wordStart != wordEnd;
-              if (wordStart == cur.ch && lineNum == cur.line &&
-                  wordEnd == wordStart + dir) {
-                // We started at the end of a word. Find the next one.
-                continue;
-              } else {
-                return {
-                  from: Math.min(wordStart, wordEnd + 1),
-                  to: Math.max(wordStart, wordEnd),
-                  line: lineNum };
-              }
-            }
-          }
-          if (!foundWord) {
-            pos += dir;
-          }
-        }
-        // Advance to next/prev line.
-        lineNum += dir;
-        if (!isLine(cm, lineNum)) {
-          return null;
-        }
-        line = cm.getLine(lineNum);
-        pos = (dir > 0) ? 0 : line.length;
-      }
-      // Should never get here.
-      throw new Error('The impossible happened.');
-    }
-
-    /**
-     * @param {CodeMirror} cm CodeMirror object.
-     * @param {Pos} cur The position to start from.
-     * @param {int} repeat Number of words to move past.
-     * @param {boolean} forward True to search forward. False to search
-     *     backward.
-     * @param {boolean} wordEnd True to move to end of word. False to move to
-     *     beginning of word.
-     * @param {boolean} bigWord True if punctuation count as part of the word.
-     *     False if only alphabet characters count as part of the word.
-     * @return {Cursor} The position the cursor should move to.
-     */
-    function moveToWord(cm, cur, repeat, forward, wordEnd, bigWord) {
-      var curStart = copyCursor(cur);
-      var words = [];
-      if (forward && !wordEnd || !forward && wordEnd) {
-        repeat++;
-      }
-      // For 'e', empty lines are not considered words, go figure.
-      var emptyLineIsWord = !(forward && wordEnd);
-      for (var i = 0; i < repeat; i++) {
-        var word = findWord(cm, cur, forward, bigWord, emptyLineIsWord);
-        if (!word) {
-          var eodCh = lineLength(cm, cm.lastLine());
-          words.push(forward
-              ? {line: cm.lastLine(), from: eodCh, to: eodCh}
-              : {line: 0, from: 0, to: 0});
-          break;
-        }
-        words.push(word);
-        cur = Pos(word.line, forward ? (word.to - 1) : word.from);
-      }
-      var shortCircuit = words.length != repeat;
-      var firstWord = words[0];
-      var lastWord = words.pop();
-      if (forward && !wordEnd) {
-        // w
-        if (!shortCircuit && (firstWord.from != curStart.ch || firstWord.line != curStart.line)) {
-          // We did not start in the middle of a word. Discard the extra word at the end.
-          lastWord = words.pop();
-        }
-        return Pos(lastWord.line, lastWord.from);
-      } else if (forward && wordEnd) {
-        return Pos(lastWord.line, lastWord.to - 1);
-      } else if (!forward && wordEnd) {
-        // ge
-        if (!shortCircuit && (firstWord.to != curStart.ch || firstWord.line != curStart.line)) {
-          // We did not start in the middle of a word. Discard the extra word at the end.
-          lastWord = words.pop();
-        }
-        return Pos(lastWord.line, lastWord.to);
-      } else {
-        // b
-        return Pos(lastWord.line, lastWord.from);
-      }
-    }
-
-    function moveToCharacter(cm, repeat, forward, character) {
-      var cur = cm.getCursor();
-      var start = cur.ch;
-      var idx;
-      for (var i = 0; i < repeat; i ++) {
-        var line = cm.getLine(cur.line);
-        idx = charIdxInLine(start, line, character, forward, true);
-        if (idx == -1) {
-          return null;
-        }
-        start = idx;
-      }
-      return Pos(cm.getCursor().line, idx);
-    }
-
-    function moveToColumn(cm, repeat) {
-      // repeat is always >= 1, so repeat - 1 always corresponds
-      // to the column we want to go to.
-      var line = cm.getCursor().line;
-      return clipCursorToContent(cm, Pos(line, repeat - 1));
-    }
-
-    function updateMark(cm, vim, markName, pos) {
-      if (!inArray(markName, validMarks)) {
-        return;
-      }
-      if (vim.marks[markName]) {
-        vim.marks[markName].clear();
-      }
-      vim.marks[markName] = cm.setBookmark(pos);
-    }
-
-    function charIdxInLine(start, line, character, forward, includeChar) {
-      // Search for char in line.
-      // motion_options: {forward, includeChar}
-      // If includeChar = true, include it too.
-      // If forward = true, search forward, else search backwards.
-      // If char is not found on this line, do nothing
-      var idx;
-      if (forward) {
-        idx = line.indexOf(character, start + 1);
-        if (idx != -1 && !includeChar) {
-          idx -= 1;
-        }
-      } else {
-        idx = line.lastIndexOf(character, start - 1);
-        if (idx != -1 && !includeChar) {
-          idx += 1;
-        }
-      }
-      return idx;
-    }
-
-    function findParagraph(cm, head, repeat, dir, inclusive) {
-      var line = head.line;
-      var min = cm.firstLine();
-      var max = cm.lastLine();
-      var start, end, i = line;
-      function isEmpty(i) { return !cm.getLine(i); }
-      function isBoundary(i, dir, any) {
-        if (any) { return isEmpty(i) != isEmpty(i + dir); }
-        return !isEmpty(i) && isEmpty(i + dir);
-      }
-      if (dir) {
-        while (min <= i && i <= max && repeat > 0) {
-          if (isBoundary(i, dir)) { repeat--; }
-          i += dir;
-        }
-        return new Pos(i, 0);
-      }
-
-      var vim = cm.state.vim;
-      if (vim.visualLine && isBoundary(line, 1, true)) {
-        var anchor = vim.sel.anchor;
-        if (isBoundary(anchor.line, -1, true)) {
-          if (!inclusive || anchor.line != line) {
-            line += 1;
-          }
-        }
-      }
-      var startState = isEmpty(line);
-      for (i = line; i <= max && repeat; i++) {
-        if (isBoundary(i, 1, true)) {
-          if (!inclusive || isEmpty(i) != startState) {
-            repeat--;
-          }
-        }
-      }
-      end = new Pos(i, 0);
-      // select boundary before paragraph for the last one
-      if (i > max && !startState) { startState = true; }
-      else { inclusive = false; }
-      for (i = line; i > min; i--) {
-        if (!inclusive || isEmpty(i) == startState || i == line) {
-          if (isBoundary(i, -1, true)) { break; }
-        }
-      }
-      start = new Pos(i, 0);
-      return { start: start, end: end };
-    }
-
-    // TODO: perhaps this finagling of start and end positions belonds
-    // in codmirror/replaceRange?
-    function selectCompanionObject(cm, head, symb, inclusive) {
-      var cur = head, start, end;
-
-      var bracketRegexp = ({
-        '(': /[()]/, ')': /[()]/,
-        '[': /[[\]]/, ']': /[[\]]/,
-        '{': /[{}]/, '}': /[{}]/})[symb];
-      var openSym = ({
-        '(': '(', ')': '(',
-        '[': '[', ']': '[',
-        '{': '{', '}': '{'})[symb];
-      var curChar = cm.getLine(cur.line).charAt(cur.ch);
-      // Due to the behavior of scanForBracket, we need to add an offset if the
-      // cursor is on a matching open bracket.
-      var offset = curChar === openSym ? 1 : 0;
-
-      start = cm.scanForBracket(Pos(cur.line, cur.ch + offset), -1, null, {'bracketRegex': bracketRegexp});
-      end = cm.scanForBracket(Pos(cur.line, cur.ch + offset), 1, null, {'bracketRegex': bracketRegexp});
-
-      if (!start || !end) {
-        return { start: cur, end: cur };
-      }
-
-      start = start.pos;
-      end = end.pos;
-
-      if ((start.line == end.line && start.ch > end.ch)
-          || (start.line > end.line)) {
-        var tmp = start;
-        start = end;
-        end = tmp;
-      }
-
-      if (inclusive) {
-        end.ch += 1;
-      } else {
-        start.ch += 1;
-      }
-
-      return { start: start, end: end };
-    }
-
-    // Takes in a symbol and a cursor and tries to simulate text objects that
-    // have identical opening and closing symbols
-    // TODO support across multiple lines
-    function findBeginningAndEnd(cm, head, symb, inclusive) {
-      var cur = copyCursor(head);
-      var line = cm.getLine(cur.line);
-      var chars = line.split('');
-      var start, end, i, len;
-      var firstIndex = chars.indexOf(symb);
-
-      // the decision tree is to always look backwards for the beginning first,
-      // but if the cursor is in front of the first instance of the symb,
-      // then move the cursor forward
-      if (cur.ch < firstIndex) {
-        cur.ch = firstIndex;
-        // Why is this line even here???
-        // cm.setCursor(cur.line, firstIndex+1);
-      }
-      // otherwise if the cursor is currently on the closing symbol
-      else if (firstIndex < cur.ch && chars[cur.ch] == symb) {
-        end = cur.ch; // assign end to the current cursor
-        --cur.ch; // make sure to look backwards
-      }
-
-      // if we're currently on the symbol, we've got a start
-      if (chars[cur.ch] == symb && !end) {
-        start = cur.ch + 1; // assign start to ahead of the cursor
-      } else {
-        // go backwards to find the start
-        for (i = cur.ch; i > -1 && !start; i--) {
-          if (chars[i] == symb) {
-            start = i + 1;
-          }
-        }
-      }
-
-      // look forwards for the end symbol
-      if (start && !end) {
-        for (i = start, len = chars.length; i < len && !end; i++) {
-          if (chars[i] == symb) {
-            end = i;
-          }
-        }
-      }
-
-      // nothing found
-      if (!start || !end) {
-        return { start: cur, end: cur };
-      }
-
-      // include the symbols
-      if (inclusive) {
-        --start; ++end;
-      }
-
-      return {
-        start: Pos(cur.line, start),
-        end: Pos(cur.line, end)
-      };
-    }
-
-    // Search functions
-    defineOption('pcre', true, 'boolean');
-    function SearchState() {}
-    SearchState.prototype = {
-      getQuery: function() {
-        return vimGlobalState.query;
-      },
-      setQuery: function(query) {
-        vimGlobalState.query = query;
-      },
-      getOverlay: function() {
-        return this.searchOverlay;
-      },
-      setOverlay: function(overlay) {
-        this.searchOverlay = overlay;
-      },
-      isReversed: function() {
-        return vimGlobalState.isReversed;
-      },
-      setReversed: function(reversed) {
-        vimGlobalState.isReversed = reversed;
-      }
-    };
-    function getSearchState(cm) {
-      var vim = cm.state.vim;
-      return vim.searchState_ || (vim.searchState_ = new SearchState());
-    }
-    function dialog(cm, template, shortText, onClose, options) {
-      if (cm.openDialog) {
-        cm.openDialog(template, onClose, { bottom: true, value: options.value,
-            onKeyDown: options.onKeyDown, onKeyUp: options.onKeyUp });
-      }
-      else {
-        onClose(prompt(shortText, ''));
-      }
-    }
-    function splitBySlash(argString) {
-      var slashes = findUnescapedSlashes(argString) || [];
-      if (!slashes.length) return [];
-      var tokens = [];
-      // in case of strings like foo/bar
-      if (slashes[0] !== 0) return;
-      for (var i = 0; i < slashes.length; i++) {
-        if (typeof slashes[i] == 'number')
-          tokens.push(argString.substring(slashes[i] + 1, slashes[i+1]));
-      }
-      return tokens;
-    }
-
-    function findUnescapedSlashes(str) {
-      var escapeNextChar = false;
-      var slashes = [];
-      for (var i = 0; i < str.length; i++) {
-        var c = str.charAt(i);
-        if (!escapeNextChar && c == '/') {
-          slashes.push(i);
-        }
-        escapeNextChar = !escapeNextChar && (c == '\\');
-      }
-      return slashes;
-    }
-
-    // Translates a search string from ex (vim) syntax into javascript form.
-    function translateRegex(str) {
-      // When these match, add a '\' if unescaped or remove one if escaped.
-      var specials = '|(){';
-      // Remove, but never add, a '\' for these.
-      var unescape = '}';
-      var escapeNextChar = false;
-      var out = [];
-      for (var i = -1; i < str.length; i++) {
-        var c = str.charAt(i) || '';
-        var n = str.charAt(i+1) || '';
-        var specialComesNext = (n && specials.indexOf(n) != -1);
-        if (escapeNextChar) {
-          if (c !== '\\' || !specialComesNext) {
-            out.push(c);
-          }
-          escapeNextChar = false;
-        } else {
-          if (c === '\\') {
-            escapeNextChar = true;
-            // Treat the unescape list as special for removing, but not adding '\'.
-            if (n && unescape.indexOf(n) != -1) {
-              specialComesNext = true;
-            }
-            // Not passing this test means removing a '\'.
-            if (!specialComesNext || n === '\\') {
-              out.push(c);
-            }
-          } else {
-            out.push(c);
-            if (specialComesNext && n !== '\\') {
-              out.push('\\');
-            }
-          }
-        }
-      }
-      return out.join('');
-    }
-
-    // Translates the replace part of a search and replace from ex (vim) syntax into
-    // javascript form.  Similar to translateRegex, but additionally fixes back references
-    // (translates '\[0..9]' to '$[0..9]') and follows different rules for escaping '$'.
-    function translateRegexReplace(str) {
-      var escapeNextChar = false;
-      var out = [];
-      for (var i = -1; i < str.length; i++) {
-        var c = str.charAt(i) || '';
-        var n = str.charAt(i+1) || '';
-        if (escapeNextChar) {
-          // At any point in the loop, escapeNextChar is true if the previous
-          // character was a '\' and was not escaped.
-          out.push(c);
-          escapeNextChar = false;
-        } else {
-          if (c === '\\') {
-            escapeNextChar = true;
-            if ((isNumber(n) || n === '$')) {
-              out.push('$');
-            } else if (n !== '/' && n !== '\\') {
-              out.push('\\');
-            }
-          } else {
-            if (c === '$') {
-              out.push('$');
-            }
-            out.push(c);
-            if (n === '/') {
-              out.push('\\');
-            }
-          }
-        }
-      }
-      return out.join('');
-    }
-
-    // Unescape \ and / in the replace part, for PCRE mode.
-    function unescapeRegexReplace(str) {
-      var stream = new CodeMirror.StringStream(str);
-      var output = [];
-      while (!stream.eol()) {
-        // Search for \.
-        while (stream.peek() && stream.peek() != '\\') {
-          output.push(stream.next());
-        }
-        if (stream.match('\\/', true)) {
-          // \/ => /
-          output.push('/');
-        } else if (stream.match('\\\\', true)) {
-          // \\ => \
-          output.push('\\');
-        } else {
-          // Don't change anything
-          output.push(stream.next());
-        }
-      }
-      return output.join('');
-    }
-
-    /**
-     * Extract the regular expression from the query and return a Regexp object.
-     * Returns null if the query is blank.
-     * If ignoreCase is passed in, the Regexp object will have the 'i' flag set.
-     * If smartCase is passed in, and the query contains upper case letters,
-     *   then ignoreCase is overridden, and the 'i' flag will not be set.
-     * If the query contains the /i in the flag part of the regular expression,
-     *   then both ignoreCase and smartCase are ignored, and 'i' will be passed
-     *   through to the Regex object.
-     */
-    function parseQuery(query, ignoreCase, smartCase) {
-      // First update the last search register
-      var lastSearchRegister = vimGlobalState.registerController.getRegister('/');
-      lastSearchRegister.setText(query);
-      // Check if the query is already a regex.
-      if (query instanceof RegExp) { return query; }
-      // First try to extract regex + flags from the input. If no flags found,
-      // extract just the regex. IE does not accept flags directly defined in
-      // the regex string in the form /regex/flags
-      var slashes = findUnescapedSlashes(query);
-      var regexPart;
-      var forceIgnoreCase;
-      if (!slashes.length) {
-        // Query looks like 'regexp'
-        regexPart = query;
-      } else {
-        // Query looks like 'regexp/...'
-        regexPart = query.substring(0, slashes[0]);
-        var flagsPart = query.substring(slashes[0]);
-        forceIgnoreCase = (flagsPart.indexOf('i') != -1);
-      }
-      if (!regexPart) {
-        return null;
-      }
-      if (!getOption('pcre')) {
-        regexPart = translateRegex(regexPart);
-      }
-      if (smartCase) {
-        ignoreCase = (/^[^A-Z]*$/).test(regexPart);
-      }
-      var regexp = new RegExp(regexPart,
-          (ignoreCase || forceIgnoreCase) ? 'i' : undefined);
-      return regexp;
-    }
-    function showConfirm(cm, text) {
-      if (cm.openNotification) {
-        cm.openNotification('<span style="color: red">' + text + '</span>',
-                            {bottom: true, duration: 5000});
-      } else {
-        alert(text);
-      }
-    }
-    function makePrompt(prefix, desc) {
-      var raw = '';
-      if (prefix) {
-        raw += '<span style="font-family: monospace">' + prefix + '</span>';
-      }
-      raw += '<input type="text"/> ' +
-          '<span style="color: #888">';
-      if (desc) {
-        raw += '<span style="color: #888">';
-        raw += desc;
-        raw += '</span>';
-      }
-      return raw;
-    }
-    var searchPromptDesc = '(Javascript regexp)';
-    function showPrompt(cm, options) {
-      var shortText = (options.prefix || '') + ' ' + (options.desc || '');
-      var prompt = makePrompt(options.prefix, options.desc);
-      dialog(cm, prompt, shortText, options.onClose, options);
-    }
-    function regexEqual(r1, r2) {
-      if (r1 instanceof RegExp && r2 instanceof RegExp) {
-          var props = ['global', 'multiline', 'ignoreCase', 'source'];
-          for (var i = 0; i < props.length; i++) {
-              var prop = props[i];
-              if (r1[prop] !== r2[prop]) {
-                  return false;
-              }
-          }
-          return true;
-      }
-      return false;
-    }
-    // Returns true if the query is valid.
-    function updateSearchQuery(cm, rawQuery, ignoreCase, smartCase) {
-      if (!rawQuery) {
-        return;
-      }
-      var state = getSearchState(cm);
-      var query = parseQuery(rawQuery, !!ignoreCase, !!smartCase);
-      if (!query) {
-        return;
-      }
-      highlightSearchMatches(cm, query);
-      if (regexEqual(query, state.getQuery())) {
-        return query;
-      }
-      state.setQuery(query);
-      return query;
-    }
-    function searchOverlay(query) {
-      if (query.source.charAt(0) == '^') {
-        var matchSol = true;
-      }
-      return {
-        token: function(stream) {
-          if (matchSol && !stream.sol()) {
-            stream.skipToEnd();
-            return;
-          }
-          var match = stream.match(query, false);
-          if (match) {
-            if (match[0].length == 0) {
-              // Matched empty string, skip to next.
-              stream.next();
-              return 'searching';
-            }
-            if (!stream.sol()) {
-              // Backtrack 1 to match \b
-              stream.backUp(1);
-              if (!query.exec(stream.next() + match[0])) {
-                stream.next();
-                return null;
-              }
-            }
-            stream.match(query);
-            return 'searching';
-          }
-          while (!stream.eol()) {
-            stream.next();
-            if (stream.match(query, false)) break;
-          }
-        },
-        query: query
-      };
-    }
-    function highlightSearchMatches(cm, query) {
-      var overlay = getSearchState(cm).getOverlay();
-      if (!overlay || query != overlay.query) {
-        if (overlay) {
-          cm.removeOverlay(overlay);
-        }
-        overlay = searchOverlay(query);
-        cm.addOverlay(overlay);
-        getSearchState(cm).setOverlay(overlay);
-      }
-    }
-    function findNext(cm, prev, query, repeat) {
-      if (repeat === undefined) { repeat = 1; }
-      return cm.operation(function() {
-        var pos = cm.getCursor();
-        var cursor = cm.getSearchCursor(query, pos);
-        for (var i = 0; i < repeat; i++) {
-          var found = cursor.find(prev);
-          if (i == 0 && found && cursorEqual(cursor.from(), pos)) { found = cursor.find(prev); }
-          if (!found) {
-            // SearchCursor may have returned null because it hit EOF, wrap
-            // around and try again.
-            cursor = cm.getSearchCursor(query,
-                (prev) ? Pos(cm.lastLine()) : Pos(cm.firstLine(), 0) );
-            if (!cursor.find(prev)) {
-              return;
-            }
-          }
-        }
-        return cursor.from();
-      });
-    }
-    function clearSearchHighlight(cm) {
-      cm.removeOverlay(getSearchState(cm).getOverlay());
-      getSearchState(cm).setOverlay(null);
-    }
-    /**
-     * Check if pos is in the specified range, INCLUSIVE.
-     * Range can be specified with 1 or 2 arguments.
-     * If the first range argument is an array, treat it as an array of line
-     * numbers. Match pos against any of the lines.
-     * If the first range argument is a number,
-     *   if there is only 1 range argument, check if pos has the same line
-     *       number
-     *   if there are 2 range arguments, then check if pos is in between the two
-     *       range arguments.
-     */
-    function isInRange(pos, start, end) {
-      if (typeof pos != 'number') {
-        // Assume it is a cursor position. Get the line number.
-        pos = pos.line;
-      }
-      if (start instanceof Array) {
-        return inArray(pos, start);
-      } else {
-        if (end) {
-          return (pos >= start && pos <= end);
-        } else {
-          return pos == start;
-        }
-      }
-    }
-    function getUserVisibleLines(cm) {
-      var scrollInfo = cm.getScrollInfo();
-      var occludeToleranceTop = 6;
-      var occludeToleranceBottom = 10;
-      var from = cm.coordsChar({left:0, top: occludeToleranceTop + scrollInfo.top}, 'local');
-      var bottomY = scrollInfo.clientHeight - occludeToleranceBottom + scrollInfo.top;
-      var to = cm.coordsChar({left:0, top: bottomY}, 'local');
-      return {top: from.line, bottom: to.line};
-    }
-
-    // Ex command handling
-    // Care must be taken when adding to the default Ex command map. For any
-    // pair of commands that have a shared prefix, at least one of their
-    // shortNames must not match the prefix of the other command.
-    var defaultExCommandMap = [
-      { name: 'map' },
-      { name: 'imap', shortName: 'im' },
-      { name: 'nmap', shortName: 'nm' },
-      { name: 'vmap', shortName: 'vm' },
-      { name: 'unmap' },
-      { name: 'write', shortName: 'w' },
-      { name: 'undo', shortName: 'u' },
-      { name: 'redo', shortName: 'red' },
-      { name: 'set', shortName: 'set' },
-      { name: 'sort', shortName: 'sor' },
-      { name: 'substitute', shortName: 's', possiblyAsync: true },
-      { name: 'nohlsearch', shortName: 'noh' },
-      { name: 'delmarks', shortName: 'delm' },
-      { name: 'registers', shortName: 'reg', excludeFromCommandHistory: true },
-      { name: 'global', shortName: 'g' }
-    ];
-    var ExCommandDispatcher = function() {
-      this.buildCommandMap_();
-    };
-    ExCommandDispatcher.prototype = {
-      processCommand: function(cm, input, opt_params) {
-        var vim = cm.state.vim;
-        var commandHistoryRegister = vimGlobalState.registerController.getRegister(':');
-        var previousCommand = commandHistoryRegister.toString();
-        if (vim.visualMode) {
-          exitVisualMode(cm);
-        }
-        var inputStream = new CodeMirror.StringStream(input);
-        // update ": with the latest command whether valid or invalid
-        commandHistoryRegister.setText(input);
-        var params = opt_params || {};
-        params.input = input;
-        try {
-          this.parseInput_(cm, inputStream, params);
-        } catch(e) {
-          showConfirm(cm, e);
-          throw e;
-        }
-        var command;
-        var commandName;
-        if (!params.commandName) {
-          // If only a line range is defined, move to the line.
-          if (params.line !== undefined) {
-            commandName = 'move';
-          }
-        } else {
-          command = this.matchCommand_(params.commandName);
-          if (command) {
-            commandName = command.name;
-            if (command.excludeFromCommandHistory) {
-              commandHistoryRegister.setText(previousCommand);
-            }
-            this.parseCommandArgs_(inputStream, params, command);
-            if (command.type == 'exToKey') {
-              // Handle Ex to Key mapping.
-              for (var i = 0; i < command.toKeys.length; i++) {
-                CodeMirror.Vim.handleKey(cm, command.toKeys[i], 'mapping');
-              }
-              return;
-            } else if (command.type == 'exToEx') {
-              // Handle Ex to Ex mapping.
-              this.processCommand(cm, command.toInput);
-              return;
-            }
-          }
-        }
-        if (!commandName) {
-          showConfirm(cm, 'Not an editor command ":' + input + '"');
-          return;
-        }
-        try {
-          exCommands[commandName](cm, params);
-          // Possibly asynchronous commands (e.g. substitute, which might have a
-          // user confirmation), are responsible for calling the callback when
-          // done. All others have it taken care of for them here.
-          if ((!command || !command.possiblyAsync) && params.callback) {
-            params.callback();
-          }
-        } catch(e) {
-          showConfirm(cm, e);
-          throw e;
-        }
-      },
-      parseInput_: function(cm, inputStream, result) {
-        inputStream.eatWhile(':');
-        // Parse range.
-        if (inputStream.eat('%')) {
-          result.line = cm.firstLine();
-          result.lineEnd = cm.lastLine();
-        } else {
-          result.line = this.parseLineSpec_(cm, inputStream);
-          if (result.line !== undefined && inputStream.eat(',')) {
-            result.lineEnd = this.parseLineSpec_(cm, inputStream);
-          }
-        }
-
-        // Parse command name.
-        var commandMatch = inputStream.match(/^(\w+)/);
-        if (commandMatch) {
-          result.commandName = commandMatch[1];
-        } else {
-          result.commandName = inputStream.match(/.*/)[0];
-        }
-
-        return result;
-      },
-      parseLineSpec_: function(cm, inputStream) {
-        var numberMatch = inputStream.match(/^(\d+)/);
-        if (numberMatch) {
-          return parseInt(numberMatch[1], 10) - 1;
-        }
-        switch (inputStream.next()) {
-          case '.':
-            return cm.getCursor().line;
-          case '$':
-            return cm.lastLine();
-          case '\'':
-            var mark = cm.state.vim.marks[inputStream.next()];
-            if (mark && mark.find()) {
-              return mark.find().line;
-            }
-            throw new Error('Mark not set');
-          default:
-            inputStream.backUp(1);
-            return undefined;
-        }
-      },
-      parseCommandArgs_: function(inputStream, params, command) {
-        if (inputStream.eol()) {
-          return;
-        }
-        params.argString = inputStream.match(/.*/)[0];
-        // Parse command-line arguments
-        var delim = command.argDelimiter || /\s+/;
-        var args = trim(params.argString).split(delim);
-        if (args.length && args[0]) {
-          params.args = args;
-        }
-      },
-      matchCommand_: function(commandName) {
-        // Return the command in the command map that matches the shortest
-        // prefix of the passed in command name. The match is guaranteed to be
-        // unambiguous if the defaultExCommandMap's shortNames are set up
-        // correctly. (see @code{defaultExCommandMap}).
-        for (var i = commandName.length; i > 0; i--) {
-          var prefix = commandName.substring(0, i);
-          if (this.commandMap_[prefix]) {
-            var command = this.commandMap_[prefix];
-            if (command.name.indexOf(commandName) === 0) {
-              return command;
-            }
-          }
-        }
-        return null;
-      },
-      buildCommandMap_: function() {
-        this.commandMap_ = {};
-        for (var i = 0; i < defaultExCommandMap.length; i++) {
-          var command = defaultExCommandMap[i];
-          var key = command.shortName || command.name;
-          this.commandMap_[key] = command;
-        }
-      },
-      map: function(lhs, rhs, ctx) {
-        if (lhs != ':' && lhs.charAt(0) == ':') {
-          if (ctx) { throw Error('Mode not supported for ex mappings'); }
-          var commandName = lhs.substring(1);
-          if (rhs != ':' && rhs.charAt(0) == ':') {
-            // Ex to Ex mapping
-            this.commandMap_[commandName] = {
-              name: commandName,
-              type: 'exToEx',
-              toInput: rhs.substring(1),
-              user: true
-            };
-          } else {
-            // Ex to key mapping
-            this.commandMap_[commandName] = {
-              name: commandName,
-              type: 'exToKey',
-              toKeys: rhs,
-              user: true
-            };
-          }
-        } else {
-          if (rhs != ':' && rhs.charAt(0) == ':') {
-            // Key to Ex mapping.
-            var mapping = {
-              keys: lhs,
-              type: 'keyToEx',
-              exArgs: { input: rhs.substring(1) },
-              user: true};
-            if (ctx) { mapping.context = ctx; }
-            defaultKeymap.unshift(mapping);
-          } else {
-            // Key to key mapping
-            var mapping = {
-              keys: lhs,
-              type: 'keyToKey',
-              toKeys: rhs,
-              user: true
-            };
-            if (ctx) { mapping.context = ctx; }
-            defaultKeymap.unshift(mapping);
-          }
-        }
-      },
-      unmap: function(lhs, ctx) {
-        if (lhs != ':' && lhs.charAt(0) == ':') {
-          // Ex to Ex or Ex to key mapping
-          if (ctx) { throw Error('Mode not supported for ex mappings'); }
-          var commandName = lhs.substring(1);
-          if (this.commandMap_[commandName] && this.commandMap_[commandName].user) {
-            delete this.commandMap_[commandName];
-            return;
-          }
-        } else {
-          // Key to Ex or key to key mapping
-          var keys = lhs;
-          for (var i = 0; i < defaultKeymap.length; i++) {
-            if (keys == defaultKeymap[i].keys
-                && defaultKeymap[i].context === ctx
-                && defaultKeymap[i].user) {
-              defaultKeymap.splice(i, 1);
-              return;
-            }
-          }
-        }
-        throw Error('No such mapping.');
-      }
-    };
-
-    var exCommands = {
-      map: function(cm, params, ctx) {
-        var mapArgs = params.args;
-        if (!mapArgs || mapArgs.length < 2) {
-          if (cm) {
-            showConfirm(cm, 'Invalid mapping: ' + params.input);
-          }
-          return;
-        }
-        exCommandDispatcher.map(mapArgs[0], mapArgs[1], ctx);
-      },
-      imap: function(cm, params) { this.map(cm, params, 'insert'); },
-      nmap: function(cm, params) { this.map(cm, params, 'normal'); },
-      vmap: function(cm, params) { this.map(cm, params, 'visual'); },
-      unmap: function(cm, params, ctx) {
-        var mapArgs = params.args;
-        if (!mapArgs || mapArgs.length < 1) {
-          if (cm) {
-            showConfirm(cm, 'No such mapping: ' + params.input);
-          }
-          return;
-        }
-        exCommandDispatcher.unmap(mapArgs[0], ctx);
-      },
-      move: function(cm, params) {
-        commandDispatcher.processCommand(cm, cm.state.vim, {
-            type: 'motion',
-            motion: 'moveToLineOrEdgeOfDocument',
-            motionArgs: { forward: false, explicitRepeat: true,
-              linewise: true },
-            repeatOverride: params.line+1});
-      },
-      set: function(cm, params) {
-        var setArgs = params.args;
-        if (!setArgs || setArgs.length < 1) {
-          if (cm) {
-            showConfirm(cm, 'Invalid mapping: ' + params.input);
-          }
-          return;
-        }
-        var expr = setArgs[0].split('=');
-        var optionName = expr[0];
-        var value = expr[1];
-        var forceGet = false;
-
-        if (optionName.charAt(optionName.length - 1) == '?') {
-          // If post-fixed with ?, then the set is actually a get.
-          if (value) { throw Error('Trailing characters: ' + params.argString); }
-          optionName = optionName.substring(0, optionName.length - 1);
-          forceGet = true;
-        }
-        if (value === undefined && optionName.substring(0, 2) == 'no') {
-          // To set boolean options to false, the option name is prefixed with
-          // 'no'.
-          optionName = optionName.substring(2);
-          value = false;
-        }
-        var optionIsBoolean = options[optionName] && options[optionName].type == 'boolean';
-        if (optionIsBoolean && value == undefined) {
-          // Calling set with a boolean option sets it to true.
-          value = true;
-        }
-        if (!optionIsBoolean && !value || forceGet) {
-          var oldValue = getOption(optionName);
-          // If no value is provided, then we assume this is a get.
-          if (oldValue === true || oldValue === false) {
-            showConfirm(cm, ' ' + (oldValue ? '' : 'no') + optionName);
-          } else {
-            showConfirm(cm, '  ' + optionName + '=' + oldValue);
-          }
-        } else {
-          setOption(optionName, value);
-        }
-      },
-      registers: function(cm,params) {
-        var regArgs = params.args;
-        var registers = vimGlobalState.registerController.registers;
-        var regInfo = '----------Registers----------<br><br>';
-        if (!regArgs) {
-          for (var registerName in registers) {
-            var text = registers[registerName].toString();
-            if (text.length) {
-              regInfo += '"' + registerName + '    ' + text + '<br>';
-            }
-          }
-        } else {
-          var registerName;
-          regArgs = regArgs.join('');
-          for (var i = 0; i < regArgs.length; i++) {
-            registerName = regArgs.charAt(i);
-            if (!vimGlobalState.registerController.isValidRegister(registerName)) {
-              continue;
-            }
-            var register = registers[registerName] || new Register();
-            regInfo += '"' + registerName + '    ' + register.toString() + '<br>';
-          }
-        }
-        showConfirm(cm, regInfo);
-      },
-      sort: function(cm, params) {
-        var reverse, ignoreCase, unique, number;
-        function parseArgs() {
-          if (params.argString) {
-            var args = new CodeMirror.StringStream(params.argString);
-            if (args.eat('!')) { reverse = true; }
-            if (args.eol()) { return; }
-            if (!args.eatSpace()) { return 'Invalid arguments'; }
-            var opts = args.match(/[a-z]+/);
-            if (opts) {
-              opts = opts[0];
-              ignoreCase = opts.indexOf('i') != -1;
-              unique = opts.indexOf('u') != -1;
-              var decimal = opts.indexOf('d') != -1 && 1;
-              var hex = opts.indexOf('x') != -1 && 1;
-              var octal = opts.indexOf('o') != -1 && 1;
-              if (decimal + hex + octal > 1) { return 'Invalid arguments'; }
-              number = decimal && 'decimal' || hex && 'hex' || octal && 'octal';
-            }
-            if (args.eatSpace() && args.match(/\/.*\//)) { 'patterns not supported'; }
-          }
-        }
-        var err = parseArgs();
-        if (err) {
-          showConfirm(cm, err + ': ' + params.argString);
-          return;
-        }
-        var lineStart = params.line || cm.firstLine();
-        var lineEnd = params.lineEnd || params.line || cm.lastLine();
-        if (lineStart == lineEnd) { return; }
-        var curStart = Pos(lineStart, 0);
-        var curEnd = Pos(lineEnd, lineLength(cm, lineEnd));
-        var text = cm.getRange(curStart, curEnd).split('\n');
-        var numberRegex = (number == 'decimal') ? /(-?)([\d]+)/ :
-           (number == 'hex') ? /(-?)(?:0x)?([0-9a-f]+)/i :
-           (number == 'octal') ? /([0-7]+)/ : null;
-        var radix = (number == 'decimal') ? 10 : (number == 'hex') ? 16 : (number == 'octal') ? 8 : null;
-        var numPart = [], textPart = [];
-        if (number) {
-          for (var i = 0; i < text.length; i++) {
-            if (numberRegex.exec(text[i])) {
-              numPart.push(text[i]);
-            } else {
-              textPart.push(text[i]);
-            }
-          }
-        } else {
-          textPart = text;
-        }
-        function compareFn(a, b) {
-          if (reverse) { var tmp; tmp = a; a = b; b = tmp; }
-          if (ignoreCase) { a = a.toLowerCase(); b = b.toLowerCase(); }
-          var anum = number && numberRegex.exec(a);
-          var bnum = number && numberRegex.exec(b);
-          if (!anum) { return a < b ? -1 : 1; }
-          anum = parseInt((anum[1] + anum[2]).toLowerCase(), radix);
-          bnum = parseInt((bnum[1] + bnum[2]).toLowerCase(), radix);
-          return anum - bnum;
-        }
-        numPart.sort(compareFn);
-        textPart.sort(compareFn);
-        text = (!reverse) ? textPart.concat(numPart) : numPart.concat(textPart);
-        if (unique) { // Remove duplicate lines
-          var textOld = text;
-          var lastLine;
-          text = [];
-          for (var i = 0; i < textOld.length; i++) {
-            if (textOld[i] != lastLine) {
-              text.push(textOld[i]);
-            }
-            lastLine = textOld[i];
-          }
-        }
-        cm.replaceRange(text.join('\n'), curStart, curEnd);
-      },
-      global: function(cm, params) {
-        // a global command is of the form
-        // :[range]g/pattern/[cmd]
-        // argString holds the string /pattern/[cmd]
-        var argString = params.argString;
-        if (!argString) {
-          showConfirm(cm, 'Regular Expression missing from global');
-          return;
-        }
-        // range is specified here
-        var lineStart = (params.line !== undefined) ? params.line : cm.firstLine();
-        var lineEnd = params.lineEnd || params.line || cm.lastLine();
-        // get the tokens from argString
-        var tokens = splitBySlash(argString);
-        var regexPart = argString, cmd;
-        if (tokens.length) {
-          regexPart = tokens[0];
-          cmd = tokens.slice(1, tokens.length).join('/');
-        }
-        if (regexPart) {
-          // If regex part is empty, then use the previous query. Otherwise
-          // use the regex part as the new query.
-          try {
-           updateSearchQuery(cm, regexPart, true /** ignoreCase */,
-             true /** smartCase */);
-          } catch (e) {
-           showConfirm(cm, 'Invalid regex: ' + regexPart);
-           return;
-          }
-        }
-        // now that we have the regexPart, search for regex matches in the
-        // specified range of lines
-        var query = getSearchState(cm).getQuery();
-        var matchedLines = [], content = '';
-        for (var i = lineStart; i <= lineEnd; i++) {
-          var matched = query.test(cm.getLine(i));
-          if (matched) {
-            matchedLines.push(i+1);
-            content+= cm.getLine(i) + '<br>';
-          }
-        }
-        // if there is no [cmd], just display the list of matched lines
-        if (!cmd) {
-          showConfirm(cm, content);
-          return;
-        }
-        var index = 0;
-        var nextCommand = function() {
-          if (index < matchedLines.length) {
-            var command = matchedLines[index] + cmd;
-            exCommandDispatcher.processCommand(cm, command, {
-              callback: nextCommand
-            });
-          }
-          index++;
-        };
-        nextCommand();
-      },
-      substitute: function(cm, params) {
-        if (!cm.getSearchCursor) {
-          throw new Error('Search feature not available. Requires searchcursor.js or ' +
-              'any other getSearchCursor implementation.');
-        }
-        var argString = params.argString;
-        var tokens = argString ? splitBySlash(argString) : [];
-        var regexPart, replacePart = '', trailing, flagsPart, count;
-        var confirm = false; // Whether to confirm each replace.
-        var global = false; // True to replace all instances on a line, false to replace only 1.
-        if (tokens.length) {
-          regexPart = tokens[0];
-          replacePart = tokens[1];
-          if (replacePart !== undefined) {
-            if (getOption('pcre')) {
-              replacePart = unescapeRegexReplace(replacePart);
-            } else {
-              replacePart = translateRegexReplace(replacePart);
-            }
-            vimGlobalState.lastSubstituteReplacePart = replacePart;
-          }
-          trailing = tokens[2] ? tokens[2].split(' ') : [];
-        } else {
-          // either the argString is empty or its of the form ' hello/world'
-          // actually splitBySlash returns a list of tokens
-          // only if the string starts with a '/'
-          if (argString && argString.length) {
-            showConfirm(cm, 'Substitutions should be of the form ' +
-                ':s/pattern/replace/');
-            return;
-          }
-        }
-        // After the 3rd slash, we can have flags followed by a space followed
-        // by count.
-        if (trailing) {
-          flagsPart = trailing[0];
-          count = parseInt(trailing[1]);
-          if (flagsPart) {
-            if (flagsPart.indexOf('c') != -1) {
-              confirm = true;
-              flagsPart.replace('c', '');
-            }
-            if (flagsPart.indexOf('g') != -1) {
-              global = true;
-              flagsPart.replace('g', '');
-            }
-            regexPart = regexPart + '/' + flagsPart;
-          }
-        }
-        if (regexPart) {
-          // If regex part is empty, then use the previous query. Otherwise use
-          // the regex part as the new query.
-          try {
-            updateSearchQuery(cm, regexPart, true /** ignoreCase */,
-              true /** smartCase */);
-          } catch (e) {
-            showConfirm(cm, 'Invalid regex: ' + regexPart);
-            return;
-          }
-        }
-        replacePart = replacePart || vimGlobalState.lastSubstituteReplacePart;
-        if (replacePart === undefined) {
-          showConfirm(cm, 'No previous substitute regular expression');
-          return;
-        }
-        var state = getSearchState(cm);
-        var query = state.getQuery();
-        var lineStart = (params.line !== undefined) ? params.line : cm.getCursor().line;
-        var lineEnd = params.lineEnd || lineStart;
-        if (count) {
-          lineStart = lineEnd;
-          lineEnd = lineStart + count - 1;
-        }
-        var startPos = clipCursorToContent(cm, Pos(lineStart, 0));
-        var cursor = cm.getSearchCursor(query, startPos);
-        doReplace(cm, confirm, global, lineStart, lineEnd, cursor, query, replacePart, params.callback);
-      },
-      redo: CodeMirror.commands.redo,
-      undo: CodeMirror.commands.undo,
-      write: function(cm) {
-        if (CodeMirror.commands.save) {
-          // If a save command is defined, call it.
-          CodeMirror.commands.save(cm);
-        } else {
-          // Saves to text area if no save command is defined.
-          cm.save();
-        }
-      },
-      nohlsearch: function(cm) {
-        clearSearchHighlight(cm);
-      },
-      delmarks: function(cm, params) {
-        if (!params.argString || !trim(params.argString)) {
-          showConfirm(cm, 'Argument required');
-          return;
-        }
-
-        var state = cm.state.vim;
-        var stream = new CodeMirror.StringStream(trim(params.argString));
-        while (!stream.eol()) {
-          stream.eatSpace();
-
-          // Record the streams position at the beginning of the loop for use
-          // in error messages.
-          var count = stream.pos;
-
-          if (!stream.match(/[a-zA-Z]/, false)) {
-            showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count));
-            return;
-          }
-
-          var sym = stream.next();
-          // Check if this symbol is part of a range
-          if (stream.match('-', true)) {
-            // This symbol is part of a range.
-
-            // The range must terminate at an alphabetic character.
-            if (!stream.match(/[a-zA-Z]/, false)) {
-              showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count));
-              return;
-            }
-
-            var startMark = sym;
-            var finishMark = stream.next();
-            // The range must terminate at an alphabetic character which
-            // shares the same case as the start of the range.
-            if (isLowerCase(startMark) && isLowerCase(finishMark) ||
-                isUpperCase(startMark) && isUpperCase(finishMark)) {
-              var start = startMark.charCodeAt(0);
-              var finish = finishMark.charCodeAt(0);
-              if (start >= finish) {
-                showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count));
-                return;
-              }
-
-              // Because marks are always ASCII values, and we have
-              // determined that they are the same case, we can use
-              // their char codes to iterate through the defined range.
-              for (var j = 0; j <= finish - start; j++) {
-                var mark = String.fromCharCode(start + j);
-                delete state.marks[mark];
-              }
-            } else {
-              showConfirm(cm, 'Invalid argument: ' + startMark + '-');
-              return;
-            }
-          } else {
-            // This symbol is a valid mark, and is not part of a range.
-            delete state.marks[sym];
-          }
-        }
-      }
-    };
-
-    var exCommandDispatcher = new ExCommandDispatcher();
-
-    /**
-    * @param {CodeMirror} cm CodeMirror instance we are in.
-    * @param {boolean} confirm Whether to confirm each replace.
-    * @param {Cursor} lineStart Line to start replacing from.
-    * @param {Cursor} lineEnd Line to stop replacing at.
-    * @param {RegExp} query Query for performing matches with.
-    * @param {string} replaceWith Text to replace matches with. May contain $1,
-    *     $2, etc for replacing captured groups using Javascript replace.
-    * @param {function()} callback A callback for when the replace is done.
-    */
-    function doReplace(cm, confirm, global, lineStart, lineEnd, searchCursor, query,
-        replaceWith, callback) {
-      // Set up all the functions.
-      cm.state.vim.exMode = true;
-      var done = false;
-      var lastPos = searchCursor.from();
-      function replaceAll() {
-        cm.operation(function() {
-          while (!done) {
-            replace();
-            next();
-          }
-          stop();
-        });
-      }
-      function replace() {
-        var text = cm.getRange(searchCursor.from(), searchCursor.to());
-        var newText = text.replace(query, replaceWith);
-        searchCursor.replace(newText);
-      }
-      function next() {
-        var found;
-        // The below only loops to skip over multiple occurrences on the same
-        // line when 'global' is not true.
-        while(found = searchCursor.findNext() &&
-              isInRange(searchCursor.from(), lineStart, lineEnd)) {
-          if (!global && lastPos && searchCursor.from().line == lastPos.line) {
-            continue;
-          }
-          cm.scrollIntoView(searchCursor.from(), 30);
-          cm.setSelection(searchCursor.from(), searchCursor.to());
-          lastPos = searchCursor.from();
-          done = false;
-          return;
-        }
-        done = true;
-      }
-      function stop(close) {
-        if (close) { close(); }
-        cm.focus();
-        if (lastPos) {
-          cm.setCursor(lastPos);
-          var vim = cm.state.vim;
-          vim.exMode = false;
-          vim.lastHPos = vim.lastHSPos = lastPos.ch;
-        }
-        if (callback) { callback(); }
-      }
-      function onPromptKeyDown(e, _value, close) {
-        // Swallow all keys.
-        CodeMirror.e_stop(e);
-        var keyName = CodeMirror.keyName(e);
-        switch (keyName) {
-          case 'Y':
-            replace(); next(); break;
-          case 'N':
-            next(); break;
-          case 'A':
-            // replaceAll contains a call to close of its own. We don't want it
-            // to fire too early or multiple times.
-            var savedCallback = callback;
-            callback = undefined;
-            cm.operation(replaceAll);
-            callback = savedCallback;
-            break;
-          case 'L':
-            replace();
-            // fall through and exit.
-          case 'Q':
-          case 'Esc':
-          case 'Ctrl-C':
-          case 'Ctrl-[':
-            stop(close);
-            break;
-        }
-        if (done) { stop(close); }
-        return true;
-      }
-
-      // Actually do replace.
-      next();
-      if (done) {
-        showConfirm(cm, 'No matches for ' + query.source);
-        return;
-      }
-      if (!confirm) {
-        replaceAll();
-        if (callback) { callback(); };
-        return;
-      }
-      showPrompt(cm, {
-        prefix: 'replace with <strong>' + replaceWith + '</strong> (y/n/a/q/l)',
-        onKeyDown: onPromptKeyDown
-      });
-    }
-
-    CodeMirror.keyMap.vim = {
-      attach: attachVimMap,
-      detach: detachVimMap,
-      call: cmKey
-    };
-
-    function exitInsertMode(cm) {
-      var vim = cm.state.vim;
-      var macroModeState = vimGlobalState.macroModeState;
-      var insertModeChangeRegister = vimGlobalState.registerController.getRegister('.');
-      var isPlaying = macroModeState.isPlaying;
-      var lastChange = macroModeState.lastInsertModeChanges;
-      // In case of visual block, the insertModeChanges are not saved as a
-      // single word, so we convert them to a single word
-      // so as to update the ". register as expected in real vim.
-      var text = [];
-      if (!isPlaying) {
-        var selLength = lastChange.inVisualBlock ? vim.lastSelection.visualBlock.height : 1;
-        var changes = lastChange.changes;
-        var text = [];
-        var i = 0;
-        // In case of multiple selections in blockwise visual,
-        // the inserted text, for example: 'f<Backspace>oo', is stored as
-        // 'f', 'f', InsertModeKey 'o', 'o', 'o', 'o'. (if you have a block with 2 lines).
-        // We push the contents of the changes array as per the following:
-        // 1. In case of InsertModeKey, just increment by 1.
-        // 2. In case of a character, jump by selLength (2 in the example).
-        while (i < changes.length) {
-          // This loop will convert 'ff<bs>oooo' to 'f<bs>oo'.
-          text.push(changes[i]);
-          if (changes[i] instanceof InsertModeKey) {
-             i++;
-          } else {
-             i+= selLength;
-          }
-        }
-        lastChange.changes = text;
-        cm.off('change', onChange);
-        CodeMirror.off(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown);
-      }
-      if (!isPlaying && vim.insertModeRepeat > 1) {
-        // Perform insert mode repeat for commands like 3,a and 3,o.
-        repeatLastEdit(cm, vim, vim.insertModeRepeat - 1,
-            true /** repeatForInsert */);
-        vim.lastEditInputState.repeatOverride = vim.insertModeRepeat;
-      }
-      delete vim.insertModeRepeat;
-      vim.insertMode = false;
-      cm.setCursor(cm.getCursor().line, cm.getCursor().ch-1);
-      cm.setOption('keyMap', 'vim');
-      cm.setOption('disableInput', true);
-      cm.toggleOverwrite(false); // exit replace mode if we were in it.
-      // update the ". register before exiting insert mode
-      insertModeChangeRegister.setText(lastChange.changes.join(''));
-      CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"});
-      if (macroModeState.isRecording) {
-        logInsertModeChange(macroModeState);
-      }
-    }
-
-    // The timeout in milliseconds for the two-character ESC keymap should be
-    // adjusted according to your typing speed to prevent false positives.
-    defineOption('insertModeEscKeysTimeout', 200, 'number');
-
-    CodeMirror.keyMap['vim-insert'] = {
-      // TODO: override navigation keys so that Esc will cancel automatic
-      // indentation from o, O, i_<CR>
-      'Ctrl-N': 'autocomplete',
-      'Ctrl-P': 'autocomplete',
-      'Enter': function(cm) {
-        var fn = CodeMirror.commands.newlineAndIndentContinueComment ||
-            CodeMirror.commands.newlineAndIndent;
-        fn(cm);
-      },
-      fallthrough: ['default'],
-      attach: attachVimMap,
-      detach: detachVimMap,
-      call: cmKey
-    };
-
-    CodeMirror.keyMap['vim-replace'] = {
-      'Backspace': 'goCharLeft',
-      fallthrough: ['vim-insert'],
-      attach: attachVimMap,
-      detach: detachVimMap,
-      call: cmKey
-    };
-
-    function executeMacroRegister(cm, vim, macroModeState, registerName) {
-      var register = vimGlobalState.registerController.getRegister(registerName);
-      var keyBuffer = register.keyBuffer;
-      var imc = 0;
-      macroModeState.isPlaying = true;
-      macroModeState.replaySearchQueries = register.searchQueries.slice(0);
-      for (var i = 0; i < keyBuffer.length; i++) {
-        var text = keyBuffer[i];
-        var match, key;
-        while (text) {
-          // Pull off one command key, which is either a single character
-          // or a special sequence wrapped in '<' and '>', e.g. '<Space>'.
-          match = (/<\w+-.+?>|<\w+>|./).exec(text);
-          key = match[0];
-          text = text.substring(match.index + key.length);
-          CodeMirror.Vim.handleKey(cm, key, 'macro');
-          if (vim.insertMode) {
-            var changes = register.insertModeChanges[imc++].changes;
-            vimGlobalState.macroModeState.lastInsertModeChanges.changes =
-                changes;
-            repeatInsertModeChanges(cm, changes, 1);
-            exitInsertMode(cm);
-          }
-        }
-      };
-      macroModeState.isPlaying = false;
-    }
-
-    function logKey(macroModeState, key) {
-      if (macroModeState.isPlaying) { return; }
-      var registerName = macroModeState.latestRegister;
-      var register = vimGlobalState.registerController.getRegister(registerName);
-      if (register) {
-        register.pushText(key);
-      }
-    }
-
-    function logInsertModeChange(macroModeState) {
-      if (macroModeState.isPlaying) { return; }
-      var registerName = macroModeState.latestRegister;
-      var register = vimGlobalState.registerController.getRegister(registerName);
-      if (register) {
-        register.pushInsertModeChanges(macroModeState.lastInsertModeChanges);
-      }
-    }
-
-    function logSearchQuery(macroModeState, query) {
-      if (macroModeState.isPlaying) { return; }
-      var registerName = macroModeState.latestRegister;
-      var register = vimGlobalState.registerController.getRegister(registerName);
-      if (register) {
-        register.pushSearchQuery(query);
-      }
-    }
-
-    /**
-     * Listens for changes made in insert mode.
-     * Should only be active in insert mode.
-     */
-    function onChange(_cm, changeObj) {
-      var macroModeState = vimGlobalState.macroModeState;
-      var lastChange = macroModeState.lastInsertModeChanges;
-      if (!macroModeState.isPlaying) {
-        while(changeObj) {
-          lastChange.expectCursorActivityForChange = true;
-          if (changeObj.origin == '+input' || changeObj.origin == 'paste'
-              || changeObj.origin === undefined /* only in testing */) {
-            var text = changeObj.text.join('\n');
-            lastChange.changes.push(text);
-          }
-          // Change objects may be chained with next.
-          changeObj = changeObj.next;
-        }
-      }
-    }
-
-    /**
-    * Listens for any kind of cursor activity on CodeMirror.
-    */
-    function onCursorActivity(cm) {
-      var vim = cm.state.vim;
-      if (vim.insertMode) {
-        // Tracking cursor activity in insert mode (for macro support).
-        var macroModeState = vimGlobalState.macroModeState;
-        if (macroModeState.isPlaying) { return; }
-        var lastChange = macroModeState.lastInsertModeChanges;
-        if (lastChange.expectCursorActivityForChange) {
-          lastChange.expectCursorActivityForChange = false;
-        } else {
-          // Cursor moved outside the context of an edit. Reset the change.
-          lastChange.changes = [];
-        }
-      } else if (!cm.curOp.isVimOp) {
-        handleExternalSelection(cm, vim);
-      }
-      if (vim.visualMode) {
-        updateFakeCursor(cm);
-      }
-    }
-    function updateFakeCursor(cm) {
-      var vim = cm.state.vim;
-      var from = copyCursor(vim.sel.head);
-      var to = offsetCursor(from, 0, 1);
-      if (vim.fakeCursor) {
-        vim.fakeCursor.clear();
-      }
-      vim.fakeCursor = cm.markText(from, to, {className: 'cm-animate-fat-cursor'});
-    }
-    function handleExternalSelection(cm, vim) {
-      var anchor = cm.getCursor('anchor');
-      var head = cm.getCursor('head');
-      // Enter or exit visual mode to match mouse selection.
-      if (vim.visualMode && cursorEqual(head, anchor) && lineLength(cm, head.line) > head.ch) {
-        exitVisualMode(cm, false);
-      } else if (!vim.visualMode && !vim.insertMode && cm.somethingSelected()) {
-        vim.visualMode = true;
-        vim.visualLine = false;
-        CodeMirror.signal(cm, "vim-mode-change", {mode: "visual"});
-      }
-      if (vim.visualMode) {
-        // Bind CodeMirror selection model to vim selection model.
-        // Mouse selections are considered visual characterwise.
-        var headOffset = !cursorIsBefore(head, anchor) ? -1 : 0;
-        var anchorOffset = cursorIsBefore(head, anchor) ? -1 : 0;
-        head = offsetCursor(head, 0, headOffset);
-        anchor = offsetCursor(anchor, 0, anchorOffset);
-        vim.sel = {
-          anchor: anchor,
-          head: head
-        };
-        updateMark(cm, vim, '<', cursorMin(head, anchor));
-        updateMark(cm, vim, '>', cursorMax(head, anchor));
-      } else if (!vim.insertMode) {
-        // Reset lastHPos if selection was modified by something outside of vim mode e.g. by mouse.
-        vim.lastHPos = cm.getCursor().ch;
-      }
-    }
-
-    /** Wrapper for special keys pressed in insert mode */
-    function InsertModeKey(keyName) {
-      this.keyName = keyName;
-    }
-
-    /**
-    * Handles raw key down events from the text area.
-    * - Should only be active in insert mode.
-    * - For recording deletes in insert mode.
-    */
-    function onKeyEventTargetKeyDown(e) {
-      var macroModeState = vimGlobalState.macroModeState;
-      var lastChange = macroModeState.lastInsertModeChanges;
-      var keyName = CodeMirror.keyName(e);
-      function onKeyFound() {
-        lastChange.changes.push(new InsertModeKey(keyName));
-        return true;
-      }
-      if (keyName.indexOf('Delete') != -1 || keyName.indexOf('Backspace') != -1) {
-        CodeMirror.lookupKey(keyName, 'vim-insert', onKeyFound);
-      }
-    }
-
-    /**
-     * Repeats the last edit, which includes exactly 1 command and at most 1
-     * insert. Operator and motion commands are read from lastEditInputState,
-     * while action commands are read from lastEditActionCommand.
-     *
-     * If repeatForInsert is true, then the function was called by
-     * exitInsertMode to repeat the insert mode changes the user just made. The
-     * corresponding enterInsertMode call was made with a count.
-     */
-    function repeatLastEdit(cm, vim, repeat, repeatForInsert) {
-      var macroModeState = vimGlobalState.macroModeState;
-      macroModeState.isPlaying = true;
-      var isAction = !!vim.lastEditActionCommand;
-      var cachedInputState = vim.inputState;
-      function repeatCommand() {
-        if (isAction) {
-          commandDispatcher.processAction(cm, vim, vim.lastEditActionCommand);
-        } else {
-          commandDispatcher.evalInput(cm, vim);
-        }
-      }
-      function repeatInsert(repeat) {
-        if (macroModeState.lastInsertModeChanges.changes.length > 0) {
-          // For some reason, repeat cw in desktop VIM does not repeat
-          // insert mode changes. Will conform to that behavior.
-          repeat = !vim.lastEditActionCommand ? 1 : repeat;
-          var changeObject = macroModeState.lastInsertModeChanges;
-          repeatInsertModeChanges(cm, changeObject.changes, repeat);
-        }
-      }
-      vim.inputState = vim.lastEditInputState;
-      if (isAction && vim.lastEditActionCommand.interlaceInsertRepeat) {
-        // o and O repeat have to be interlaced with insert repeats so that the
-        // insertions appear on separate lines instead of the last line.
-        for (var i = 0; i < repeat; i++) {
-          repeatCommand();
-          repeatInsert(1);
-        }
-      } else {
-        if (!repeatForInsert) {
-          // Hack to get the cursor to end up at the right place. If I is
-          // repeated in insert mode repeat, cursor will be 1 insert
-          // change set left of where it should be.
-          repeatCommand();
-        }
-        repeatInsert(repeat);
-      }
-      vim.inputState = cachedInputState;
-      if (vim.insertMode && !repeatForInsert) {
-        // Don't exit insert mode twice. If repeatForInsert is set, then we
-        // were called by an exitInsertMode call lower on the stack.
-        exitInsertMode(cm);
-      }
-      macroModeState.isPlaying = false;
-    };
-
-    function repeatInsertModeChanges(cm, changes, repeat) {
-      function keyHandler(binding) {
-        if (typeof binding == 'string') {
-          CodeMirror.commands[binding](cm);
-        } else {
-          binding(cm);
-        }
-        return true;
-      }
-      var head = cm.getCursor('head');
-      var inVisualBlock = vimGlobalState.macroModeState.lastInsertModeChanges.inVisualBlock;
-      if (inVisualBlock) {
-        // Set up block selection again for repeating the changes.
-        var vim = cm.state.vim;
-        var lastSel = vim.lastSelection;
-        var offset = getOffset(lastSel.anchor, lastSel.head);
-        selectForInsert(cm, head, offset.line + 1);
-        repeat = cm.listSelections().length;
-        cm.setCursor(head);
-      }
-      for (var i = 0; i < repeat; i++) {
-        if (inVisualBlock) {
-          cm.setCursor(offsetCursor(head, i, 0));
-        }
-        for (var j = 0; j < changes.length; j++) {
-          var change = changes[j];
-          if (change instanceof InsertModeKey) {
-            CodeMirror.lookupKey(change.keyName, 'vim-insert', keyHandler);
-          } else {
-            var cur = cm.getCursor();
-            cm.replaceRange(change, cur, cur);
-          }
-        }
-      }
-      if (inVisualBlock) {
-        cm.setCursor(offsetCursor(head, 0, 1));
-      }
-    }
-
-    resetVimGlobalState();
-    return vimApi;
-  };
-  // Initialize Vim and make it available as an API.
-  CodeMirror.Vim = Vim();
-});
diff --git a/public/js/lib/codemirror/lib/codemirror.css b/public/js/lib/codemirror/lib/codemirror.css
deleted file mode 100644
index 4e47984..0000000
--- a/public/js/lib/codemirror/lib/codemirror.css
+++ /dev/null
@@ -1,311 +0,0 @@
-/* BASICS */
-
-.CodeMirror {
-  /* Set height, width, borders, and global font properties here */
-  font-family: monospace;
-  height: 300px;
-}
-
-/* PADDING */
-
-.CodeMirror-lines {
-  padding: 4px 0; /* Vertical padding around content */
-}
-.CodeMirror pre {
-  padding: 0 4px; /* Horizontal padding of content */
-}
-
-.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
-  background-color: white; /* The little square between H and V scrollbars */
-}
-
-/* GUTTER */
-
-.CodeMirror-gutters {
-  border-right: 1px solid #ddd;
-  background-color: #f7f7f7;
-  white-space: nowrap;
-}
-.CodeMirror-linenumbers {}
-.CodeMirror-linenumber {
-  padding: 0 3px 0 5px;
-  min-width: 20px;
-  text-align: right;
-  color: #999;
-  -moz-box-sizing: content-box;
-  box-sizing: content-box;
-}
-
-.CodeMirror-guttermarker { color: black; }
-.CodeMirror-guttermarker-subtle { color: #999; }
-
-/* CURSOR */
-
-.CodeMirror div.CodeMirror-cursor {
-  border-left: 1px solid black;
-}
-/* Shown when moving in bi-directional text */
-.CodeMirror div.CodeMirror-secondarycursor {
-  border-left: 1px solid silver;
-}
-.CodeMirror.cm-fat-cursor div.CodeMirror-cursor {
-  width: auto;
-  border: 0;
-  background: #7e7;
-}
-.CodeMirror.cm-fat-cursor div.CodeMirror-cursors {
-  z-index: 1;
-}
-
-.cm-animate-fat-cursor {
-  width: auto;
-  border: 0;
-  -webkit-animation: blink 1.06s steps(1) infinite;
-  -moz-animation: blink 1.06s steps(1) infinite;
-  animation: blink 1.06s steps(1) infinite;
-}
-@-moz-keyframes blink {
-  0% { background: #7e7; }
-  50% { background: none; }
-  100% { background: #7e7; }
-}
-@-webkit-keyframes blink {
-  0% { background: #7e7; }
-  50% { background: none; }
-  100% { background: #7e7; }
-}
-@keyframes blink {
-  0% { background: #7e7; }
-  50% { background: none; }
-  100% { background: #7e7; }
-}
-
-/* Can style cursor different in overwrite (non-insert) mode */
-div.CodeMirror-overwrite div.CodeMirror-cursor {}
-
-.cm-tab { display: inline-block; text-decoration: inherit; }
-
-.CodeMirror-ruler {
-  border-left: 1px solid #ccc;
-  position: absolute;
-}
-
-/* DEFAULT THEME */
-
-.cm-s-default .cm-keyword {color: #708;}
-.cm-s-default .cm-atom {color: #219;}
-.cm-s-default .cm-number {color: #164;}
-.cm-s-default .cm-def {color: #00f;}
-.cm-s-default .cm-variable,
-.cm-s-default .cm-punctuation,
-.cm-s-default .cm-property,
-.cm-s-default .cm-operator {}
-.cm-s-default .cm-variable-2 {color: #05a;}
-.cm-s-default .cm-variable-3 {color: #085;}
-.cm-s-default .cm-comment {color: #a50;}
-.cm-s-default .cm-string {color: #a11;}
-.cm-s-default .cm-string-2 {color: #f50;}
-.cm-s-default .cm-meta {color: #555;}
-.cm-s-default .cm-qualifier {color: #555;}
-.cm-s-default .cm-builtin {color: #30a;}
-.cm-s-default .cm-bracket {color: #997;}
-.cm-s-default .cm-tag {color: #170;}
-.cm-s-default .cm-attribute {color: #00c;}
-.cm-s-default .cm-header {color: blue;}
-.cm-s-default .cm-quote {color: #090;}
-.cm-s-default .cm-hr {color: #999;}
-.cm-s-default .cm-link {color: #00c;}
-
-.cm-negative {color: #d44;}
-.cm-positive {color: #292;}
-.cm-header, .cm-strong {font-weight: bold;}
-.cm-em {font-style: italic;}
-.cm-link {text-decoration: underline;}
-.cm-strikethrough {text-decoration: line-through;}
-
-.cm-s-default .cm-error {color: #f00;}
-.cm-invalidchar {color: #f00;}
-
-/* Default styles for common addons */
-
-div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
-div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
-.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
-.CodeMirror-activeline-background {background: #e8f2ff;}
-
-/* STOP */
-
-/* The rest of this file contains styles related to the mechanics of
-   the editor. You probably shouldn't touch them. */
-
-.CodeMirror {
-  line-height: 1;
-  position: relative;
-  overflow: hidden;
-  background: white;
-  color: black;
-}
-
-.CodeMirror-scroll {
-    /* Commenting out for no scroll display
-  overflow: scroll !important; /* Things will break if this is overridden */
-  /* 30px is the magic margin used to hide the element's real scrollbars */
-  /* See overflow: hidden in .CodeMirror */
-  margin-bottom: -30px; margin-right: -30px;
-  padding-bottom: 0px;
-  border-radius: 5px;
-  height: 100%;
-  outline: none; /* Prevent dragging from highlighting the element */
-  position: relative;
-  -moz-box-sizing: content-box;
-  box-sizing: content-box;
-}
-.CodeMirror-sizer {
-  position: relative;
-  border-right: 30px solid transparent;
-  -moz-box-sizing: content-box;
-  box-sizing: content-box;
-}
-
-/* The fake, visible scrollbars. Used to force redraw during scrolling
-   before actuall scrolling happens, thus preventing shaking and
-   flickering artifacts. */
-.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
-  position: absolute;
-  z-index: 6;
-  display: none;
-}
-.CodeMirror-vscrollbar {
-  right: 0; top: 0;
-  overflow-x: hidden;
-  overflow-y: scroll;
-}
-.CodeMirror-hscrollbar {
-  bottom: 0; left: 0;
-  overflow-y: hidden;
-  overflow-x: scroll;
-}
-.CodeMirror-scrollbar-filler {
-  right: 0; bottom: 0;
-}
-.CodeMirror-gutter-filler {
-  left: 0; bottom: 0;
-}
-
-.CodeMirror-gutters {
-  position: absolute; left: 0; top: 0;
-  z-index: 3;
-}
-.CodeMirror-gutter {
-  white-space: normal;
-  height: 100%;
-  -moz-box-sizing: content-box;
-  box-sizing: content-box;
-  display: inline-block;
-  margin-bottom: -30px;
-  /* Hack to make IE7 behave */
-  *zoom:1;
-  *display:inline;
-}
-.CodeMirror-gutter-wrapper {
-  position: absolute;
-  z-index: 4;
-  height: 100%;
-}
-.CodeMirror-gutter-elt {
-  position: absolute;
-  cursor: default;
-  z-index: 4;
-}
-
-.CodeMirror-lines {
-  cursor: text;
-  min-height: 1px; /* prevents collapsing before first draw */
-}
-.CodeMirror pre {
-  /* Reset some styles that the rest of the page might have set */
-  -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
-  border-width: 0;
-  background: transparent;
-  font-family: inherit;
-  font-size: inherit;
-  margin: 0;
-  white-space: pre;
-  word-wrap: normal;
-  line-height: inherit;
-  color: inherit;
-  z-index: 2;
-  position: relative;
-  overflow: visible;
-}
-.CodeMirror-wrap pre {
-  word-wrap: break-word;
-  white-space: pre-wrap;
-  word-break: normal;
-}
-
-.CodeMirror-linebackground {
-  position: absolute;
-  left: 0; right: 0; top: 0; bottom: 0;
-  z-index: 0;
-}
-
-.CodeMirror-linewidget {
-  position: relative;
-  z-index: 2;
-  overflow: auto;
-}
-
-.CodeMirror-widget {}
-
-.CodeMirror-measure {
-  position: absolute;
-  width: 100%;
-  height: 0;
-  overflow: hidden;
-  visibility: hidden;
-}
-.CodeMirror-measure pre { position: static; }
-
-.CodeMirror div.CodeMirror-cursor {
-  position: absolute;
-  border-right: none;
-  width: 0;
-}
-
-div.CodeMirror-cursors {
-  visibility: hidden;
-  position: relative;
-  z-index: 3;
-}
-.CodeMirror-focused div.CodeMirror-cursors {
-  visibility: visible;
-}
-
-.CodeMirror-selected { background: #d9d9d9; }
-.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
-.CodeMirror-crosshair { cursor: crosshair; }
-
-.cm-searching {
-  background: #ffa;
-  background: rgba(255, 255, 0, .4);
-}
-
-/* IE7 hack to prevent it from returning funny offsetTops on the spans */
-.CodeMirror span { *vertical-align: text-bottom; }
-
-/* Used to force a border model for a node */
-.cm-force-border { padding-right: .1px; }
-
-@media print {
-  /* Hide the cursor when printing */
-  .CodeMirror div.CodeMirror-cursors {
-    visibility: hidden;
-  }
-}
-
-/* See issue #2901 */
-.cm-tab-wrap-hack:after { content: ''; }
-
-/* Help users use markselection to safely style text background */
-span.CodeMirror-selectedtext { background: none; }
diff --git a/public/js/lib/codemirror/lib/codemirror.js b/public/js/lib/codemirror/lib/codemirror.js
deleted file mode 100644
index e21f416..0000000
--- a/public/js/lib/codemirror/lib/codemirror.js
+++ /dev/null
@@ -1,8029 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// This is CodeMirror (http://codemirror.net), a code editor
-// implemented in JavaScript on top of the browser's DOM.
-//
-// You can find some technical background for some of the code below
-// at http://marijnhaverbeke.nl/blog/#cm-internals .
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    module.exports = mod();
-  else if (typeof define == "function" && define.amd) // AMD
-    return define([], mod);
-  else // Plain browser env
-    this.CodeMirror = mod();
-})(function() {
-  "use strict";
-
-  // BROWSER SNIFFING
-
-  // Kludges for bugs and behavior differences that can't be feature
-  // detected are enabled based on userAgent etc sniffing.
-
-  var gecko = /gecko\/\d/i.test(navigator.userAgent);
-  // ie_uptoN means Internet Explorer version N or lower
-  var ie_upto10 = /MSIE \d/.test(navigator.userAgent);
-  var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
-  var ie = ie_upto10 || ie_11up;
-  var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : ie_11up[1]);
-  var webkit = /WebKit\//.test(navigator.userAgent);
-  var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(navigator.userAgent);
-  var chrome = /Chrome\//.test(navigator.userAgent);
-  var presto = /Opera\//.test(navigator.userAgent);
-  var safari = /Apple Computer/.test(navigator.vendor);
-  var khtml = /KHTML\//.test(navigator.userAgent);
-  var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent);
-  var phantom = /PhantomJS/.test(navigator.userAgent);
-
-  var ios = /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent);
-  // This is woefully incomplete. Suggestions for alternative methods welcome.
-  var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent);
-  var mac = ios || /Mac/.test(navigator.platform);
-  var windows = /win/i.test(navigator.platform);
-
-  var presto_version = presto && navigator.userAgent.match(/Version\/(\d*\.\d*)/);
-  if (presto_version) presto_version = Number(presto_version[1]);
-  if (presto_version && presto_version >= 15) { presto = false; webkit = true; }
-  // Some browsers use the wrong event properties to signal cmd/ctrl on OS X
-  var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));
-  var captureRightClick = gecko || (ie && ie_version >= 9);
-
-  // Optimize some code when these features are not used.
-  var sawReadOnlySpans = false, sawCollapsedSpans = false;
-
-  // EDITOR CONSTRUCTOR
-
-  // A CodeMirror instance represents an editor. This is the object
-  // that user code is usually dealing with.
-
-  function CodeMirror(place, options) {
-    if (!(this instanceof CodeMirror)) return new CodeMirror(place, options);
-
-    this.options = options = options ? copyObj(options) : {};
-    // Determine effective options based on given values and defaults.
-    copyObj(defaults, options, false);
-    setGuttersForLineNumbers(options);
-
-    var doc = options.value;
-    if (typeof doc == "string") doc = new Doc(doc, options.mode);
-    this.doc = doc;
-
-    var display = this.display = new Display(place, doc);
-    display.wrapper.CodeMirror = this;
-    updateGutters(this);
-    themeChanged(this);
-    if (options.lineWrapping)
-      this.display.wrapper.className += " CodeMirror-wrap";
-    if (options.autofocus && !mobile) focusInput(this);
-    initScrollbars(this);
-
-    this.state = {
-      keyMaps: [],  // stores maps added by addKeyMap
-      overlays: [], // highlighting overlays, as added by addOverlay
-      modeGen: 0,   // bumped when mode/overlay changes, used to invalidate highlighting info
-      overwrite: false, focused: false,
-      suppressEdits: false, // used to disable editing during key handlers when in readOnly mode
-      pasteIncoming: false, cutIncoming: false, // help recognize paste/cut edits in readInput
-      draggingText: false,
-      highlight: new Delayed(), // stores highlight worker timeout
-      keySeq: null  // Unfinished key sequence
-    };
-
-    // Override magic textarea content restore that IE sometimes does
-    // on our hidden textarea on reload
-    if (ie && ie_version < 11) setTimeout(bind(resetInput, this, true), 20);
-
-    registerEventHandlers(this);
-    ensureGlobalHandlers();
-
-    startOperation(this);
-    this.curOp.forceUpdate = true;
-    attachDoc(this, doc);
-
-    if ((options.autofocus && !mobile) || activeElt() == display.input)
-      setTimeout(bind(onFocus, this), 20);
-    else
-      onBlur(this);
-
-    for (var opt in optionHandlers) if (optionHandlers.hasOwnProperty(opt))
-      optionHandlers[opt](this, options[opt], Init);
-    maybeUpdateLineNumberWidth(this);
-    for (var i = 0; i < initHooks.length; ++i) initHooks[i](this);
-    endOperation(this);
-  }
-
-  // DISPLAY CONSTRUCTOR
-
-  // The display handles the DOM integration, both for input reading
-  // and content drawing. It holds references to DOM nodes and
-  // display-related state.
-
-  function Display(place, doc) {
-    var d = this;
-
-    // The semihidden textarea that is focused when the editor is
-    // focused, and receives input.
-    var input = d.input = elt("textarea", null, null, "position: absolute; padding: 0; width: 1px; height: 1em; outline: none");
-    // The textarea is kept positioned near the cursor to prevent the
-    // fact that it'll be scrolled into view on input from scrolling
-    // our fake cursor out of view. On webkit, when wrap=off, paste is
-    // very slow. So make the area wide instead.
-    if (webkit) input.style.width = "1000px";
-    else input.setAttribute("wrap", "off");
-    // If border: 0; -- iOS fails to open keyboard (issue #1287)
-    if (ios) input.style.border = "1px solid black";
-    input.setAttribute("autocorrect", "off"); input.setAttribute("autocapitalize", "off"); input.setAttribute("spellcheck", "false");
-
-    // Wraps and hides input textarea
-    d.inputDiv = elt("div", [input], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
-    // Covers bottom-right square when both scrollbars are present.
-    d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler");
-    d.scrollbarFiller.setAttribute("not-content", "true");
-    // Covers bottom of gutter when coverGutterNextToScrollbar is on
-    // and h scrollbar is present.
-    d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler");
-    d.gutterFiller.setAttribute("not-content", "true");
-    // Will contain the actual code, positioned to cover the viewport.
-    d.lineDiv = elt("div", null, "CodeMirror-code");
-    // Elements are added to these to represent selection and cursors.
-    d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1");
-    d.cursorDiv = elt("div", null, "CodeMirror-cursors");
-    // A visibility: hidden element used to find the size of things.
-    d.measure = elt("div", null, "CodeMirror-measure");
-    // When lines outside of the viewport are measured, they are drawn in this.
-    d.lineMeasure = elt("div", null, "CodeMirror-measure");
-    // Wraps everything that needs to exist inside the vertically-padded coordinate system
-    d.lineSpace = elt("div", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],
-                      null, "position: relative; outline: none");
-    // Moved around its parent to cover visible view.
-    d.mover = elt("div", [elt("div", [d.lineSpace], "CodeMirror-lines")], null, "position: relative");
-    // Set to the height of the document, allowing scrolling.
-    d.sizer = elt("div", [d.mover], "CodeMirror-sizer");
-    d.sizerWidth = null;
-    // Behavior of elts with overflow: auto and padding is
-    // inconsistent across browsers. This is used to ensure the
-    // scrollable area is big enough.
-    d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerGap + "px; width: 1px;");
-    // Will contain the gutters, if any.
-    d.gutters = elt("div", null, "CodeMirror-gutters");
-    d.lineGutter = null;
-    // Actual scrollable element.
-    d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll");
-    d.scroller.setAttribute("tabIndex", "-1");
-    // The element in which the editor lives.
-    d.wrapper = elt("div", [d.inputDiv, d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror");
-
-    // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)
-    if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }
-    // Needed to hide big blue blinking cursor on Mobile Safari
-    if (ios) input.style.width = "0px";
-    if (!webkit) d.scroller.draggable = true;
-    // Needed to handle Tab key in KHTML
-    if (khtml) { d.inputDiv.style.height = "1px"; d.inputDiv.style.position = "absolute"; }
-
-    if (place) {
-      if (place.appendChild) place.appendChild(d.wrapper);
-      else place(d.wrapper);
-    }
-
-    // Current rendered range (may be bigger than the view window).
-    d.viewFrom = d.viewTo = doc.first;
-    d.reportedViewFrom = d.reportedViewTo = doc.first;
-    // Information about the rendered lines.
-    d.view = [];
-    d.renderedView = null;
-    // Holds info about a single rendered line when it was rendered
-    // for measurement, while not in view.
-    d.externalMeasured = null;
-    // Empty space (in pixels) above the view
-    d.viewOffset = 0;
-    d.lastWrapHeight = d.lastWrapWidth = 0;
-    d.updateLineNumbers = null;
-
-    d.nativeBarWidth = d.barHeight = d.barWidth = 0;
-    d.scrollbarsClipped = false;
-
-    // Used to only resize the line number gutter when necessary (when
-    // the amount of lines crosses a boundary that makes its width change)
-    d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;
-    // See readInput and resetInput
-    d.prevInput = "";
-    // Set to true when a non-horizontal-scrolling line widget is
-    // added. As an optimization, line widget aligning is skipped when
-    // this is false.
-    d.alignWidgets = false;
-    // Flag that indicates whether we expect input to appear real soon
-    // now (after some event like 'keypress' or 'input') and are
-    // polling intensively.
-    d.pollingFast = false;
-    // Self-resetting timeout for the poller
-    d.poll = new Delayed();
-
-    d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;
-
-    // Tracks when resetInput has punted to just putting a short
-    // string into the textarea instead of the full selection.
-    d.inaccurateSelection = false;
-
-    // Tracks the maximum line length so that the horizontal scrollbar
-    // can be kept static when scrolling.
-    d.maxLine = null;
-    d.maxLineLength = 0;
-    d.maxLineChanged = false;
-
-    // Used for measuring wheel scrolling granularity
-    d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;
-
-    // True when shift is held down.
-    d.shift = false;
-
-    // Used to track whether anything happened since the context menu
-    // was opened.
-    d.selForContextMenu = null;
-  }
-
-  // STATE UPDATES
-
-  // Used to get the editor into a consistent state again when options change.
-
-  function loadMode(cm) {
-    cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption);
-    resetModeState(cm);
-  }
-
-  function resetModeState(cm) {
-    cm.doc.iter(function(line) {
-      if (line.stateAfter) line.stateAfter = null;
-      if (line.styles) line.styles = null;
-    });
-    cm.doc.frontier = cm.doc.first;
-    startWorker(cm, 100);
-    cm.state.modeGen++;
-    if (cm.curOp) regChange(cm);
-  }
-
-  function wrappingChanged(cm) {
-    if (cm.options.lineWrapping) {
-      addClass(cm.display.wrapper, "CodeMirror-wrap");
-      cm.display.sizer.style.minWidth = "";
-      cm.display.sizerWidth = null;
-    } else {
-      rmClass(cm.display.wrapper, "CodeMirror-wrap");
-      findMaxLine(cm);
-    }
-    estimateLineHeights(cm);
-    regChange(cm);
-    clearCaches(cm);
-    setTimeout(function(){updateScrollbars(cm);}, 100);
-  }
-
-  // Returns a function that estimates the height of a line, to use as
-  // first approximation until the line becomes visible (and is thus
-  // properly measurable).
-  function estimateHeight(cm) {
-    var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;
-    var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);
-    return function(line) {
-      if (lineIsHidden(cm.doc, line)) return 0;
-
-      var widgetsHeight = 0;
-      if (line.widgets) for (var i = 0; i < line.widgets.length; i++) {
-        if (line.widgets[i].height) widgetsHeight += line.widgets[i].height;
-      }
-
-      if (wrapping)
-        return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th;
-      else
-        return widgetsHeight + th;
-    };
-  }
-
-  function estimateLineHeights(cm) {
-    var doc = cm.doc, est = estimateHeight(cm);
-    doc.iter(function(line) {
-      var estHeight = est(line);
-      if (estHeight != line.height) updateLineHeight(line, estHeight);
-    });
-  }
-
-  function themeChanged(cm) {
-    cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") +
-      cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-");
-    clearCaches(cm);
-  }
-
-  function guttersChanged(cm) {
-    updateGutters(cm);
-    regChange(cm);
-    setTimeout(function(){alignHorizontally(cm);}, 20);
-  }
-
-  // Rebuild the gutter elements, ensure the margin to the left of the
-  // code matches their width.
-  function updateGutters(cm) {
-    var gutters = cm.display.gutters, specs = cm.options.gutters;
-    removeChildren(gutters);
-    for (var i = 0; i < specs.length; ++i) {
-      var gutterClass = specs[i];
-      var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + gutterClass));
-      if (gutterClass == "CodeMirror-linenumbers") {
-        cm.display.lineGutter = gElt;
-        gElt.style.width = (cm.display.lineNumWidth || 1) + "px";
-      }
-    }
-    gutters.style.display = i ? "" : "none";
-    updateGutterSpace(cm);
-  }
-
-  function updateGutterSpace(cm) {
-    var width = cm.display.gutters.offsetWidth;
-    cm.display.sizer.style.marginLeft = width + "px";
-  }
-
-  // Compute the character length of a line, taking into account
-  // collapsed ranges (see markText) that might hide parts, and join
-  // other lines onto it.
-  function lineLength(line) {
-    if (line.height == 0) return 0;
-    var len = line.text.length, merged, cur = line;
-    while (merged = collapsedSpanAtStart(cur)) {
-      var found = merged.find(0, true);
-      cur = found.from.line;
-      len += found.from.ch - found.to.ch;
-    }
-    cur = line;
-    while (merged = collapsedSpanAtEnd(cur)) {
-      var found = merged.find(0, true);
-      len -= cur.text.length - found.from.ch;
-      cur = found.to.line;
-      len += cur.text.length - found.to.ch;
-    }
-    return len;
-  }
-
-  // Find the longest line in the document.
-  function findMaxLine(cm) {
-    var d = cm.display, doc = cm.doc;
-    d.maxLine = getLine(doc, doc.first);
-    d.maxLineLength = lineLength(d.maxLine);
-    d.maxLineChanged = true;
-    doc.iter(function(line) {
-      var len = lineLength(line);
-      if (len > d.maxLineLength) {
-        d.maxLineLength = len;
-        d.maxLine = line;
-      }
-    });
-  }
-
-  // Make sure the gutters options contains the element
-  // "CodeMirror-linenumbers" when the lineNumbers option is true.
-  function setGuttersForLineNumbers(options) {
-    var found = indexOf(options.gutters, "CodeMirror-linenumbers");
-    if (found == -1 && options.lineNumbers) {
-      options.gutters = options.gutters.concat(["CodeMirror-linenumbers"]);
-    } else if (found > -1 && !options.lineNumbers) {
-      options.gutters = options.gutters.slice(0);
-      options.gutters.splice(found, 1);
-    }
-  }
-
-  // SCROLLBARS
-
-  // Prepare DOM reads needed to update the scrollbars. Done in one
-  // shot to minimize update/measure roundtrips.
-  function measureForScrollbars(cm) {
-    var d = cm.display, gutterW = d.gutters.offsetWidth;
-    var docH = Math.round(cm.doc.height + paddingVert(cm.display));
-    return {
-      clientHeight: d.scroller.clientHeight,
-      viewHeight: d.wrapper.clientHeight,
-      scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,
-      viewWidth: d.wrapper.clientWidth,
-      barLeft: cm.options.fixedGutter ? gutterW : 0,
-      docHeight: docH,
-      scrollHeight: docH + scrollGap(cm) + d.barHeight,
-      nativeBarWidth: d.nativeBarWidth,
-      gutterWidth: gutterW
-    };
-  }
-
-  function NativeScrollbars(place, scroll, cm) {
-    this.cm = cm;
-    var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar");
-    var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar");
-    place(vert); place(horiz);
-
-    on(vert, "scroll", function() {
-      if (vert.clientHeight) scroll(vert.scrollTop, "vertical");
-    });
-    on(horiz, "scroll", function() {
-      if (horiz.clientWidth) scroll(horiz.scrollLeft, "horizontal");
-    });
-
-    this.checkedOverlay = false;
-    // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).
-    if (ie && ie_version < 8) this.horiz.style.minHeight = this.vert.style.minWidth = "18px";
-  }
-
-  NativeScrollbars.prototype = copyObj({
-    update: function(measure) {
-      var needsH = measure.scrollWidth > measure.clientWidth + 1;
-      var needsV = measure.scrollHeight > measure.clientHeight + 1;
-      var sWidth = measure.nativeBarWidth;
-
-      if (needsV) {
-        this.vert.style.display = "block";
-        this.vert.style.bottom = needsH ? sWidth + "px" : "0";
-        var totalHeight = measure.viewHeight - (needsH ? sWidth : 0);
-        // A bug in IE8 can cause this value to be negative, so guard it.
-        this.vert.firstChild.style.height =
-          Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px";
-      } else {
-        this.vert.style.display = "";
-        this.vert.firstChild.style.height = "0";
-      }
-
-      if (needsH) {
-        this.horiz.style.display = "block";
-        this.horiz.style.right = needsV ? sWidth + "px" : "0";
-        this.horiz.style.left = measure.barLeft + "px";
-        var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0);
-        this.horiz.firstChild.style.width =
-          (measure.scrollWidth - measure.clientWidth + totalWidth) + "px";
-      } else {
-        this.horiz.style.display = "";
-        this.horiz.firstChild.style.width = "0";
-      }
-
-      if (!this.checkedOverlay && measure.clientHeight > 0) {
-        if (sWidth == 0) this.overlayHack();
-        this.checkedOverlay = true;
-      }
-
-      return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0};
-    },
-    setScrollLeft: function(pos) {
-      if (this.horiz.scrollLeft != pos) this.horiz.scrollLeft = pos;
-    },
-    setScrollTop: function(pos) {
-      if (this.vert.scrollTop != pos) this.vert.scrollTop = pos;
-    },
-    overlayHack: function() {
-      var w = mac && !mac_geMountainLion ? "12px" : "18px";
-      this.horiz.style.minHeight = this.vert.style.minWidth = w;
-      var self = this;
-      var barMouseDown = function(e) {
-        if (e_target(e) != self.vert && e_target(e) != self.horiz)
-          operation(self.cm, onMouseDown)(e);
-      };
-      on(this.vert, "mousedown", barMouseDown);
-      on(this.horiz, "mousedown", barMouseDown);
-    },
-    clear: function() {
-      var parent = this.horiz.parentNode;
-      parent.removeChild(this.horiz);
-      parent.removeChild(this.vert);
-    }
-  }, NativeScrollbars.prototype);
-
-  function NullScrollbars() {}
-
-  NullScrollbars.prototype = copyObj({
-    update: function() { return {bottom: 0, right: 0}; },
-    setScrollLeft: function() {},
-    setScrollTop: function() {},
-    clear: function() {}
-  }, NullScrollbars.prototype);
-
-  CodeMirror.scrollbarModel = {"native": NativeScrollbars, "null": NullScrollbars};
-
-  function initScrollbars(cm) {
-    if (cm.display.scrollbars) {
-      cm.display.scrollbars.clear();
-      if (cm.display.scrollbars.addClass)
-        rmClass(cm.display.wrapper, cm.display.scrollbars.addClass);
-    }
-
-    cm.display.scrollbars = new CodeMirror.scrollbarModel[cm.options.scrollbarStyle](function(node) {
-      cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);
-      on(node, "mousedown", function() {
-        if (cm.state.focused) setTimeout(bind(focusInput, cm), 0);
-      });
-      node.setAttribute("not-content", "true");
-    }, function(pos, axis) {
-      if (axis == "horizontal") setScrollLeft(cm, pos);
-      else setScrollTop(cm, pos);
-    }, cm);
-    if (cm.display.scrollbars.addClass)
-      addClass(cm.display.wrapper, cm.display.scrollbars.addClass);
-  }
-
-  function updateScrollbars(cm, measure) {
-    if (!measure) measure = measureForScrollbars(cm);
-    var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight;
-    updateScrollbarsInner(cm, measure);
-    for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {
-      if (startWidth != cm.display.barWidth && cm.options.lineWrapping)
-        updateHeightsInViewport(cm);
-      updateScrollbarsInner(cm, measureForScrollbars(cm));
-      startWidth = cm.display.barWidth; startHeight = cm.display.barHeight;
-    }
-  }
-
-  // Re-synchronize the fake scrollbars with the actual size of the
-  // content.
-  function updateScrollbarsInner(cm, measure) {
-    var d = cm.display;
-    var sizes = d.scrollbars.update(measure);
-
-    d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px";
-    d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px";
-
-    if (sizes.right && sizes.bottom) {
-      d.scrollbarFiller.style.display = "block";
-      d.scrollbarFiller.style.height = sizes.bottom + "px";
-      d.scrollbarFiller.style.width = sizes.right + "px";
-    } else d.scrollbarFiller.style.display = "";
-    if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {
-      d.gutterFiller.style.display = "block";
-      d.gutterFiller.style.height = sizes.bottom + "px";
-      d.gutterFiller.style.width = measure.gutterWidth + "px";
-    } else d.gutterFiller.style.display = "";
-  }
-
-  // Compute the lines that are visible in a given viewport (defaults
-  // the the current scroll position). viewport may contain top,
-  // height, and ensure (see op.scrollToPos) properties.
-  function visibleLines(display, doc, viewport) {
-    var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;
-    top = Math.floor(top - paddingTop(display));
-    var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;
-
-    var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom);
-    // Ensure is a {from: {line, ch}, to: {line, ch}} object, and
-    // forces those lines into the viewport (if possible).
-    if (viewport && viewport.ensure) {
-      var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line;
-      if (ensureFrom < from) {
-        from = ensureFrom;
-        to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight);
-      } else if (Math.min(ensureTo, doc.lastLine()) >= to) {
-        from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight);
-        to = ensureTo;
-      }
-    }
-    return {from: from, to: Math.max(to, from + 1)};
-  }
-
-  // LINE NUMBERS
-
-  // Re-align line numbers and gutter marks to compensate for
-  // horizontal scrolling.
-  function alignHorizontally(cm) {
-    var display = cm.display, view = display.view;
-    if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) return;
-    var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;
-    var gutterW = display.gutters.offsetWidth, left = comp + "px";
-    for (var i = 0; i < view.length; i++) if (!view[i].hidden) {
-      if (cm.options.fixedGutter && view[i].gutter)
-        view[i].gutter.style.left = left;
-      var align = view[i].alignable;
-      if (align) for (var j = 0; j < align.length; j++)
-        align[j].style.left = left;
-    }
-    if (cm.options.fixedGutter)
-      display.gutters.style.left = (comp + gutterW) + "px";
-  }
-
-  // Used to ensure that the line number gutter is still the right
-  // size for the current document size. Returns true when an update
-  // is needed.
-  function maybeUpdateLineNumberWidth(cm) {
-    if (!cm.options.lineNumbers) return false;
-    var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;
-    if (last.length != display.lineNumChars) {
-      var test = display.measure.appendChild(elt("div", [elt("div", last)],
-                                                 "CodeMirror-linenumber CodeMirror-gutter-elt"));
-      var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;
-      display.lineGutter.style.width = "";
-      display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding);
-      display.lineNumWidth = display.lineNumInnerWidth + padding;
-      display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;
-      display.lineGutter.style.width = display.lineNumWidth + "px";
-      updateGutterSpace(cm);
-      return true;
-    }
-    return false;
-  }
-
-  function lineNumberFor(options, i) {
-    return String(options.lineNumberFormatter(i + options.firstLineNumber));
-  }
-
-  // Computes display.scroller.scrollLeft + display.gutters.offsetWidth,
-  // but using getBoundingClientRect to get a sub-pixel-accurate
-  // result.
-  function compensateForHScroll(display) {
-    return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left;
-  }
-
-  // DISPLAY DRAWING
-
-  function DisplayUpdate(cm, viewport, force) {
-    var display = cm.display;
-
-    this.viewport = viewport;
-    // Store some values that we'll need later (but don't want to force a relayout for)
-    this.visible = visibleLines(display, cm.doc, viewport);
-    this.editorIsHidden = !display.wrapper.offsetWidth;
-    this.wrapperHeight = display.wrapper.clientHeight;
-    this.wrapperWidth = display.wrapper.clientWidth;
-    this.oldDisplayWidth = displayWidth(cm);
-    this.force = force;
-    this.dims = getDimensions(cm);
-  }
-
-  function maybeClipScrollbars(cm) {
-    var display = cm.display;
-    if (!display.scrollbarsClipped && display.scroller.offsetWidth) {
-      display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth;
-      display.heightForcer.style.height = scrollGap(cm) + "px";
-      display.sizer.style.marginBottom = -display.nativeBarWidth + "px";
-      display.sizer.style.borderRightWidth = scrollGap(cm) + "px";
-      display.scrollbarsClipped = true;
-    }
-  }
-
-  // Does the actual updating of the line display. Bails out
-  // (returning false) when there is nothing to be done and forced is
-  // false.
-  function updateDisplayIfNeeded(cm, update) {
-    var display = cm.display, doc = cm.doc;
-
-    if (update.editorIsHidden) {
-      resetView(cm);
-      return false;
-    }
-
-    // Bail out if the visible area is already rendered and nothing changed.
-    if (!update.force &&
-        update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo &&
-        (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) &&
-        display.renderedView == display.view && countDirtyView(cm) == 0)
-      return false;
-
-    if (maybeUpdateLineNumberWidth(cm)) {
-      resetView(cm);
-      update.dims = getDimensions(cm);
-    }
-
-    // Compute a suitable new viewport (from & to)
-    var end = doc.first + doc.size;
-    var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first);
-    var to = Math.min(end, update.visible.to + cm.options.viewportMargin);
-    if (display.viewFrom < from && from - display.viewFrom < 20) from = Math.max(doc.first, display.viewFrom);
-    if (display.viewTo > to && display.viewTo - to < 20) to = Math.min(end, display.viewTo);
-    if (sawCollapsedSpans) {
-      from = visualLineNo(cm.doc, from);
-      to = visualLineEndNo(cm.doc, to);
-    }
-
-    var different = from != display.viewFrom || to != display.viewTo ||
-      display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth;
-    adjustView(cm, from, to);
-
-    display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom));
-    // Position the mover div to align with the current scroll position
-    cm.display.mover.style.top = display.viewOffset + "px";
-
-    var toUpdate = countDirtyView(cm);
-    if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&
-        (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))
-      return false;
-
-    // For big changes, we hide the enclosing element during the
-    // update, since that speeds up the operations on most browsers.
-    var focused = activeElt();
-    if (toUpdate > 4) display.lineDiv.style.display = "none";
-    patchDisplay(cm, display.updateLineNumbers, update.dims);
-    if (toUpdate > 4) display.lineDiv.style.display = "";
-    display.renderedView = display.view;
-    // There might have been a widget with a focused element that got
-    // hidden or updated, if so re-focus it.
-    if (focused && activeElt() != focused && focused.offsetHeight) focused.focus();
-
-    // Prevent selection and cursors from interfering with the scroll
-    // width and height.
-    removeChildren(display.cursorDiv);
-    removeChildren(display.selectionDiv);
-    display.heightForcer.style.top = display.gutters.style.height = 0;
-
-    if (different) {
-      display.lastWrapHeight = update.wrapperHeight;
-      display.lastWrapWidth = update.wrapperWidth;
-      startWorker(cm, 400);
-    }
-
-    display.updateLineNumbers = null;
-
-    return true;
-  }
-
-  function postUpdateDisplay(cm, update) {
-    var force = update.force, viewport = update.viewport;
-    for (var first = true;; first = false) {
-      if (first && cm.options.lineWrapping && update.oldDisplayWidth != displayWidth(cm)) {
-        force = true;
-      } else {
-        force = false;
-        // Clip forced viewport to actual scrollable area.
-        if (viewport && viewport.top != null)
-          viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)};
-        // Updated line heights might result in the drawn area not
-        // actually covering the viewport. Keep looping until it does.
-        update.visible = visibleLines(cm.display, cm.doc, viewport);
-        if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)
-          break;
-      }
-      if (!updateDisplayIfNeeded(cm, update)) break;
-      updateHeightsInViewport(cm);
-      var barMeasure = measureForScrollbars(cm);
-      updateSelection(cm);
-      setDocumentHeight(cm, barMeasure);
-      updateScrollbars(cm, barMeasure);
-    }
-
-    signalLater(cm, "update", cm);
-    if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {
-      signalLater(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo);
-      cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;
-    }
-  }
-
-  function updateDisplaySimple(cm, viewport) {
-    var update = new DisplayUpdate(cm, viewport);
-    if (updateDisplayIfNeeded(cm, update)) {
-      updateHeightsInViewport(cm);
-      postUpdateDisplay(cm, update);
-      var barMeasure = measureForScrollbars(cm);
-      updateSelection(cm);
-      setDocumentHeight(cm, barMeasure);
-      updateScrollbars(cm, barMeasure);
-    }
-  }
-
-  function setDocumentHeight(cm, measure) {
-    cm.display.sizer.style.minHeight = measure.docHeight + "px";
-    var plusGap = measure.docHeight + scrollGap(cm);
-    cm.display.heightForcer.style.top = plusGap + "px";
-    cm.display.gutters.style.height = Math.max(plusGap, measure.clientHeight) + "px";
-  }
-
-  // Read the actual heights of the rendered lines, and update their
-  // stored heights to match.
-  function updateHeightsInViewport(cm) {
-    var display = cm.display;
-    var prevBottom = display.lineDiv.offsetTop;
-    for (var i = 0; i < display.view.length; i++) {
-      var cur = display.view[i], height;
-      if (cur.hidden) continue;
-      if (ie && ie_version < 8) {
-        var bot = cur.node.offsetTop + cur.node.offsetHeight;
-        height = bot - prevBottom;
-        prevBottom = bot;
-      } else {
-        var box = cur.node.getBoundingClientRect();
-        height = box.bottom - box.top;
-      }
-      var diff = cur.line.height - height;
-      if (height < 2) height = textHeight(display);
-      if (diff > .001 || diff < -.001) {
-        updateLineHeight(cur.line, height);
-        updateWidgetHeight(cur.line);
-        if (cur.rest) for (var j = 0; j < cur.rest.length; j++)
-          updateWidgetHeight(cur.rest[j]);
-      }
-    }
-  }
-
-  // Read and store the height of line widgets associated with the
-  // given line.
-  function updateWidgetHeight(line) {
-    if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)
-      line.widgets[i].height = line.widgets[i].node.offsetHeight;
-  }
-
-  // Do a bulk-read of the DOM positions and sizes needed to draw the
-  // view, so that we don't interleave reading and writing to the DOM.
-  function getDimensions(cm) {
-    var d = cm.display, left = {}, width = {};
-    var gutterLeft = d.gutters.clientLeft;
-    for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {
-      left[cm.options.gutters[i]] = n.offsetLeft + n.clientLeft + gutterLeft;
-      width[cm.options.gutters[i]] = n.clientWidth;
-    }
-    return {fixedPos: compensateForHScroll(d),
-            gutterTotalWidth: d.gutters.offsetWidth,
-            gutterLeft: left,
-            gutterWidth: width,
-            wrapperWidth: d.wrapper.clientWidth};
-  }
-
-  // Sync the actual display DOM structure with display.view, removing
-  // nodes for lines that are no longer in view, and creating the ones
-  // that are not there yet, and updating the ones that are out of
-  // date.
-  function patchDisplay(cm, updateNumbersFrom, dims) {
-    var display = cm.display, lineNumbers = cm.options.lineNumbers;
-    var container = display.lineDiv, cur = container.firstChild;
-
-    function rm(node) {
-      var next = node.nextSibling;
-      // Works around a throw-scroll bug in OS X Webkit
-      if (webkit && mac && cm.display.currentWheelTarget == node)
-        node.style.display = "none";
-      else
-        node.parentNode.removeChild(node);
-      return next;
-    }
-
-    var view = display.view, lineN = display.viewFrom;
-    // Loop over the elements in the view, syncing cur (the DOM nodes
-    // in display.lineDiv) with the view as we go.
-    for (var i = 0; i < view.length; i++) {
-      var lineView = view[i];
-      if (lineView.hidden) {
-      } else if (!lineView.node) { // Not drawn yet
-        var node = buildLineElement(cm, lineView, lineN, dims);
-        container.insertBefore(node, cur);
-      } else { // Already drawn
-        while (cur != lineView.node) cur = rm(cur);
-        var updateNumber = lineNumbers && updateNumbersFrom != null &&
-          updateNumbersFrom <= lineN && lineView.lineNumber;
-        if (lineView.changes) {
-          if (indexOf(lineView.changes, "gutter") > -1) updateNumber = false;
-          updateLineForChanges(cm, lineView, lineN, dims);
-        }
-        if (updateNumber) {
-          removeChildren(lineView.lineNumber);
-          lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));
-        }
-        cur = lineView.node.nextSibling;
-      }
-      lineN += lineView.size;
-    }
-    while (cur) cur = rm(cur);
-  }
-
-  // When an aspect of a line changes, a string is added to
-  // lineView.changes. This updates the relevant part of the line's
-  // DOM structure.
-  function updateLineForChanges(cm, lineView, lineN, dims) {
-    for (var j = 0; j < lineView.changes.length; j++) {
-      var type = lineView.changes[j];
-      if (type == "text") updateLineText(cm, lineView);
-      else if (type == "gutter") updateLineGutter(cm, lineView, lineN, dims);
-      else if (type == "class") updateLineClasses(lineView);
-      else if (type == "widget") updateLineWidgets(lineView, dims);
-    }
-    lineView.changes = null;
-  }
-
-  // Lines with gutter elements, widgets or a background class need to
-  // be wrapped, and have the extra elements added to the wrapper div
-  function ensureLineWrapped(lineView) {
-    if (lineView.node == lineView.text) {
-      lineView.node = elt("div", null, null, "position: relative");
-      if (lineView.text.parentNode)
-        lineView.text.parentNode.replaceChild(lineView.node, lineView.text);
-      lineView.node.appendChild(lineView.text);
-      if (ie && ie_version < 8) lineView.node.style.zIndex = 2;
-    }
-    return lineView.node;
-  }
-
-  function updateLineBackground(lineView) {
-    var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass;
-    if (cls) cls += " CodeMirror-linebackground";
-    if (lineView.background) {
-      if (cls) lineView.background.className = cls;
-      else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }
-    } else if (cls) {
-      var wrap = ensureLineWrapped(lineView);
-      lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild);
-    }
-  }
-
-  // Wrapper around buildLineContent which will reuse the structure
-  // in display.externalMeasured when possible.
-  function getLineContent(cm, lineView) {
-    var ext = cm.display.externalMeasured;
-    if (ext && ext.line == lineView.line) {
-      cm.display.externalMeasured = null;
-      lineView.measure = ext.measure;
-      return ext.built;
-    }
-    return buildLineContent(cm, lineView);
-  }
-
-  // Redraw the line's text. Interacts with the background and text
-  // classes because the mode may output tokens that influence these
-  // classes.
-  function updateLineText(cm, lineView) {
-    var cls = lineView.text.className;
-    var built = getLineContent(cm, lineView);
-    if (lineView.text == lineView.node) lineView.node = built.pre;
-    lineView.text.parentNode.replaceChild(built.pre, lineView.text);
-    lineView.text = built.pre;
-    if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {
-      lineView.bgClass = built.bgClass;
-      lineView.textClass = built.textClass;
-      updateLineClasses(lineView);
-    } else if (cls) {
-      lineView.text.className = cls;
-    }
-  }
-
-  function updateLineClasses(lineView) {
-    updateLineBackground(lineView);
-    if (lineView.line.wrapClass)
-      ensureLineWrapped(lineView).className = lineView.line.wrapClass;
-    else if (lineView.node != lineView.text)
-      lineView.node.className = "";
-    var textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass;
-    lineView.text.className = textClass || "";
-  }
-
-  function updateLineGutter(cm, lineView, lineN, dims) {
-    if (lineView.gutter) {
-      lineView.node.removeChild(lineView.gutter);
-      lineView.gutter = null;
-    }
-    var markers = lineView.line.gutterMarkers;
-    if (cm.options.lineNumbers || markers) {
-      var wrap = ensureLineWrapped(lineView);
-      var gutterWrap = lineView.gutter =
-        wrap.insertBefore(elt("div", null, "CodeMirror-gutter-wrapper", "left: " +
-                              (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) +
-                              "px; width: " + dims.gutterTotalWidth + "px"),
-                          lineView.text);
-      if (lineView.line.gutterClass)
-        gutterWrap.className += " " + lineView.line.gutterClass;
-      if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"]))
-        lineView.lineNumber = gutterWrap.appendChild(
-          elt("div", lineNumberFor(cm.options, lineN),
-              "CodeMirror-linenumber CodeMirror-gutter-elt",
-              "left: " + dims.gutterLeft["CodeMirror-linenumbers"] + "px; width: "
-              + cm.display.lineNumInnerWidth + "px"));
-      if (markers) for (var k = 0; k < cm.options.gutters.length; ++k) {
-        var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id];
-        if (found)
-          gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt", "left: " +
-                                     dims.gutterLeft[id] + "px; width: " + dims.gutterWidth[id] + "px"));
-      }
-    }
-  }
-
-  function updateLineWidgets(lineView, dims) {
-    if (lineView.alignable) lineView.alignable = null;
-    for (var node = lineView.node.firstChild, next; node; node = next) {
-      var next = node.nextSibling;
-      if (node.className == "CodeMirror-linewidget")
-        lineView.node.removeChild(node);
-    }
-    insertLineWidgets(lineView, dims);
-  }
-
-  // Build a line's DOM representation from scratch
-  function buildLineElement(cm, lineView, lineN, dims) {
-    var built = getLineContent(cm, lineView);
-    lineView.text = lineView.node = built.pre;
-    if (built.bgClass) lineView.bgClass = built.bgClass;
-    if (built.textClass) lineView.textClass = built.textClass;
-
-    updateLineClasses(lineView);
-    updateLineGutter(cm, lineView, lineN, dims);
-    insertLineWidgets(lineView, dims);
-    return lineView.node;
-  }
-
-  // A lineView may contain multiple logical lines (when merged by
-  // collapsed spans). The widgets for all of them need to be drawn.
-  function insertLineWidgets(lineView, dims) {
-    insertLineWidgetsFor(lineView.line, lineView, dims, true);
-    if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++)
-      insertLineWidgetsFor(lineView.rest[i], lineView, dims, false);
-  }
-
-  function insertLineWidgetsFor(line, lineView, dims, allowAbove) {
-    if (!line.widgets) return;
-    var wrap = ensureLineWrapped(lineView);
-    for (var i = 0, ws = line.widgets; i < ws.length; ++i) {
-      var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget");
-      if (!widget.handleMouseEvents) node.setAttribute("cm-ignore-events", "true");
-      positionLineWidget(widget, node, lineView, dims);
-      if (allowAbove && widget.above)
-        wrap.insertBefore(node, lineView.gutter || lineView.text);
-      else
-        wrap.appendChild(node);
-      signalLater(widget, "redraw");
-    }
-  }
-
-  function positionLineWidget(widget, node, lineView, dims) {
-    if (widget.noHScroll) {
-      (lineView.alignable || (lineView.alignable = [])).push(node);
-      var width = dims.wrapperWidth;
-      node.style.left = dims.fixedPos + "px";
-      if (!widget.coverGutter) {
-        width -= dims.gutterTotalWidth;
-        node.style.paddingLeft = dims.gutterTotalWidth + "px";
-      }
-      node.style.width = width + "px";
-    }
-    if (widget.coverGutter) {
-      node.style.zIndex = 5;
-      node.style.position = "relative";
-      if (!widget.noHScroll) node.style.marginLeft = -dims.gutterTotalWidth + "px";
-    }
-  }
-
-  // POSITION OBJECT
-
-  // A Pos instance represents a position within the text.
-  var Pos = CodeMirror.Pos = function(line, ch) {
-    if (!(this instanceof Pos)) return new Pos(line, ch);
-    this.line = line; this.ch = ch;
-  };
-
-  // Compare two positions, return 0 if they are the same, a negative
-  // number when a is less, and a positive number otherwise.
-  var cmp = CodeMirror.cmpPos = function(a, b) { return a.line - b.line || a.ch - b.ch; };
-
-  function copyPos(x) {return Pos(x.line, x.ch);}
-  function maxPos(a, b) { return cmp(a, b) < 0 ? b : a; }
-  function minPos(a, b) { return cmp(a, b) < 0 ? a : b; }
-
-  // SELECTION / CURSOR
-
-  // Selection objects are immutable. A new one is created every time
-  // the selection changes. A selection is one or more non-overlapping
-  // (and non-touching) ranges, sorted, and an integer that indicates
-  // which one is the primary selection (the one that's scrolled into
-  // view, that getCursor returns, etc).
-  function Selection(ranges, primIndex) {
-    this.ranges = ranges;
-    this.primIndex = primIndex;
-  }
-
-  Selection.prototype = {
-    primary: function() { return this.ranges[this.primIndex]; },
-    equals: function(other) {
-      if (other == this) return true;
-      if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) return false;
-      for (var i = 0; i < this.ranges.length; i++) {
-        var here = this.ranges[i], there = other.ranges[i];
-        if (cmp(here.anchor, there.anchor) != 0 || cmp(here.head, there.head) != 0) return false;
-      }
-      return true;
-    },
-    deepCopy: function() {
-      for (var out = [], i = 0; i < this.ranges.length; i++)
-        out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head));
-      return new Selection(out, this.primIndex);
-    },
-    somethingSelected: function() {
-      for (var i = 0; i < this.ranges.length; i++)
-        if (!this.ranges[i].empty()) return true;
-      return false;
-    },
-    contains: function(pos, end) {
-      if (!end) end = pos;
-      for (var i = 0; i < this.ranges.length; i++) {
-        var range = this.ranges[i];
-        if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0)
-          return i;
-      }
-      return -1;
-    }
-  };
-
-  function Range(anchor, head) {
-    this.anchor = anchor; this.head = head;
-  }
-
-  Range.prototype = {
-    from: function() { return minPos(this.anchor, this.head); },
-    to: function() { return maxPos(this.anchor, this.head); },
-    empty: function() {
-      return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch;
-    }
-  };
-
-  // Take an unsorted, potentially overlapping set of ranges, and
-  // build a selection out of it. 'Consumes' ranges array (modifying
-  // it).
-  function normalizeSelection(ranges, primIndex) {
-    var prim = ranges[primIndex];
-    ranges.sort(function(a, b) { return cmp(a.from(), b.from()); });
-    primIndex = indexOf(ranges, prim);
-    for (var i = 1; i < ranges.length; i++) {
-      var cur = ranges[i], prev = ranges[i - 1];
-      if (cmp(prev.to(), cur.from()) >= 0) {
-        var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to());
-        var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head;
-        if (i <= primIndex) --primIndex;
-        ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to));
-      }
-    }
-    return new Selection(ranges, primIndex);
-  }
-
-  function simpleSelection(anchor, head) {
-    return new Selection([new Range(anchor, head || anchor)], 0);
-  }
-
-  // Most of the external API clips given positions to make sure they
-  // actually exist within the document.
-  function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1));}
-  function clipPos(doc, pos) {
-    if (pos.line < doc.first) return Pos(doc.first, 0);
-    var last = doc.first + doc.size - 1;
-    if (pos.line > last) return Pos(last, getLine(doc, last).text.length);
-    return clipToLen(pos, getLine(doc, pos.line).text.length);
-  }
-  function clipToLen(pos, linelen) {
-    var ch = pos.ch;
-    if (ch == null || ch > linelen) return Pos(pos.line, linelen);
-    else if (ch < 0) return Pos(pos.line, 0);
-    else return pos;
-  }
-  function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size;}
-  function clipPosArray(doc, array) {
-    for (var out = [], i = 0; i < array.length; i++) out[i] = clipPos(doc, array[i]);
-    return out;
-  }
-
-  // SELECTION UPDATES
-
-  // The 'scroll' parameter given to many of these indicated whether
-  // the new cursor position should be scrolled into view after
-  // modifying the selection.
-
-  // If shift is held or the extend flag is set, extends a range to
-  // include a given position (and optionally a second position).
-  // Otherwise, simply returns the range between the given positions.
-  // Used for cursor motion and such.
-  function extendRange(doc, range, head, other) {
-    if (doc.cm && doc.cm.display.shift || doc.extend) {
-      var anchor = range.anchor;
-      if (other) {
-        var posBefore = cmp(head, anchor) < 0;
-        if (posBefore != (cmp(other, anchor) < 0)) {
-          anchor = head;
-          head = other;
-        } else if (posBefore != (cmp(head, other) < 0)) {
-          head = other;
-        }
-      }
-      return new Range(anchor, head);
-    } else {
-      return new Range(other || head, head);
-    }
-  }
-
-  // Extend the primary selection range, discard the rest.
-  function extendSelection(doc, head, other, options) {
-    setSelection(doc, new Selection([extendRange(doc, doc.sel.primary(), head, other)], 0), options);
-  }
-
-  // Extend all selections (pos is an array of selections with length
-  // equal the number of selections)
-  function extendSelections(doc, heads, options) {
-    for (var out = [], i = 0; i < doc.sel.ranges.length; i++)
-      out[i] = extendRange(doc, doc.sel.ranges[i], heads[i], null);
-    var newSel = normalizeSelection(out, doc.sel.primIndex);
-    setSelection(doc, newSel, options);
-  }
-
-  // Updates a single range in the selection.
-  function replaceOneSelection(doc, i, range, options) {
-    var ranges = doc.sel.ranges.slice(0);
-    ranges[i] = range;
-    setSelection(doc, normalizeSelection(ranges, doc.sel.primIndex), options);
-  }
-
-  // Reset the selection to a single range.
-  function setSimpleSelection(doc, anchor, head, options) {
-    setSelection(doc, simpleSelection(anchor, head), options);
-  }
-
-  // Give beforeSelectionChange handlers a change to influence a
-  // selection update.
-  function filterSelectionChange(doc, sel) {
-    var obj = {
-      ranges: sel.ranges,
-      update: function(ranges) {
-        this.ranges = [];
-        for (var i = 0; i < ranges.length; i++)
-          this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),
-                                     clipPos(doc, ranges[i].head));
-      }
-    };
-    signal(doc, "beforeSelectionChange", doc, obj);
-    if (doc.cm) signal(doc.cm, "beforeSelectionChange", doc.cm, obj);
-    if (obj.ranges != sel.ranges) return normalizeSelection(obj.ranges, obj.ranges.length - 1);
-    else return sel;
-  }
-
-  function setSelectionReplaceHistory(doc, sel, options) {
-    var done = doc.history.done, last = lst(done);
-    if (last && last.ranges) {
-      done[done.length - 1] = sel;
-      setSelectionNoUndo(doc, sel, options);
-    } else {
-      setSelection(doc, sel, options);
-    }
-  }
-
-  // Set a new selection.
-  function setSelection(doc, sel, options) {
-    setSelectionNoUndo(doc, sel, options);
-    addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options);
-  }
-
-  function setSelectionNoUndo(doc, sel, options) {
-    if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange"))
-      sel = filterSelectionChange(doc, sel);
-
-    var bias = options && options.bias ||
-      (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);
-    setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));
-
-    if (!(options && options.scroll === false) && doc.cm)
-      ensureCursorVisible(doc.cm);
-  }
-
-  function setSelectionInner(doc, sel) {
-    if (sel.equals(doc.sel)) return;
-
-    doc.sel = sel;
-
-    if (doc.cm) {
-      doc.cm.curOp.updateInput = doc.cm.curOp.selectionChanged = true;
-      signalCursorActivity(doc.cm);
-    }
-    signalLater(doc, "cursorActivity", doc);
-  }
-
-  // Verify that the selection does not partially select any atomic
-  // marked ranges.
-  function reCheckSelection(doc) {
-    setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false), sel_dontScroll);
-  }
-
-  // Return a selection that does not partially select any atomic
-  // ranges.
-  function skipAtomicInSelection(doc, sel, bias, mayClear) {
-    var out;
-    for (var i = 0; i < sel.ranges.length; i++) {
-      var range = sel.ranges[i];
-      var newAnchor = skipAtomic(doc, range.anchor, bias, mayClear);
-      var newHead = skipAtomic(doc, range.head, bias, mayClear);
-      if (out || newAnchor != range.anchor || newHead != range.head) {
-        if (!out) out = sel.ranges.slice(0, i);
-        out[i] = new Range(newAnchor, newHead);
-      }
-    }
-    return out ? normalizeSelection(out, sel.primIndex) : sel;
-  }
-
-  // Ensure a given position is not inside an atomic range.
-  function skipAtomic(doc, pos, bias, mayClear) {
-    var flipped = false, curPos = pos;
-    var dir = bias || 1;
-    doc.cantEdit = false;
-    search: for (;;) {
-      var line = getLine(doc, curPos.line);
-      if (line.markedSpans) {
-        for (var i = 0; i < line.markedSpans.length; ++i) {
-          var sp = line.markedSpans[i], m = sp.marker;
-          if ((sp.from == null || (m.inclusiveLeft ? sp.from <= curPos.ch : sp.from < curPos.ch)) &&
-              (sp.to == null || (m.inclusiveRight ? sp.to >= curPos.ch : sp.to > curPos.ch))) {
-            if (mayClear) {
-              signal(m, "beforeCursorEnter");
-              if (m.explicitlyCleared) {
-                if (!line.markedSpans) break;
-                else {--i; continue;}
-              }
-            }
-            if (!m.atomic) continue;
-            var newPos = m.find(dir < 0 ? -1 : 1);
-            if (cmp(newPos, curPos) == 0) {
-              newPos.ch += dir;
-              if (newPos.ch < 0) {
-                if (newPos.line > doc.first) newPos = clipPos(doc, Pos(newPos.line - 1));
-                else newPos = null;
-              } else if (newPos.ch > line.text.length) {
-                if (newPos.line < doc.first + doc.size - 1) newPos = Pos(newPos.line + 1, 0);
-                else newPos = null;
-              }
-              if (!newPos) {
-                if (flipped) {
-                  // Driven in a corner -- no valid cursor position found at all
-                  // -- try again *with* clearing, if we didn't already
-                  if (!mayClear) return skipAtomic(doc, pos, bias, true);
-                  // Otherwise, turn off editing until further notice, and return the start of the doc
-                  doc.cantEdit = true;
-                  return Pos(doc.first, 0);
-                }
-                flipped = true; newPos = pos; dir = -dir;
-              }
-            }
-            curPos = newPos;
-            continue search;
-          }
-        }
-      }
-      return curPos;
-    }
-  }
-
-  // SELECTION DRAWING
-
-  // Redraw the selection and/or cursor
-  function drawSelection(cm) {
-    var display = cm.display, doc = cm.doc, result = {};
-    var curFragment = result.cursors = document.createDocumentFragment();
-    var selFragment = result.selection = document.createDocumentFragment();
-
-    for (var i = 0; i < doc.sel.ranges.length; i++) {
-      var range = doc.sel.ranges[i];
-      var collapsed = range.empty();
-      if (collapsed || cm.options.showCursorWhenSelecting)
-        drawSelectionCursor(cm, range, curFragment);
-      if (!collapsed)
-        drawSelectionRange(cm, range, selFragment);
-    }
-
-    // Move the hidden textarea near the cursor to prevent scrolling artifacts
-    if (cm.options.moveInputWithCursor) {
-      var headPos = cursorCoords(cm, doc.sel.primary().head, "div");
-      var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();
-      result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,
-                                          headPos.top + lineOff.top - wrapOff.top));
-      result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,
-                                           headPos.left + lineOff.left - wrapOff.left));
-    }
-
-    return result;
-  }
-
-  function showSelection(cm, drawn) {
-    removeChildrenAndAdd(cm.display.cursorDiv, drawn.cursors);
-    removeChildrenAndAdd(cm.display.selectionDiv, drawn.selection);
-    if (drawn.teTop != null) {
-      cm.display.inputDiv.style.top = drawn.teTop + "px";
-      cm.display.inputDiv.style.left = drawn.teLeft + "px";
-    }
-  }
-
-  function updateSelection(cm) {
-    showSelection(cm, drawSelection(cm));
-  }
-
-  // Draws a cursor for the given range
-  function drawSelectionCursor(cm, range, output) {
-    var pos = cursorCoords(cm, range.head, "div", null, null, !cm.options.singleCursorHeightPerLine);
-
-    var cursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor"));
-    cursor.style.left = pos.left + "px";
-    cursor.style.top = pos.top + "px";
-    cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px";
-
-    if (pos.other) {
-      // Secondary cursor, shown when on a 'jump' in bi-directional text
-      var otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor"));
-      otherCursor.style.display = "";
-      otherCursor.style.left = pos.other.left + "px";
-      otherCursor.style.top = pos.other.top + "px";
-      otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px";
-    }
-  }
-
-  // Draws the given range as a highlighted selection
-  function drawSelectionRange(cm, range, output) {
-    var display = cm.display, doc = cm.doc;
-    var fragment = document.createDocumentFragment();
-    var padding = paddingH(cm.display), leftSide = padding.left;
-    var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;
-
-    function add(left, top, width, bottom) {
-      if (top < 0) top = 0;
-      top = Math.round(top);
-      bottom = Math.round(bottom);
-      fragment.appendChild(elt("div", null, "CodeMirror-selected", "position: absolute; left: " + left +
-                               "px; top: " + top + "px; width: " + (width == null ? rightSide - left : width) +
-                               "px; height: " + (bottom - top) + "px"));
-    }
-
-    function drawForLine(line, fromArg, toArg) {
-      var lineObj = getLine(doc, line);
-      var lineLen = lineObj.text.length;
-      var start, end;
-      function coords(ch, bias) {
-        return charCoords(cm, Pos(line, ch), "div", lineObj, bias);
-      }
-
-      iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) {
-        var leftPos = coords(from, "left"), rightPos, left, right;
-        if (from == to) {
-          rightPos = leftPos;
-          left = right = leftPos.left;
-        } else {
-          rightPos = coords(to - 1, "right");
-          if (dir == "rtl") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; }
-          left = leftPos.left;
-          right = rightPos.right;
-        }
-        if (fromArg == null && from == 0) left = leftSide;
-        if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part
-          add(left, leftPos.top, null, leftPos.bottom);
-          left = leftSide;
-          if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top);
-        }
-        if (toArg == null && to == lineLen) right = rightSide;
-        if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left)
-          start = leftPos;
-        if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right)
-          end = rightPos;
-        if (left < leftSide + 1) left = leftSide;
-        add(left, rightPos.top, right - left, rightPos.bottom);
-      });
-      return {start: start, end: end};
-    }
-
-    var sFrom = range.from(), sTo = range.to();
-    if (sFrom.line == sTo.line) {
-      drawForLine(sFrom.line, sFrom.ch, sTo.ch);
-    } else {
-      var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);
-      var singleVLine = visualLine(fromLine) == visualLine(toLine);
-      var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;
-      var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;
-      if (singleVLine) {
-        if (leftEnd.top < rightStart.top - 2) {
-          add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);
-          add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);
-        } else {
-          add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);
-        }
-      }
-      if (leftEnd.bottom < rightStart.top)
-        add(leftSide, leftEnd.bottom, null, rightStart.top);
-    }
-
-    output.appendChild(fragment);
-  }
-
-  // Cursor-blinking
-  function restartBlink(cm) {
-    if (!cm.state.focused) return;
-    var display = cm.display;
-    clearInterval(display.blinker);
-    var on = true;
-    display.cursorDiv.style.visibility = "";
-    if (cm.options.cursorBlinkRate > 0)
-      display.blinker = setInterval(function() {
-        display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden";
-      }, cm.options.cursorBlinkRate);
-    else if (cm.options.cursorBlinkRate < 0)
-      display.cursorDiv.style.visibility = "hidden";
-  }
-
-  // HIGHLIGHT WORKER
-
-  function startWorker(cm, time) {
-    if (cm.doc.mode.startState && cm.doc.frontier < cm.display.viewTo)
-      cm.state.highlight.set(time, bind(highlightWorker, cm));
-  }
-
-  function highlightWorker(cm) {
-    var doc = cm.doc;
-    if (doc.frontier < doc.first) doc.frontier = doc.first;
-    if (doc.frontier >= cm.display.viewTo) return;
-    var end = +new Date + cm.options.workTime;
-    var state = copyState(doc.mode, getStateBefore(cm, doc.frontier));
-    var changedLines = [];
-
-    doc.iter(doc.frontier, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function(line) {
-      if (doc.frontier >= cm.display.viewFrom) { // Visible
-        var oldStyles = line.styles;
-        var highlighted = highlightLine(cm, line, state, true);
-        line.styles = highlighted.styles;
-        var oldCls = line.styleClasses, newCls = highlighted.classes;
-        if (newCls) line.styleClasses = newCls;
-        else if (oldCls) line.styleClasses = null;
-        var ischange = !oldStyles || oldStyles.length != line.styles.length ||
-          oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass);
-        for (var i = 0; !ischange && i < oldStyles.length; ++i) ischange = oldStyles[i] != line.styles[i];
-        if (ischange) changedLines.push(doc.frontier);
-        line.stateAfter = copyState(doc.mode, state);
-      } else {
-        processLine(cm, line.text, state);
-        line.stateAfter = doc.frontier % 5 == 0 ? copyState(doc.mode, state) : null;
-      }
-      ++doc.frontier;
-      if (+new Date > end) {
-        startWorker(cm, cm.options.workDelay);
-        return true;
-      }
-    });
-    if (changedLines.length) runInOp(cm, function() {
-      for (var i = 0; i < changedLines.length; i++)
-        regLineChange(cm, changedLines[i], "text");
-    });
-  }
-
-  // Finds the line to start with when starting a parse. Tries to
-  // find a line with a stateAfter, so that it can start with a
-  // valid state. If that fails, it returns the line with the
-  // smallest indentation, which tends to need the least context to
-  // parse correctly.
-  function findStartLine(cm, n, precise) {
-    var minindent, minline, doc = cm.doc;
-    var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);
-    for (var search = n; search > lim; --search) {
-      if (search <= doc.first) return doc.first;
-      var line = getLine(doc, search - 1);
-      if (line.stateAfter && (!precise || search <= doc.frontier)) return search;
-      var indented = countColumn(line.text, null, cm.options.tabSize);
-      if (minline == null || minindent > indented) {
-        minline = search - 1;
-        minindent = indented;
-      }
-    }
-    return minline;
-  }
-
-  function getStateBefore(cm, n, precise) {
-    var doc = cm.doc, display = cm.display;
-    if (!doc.mode.startState) return true;
-    var pos = findStartLine(cm, n, precise), state = pos > doc.first && getLine(doc, pos-1).stateAfter;
-    if (!state) state = startState(doc.mode);
-    else state = copyState(doc.mode, state);
-    doc.iter(pos, n, function(line) {
-      processLine(cm, line.text, state);
-      var save = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo;
-      line.stateAfter = save ? copyState(doc.mode, state) : null;
-      ++pos;
-    });
-    if (precise) doc.frontier = pos;
-    return state;
-  }
-
-  // POSITION MEASUREMENT
-
-  function paddingTop(display) {return display.lineSpace.offsetTop;}
-  function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight;}
-  function paddingH(display) {
-    if (display.cachedPaddingH) return display.cachedPaddingH;
-    var e = removeChildrenAndAdd(display.measure, elt("pre", "x"));
-    var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;
-    var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};
-    if (!isNaN(data.left) && !isNaN(data.right)) display.cachedPaddingH = data;
-    return data;
-  }
-
-  function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth; }
-  function displayWidth(cm) {
-    return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth;
-  }
-  function displayHeight(cm) {
-    return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight;
-  }
-
-  // Ensure the lineView.wrapping.heights array is populated. This is
-  // an array of bottom offsets for the lines that make up a drawn
-  // line. When lineWrapping is on, there might be more than one
-  // height.
-  function ensureLineHeights(cm, lineView, rect) {
-    var wrapping = cm.options.lineWrapping;
-    var curWidth = wrapping && displayWidth(cm);
-    if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {
-      var heights = lineView.measure.heights = [];
-      if (wrapping) {
-        lineView.measure.width = curWidth;
-        var rects = lineView.text.firstChild.getClientRects();
-        for (var i = 0; i < rects.length - 1; i++) {
-          var cur = rects[i], next = rects[i + 1];
-          if (Math.abs(cur.bottom - next.bottom) > 2)
-            heights.push((cur.bottom + next.top) / 2 - rect.top);
-        }
-      }
-      heights.push(rect.bottom - rect.top);
-    }
-  }
-
-  // Find a line map (mapping character offsets to text nodes) and a
-  // measurement cache for the given line number. (A line view might
-  // contain multiple lines when collapsed ranges are present.)
-  function mapFromLineView(lineView, line, lineN) {
-    if (lineView.line == line)
-      return {map: lineView.measure.map, cache: lineView.measure.cache};
-    for (var i = 0; i < lineView.rest.length; i++)
-      if (lineView.rest[i] == line)
-        return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]};
-    for (var i = 0; i < lineView.rest.length; i++)
-      if (lineNo(lineView.rest[i]) > lineN)
-        return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i], before: true};
-  }
-
-  // Render a line into the hidden node display.externalMeasured. Used
-  // when measurement is needed for a line that's not in the viewport.
-  function updateExternalMeasurement(cm, line) {
-    line = visualLine(line);
-    var lineN = lineNo(line);
-    var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);
-    view.lineN = lineN;
-    var built = view.built = buildLineContent(cm, view);
-    view.text = built.pre;
-    removeChildrenAndAdd(cm.display.lineMeasure, built.pre);
-    return view;
-  }
-
-  // Get a {top, bottom, left, right} box (in line-local coordinates)
-  // for a given character.
-  function measureChar(cm, line, ch, bias) {
-    return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias);
-  }
-
-  // Find a line view that corresponds to the given line number.
-  function findViewForLine(cm, lineN) {
-    if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)
-      return cm.display.view[findViewIndex(cm, lineN)];
-    var ext = cm.display.externalMeasured;
-    if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)
-      return ext;
-  }
-
-  // Measurement can be split in two steps, the set-up work that
-  // applies to the whole line, and the measurement of the actual
-  // character. Functions like coordsChar, that need to do a lot of
-  // measurements in a row, can thus ensure that the set-up work is
-  // only done once.
-  function prepareMeasureForLine(cm, line) {
-    var lineN = lineNo(line);
-    var view = findViewForLine(cm, lineN);
-    if (view && !view.text)
-      view = null;
-    else if (view && view.changes)
-      updateLineForChanges(cm, view, lineN, getDimensions(cm));
-    if (!view)
-      view = updateExternalMeasurement(cm, line);
-
-    var info = mapFromLineView(view, line, lineN);
-    return {
-      line: line, view: view, rect: null,
-      map: info.map, cache: info.cache, before: info.before,
-      hasHeights: false
-    };
-  }
-
-  // Given a prepared measurement object, measures the position of an
-  // actual character (or fetches it from the cache).
-  function measureCharPrepared(cm, prepared, ch, bias, varHeight) {
-    if (prepared.before) ch = -1;
-    var key = ch + (bias || ""), found;
-    if (prepared.cache.hasOwnProperty(key)) {
-      found = prepared.cache[key];
-    } else {
-      if (!prepared.rect)
-        prepared.rect = prepared.view.text.getBoundingClientRect();
-      if (!prepared.hasHeights) {
-        ensureLineHeights(cm, prepared.view, prepared.rect);
-        prepared.hasHeights = true;
-      }
-      found = measureCharInner(cm, prepared, ch, bias);
-      if (!found.bogus) prepared.cache[key] = found;
-    }
-    return {left: found.left, right: found.right,
-            top: varHeight ? found.rtop : found.top,
-            bottom: varHeight ? found.rbottom : found.bottom};
-  }
-
-  var nullRect = {left: 0, right: 0, top: 0, bottom: 0};
-
-  function measureCharInner(cm, prepared, ch, bias) {
-    var map = prepared.map;
-
-    var node, start, end, collapse;
-    // First, search the line map for the text node corresponding to,
-    // or closest to, the target character.
-    for (var i = 0; i < map.length; i += 3) {
-      var mStart = map[i], mEnd = map[i + 1];
-      if (ch < mStart) {
-        start = 0; end = 1;
-        collapse = "left";
-      } else if (ch < mEnd) {
-        start = ch - mStart;
-        end = start + 1;
-      } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) {
-        end = mEnd - mStart;
-        start = end - 1;
-        if (ch >= mEnd) collapse = "right";
-      }
-      if (start != null) {
-        node = map[i + 2];
-        if (mStart == mEnd && bias == (node.insertLeft ? "left" : "right"))
-          collapse = bias;
-        if (bias == "left" && start == 0)
-          while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) {
-            node = map[(i -= 3) + 2];
-            collapse = "left";
-          }
-        if (bias == "right" && start == mEnd - mStart)
-          while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) {
-            node = map[(i += 3) + 2];
-            collapse = "right";
-          }
-        break;
-      }
-    }
-
-    var rect;
-    if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.
-      for (var i = 0; i < 4; i++) { // Retry a maximum of 4 times when nonsense rectangles are returned
-        while (start && isExtendingChar(prepared.line.text.charAt(mStart + start))) --start;
-        while (mStart + end < mEnd && isExtendingChar(prepared.line.text.charAt(mStart + end))) ++end;
-        if (ie && ie_version < 9 && start == 0 && end == mEnd - mStart) {
-          rect = node.parentNode.getBoundingClientRect();
-        } else if (ie && cm.options.lineWrapping) {
-          var rects = range(node, start, end).getClientRects();
-          if (rects.length)
-            rect = rects[bias == "right" ? rects.length - 1 : 0];
-          else
-            rect = nullRect;
-        } else {
-          rect = range(node, start, end).getBoundingClientRect() || nullRect;
-        }
-        if (rect.left || rect.right || start == 0) break;
-        end = start;
-        start = start - 1;
-        collapse = "right";
-      }
-      if (ie && ie_version < 11) rect = maybeUpdateRectForZooming(cm.display.measure, rect);
-    } else { // If it is a widget, simply get the box for the whole widget.
-      if (start > 0) collapse = bias = "right";
-      var rects;
-      if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1)
-        rect = rects[bias == "right" ? rects.length - 1 : 0];
-      else
-        rect = node.getBoundingClientRect();
-    }
-    if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {
-      var rSpan = node.parentNode.getClientRects()[0];
-      if (rSpan)
-        rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom};
-      else
-        rect = nullRect;
-    }
-
-    var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top;
-    var mid = (rtop + rbot) / 2;
-    var heights = prepared.view.measure.heights;
-    for (var i = 0; i < heights.length - 1; i++)
-      if (mid < heights[i]) break;
-    var top = i ? heights[i - 1] : 0, bot = heights[i];
-    var result = {left: (collapse == "right" ? rect.right : rect.left) - prepared.rect.left,
-                  right: (collapse == "left" ? rect.left : rect.right) - prepared.rect.left,
-                  top: top, bottom: bot};
-    if (!rect.left && !rect.right) result.bogus = true;
-    if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; }
-
-    return result;
-  }
-
-  // Work around problem with bounding client rects on ranges being
-  // returned incorrectly when zoomed on IE10 and below.
-  function maybeUpdateRectForZooming(measure, rect) {
-    if (!window.screen || screen.logicalXDPI == null ||
-        screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))
-      return rect;
-    var scaleX = screen.logicalXDPI / screen.deviceXDPI;
-    var scaleY = screen.logicalYDPI / screen.deviceYDPI;
-    return {left: rect.left * scaleX, right: rect.right * scaleX,
-            top: rect.top * scaleY, bottom: rect.bottom * scaleY};
-  }
-
-  function clearLineMeasurementCacheFor(lineView) {
-    if (lineView.measure) {
-      lineView.measure.cache = {};
-      lineView.measure.heights = null;
-      if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++)
-        lineView.measure.caches[i] = {};
-    }
-  }
-
-  function clearLineMeasurementCache(cm) {
-    cm.display.externalMeasure = null;
-    removeChildren(cm.display.lineMeasure);
-    for (var i = 0; i < cm.display.view.length; i++)
-      clearLineMeasurementCacheFor(cm.display.view[i]);
-  }
-
-  function clearCaches(cm) {
-    clearLineMeasurementCache(cm);
-    cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;
-    if (!cm.options.lineWrapping) cm.display.maxLineChanged = true;
-    cm.display.lineNumChars = null;
-  }
-
-  function pageScrollX() { return window.pageXOffset || (document.documentElement || document.body).scrollLeft; }
-  function pageScrollY() { return window.pageYOffset || (document.documentElement || document.body).scrollTop; }
-
-  // Converts a {top, bottom, left, right} box from line-local
-  // coordinates into another coordinate system. Context may be one of
-  // "line", "div" (display.lineDiv), "local"/null (editor), or "page".
-  function intoCoordSystem(cm, lineObj, rect, context) {
-    if (lineObj.widgets) for (var i = 0; i < lineObj.widgets.length; ++i) if (lineObj.widgets[i].above) {
-      var size = widgetHeight(lineObj.widgets[i]);
-      rect.top += size; rect.bottom += size;
-    }
-    if (context == "line") return rect;
-    if (!context) context = "local";
-    var yOff = heightAtLine(lineObj);
-    if (context == "local") yOff += paddingTop(cm.display);
-    else yOff -= cm.display.viewOffset;
-    if (context == "page" || context == "window") {
-      var lOff = cm.display.lineSpace.getBoundingClientRect();
-      yOff += lOff.top + (context == "window" ? 0 : pageScrollY());
-      var xOff = lOff.left + (context == "window" ? 0 : pageScrollX());
-      rect.left += xOff; rect.right += xOff;
-    }
-    rect.top += yOff; rect.bottom += yOff;
-    return rect;
-  }
-
-  // Coverts a box from "div" coords to another coordinate system.
-  // Context may be "window", "page", "div", or "local"/null.
-  function fromCoordSystem(cm, coords, context) {
-    if (context == "div") return coords;
-    var left = coords.left, top = coords.top;
-    // First move into "page" coordinate system
-    if (context == "page") {
-      left -= pageScrollX();
-      top -= pageScrollY();
-    } else if (context == "local" || !context) {
-      var localBox = cm.display.sizer.getBoundingClientRect();
-      left += localBox.left;
-      top += localBox.top;
-    }
-
-    var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();
-    return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top};
-  }
-
-  function charCoords(cm, pos, context, lineObj, bias) {
-    if (!lineObj) lineObj = getLine(cm.doc, pos.line);
-    return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context);
-  }
-
-  // Returns a box for a given cursor position, which may have an
-  // 'other' property containing the position of the secondary cursor
-  // on a bidi boundary.
-  function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {
-    lineObj = lineObj || getLine(cm.doc, pos.line);
-    if (!preparedMeasure) preparedMeasure = prepareMeasureForLine(cm, lineObj);
-    function get(ch, right) {
-      var m = measureCharPrepared(cm, preparedMeasure, ch, right ? "right" : "left", varHeight);
-      if (right) m.left = m.right; else m.right = m.left;
-      return intoCoordSystem(cm, lineObj, m, context);
-    }
-    function getBidi(ch, partPos) {
-      var part = order[partPos], right = part.level % 2;
-      if (ch == bidiLeft(part) && partPos && part.level < order[partPos - 1].level) {
-        part = order[--partPos];
-        ch = bidiRight(part) - (part.level % 2 ? 0 : 1);
-        right = true;
-      } else if (ch == bidiRight(part) && partPos < order.length - 1 && part.level < order[partPos + 1].level) {
-        part = order[++partPos];
-        ch = bidiLeft(part) - part.level % 2;
-        right = false;
-      }
-      if (right && ch == part.to && ch > part.from) return get(ch - 1);
-      return get(ch, right);
-    }
-    var order = getOrder(lineObj), ch = pos.ch;
-    if (!order) return get(ch);
-    var partPos = getBidiPartAt(order, ch);
-    var val = getBidi(ch, partPos);
-    if (bidiOther != null) val.other = getBidi(ch, bidiOther);
-    return val;
-  }
-
-  // Used to cheaply estimate the coordinates for a position. Used for
-  // intermediate scroll updates.
-  function estimateCoords(cm, pos) {
-    var left = 0, pos = clipPos(cm.doc, pos);
-    if (!cm.options.lineWrapping) left = charWidth(cm.display) * pos.ch;
-    var lineObj = getLine(cm.doc, pos.line);
-    var top = heightAtLine(lineObj) + paddingTop(cm.display);
-    return {left: left, right: left, top: top, bottom: top + lineObj.height};
-  }
-
-  // Positions returned by coordsChar contain some extra information.
-  // xRel is the relative x position of the input coordinates compared
-  // to the found position (so xRel > 0 means the coordinates are to
-  // the right of the character position, for example). When outside
-  // is true, that means the coordinates lie outside the line's
-  // vertical range.
-  function PosWithInfo(line, ch, outside, xRel) {
-    var pos = Pos(line, ch);
-    pos.xRel = xRel;
-    if (outside) pos.outside = true;
-    return pos;
-  }
-
-  // Compute the character position closest to the given coordinates.
-  // Input must be lineSpace-local ("div" coordinate system).
-  function coordsChar(cm, x, y) {
-    var doc = cm.doc;
-    y += cm.display.viewOffset;
-    if (y < 0) return PosWithInfo(doc.first, 0, true, -1);
-    var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1;
-    if (lineN > last)
-      return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, true, 1);
-    if (x < 0) x = 0;
-
-    var lineObj = getLine(doc, lineN);
-    for (;;) {
-      var found = coordsCharInner(cm, lineObj, lineN, x, y);
-      var merged = collapsedSpanAtEnd(lineObj);
-      var mergedPos = merged && merged.find(0, true);
-      if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0))
-        lineN = lineNo(lineObj = mergedPos.to.line);
-      else
-        return found;
-    }
-  }
-
-  function coordsCharInner(cm, lineObj, lineNo, x, y) {
-    var innerOff = y - heightAtLine(lineObj);
-    var wrongLine = false, adjust = 2 * cm.display.wrapper.clientWidth;
-    var preparedMeasure = prepareMeasureForLine(cm, lineObj);
-
-    function getX(ch) {
-      var sp = cursorCoords(cm, Pos(lineNo, ch), "line", lineObj, preparedMeasure);
-      wrongLine = true;
-      if (innerOff > sp.bottom) return sp.left - adjust;
-      else if (innerOff < sp.top) return sp.left + adjust;
-      else wrongLine = false;
-      return sp.left;
-    }
-
-    var bidi = getOrder(lineObj), dist = lineObj.text.length;
-    var from = lineLeft(lineObj), to = lineRight(lineObj);
-    var fromX = getX(from), fromOutside = wrongLine, toX = getX(to), toOutside = wrongLine;
-
-    if (x > toX) return PosWithInfo(lineNo, to, toOutside, 1);
-    // Do a binary search between these bounds.
-    for (;;) {
-      if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) {
-        var ch = x < fromX || x - fromX <= toX - x ? from : to;
-        var xDiff = x - (ch == from ? fromX : toX);
-        while (isExtendingChar(lineObj.text.charAt(ch))) ++ch;
-        var pos = PosWithInfo(lineNo, ch, ch == from ? fromOutside : toOutside,
-                              xDiff < -1 ? -1 : xDiff > 1 ? 1 : 0);
-        return pos;
-      }
-      var step = Math.ceil(dist / 2), middle = from + step;
-      if (bidi) {
-        middle = from;
-        for (var i = 0; i < step; ++i) middle = moveVisually(lineObj, middle, 1);
-      }
-      var middleX = getX(middle);
-      if (middleX > x) {to = middle; toX = middleX; if (toOutside = wrongLine) toX += 1000; dist = step;}
-      else {from = middle; fromX = middleX; fromOutside = wrongLine; dist -= step;}
-    }
-  }
-
-  var measureText;
-  // Compute the default text height.
-  function textHeight(display) {
-    if (display.cachedTextHeight != null) return display.cachedTextHeight;
-    if (measureText == null) {
-      measureText = elt("pre");
-      // Measure a bunch of lines, for browsers that compute
-      // fractional heights.
-      for (var i = 0; i < 49; ++i) {
-        measureText.appendChild(document.createTextNode("x"));
-        measureText.appendChild(elt("br"));
-      }
-      measureText.appendChild(document.createTextNode("x"));
-    }
-    removeChildrenAndAdd(display.measure, measureText);
-    var height = measureText.offsetHeight / 50;
-    if (height > 3) display.cachedTextHeight = height;
-    removeChildren(display.measure);
-    return height || 1;
-  }
-
-  // Compute the default character width.
-  function charWidth(display) {
-    if (display.cachedCharWidth != null) return display.cachedCharWidth;
-    var anchor = elt("span", "xxxxxxxxxx");
-    var pre = elt("pre", [anchor]);
-    removeChildrenAndAdd(display.measure, pre);
-    var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;
-    if (width > 2) display.cachedCharWidth = width;
-    return width || 10;
-  }
-
-  // OPERATIONS
-
-  // Operations are used to wrap a series of changes to the editor
-  // state in such a way that each change won't have to update the
-  // cursor and display (which would be awkward, slow, and
-  // error-prone). Instead, display updates are batched and then all
-  // combined and executed at once.
-
-  var operationGroup = null;
-
-  var nextOpId = 0;
-  // Start a new operation.
-  function startOperation(cm) {
-    cm.curOp = {
-      cm: cm,
-      viewChanged: false,      // Flag that indicates that lines might need to be redrawn
-      startHeight: cm.doc.height, // Used to detect need to update scrollbar
-      forceUpdate: false,      // Used to force a redraw
-      updateInput: null,       // Whether to reset the input textarea
-      typing: false,           // Whether this reset should be careful to leave existing text (for compositing)
-      changeObjs: null,        // Accumulated changes, for firing change events
-      cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on
-      cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already
-      selectionChanged: false, // Whether the selection needs to be redrawn
-      updateMaxLine: false,    // Set when the widest line needs to be determined anew
-      scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet
-      scrollToPos: null,       // Used to scroll to a specific position
-      id: ++nextOpId           // Unique ID
-    };
-    if (operationGroup) {
-      operationGroup.ops.push(cm.curOp);
-    } else {
-      cm.curOp.ownsGroup = operationGroup = {
-        ops: [cm.curOp],
-        delayedCallbacks: []
-      };
-    }
-  }
-
-  function fireCallbacksForOps(group) {
-    // Calls delayed callbacks and cursorActivity handlers until no
-    // new ones appear
-    var callbacks = group.delayedCallbacks, i = 0;
-    do {
-      for (; i < callbacks.length; i++)
-        callbacks[i]();
-      for (var j = 0; j < group.ops.length; j++) {
-        var op = group.ops[j];
-        if (op.cursorActivityHandlers)
-          while (op.cursorActivityCalled < op.cursorActivityHandlers.length)
-            op.cursorActivityHandlers[op.cursorActivityCalled++](op.cm);
-      }
-    } while (i < callbacks.length);
-  }
-
-  // Finish an operation, updating the display and signalling delayed events
-  function endOperation(cm) {
-    var op = cm.curOp, group = op.ownsGroup;
-    if (!group) return;
-
-    try { fireCallbacksForOps(group); }
-    finally {
-      operationGroup = null;
-      for (var i = 0; i < group.ops.length; i++)
-        group.ops[i].cm.curOp = null;
-      endOperations(group);
-    }
-  }
-
-  // The DOM updates done when an operation finishes are batched so
-  // that the minimum number of relayouts are required.
-  function endOperations(group) {
-    var ops = group.ops;
-    for (var i = 0; i < ops.length; i++) // Read DOM
-      endOperation_R1(ops[i]);
-    for (var i = 0; i < ops.length; i++) // Write DOM (maybe)
-      endOperation_W1(ops[i]);
-    for (var i = 0; i < ops.length; i++) // Read DOM
-      endOperation_R2(ops[i]);
-    for (var i = 0; i < ops.length; i++) // Write DOM (maybe)
-      endOperation_W2(ops[i]);
-    for (var i = 0; i < ops.length; i++) // Read DOM
-      endOperation_finish(ops[i]);
-  }
-
-  function endOperation_R1(op) {
-    var cm = op.cm, display = cm.display;
-    maybeClipScrollbars(cm);
-    if (op.updateMaxLine) findMaxLine(cm);
-
-    op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null ||
-      op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom ||
-                         op.scrollToPos.to.line >= display.viewTo) ||
-      display.maxLineChanged && cm.options.lineWrapping;
-    op.update = op.mustUpdate &&
-      new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate);
-  }
-
-  function endOperation_W1(op) {
-    op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update);
-  }
-
-  function endOperation_R2(op) {
-    var cm = op.cm, display = cm.display;
-    if (op.updatedDisplay) updateHeightsInViewport(cm);
-
-    op.barMeasure = measureForScrollbars(cm);
-
-    // If the max line changed since it was last measured, measure it,
-    // and ensure the document's width matches it.
-    // updateDisplay_W2 will use these properties to do the actual resizing
-    if (display.maxLineChanged && !cm.options.lineWrapping) {
-      op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;
-      cm.display.sizerWidth = op.adjustWidthTo;
-      op.barMeasure.scrollWidth =
-        Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);
-      op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));
-    }
-
-    if (op.updatedDisplay || op.selectionChanged)
-      op.newSelectionNodes = drawSelection(cm);
-  }
-
-  function endOperation_W2(op) {
-    var cm = op.cm;
-
-    if (op.adjustWidthTo != null) {
-      cm.display.sizer.style.minWidth = op.adjustWidthTo + "px";
-      if (op.maxScrollLeft < cm.doc.scrollLeft)
-        setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true);
-      cm.display.maxLineChanged = false;
-    }
-
-    if (op.newSelectionNodes)
-      showSelection(cm, op.newSelectionNodes);
-    if (op.updatedDisplay)
-      setDocumentHeight(cm, op.barMeasure);
-    if (op.updatedDisplay || op.startHeight != cm.doc.height)
-      updateScrollbars(cm, op.barMeasure);
-
-    if (op.selectionChanged) restartBlink(cm);
-
-    if (cm.state.focused && op.updateInput)
-      resetInput(cm, op.typing);
-  }
-
-  function endOperation_finish(op) {
-    var cm = op.cm, display = cm.display, doc = cm.doc;
-
-    if (op.updatedDisplay) postUpdateDisplay(cm, op.update);
-
-    // Abort mouse wheel delta measurement, when scrolling explicitly
-    if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))
-      display.wheelStartX = display.wheelStartY = null;
-
-    // Propagate the scroll position to the actual DOM scroller
-    if (op.scrollTop != null && (display.scroller.scrollTop != op.scrollTop || op.forceScroll)) {
-      doc.scrollTop = Math.max(0, Math.min(display.scroller.scrollHeight - display.scroller.clientHeight, op.scrollTop));
-      display.scrollbars.setScrollTop(doc.scrollTop);
-      display.scroller.scrollTop = doc.scrollTop;
-    }
-    if (op.scrollLeft != null && (display.scroller.scrollLeft != op.scrollLeft || op.forceScroll)) {
-      doc.scrollLeft = Math.max(0, Math.min(display.scroller.scrollWidth - displayWidth(cm), op.scrollLeft));
-      display.scrollbars.setScrollLeft(doc.scrollLeft);
-      display.scroller.scrollLeft = doc.scrollLeft;
-      alignHorizontally(cm);
-    }
-    // If we need to scroll a specific position into view, do so.
-    if (op.scrollToPos) {
-      var coords = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from),
-                                     clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin);
-      if (op.scrollToPos.isCursor && cm.state.focused) maybeScrollWindow(cm, coords);
-    }
-
-    // Fire events for markers that are hidden/unidden by editing or
-    // undoing
-    var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;
-    if (hidden) for (var i = 0; i < hidden.length; ++i)
-      if (!hidden[i].lines.length) signal(hidden[i], "hide");
-    if (unhidden) for (var i = 0; i < unhidden.length; ++i)
-      if (unhidden[i].lines.length) signal(unhidden[i], "unhide");
-
-    if (display.wrapper.offsetHeight)
-      doc.scrollTop = cm.display.scroller.scrollTop;
-
-    // Fire change events, and delayed event handlers
-    if (op.changeObjs)
-      signal(cm, "changes", cm, op.changeObjs);
-  }
-
-  // Run the given function in an operation
-  function runInOp(cm, f) {
-    if (cm.curOp) return f();
-    startOperation(cm);
-    try { return f(); }
-    finally { endOperation(cm); }
-  }
-  // Wraps a function in an operation. Returns the wrapped function.
-  function operation(cm, f) {
-    return function() {
-      if (cm.curOp) return f.apply(cm, arguments);
-      startOperation(cm);
-      try { return f.apply(cm, arguments); }
-      finally { endOperation(cm); }
-    };
-  }
-  // Used to add methods to editor and doc instances, wrapping them in
-  // operations.
-  function methodOp(f) {
-    return function() {
-      if (this.curOp) return f.apply(this, arguments);
-      startOperation(this);
-      try { return f.apply(this, arguments); }
-      finally { endOperation(this); }
-    };
-  }
-  function docMethodOp(f) {
-    return function() {
-      var cm = this.cm;
-      if (!cm || cm.curOp) return f.apply(this, arguments);
-      startOperation(cm);
-      try { return f.apply(this, arguments); }
-      finally { endOperation(cm); }
-    };
-  }
-
-  // VIEW TRACKING
-
-  // These objects are used to represent the visible (currently drawn)
-  // part of the document. A LineView may correspond to multiple
-  // logical lines, if those are connected by collapsed ranges.
-  function LineView(doc, line, lineN) {
-    // The starting line
-    this.line = line;
-    // Continuing lines, if any
-    this.rest = visualLineContinued(line);
-    // Number of logical lines in this visual line
-    this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;
-    this.node = this.text = null;
-    this.hidden = lineIsHidden(doc, line);
-  }
-
-  // Create a range of LineView objects for the given lines.
-  function buildViewArray(cm, from, to) {
-    var array = [], nextPos;
-    for (var pos = from; pos < to; pos = nextPos) {
-      var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);
-      nextPos = pos + view.size;
-      array.push(view);
-    }
-    return array;
-  }
-
-  // Updates the display.view data structure for a given change to the
-  // document. From and to are in pre-change coordinates. Lendiff is
-  // the amount of lines added or subtracted by the change. This is
-  // used for changes that span multiple lines, or change the way
-  // lines are divided into visual lines. regLineChange (below)
-  // registers single-line changes.
-  function regChange(cm, from, to, lendiff) {
-    if (from == null) from = cm.doc.first;
-    if (to == null) to = cm.doc.first + cm.doc.size;
-    if (!lendiff) lendiff = 0;
-
-    var display = cm.display;
-    if (lendiff && to < display.viewTo &&
-        (display.updateLineNumbers == null || display.updateLineNumbers > from))
-      display.updateLineNumbers = from;
-
-    cm.curOp.viewChanged = true;
-
-    if (from >= display.viewTo) { // Change after
-      if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo)
-        resetView(cm);
-    } else if (to <= display.viewFrom) { // Change before
-      if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {
-        resetView(cm);
-      } else {
-        display.viewFrom += lendiff;
-        display.viewTo += lendiff;
-      }
-    } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap
-      resetView(cm);
-    } else if (from <= display.viewFrom) { // Top overlap
-      var cut = viewCuttingPoint(cm, to, to + lendiff, 1);
-      if (cut) {
-        display.view = display.view.slice(cut.index);
-        display.viewFrom = cut.lineN;
-        display.viewTo += lendiff;
-      } else {
-        resetView(cm);
-      }
-    } else if (to >= display.viewTo) { // Bottom overlap
-      var cut = viewCuttingPoint(cm, from, from, -1);
-      if (cut) {
-        display.view = display.view.slice(0, cut.index);
-        display.viewTo = cut.lineN;
-      } else {
-        resetView(cm);
-      }
-    } else { // Gap in the middle
-      var cutTop = viewCuttingPoint(cm, from, from, -1);
-      var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1);
-      if (cutTop && cutBot) {
-        display.view = display.view.slice(0, cutTop.index)
-          .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN))
-          .concat(display.view.slice(cutBot.index));
-        display.viewTo += lendiff;
-      } else {
-        resetView(cm);
-      }
-    }
-
-    var ext = display.externalMeasured;
-    if (ext) {
-      if (to < ext.lineN)
-        ext.lineN += lendiff;
-      else if (from < ext.lineN + ext.size)
-        display.externalMeasured = null;
-    }
-  }
-
-  // Register a change to a single line. Type must be one of "text",
-  // "gutter", "class", "widget"
-  function regLineChange(cm, line, type) {
-    cm.curOp.viewChanged = true;
-    var display = cm.display, ext = cm.display.externalMeasured;
-    if (ext && line >= ext.lineN && line < ext.lineN + ext.size)
-      display.externalMeasured = null;
-
-    if (line < display.viewFrom || line >= display.viewTo) return;
-    var lineView = display.view[findViewIndex(cm, line)];
-    if (lineView.node == null) return;
-    var arr = lineView.changes || (lineView.changes = []);
-    if (indexOf(arr, type) == -1) arr.push(type);
-  }
-
-  // Clear the view.
-  function resetView(cm) {
-    cm.display.viewFrom = cm.display.viewTo = cm.doc.first;
-    cm.display.view = [];
-    cm.display.viewOffset = 0;
-  }
-
-  // Find the view element corresponding to a given line. Return null
-  // when the line isn't visible.
-  function findViewIndex(cm, n) {
-    if (n >= cm.display.viewTo) return null;
-    n -= cm.display.viewFrom;
-    if (n < 0) return null;
-    var view = cm.display.view;
-    for (var i = 0; i < view.length; i++) {
-      n -= view[i].size;
-      if (n < 0) return i;
-    }
-  }
-
-  function viewCuttingPoint(cm, oldN, newN, dir) {
-    var index = findViewIndex(cm, oldN), diff, view = cm.display.view;
-    if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size)
-      return {index: index, lineN: newN};
-    for (var i = 0, n = cm.display.viewFrom; i < index; i++)
-      n += view[i].size;
-    if (n != oldN) {
-      if (dir > 0) {
-        if (index == view.length - 1) return null;
-        diff = (n + view[index].size) - oldN;
-        index++;
-      } else {
-        diff = n - oldN;
-      }
-      oldN += diff; newN += diff;
-    }
-    while (visualLineNo(cm.doc, newN) != newN) {
-      if (index == (dir < 0 ? 0 : view.length - 1)) return null;
-      newN += dir * view[index - (dir < 0 ? 1 : 0)].size;
-      index += dir;
-    }
-    return {index: index, lineN: newN};
-  }
-
-  // Force the view to cover a given range, adding empty view element
-  // or clipping off existing ones as needed.
-  function adjustView(cm, from, to) {
-    var display = cm.display, view = display.view;
-    if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) {
-      display.view = buildViewArray(cm, from, to);
-      display.viewFrom = from;
-    } else {
-      if (display.viewFrom > from)
-        display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view);
-      else if (display.viewFrom < from)
-        display.view = display.view.slice(findViewIndex(cm, from));
-      display.viewFrom = from;
-      if (display.viewTo < to)
-        display.view = display.view.concat(buildViewArray(cm, display.viewTo, to));
-      else if (display.viewTo > to)
-        display.view = display.view.slice(0, findViewIndex(cm, to));
-    }
-    display.viewTo = to;
-  }
-
-  // Count the number of lines in the view whose DOM representation is
-  // out of date (or nonexistent).
-  function countDirtyView(cm) {
-    var view = cm.display.view, dirty = 0;
-    for (var i = 0; i < view.length; i++) {
-      var lineView = view[i];
-      if (!lineView.hidden && (!lineView.node || lineView.changes)) ++dirty;
-    }
-    return dirty;
-  }
-
-  // INPUT HANDLING
-
-  // Poll for input changes, using the normal rate of polling. This
-  // runs as long as the editor is focused.
-  function slowPoll(cm) {
-    if (cm.display.pollingFast) return;
-    cm.display.poll.set(cm.options.pollInterval, function() {
-      readInput(cm);
-      if (cm.state.focused) slowPoll(cm);
-    });
-  }
-
-  // When an event has just come in that is likely to add or change
-  // something in the input textarea, we poll faster, to ensure that
-  // the change appears on the screen quickly.
-  function fastPoll(cm) {
-    var missed = false;
-    cm.display.pollingFast = true;
-    function p() {
-      var changed = readInput(cm);
-      if (!changed && !missed) {missed = true; cm.display.poll.set(60, p);}
-      else {cm.display.pollingFast = false; slowPoll(cm);}
-    }
-    cm.display.poll.set(20, p);
-  }
-
-  // This will be set to an array of strings when copying, so that,
-  // when pasting, we know what kind of selections the copied text
-  // was made out of.
-  var lastCopied = null;
-
-  // Read input from the textarea, and update the document to match.
-  // When something is selected, it is present in the textarea, and
-  // selected (unless it is huge, in which case a placeholder is
-  // used). When nothing is selected, the cursor sits after previously
-  // seen text (can be empty), which is stored in prevInput (we must
-  // not reset the textarea when typing, because that breaks IME).
-  function readInput(cm) {
-    var input = cm.display.input, prevInput = cm.display.prevInput, doc = cm.doc;
-    // Since this is called a *lot*, try to bail out as cheaply as
-    // possible when it is clear that nothing happened. hasSelection
-    // will be the case when there is a lot of text in the textarea,
-    // in which case reading its value would be expensive.
-    if (!cm.state.focused || (hasSelection(input) && !prevInput) || isReadOnly(cm) || cm.options.disableInput || cm.state.keySeq)
-      return false;
-    // See paste handler for more on the fakedLastChar kludge
-    if (cm.state.pasteIncoming && cm.state.fakedLastChar) {
-      input.value = input.value.substring(0, input.value.length - 1);
-      cm.state.fakedLastChar = false;
-    }
-    var text = input.value;
-    // If nothing changed, bail.
-    if (text == prevInput && !cm.somethingSelected()) return false;
-    // Work around nonsensical selection resetting in IE9/10, and
-    // inexplicable appearance of private area unicode characters on
-    // some key combos in Mac (#2689).
-    if (ie && ie_version >= 9 && cm.display.inputHasSelection === text ||
-        mac && /[\uf700-\uf7ff]/.test(text)) {
-      resetInput(cm);
-      return false;
-    }
-
-    var withOp = !cm.curOp;
-    if (withOp) startOperation(cm);
-    cm.display.shift = false;
-
-    if (text.charCodeAt(0) == 0x200b && doc.sel == cm.display.selForContextMenu && !prevInput)
-      prevInput = "\u200b";
-    // Find the part of the input that is actually new
-    var same = 0, l = Math.min(prevInput.length, text.length);
-    while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same;
-    var inserted = text.slice(same), textLines = splitLines(inserted);
-
-    // When pasing N lines into N selections, insert one line per selection
-    var multiPaste = null;
-    if (cm.state.pasteIncoming && doc.sel.ranges.length > 1) {
-      if (lastCopied && lastCopied.join("\n") == inserted)
-        multiPaste = doc.sel.ranges.length % lastCopied.length == 0 && map(lastCopied, splitLines);
-      else if (textLines.length == doc.sel.ranges.length)
-        multiPaste = map(textLines, function(l) { return [l]; });
-    }
-
-    // Normal behavior is to insert the new text into every selection
-    for (var i = doc.sel.ranges.length - 1; i >= 0; i--) {
-      var range = doc.sel.ranges[i];
-      var from = range.from(), to = range.to();
-      // Handle deletion
-      if (same < prevInput.length)
-        from = Pos(from.line, from.ch - (prevInput.length - same));
-      // Handle overwrite
-      else if (cm.state.overwrite && range.empty() && !cm.state.pasteIncoming)
-        to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length));
-      var updateInput = cm.curOp.updateInput;
-      var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines,
-                         origin: cm.state.pasteIncoming ? "paste" : cm.state.cutIncoming ? "cut" : "+input"};
-      makeChange(cm.doc, changeEvent);
-      signalLater(cm, "inputRead", cm, changeEvent);
-      // When an 'electric' character is inserted, immediately trigger a reindent
-      if (inserted && !cm.state.pasteIncoming && cm.options.electricChars &&
-          cm.options.smartIndent && range.head.ch < 100 &&
-          (!i || doc.sel.ranges[i - 1].head.line != range.head.line)) {
-        var mode = cm.getModeAt(range.head);
-        var end = changeEnd(changeEvent);
-        if (mode.electricChars) {
-          for (var j = 0; j < mode.electricChars.length; j++)
-            if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {
-              indentLine(cm, end.line, "smart");
-              break;
-            }
-        } else if (mode.electricInput) {
-          if (mode.electricInput.test(getLine(doc, end.line).text.slice(0, end.ch)))
-            indentLine(cm, end.line, "smart");
-        }
-      }
-    }
-    ensureCursorVisible(cm);
-    cm.curOp.updateInput = updateInput;
-    cm.curOp.typing = true;
-
-    // Don't leave long text in the textarea, since it makes further polling slow
-    if (text.length > 1000 || text.indexOf("\n") > -1) input.value = cm.display.prevInput = "";
-    else cm.display.prevInput = text;
-    if (withOp) endOperation(cm);
-    cm.state.pasteIncoming = cm.state.cutIncoming = false;
-    return true;
-  }
-
-  // Reset the input to correspond to the selection (or to be empty,
-  // when not typing and nothing is selected)
-  function resetInput(cm, typing) {
-    if (cm.display.contextMenuPending) return;
-    var minimal, selected, doc = cm.doc;
-    if (cm.somethingSelected()) {
-      cm.display.prevInput = "";
-      var range = doc.sel.primary();
-      minimal = hasCopyEvent &&
-        (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000);
-      var content = minimal ? "-" : selected || cm.getSelection();
-      cm.display.input.value = content;
-      if (cm.state.focused) selectInput(cm.display.input);
-      if (ie && ie_version >= 9) cm.display.inputHasSelection = content;
-    } else if (!typing) {
-      cm.display.prevInput = cm.display.input.value = "";
-      if (ie && ie_version >= 9) cm.display.inputHasSelection = null;
-    }
-    cm.display.inaccurateSelection = minimal;
-  }
-
-  function focusInput(cm) {
-    if (cm.options.readOnly != "nocursor" && (!mobile || activeElt() != cm.display.input))
-      cm.display.input.focus();
-  }
-
-  function ensureFocus(cm) {
-    if (!cm.state.focused) { focusInput(cm); onFocus(cm); }
-  }
-
-  function isReadOnly(cm) {
-    return cm.options.readOnly || cm.doc.cantEdit;
-  }
-
-  // EVENT HANDLERS
-
-  // Attach the necessary event handlers when initializing the editor
-  function registerEventHandlers(cm) {
-    var d = cm.display;
-    on(d.scroller, "mousedown", operation(cm, onMouseDown));
-    // Older IE's will not fire a second mousedown for a double click
-    if (ie && ie_version < 11)
-      on(d.scroller, "dblclick", operation(cm, function(e) {
-        if (signalDOMEvent(cm, e)) return;
-        var pos = posFromMouse(cm, e);
-        if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) return;
-        e_preventDefault(e);
-        var word = cm.findWordAt(pos);
-        extendSelection(cm.doc, word.anchor, word.head);
-      }));
-    else
-      on(d.scroller, "dblclick", function(e) { signalDOMEvent(cm, e) || e_preventDefault(e); });
-    // Prevent normal selection in the editor (we handle our own)
-    on(d.lineSpace, "selectstart", function(e) {
-      if (!eventInWidget(d, e)) e_preventDefault(e);
-    });
-    // Some browsers fire contextmenu *after* opening the menu, at
-    // which point we can't mess with it anymore. Context menu is
-    // handled in onMouseDown for these browsers.
-    if (!captureRightClick) on(d.scroller, "contextmenu", function(e) {onContextMenu(cm, e);});
-
-    // Sync scrolling between fake scrollbars and real scrollable
-    // area, ensure viewport is updated when scrolling.
-    on(d.scroller, "scroll", function() {
-      if (d.scroller.clientHeight) {
-        setScrollTop(cm, d.scroller.scrollTop);
-        setScrollLeft(cm, d.scroller.scrollLeft, true);
-        signal(cm, "scroll", cm);
-      }
-    });
-
-    // Listen to wheel events in order to try and update the viewport on time.
-    on(d.scroller, "mousewheel", function(e){onScrollWheel(cm, e);});
-    on(d.scroller, "DOMMouseScroll", function(e){onScrollWheel(cm, e);});
-
-    // Prevent wrapper from ever scrolling
-    on(d.wrapper, "scroll", function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });
-
-    on(d.input, "keyup", function(e) { onKeyUp.call(cm, e); });
-    on(d.input, "input", function() {
-      if (ie && ie_version >= 9 && cm.display.inputHasSelection) cm.display.inputHasSelection = null;
-      readInput(cm);
-    });
-    on(d.input, "keydown", operation(cm, onKeyDown));
-    on(d.input, "keypress", operation(cm, onKeyPress));
-    on(d.input, "focus", bind(onFocus, cm));
-    on(d.input, "blur", bind(onBlur, cm));
-
-    function drag_(e) {
-      if (!signalDOMEvent(cm, e)) e_stop(e);
-    }
-    if (cm.options.dragDrop) {
-      on(d.scroller, "dragstart", function(e){onDragStart(cm, e);});
-      on(d.scroller, "dragenter", drag_);
-      on(d.scroller, "dragover", drag_);
-      on(d.scroller, "drop", operation(cm, onDrop));
-    }
-    on(d.scroller, "paste", function(e) {
-      if (eventInWidget(d, e)) return;
-      cm.state.pasteIncoming = true;
-      focusInput(cm);
-      fastPoll(cm);
-    });
-    on(d.input, "paste", function() {
-      // Workaround for webkit bug https://bugs.webkit.org/show_bug.cgi?id=90206
-      // Add a char to the end of textarea before paste occur so that
-      // selection doesn't span to the end of textarea.
-      if (webkit && !cm.state.fakedLastChar && !(new Date - cm.state.lastMiddleDown < 200)) {
-        var start = d.input.selectionStart, end = d.input.selectionEnd;
-        d.input.value += "$";
-        // The selection end needs to be set before the start, otherwise there
-        // can be an intermediate non-empty selection between the two, which
-        // can override the middle-click paste buffer on linux and cause the
-        // wrong thing to get pasted.
-        d.input.selectionEnd = end;
-        d.input.selectionStart = start;
-        cm.state.fakedLastChar = true;
-      }
-      cm.state.pasteIncoming = true;
-      fastPoll(cm);
-    });
-
-    function prepareCopyCut(e) {
-      if (cm.somethingSelected()) {
-        lastCopied = cm.getSelections();
-        if (d.inaccurateSelection) {
-          d.prevInput = "";
-          d.inaccurateSelection = false;
-          d.input.value = lastCopied.join("\n");
-          selectInput(d.input);
-        }
-      } else {
-        var text = [], ranges = [];
-        for (var i = 0; i < cm.doc.sel.ranges.length; i++) {
-          var line = cm.doc.sel.ranges[i].head.line;
-          var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};
-          ranges.push(lineRange);
-          text.push(cm.getRange(lineRange.anchor, lineRange.head));
-        }
-        if (e.type == "cut") {
-          cm.setSelections(ranges, null, sel_dontScroll);
-        } else {
-          d.prevInput = "";
-          d.input.value = text.join("\n");
-          selectInput(d.input);
-        }
-        lastCopied = text;
-      }
-      if (e.type == "cut") cm.state.cutIncoming = true;
-    }
-    on(d.input, "cut", prepareCopyCut);
-    on(d.input, "copy", prepareCopyCut);
-
-    // Needed to handle Tab key in KHTML
-    if (khtml) on(d.sizer, "mouseup", function() {
-      if (activeElt() == d.input) d.input.blur();
-      focusInput(cm);
-    });
-  }
-
-  // Called when the window resizes
-  function onResize(cm) {
-    var d = cm.display;
-    if (d.lastWrapHeight == d.wrapper.clientHeight && d.lastWrapWidth == d.wrapper.clientWidth)
-      return;
-    // Might be a text scaling operation, clear size caches.
-    d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;
-    d.scrollbarsClipped = false;
-    cm.setSize();
-  }
-
-  // MOUSE EVENTS
-
-  // Return true when the given mouse event happened in a widget
-  function eventInWidget(display, e) {
-    for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {
-      if (!n || n.getAttribute("cm-ignore-events") == "true" || n.parentNode == display.sizer && n != display.mover) return true;
-    }
-  }
-
-  // Given a mouse event, find the corresponding position. If liberal
-  // is false, it checks whether a gutter or scrollbar was clicked,
-  // and returns null if it was. forRect is used by rectangular
-  // selections, and tries to estimate a character position even for
-  // coordinates beyond the right of the text.
-  function posFromMouse(cm, e, liberal, forRect) {
-    var display = cm.display;
-    if (!liberal && e_target(e).getAttribute("not-content") == "true") return null;
-
-    var x, y, space = display.lineSpace.getBoundingClientRect();
-    // Fails unpredictably on IE[67] when mouse is dragged around quickly.
-    try { x = e.clientX - space.left; y = e.clientY - space.top; }
-    catch (e) { return null; }
-    var coords = coordsChar(cm, x, y), line;
-    if (forRect && coords.xRel == 1 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {
-      var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;
-      coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));
-    }
-    return coords;
-  }
-
-  // A mouse down can be a single click, double click, triple click,
-  // start of selection drag, start of text drag, new cursor
-  // (ctrl-click), rectangle drag (alt-drag), or xwin
-  // middle-click-paste. Or it might be a click on something we should
-  // not interfere with, such as a scrollbar or widget.
-  function onMouseDown(e) {
-    if (signalDOMEvent(this, e)) return;
-    var cm = this, display = cm.display;
-    display.shift = e.shiftKey;
-
-    if (eventInWidget(display, e)) {
-      if (!webkit) {
-        // Briefly turn off draggability, to allow widgets to do
-        // normal dragging things.
-        display.scroller.draggable = false;
-        setTimeout(function(){display.scroller.draggable = true;}, 100);
-      }
-      return;
-    }
-    if (clickInGutter(cm, e)) return;
-    var start = posFromMouse(cm, e);
-    window.focus();
-
-    switch (e_button(e)) {
-    case 1:
-      if (start)
-        leftButtonDown(cm, e, start);
-      else if (e_target(e) == display.scroller)
-        e_preventDefault(e);
-      break;
-    case 2:
-      if (webkit) cm.state.lastMiddleDown = +new Date;
-      if (start) extendSelection(cm.doc, start);
-      setTimeout(bind(focusInput, cm), 20);
-      e_preventDefault(e);
-      break;
-    case 3:
-      if (captureRightClick) onContextMenu(cm, e);
-      break;
-    }
-  }
-
-  var lastClick, lastDoubleClick;
-  function leftButtonDown(cm, e, start) {
-    setTimeout(bind(ensureFocus, cm), 0);
-
-    var now = +new Date, type;
-    if (lastDoubleClick && lastDoubleClick.time > now - 400 && cmp(lastDoubleClick.pos, start) == 0) {
-      type = "triple";
-    } else if (lastClick && lastClick.time > now - 400 && cmp(lastClick.pos, start) == 0) {
-      type = "double";
-      lastDoubleClick = {time: now, pos: start};
-    } else {
-      type = "single";
-      lastClick = {time: now, pos: start};
-    }
-
-    var sel = cm.doc.sel, modifier = mac ? e.metaKey : e.ctrlKey, contained;
-    if (cm.options.dragDrop && dragAndDrop && !isReadOnly(cm) &&
-        type == "single" && (contained = sel.contains(start)) > -1 &&
-        !sel.ranges[contained].empty())
-      leftButtonStartDrag(cm, e, start, modifier);
-    else
-      leftButtonSelect(cm, e, start, type, modifier);
-  }
-
-  // Start a text drag. When it ends, see if any dragging actually
-  // happen, and treat as a click if it didn't.
-  function leftButtonStartDrag(cm, e, start, modifier) {
-    var display = cm.display;
-    var dragEnd = operation(cm, function(e2) {
-      if (webkit) display.scroller.draggable = false;
-      cm.state.draggingText = false;
-      off(document, "mouseup", dragEnd);
-      off(display.scroller, "drop", dragEnd);
-      if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) {
-        e_preventDefault(e2);
-        if (!modifier)
-          extendSelection(cm.doc, start);
-        focusInput(cm);
-        // Work around unexplainable focus problem in IE9 (#2127)
-        if (ie && ie_version == 9)
-          setTimeout(function() {document.body.focus(); focusInput(cm);}, 20);
-      }
-    });
-    // Let the drag handler handle this.
-    if (webkit) display.scroller.draggable = true;
-    cm.state.draggingText = dragEnd;
-    // IE's approach to draggable
-    if (display.scroller.dragDrop) display.scroller.dragDrop();
-    on(document, "mouseup", dragEnd);
-    on(display.scroller, "drop", dragEnd);
-  }
-
-  // Normal selection, as opposed to text dragging.
-  function leftButtonSelect(cm, e, start, type, addNew) {
-    var display = cm.display, doc = cm.doc;
-    e_preventDefault(e);
-
-    var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;
-    if (addNew && !e.shiftKey) {
-      ourIndex = doc.sel.contains(start);
-      if (ourIndex > -1)
-        ourRange = ranges[ourIndex];
-      else
-        ourRange = new Range(start, start);
-    } else {
-      ourRange = doc.sel.primary();
-    }
-
-    if (e.altKey) {
-      type = "rect";
-      if (!addNew) ourRange = new Range(start, start);
-      start = posFromMouse(cm, e, true, true);
-      ourIndex = -1;
-    } else if (type == "double") {
-      var word = cm.findWordAt(start);
-      if (cm.display.shift || doc.extend)
-        ourRange = extendRange(doc, ourRange, word.anchor, word.head);
-      else
-        ourRange = word;
-    } else if (type == "triple") {
-      var line = new Range(Pos(start.line, 0), clipPos(doc, Pos(start.line + 1, 0)));
-      if (cm.display.shift || doc.extend)
-        ourRange = extendRange(doc, ourRange, line.anchor, line.head);
-      else
-        ourRange = line;
-    } else {
-      ourRange = extendRange(doc, ourRange, start);
-    }
-
-    if (!addNew) {
-      ourIndex = 0;
-      setSelection(doc, new Selection([ourRange], 0), sel_mouse);
-      startSel = doc.sel;
-    } else if (ourIndex == -1) {
-      ourIndex = ranges.length;
-      setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex),
-                   {scroll: false, origin: "*mouse"});
-    } else if (ranges.length > 1 && ranges[ourIndex].empty() && type == "single") {
-      setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0));
-      startSel = doc.sel;
-    } else {
-      replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);
-    }
-
-    var lastPos = start;
-    function extendTo(pos) {
-      if (cmp(lastPos, pos) == 0) return;
-      lastPos = pos;
-
-      if (type == "rect") {
-        var ranges = [], tabSize = cm.options.tabSize;
-        var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);
-        var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);
-        var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);
-        for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));
-             line <= end; line++) {
-          var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);
-          if (left == right)
-            ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos)));
-          else if (text.length > leftPos)
-            ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize))));
-        }
-        if (!ranges.length) ranges.push(new Range(start, start));
-        setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),
-                     {origin: "*mouse", scroll: false});
-        cm.scrollIntoView(pos);
-      } else {
-        var oldRange = ourRange;
-        var anchor = oldRange.anchor, head = pos;
-        if (type != "single") {
-          if (type == "double")
-            var range = cm.findWordAt(pos);
-          else
-            var range = new Range(Pos(pos.line, 0), clipPos(doc, Pos(pos.line + 1, 0)));
-          if (cmp(range.anchor, anchor) > 0) {
-            head = range.head;
-            anchor = minPos(oldRange.from(), range.anchor);
-          } else {
-            head = range.anchor;
-            anchor = maxPos(oldRange.to(), range.head);
-          }
-        }
-        var ranges = startSel.ranges.slice(0);
-        ranges[ourIndex] = new Range(clipPos(doc, anchor), head);
-        setSelection(doc, normalizeSelection(ranges, ourIndex), sel_mouse);
-      }
-    }
-
-    var editorSize = display.wrapper.getBoundingClientRect();
-    // Used to ensure timeout re-tries don't fire when another extend
-    // happened in the meantime (clearTimeout isn't reliable -- at
-    // least on Chrome, the timeouts still happen even when cleared,
-    // if the clear happens after their scheduled firing time).
-    var counter = 0;
-
-    function extend(e) {
-      var curCount = ++counter;
-      var cur = posFromMouse(cm, e, true, type == "rect");
-      if (!cur) return;
-      if (cmp(cur, lastPos) != 0) {
-        ensureFocus(cm);
-        extendTo(cur);
-        var visible = visibleLines(display, doc);
-        if (cur.line >= visible.to || cur.line < visible.from)
-          setTimeout(operation(cm, function(){if (counter == curCount) extend(e);}), 150);
-      } else {
-        var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;
-        if (outside) setTimeout(operation(cm, function() {
-          if (counter != curCount) return;
-          display.scroller.scrollTop += outside;
-          extend(e);
-        }), 50);
-      }
-    }
-
-    function done(e) {
-      counter = Infinity;
-      e_preventDefault(e);
-      focusInput(cm);
-      off(document, "mousemove", move);
-      off(document, "mouseup", up);
-      doc.history.lastSelOrigin = null;
-    }
-
-    var move = operation(cm, function(e) {
-      if (!e_button(e)) done(e);
-      else extend(e);
-    });
-    var up = operation(cm, done);
-    on(document, "mousemove", move);
-    on(document, "mouseup", up);
-  }
-
-  // Determines whether an event happened in the gutter, and fires the
-  // handlers for the corresponding event.
-  function gutterEvent(cm, e, type, prevent, signalfn) {
-    try { var mX = e.clientX, mY = e.clientY; }
-    catch(e) { return false; }
-    if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) return false;
-    if (prevent) e_preventDefault(e);
-
-    var display = cm.display;
-    var lineBox = display.lineDiv.getBoundingClientRect();
-
-    if (mY > lineBox.bottom || !hasHandler(cm, type)) return e_defaultPrevented(e);
-    mY -= lineBox.top - display.viewOffset;
-
-    for (var i = 0; i < cm.options.gutters.length; ++i) {
-      var g = display.gutters.childNodes[i];
-      if (g && g.getBoundingClientRect().right >= mX) {
-        var line = lineAtHeight(cm.doc, mY);
-        var gutter = cm.options.gutters[i];
-        signalfn(cm, type, cm, line, gutter, e);
-        return e_defaultPrevented(e);
-      }
-    }
-  }
-
-  function clickInGutter(cm, e) {
-    return gutterEvent(cm, e, "gutterClick", true, signalLater);
-  }
-
-  // Kludge to work around strange IE behavior where it'll sometimes
-  // re-fire a series of drag-related events right after the drop (#1551)
-  var lastDrop = 0;
-
-  function onDrop(e) {
-    var cm = this;
-    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e))
-      return;
-    e_preventDefault(e);
-    if (ie) lastDrop = +new Date;
-    var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;
-    if (!pos || isReadOnly(cm)) return;
-    // Might be a file drop, in which case we simply extract the text
-    // and insert it.
-    if (files && files.length && window.FileReader && window.File) {
-      var n = files.length, text = Array(n), read = 0;
-      var loadFile = function(file, i) {
-        var reader = new FileReader;
-        reader.onload = operation(cm, function() {
-          text[i] = reader.result;
-          if (++read == n) {
-            pos = clipPos(cm.doc, pos);
-            var change = {from: pos, to: pos, text: splitLines(text.join("\n")), origin: "paste"};
-            makeChange(cm.doc, change);
-            setSelectionReplaceHistory(cm.doc, simpleSelection(pos, changeEnd(change)));
-          }
-        });
-        reader.readAsText(file);
-      };
-      for (var i = 0; i < n; ++i) loadFile(files[i], i);
-    } else { // Normal drop
-      // Don't do a replace if the drop happened inside of the selected text.
-      if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {
-        cm.state.draggingText(e);
-        // Ensure the editor is re-focused
-        setTimeout(bind(focusInput, cm), 20);
-        return;
-      }
-      try {
-        var text = e.dataTransfer.getData("Text");
-        if (text) {
-          if (cm.state.draggingText && !(mac ? e.metaKey : e.ctrlKey))
-            var selected = cm.listSelections();
-          setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));
-          if (selected) for (var i = 0; i < selected.length; ++i)
-            replaceRange(cm.doc, "", selected[i].anchor, selected[i].head, "drag");
-          cm.replaceSelection(text, "around", "paste");
-          focusInput(cm);
-        }
-      }
-      catch(e){}
-    }
-  }
-
-  function onDragStart(cm, e) {
-    if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return; }
-    if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) return;
-
-    e.dataTransfer.setData("Text", cm.getSelection());
-
-    // Use dummy image instead of default browsers image.
-    // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.
-    if (e.dataTransfer.setDragImage && !safari) {
-      var img = elt("img", null, null, "position: fixed; left: 0; top: 0;");
-      img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
-      if (presto) {
-        img.width = img.height = 1;
-        cm.display.wrapper.appendChild(img);
-        // Force a relayout, or Opera won't use our image for some obscure reason
-        img._top = img.offsetTop;
-      }
-      e.dataTransfer.setDragImage(img, 0, 0);
-      if (presto) img.parentNode.removeChild(img);
-    }
-  }
-
-  // SCROLL EVENTS
-
-  // Sync the scrollable area and scrollbars, ensure the viewport
-  // covers the visible area.
-  function setScrollTop(cm, val) {
-    if (Math.abs(cm.doc.scrollTop - val) < 2) return;
-    cm.doc.scrollTop = val;
-    if (!gecko) updateDisplaySimple(cm, {top: val});
-    if (cm.display.scroller.scrollTop != val) cm.display.scroller.scrollTop = val;
-    cm.display.scrollbars.setScrollTop(val);
-    if (gecko) updateDisplaySimple(cm);
-    startWorker(cm, 100);
-  }
-  // Sync scroller and scrollbar, ensure the gutter elements are
-  // aligned.
-  function setScrollLeft(cm, val, isScroller) {
-    if (isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) return;
-    val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth);
-    cm.doc.scrollLeft = val;
-    alignHorizontally(cm);
-    if (cm.display.scroller.scrollLeft != val) cm.display.scroller.scrollLeft = val;
-    cm.display.scrollbars.setScrollLeft(val);
-  }
-
-  // Since the delta values reported on mouse wheel events are
-  // unstandardized between browsers and even browser versions, and
-  // generally horribly unpredictable, this code starts by measuring
-  // the scroll effect that the first few mouse wheel events have,
-  // and, from that, detects the way it can convert deltas to pixel
-  // offsets afterwards.
-  //
-  // The reason we want to know the amount a wheel event will scroll
-  // is that it gives us a chance to update the display before the
-  // actual scrolling happens, reducing flickering.
-
-  var wheelSamples = 0, wheelPixelsPerUnit = null;
-  // Fill in a browser-detected starting value on browsers where we
-  // know one. These don't have to be accurate -- the result of them
-  // being wrong would just be a slight flicker on the first wheel
-  // scroll (if it is large enough).
-  if (ie) wheelPixelsPerUnit = -.53;
-  else if (gecko) wheelPixelsPerUnit = 15;
-  else if (chrome) wheelPixelsPerUnit = -.7;
-  else if (safari) wheelPixelsPerUnit = -1/3;
-
-  var wheelEventDelta = function(e) {
-    var dx = e.wheelDeltaX, dy = e.wheelDeltaY;
-    if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) dx = e.detail;
-    if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) dy = e.detail;
-    else if (dy == null) dy = e.wheelDelta;
-    return {x: dx, y: dy};
-  };
-  CodeMirror.wheelEventPixels = function(e) {
-    var delta = wheelEventDelta(e);
-    delta.x *= wheelPixelsPerUnit;
-    delta.y *= wheelPixelsPerUnit;
-    return delta;
-  };
-
-  function onScrollWheel(cm, e) {
-    var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;
-
-    var display = cm.display, scroll = display.scroller;
-    // Quit if there's nothing to scroll here
-    if (!(dx && scroll.scrollWidth > scroll.clientWidth ||
-          dy && scroll.scrollHeight > scroll.clientHeight)) return;
-
-    // Webkit browsers on OS X abort momentum scrolls when the target
-    // of the scroll event is removed from the scrollable element.
-    // This hack (see related code in patchDisplay) makes sure the
-    // element is kept around.
-    if (dy && mac && webkit) {
-      outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {
-        for (var i = 0; i < view.length; i++) {
-          if (view[i].node == cur) {
-            cm.display.currentWheelTarget = cur;
-            break outer;
-          }
-        }
-      }
-    }
-
-    // On some browsers, horizontal scrolling will cause redraws to
-    // happen before the gutter has been realigned, causing it to
-    // wriggle around in a most unseemly way. When we have an
-    // estimated pixels/delta value, we just handle horizontal
-    // scrolling entirely here. It'll be slightly off from native, but
-    // better than glitching out.
-    if (dx && !gecko && !presto && wheelPixelsPerUnit != null) {
-      if (dy)
-        setScrollTop(cm, Math.max(0, Math.min(scroll.scrollTop + dy * wheelPixelsPerUnit, scroll.scrollHeight - scroll.clientHeight)));
-      setScrollLeft(cm, Math.max(0, Math.min(scroll.scrollLeft + dx * wheelPixelsPerUnit, scroll.scrollWidth - scroll.clientWidth)));
-      e_preventDefault(e);
-      display.wheelStartX = null; // Abort measurement, if in progress
-      return;
-    }
-
-    // 'Project' the visible viewport to cover the area that is being
-    // scrolled into view (if we know enough to estimate it).
-    if (dy && wheelPixelsPerUnit != null) {
-      var pixels = dy * wheelPixelsPerUnit;
-      var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;
-      if (pixels < 0) top = Math.max(0, top + pixels - 50);
-      else bot = Math.min(cm.doc.height, bot + pixels + 50);
-      updateDisplaySimple(cm, {top: top, bottom: bot});
-    }
-
-    if (wheelSamples < 20) {
-      if (display.wheelStartX == null) {
-        display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;
-        display.wheelDX = dx; display.wheelDY = dy;
-        setTimeout(function() {
-          if (display.wheelStartX == null) return;
-          var movedX = scroll.scrollLeft - display.wheelStartX;
-          var movedY = scroll.scrollTop - display.wheelStartY;
-          var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||
-            (movedX && display.wheelDX && movedX / display.wheelDX);
-          display.wheelStartX = display.wheelStartY = null;
-          if (!sample) return;
-          wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);
-          ++wheelSamples;
-        }, 200);
-      } else {
-        display.wheelDX += dx; display.wheelDY += dy;
-      }
-    }
-  }
-
-  // KEY EVENTS
-
-  // Run a handler that was bound to a key.
-  function doHandleBinding(cm, bound, dropShift) {
-    if (typeof bound == "string") {
-      bound = commands[bound];
-      if (!bound) return false;
-    }
-    // Ensure previous input has been read, so that the handler sees a
-    // consistent view of the document
-    if (cm.display.pollingFast && readInput(cm)) cm.display.pollingFast = false;
-    var prevShift = cm.display.shift, done = false;
-    try {
-      if (isReadOnly(cm)) cm.state.suppressEdits = true;
-      if (dropShift) cm.display.shift = false;
-      done = bound(cm) != Pass;
-    } finally {
-      cm.display.shift = prevShift;
-      cm.state.suppressEdits = false;
-    }
-    return done;
-  }
-
-  function lookupKeyForEditor(cm, name, handle) {
-    for (var i = 0; i < cm.state.keyMaps.length; i++) {
-      var result = lookupKey(name, cm.state.keyMaps[i], handle, cm);
-      if (result) return result;
-    }
-    return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm))
-      || lookupKey(name, cm.options.keyMap, handle, cm);
-  }
-
-  var stopSeq = new Delayed;
-  function dispatchKey(cm, name, e, handle) {
-    var seq = cm.state.keySeq;
-    if (seq) {
-      if (isModifierKey(name)) return "handled";
-      stopSeq.set(50, function() {
-        if (cm.state.keySeq == seq) {
-          cm.state.keySeq = null;
-          resetInput(cm);
-        }
-      });
-      name = seq + " " + name;
-    }
-    var result = lookupKeyForEditor(cm, name, handle);
-
-    if (result == "multi")
-      cm.state.keySeq = name;
-    if (result == "handled")
-      signalLater(cm, "keyHandled", cm, name, e);
-
-    if (result == "handled" || result == "multi") {
-      e_preventDefault(e);
-      restartBlink(cm);
-    }
-
-    if (seq && !result && /\'$/.test(name)) {
-      e_preventDefault(e);
-      return true;
-    }
-    return !!result;
-  }
-
-  // Handle a key from the keydown event.
-  function handleKeyBinding(cm, e) {
-    var name = keyName(e, true);
-    if (!name) return false;
-
-    if (e.shiftKey && !cm.state.keySeq) {
-      // First try to resolve full name (including 'Shift-'). Failing
-      // that, see if there is a cursor-motion command (starting with
-      // 'go') bound to the keyname without 'Shift-'.
-      return dispatchKey(cm, "Shift-" + name, e, function(b) {return doHandleBinding(cm, b, true);})
-          || dispatchKey(cm, name, e, function(b) {
-               if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion)
-                 return doHandleBinding(cm, b);
-             });
-    } else {
-      return dispatchKey(cm, name, e, function(b) { return doHandleBinding(cm, b); });
-    }
-  }
-
-  // Handle a key from the keypress event
-  function handleCharBinding(cm, e, ch) {
-    return dispatchKey(cm, "'" + ch + "'", e,
-                       function(b) { return doHandleBinding(cm, b, true); });
-  }
-
-  var lastStoppedKey = null;
-  function onKeyDown(e) {
-    var cm = this;
-    ensureFocus(cm);
-    if (signalDOMEvent(cm, e)) return;
-    // IE does strange things with escape.
-    if (ie && ie_version < 11 && e.keyCode == 27) e.returnValue = false;
-    var code = e.keyCode;
-    cm.display.shift = code == 16 || e.shiftKey;
-    var handled = handleKeyBinding(cm, e);
-    if (presto) {
-      lastStoppedKey = handled ? code : null;
-      // Opera has no cut event... we try to at least catch the key combo
-      if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))
-        cm.replaceSelection("", null, "cut");
-    }
-
-    // Turn mouse into crosshair when Alt is held on Mac.
-    if (code == 18 && !/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className))
-      showCrossHair(cm);
-  }
-
-  function showCrossHair(cm) {
-    var lineDiv = cm.display.lineDiv;
-    addClass(lineDiv, "CodeMirror-crosshair");
-
-    function up(e) {
-      if (e.keyCode == 18 || !e.altKey) {
-        rmClass(lineDiv, "CodeMirror-crosshair");
-        off(document, "keyup", up);
-        off(document, "mouseover", up);
-      }
-    }
-    on(document, "keyup", up);
-    on(document, "mouseover", up);
-  }
-
-  function onKeyUp(e) {
-    if (e.keyCode == 16) this.doc.sel.shift = false;
-    signalDOMEvent(this, e);
-  }
-
-  function onKeyPress(e) {
-    var cm = this;
-    if (signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) return;
-    var keyCode = e.keyCode, charCode = e.charCode;
-    if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;}
-    if (((presto && (!e.which || e.which < 10)) || khtml) && handleKeyBinding(cm, e)) return;
-    var ch = String.fromCharCode(charCode == null ? keyCode : charCode);
-    if (handleCharBinding(cm, e, ch)) return;
-    if (ie && ie_version >= 9) cm.display.inputHasSelection = null;
-    fastPoll(cm);
-  }
-
-  // FOCUS/BLUR EVENTS
-
-  function onFocus(cm) {
-    if (cm.options.readOnly == "nocursor") return;
-    if (!cm.state.focused) {
-      signal(cm, "focus", cm);
-      cm.state.focused = true;
-      addClass(cm.display.wrapper, "CodeMirror-focused");
-      // The prevInput test prevents this from firing when a context
-      // menu is closed (since the resetInput would kill the
-      // select-all detection hack)
-      if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {
-        resetInput(cm);
-        if (webkit) setTimeout(bind(resetInput, cm, true), 0); // Issue #1730
-      }
-    }
-    slowPoll(cm);
-    restartBlink(cm);
-  }
-  function onBlur(cm) {
-    if (cm.state.focused) {
-      signal(cm, "blur", cm);
-      cm.state.focused = false;
-      rmClass(cm.display.wrapper, "CodeMirror-focused");
-    }
-    clearInterval(cm.display.blinker);
-    setTimeout(function() {if (!cm.state.focused) cm.display.shift = false;}, 150);
-  }
-
-  // CONTEXT MENU HANDLING
-
-  // To make the context menu work, we need to briefly unhide the
-  // textarea (making it as unobtrusive as possible) to let the
-  // right-click take effect on it.
-  function onContextMenu(cm, e) {
-    if (signalDOMEvent(cm, e, "contextmenu")) return;
-    var display = cm.display;
-    if (eventInWidget(display, e) || contextMenuInGutter(cm, e)) return;
-
-    var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;
-    if (!pos || presto) return; // Opera is difficult.
-
-    // Reset the current text selection only if the click is done outside of the selection
-    // and 'resetSelectionOnContextMenu' option is true.
-    var reset = cm.options.resetSelectionOnContextMenu;
-    if (reset && cm.doc.sel.contains(pos) == -1)
-      operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll);
-
-    var oldCSS = display.input.style.cssText;
-    display.inputDiv.style.position = "absolute";
-    display.input.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e.clientY - 5) +
-      "px; left: " + (e.clientX - 5) + "px; z-index: 1000; background: " +
-      (ie ? "rgba(255, 255, 255, .05)" : "transparent") +
-      "; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";
-    if (webkit) var oldScrollY = window.scrollY; // Work around Chrome issue (#2712)
-    focusInput(cm);
-    if (webkit) window.scrollTo(null, oldScrollY);
-    resetInput(cm);
-    // Adds "Select all" to context menu in FF
-    if (!cm.somethingSelected()) display.input.value = display.prevInput = " ";
-    display.contextMenuPending = true;
-    display.selForContextMenu = cm.doc.sel;
-    clearTimeout(display.detectingSelectAll);
-
-    // Select-all will be greyed out if there's nothing to select, so
-    // this adds a zero-width space so that we can later check whether
-    // it got selected.
-    function prepareSelectAllHack() {
-      if (display.input.selectionStart != null) {
-        var selected = cm.somethingSelected();
-        var extval = display.input.value = "\u200b" + (selected ? display.input.value : "");
-        display.prevInput = selected ? "" : "\u200b";
-        display.input.selectionStart = 1; display.input.selectionEnd = extval.length;
-        // Re-set this, in case some other handler touched the
-        // selection in the meantime.
-        display.selForContextMenu = cm.doc.sel;
-      }
-    }
-    function rehide() {
-      display.contextMenuPending = false;
-      display.inputDiv.style.position = "relative";
-      display.input.style.cssText = oldCSS;
-      if (ie && ie_version < 9) display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos);
-      slowPoll(cm);
-
-      // Try to detect the user choosing select-all
-      if (display.input.selectionStart != null) {
-        if (!ie || (ie && ie_version < 9)) prepareSelectAllHack();
-        var i = 0, poll = function() {
-          if (display.selForContextMenu == cm.doc.sel && display.input.selectionStart == 0)
-            operation(cm, commands.selectAll)(cm);
-          else if (i++ < 10) display.detectingSelectAll = setTimeout(poll, 500);
-          else resetInput(cm);
-        };
-        display.detectingSelectAll = setTimeout(poll, 200);
-      }
-    }
-
-    if (ie && ie_version >= 9) prepareSelectAllHack();
-    if (captureRightClick) {
-      e_stop(e);
-      var mouseup = function() {
-        off(window, "mouseup", mouseup);
-        setTimeout(rehide, 20);
-      };
-      on(window, "mouseup", mouseup);
-    } else {
-      setTimeout(rehide, 50);
-    }
-  }
-
-  function contextMenuInGutter(cm, e) {
-    if (!hasHandler(cm, "gutterContextMenu")) return false;
-    return gutterEvent(cm, e, "gutterContextMenu", false, signal);
-  }
-
-  // UPDATING
-
-  // Compute the position of the end of a change (its 'to' property
-  // refers to the pre-change end).
-  var changeEnd = CodeMirror.changeEnd = function(change) {
-    if (!change.text) return change.to;
-    return Pos(change.from.line + change.text.length - 1,
-               lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0));
-  };
-
-  // Adjust a position to refer to the post-change position of the
-  // same text, or the end of the change if the change covers it.
-  function adjustForChange(pos, change) {
-    if (cmp(pos, change.from) < 0) return pos;
-    if (cmp(pos, change.to) <= 0) return changeEnd(change);
-
-    var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;
-    if (pos.line == change.to.line) ch += changeEnd(change).ch - change.to.ch;
-    return Pos(line, ch);
-  }
-
-  function computeSelAfterChange(doc, change) {
-    var out = [];
-    for (var i = 0; i < doc.sel.ranges.length; i++) {
-      var range = doc.sel.ranges[i];
-      out.push(new Range(adjustForChange(range.anchor, change),
-                         adjustForChange(range.head, change)));
-    }
-    return normalizeSelection(out, doc.sel.primIndex);
-  }
-
-  function offsetPos(pos, old, nw) {
-    if (pos.line == old.line)
-      return Pos(nw.line, pos.ch - old.ch + nw.ch);
-    else
-      return Pos(nw.line + (pos.line - old.line), pos.ch);
-  }
-
-  // Used by replaceSelections to allow moving the selection to the
-  // start or around the replaced test. Hint may be "start" or "around".
-  function computeReplacedSel(doc, changes, hint) {
-    var out = [];
-    var oldPrev = Pos(doc.first, 0), newPrev = oldPrev;
-    for (var i = 0; i < changes.length; i++) {
-      var change = changes[i];
-      var from = offsetPos(change.from, oldPrev, newPrev);
-      var to = offsetPos(changeEnd(change), oldPrev, newPrev);
-      oldPrev = change.to;
-      newPrev = to;
-      if (hint == "around") {
-        var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0;
-        out[i] = new Range(inv ? to : from, inv ? from : to);
-      } else {
-        out[i] = new Range(from, from);
-      }
-    }
-    return new Selection(out, doc.sel.primIndex);
-  }
-
-  // Allow "beforeChange" event handlers to influence a change
-  function filterChange(doc, change, update) {
-    var obj = {
-      canceled: false,
-      from: change.from,
-      to: change.to,
-      text: change.text,
-      origin: change.origin,
-      cancel: function() { this.canceled = true; }
-    };
-    if (update) obj.update = function(from, to, text, origin) {
-      if (from) this.from = clipPos(doc, from);
-      if (to) this.to = clipPos(doc, to);
-      if (text) this.text = text;
-      if (origin !== undefined) this.origin = origin;
-    };
-    signal(doc, "beforeChange", doc, obj);
-    if (doc.cm) signal(doc.cm, "beforeChange", doc.cm, obj);
-
-    if (obj.canceled) return null;
-    return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin};
-  }
-
-  // Apply a change to a document, and add it to the document's
-  // history, and propagating it to all linked documents.
-  function makeChange(doc, change, ignoreReadOnly) {
-    if (doc.cm) {
-      if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly);
-      if (doc.cm.state.suppressEdits) return;
-    }
-
-    if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) {
-      change = filterChange(doc, change, true);
-      if (!change) return;
-    }
-
-    // Possibly split or suppress the update based on the presence
-    // of read-only spans in its range.
-    var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);
-    if (split) {
-      for (var i = split.length - 1; i >= 0; --i)
-        makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [""] : change.text});
-    } else {
-      makeChangeInner(doc, change);
-    }
-  }
-
-  function makeChangeInner(doc, change) {
-    if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) return;
-    var selAfter = computeSelAfterChange(doc, change);
-    addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);
-
-    makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));
-    var rebased = [];
-
-    linkedDocs(doc, function(doc, sharedHist) {
-      if (!sharedHist && indexOf(rebased, doc.history) == -1) {
-        rebaseHist(doc.history, change);
-        rebased.push(doc.history);
-      }
-      makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));
-    });
-  }
-
-  // Revert a change stored in a document's history.
-  function makeChangeFromHistory(doc, type, allowSelectionOnly) {
-    if (doc.cm && doc.cm.state.suppressEdits) return;
-
-    var hist = doc.history, event, selAfter = doc.sel;
-    var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done;
-
-    // Verify that there is a useable event (so that ctrl-z won't
-    // needlessly clear selection events)
-    for (var i = 0; i < source.length; i++) {
-      event = source[i];
-      if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges)
-        break;
-    }
-    if (i == source.length) return;
-    hist.lastOrigin = hist.lastSelOrigin = null;
-
-    for (;;) {
-      event = source.pop();
-      if (event.ranges) {
-        pushSelectionToHistory(event, dest);
-        if (allowSelectionOnly && !event.equals(doc.sel)) {
-          setSelection(doc, event, {clearRedo: false});
-          return;
-        }
-        selAfter = event;
-      }
-      else break;
-    }
-
-    // Build up a reverse change object to add to the opposite history
-    // stack (redo when undoing, and vice versa).
-    var antiChanges = [];
-    pushSelectionToHistory(selAfter, dest);
-    dest.push({changes: antiChanges, generation: hist.generation});
-    hist.generation = event.generation || ++hist.maxGeneration;
-
-    var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange");
-
-    for (var i = event.changes.length - 1; i >= 0; --i) {
-      var change = event.changes[i];
-      change.origin = type;
-      if (filter && !filterChange(doc, change, false)) {
-        source.length = 0;
-        return;
-      }
-
-      antiChanges.push(historyChangeFromChange(doc, change));
-
-      var after = i ? computeSelAfterChange(doc, change) : lst(source);
-      makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));
-      if (!i && doc.cm) doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)});
-      var rebased = [];
-
-      // Propagate to the linked documents
-      linkedDocs(doc, function(doc, sharedHist) {
-        if (!sharedHist && indexOf(rebased, doc.history) == -1) {
-          rebaseHist(doc.history, change);
-          rebased.push(doc.history);
-        }
-        makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));
-      });
-    }
-  }
-
-  // Sub-views need their line numbers shifted when text is added
-  // above or below them in the parent document.
-  function shiftDoc(doc, distance) {
-    if (distance == 0) return;
-    doc.first += distance;
-    doc.sel = new Selection(map(doc.sel.ranges, function(range) {
-      return new Range(Pos(range.anchor.line + distance, range.anchor.ch),
-                       Pos(range.head.line + distance, range.head.ch));
-    }), doc.sel.primIndex);
-    if (doc.cm) {
-      regChange(doc.cm, doc.first, doc.first - distance, distance);
-      for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++)
-        regLineChange(doc.cm, l, "gutter");
-    }
-  }
-
-  // More lower-level change function, handling only a single document
-  // (not linked ones).
-  function makeChangeSingleDoc(doc, change, selAfter, spans) {
-    if (doc.cm && !doc.cm.curOp)
-      return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans);
-
-    if (change.to.line < doc.first) {
-      shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));
-      return;
-    }
-    if (change.from.line > doc.lastLine()) return;
-
-    // Clip the change to the size of this doc
-    if (change.from.line < doc.first) {
-      var shift = change.text.length - 1 - (doc.first - change.from.line);
-      shiftDoc(doc, shift);
-      change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),
-                text: [lst(change.text)], origin: change.origin};
-    }
-    var last = doc.lastLine();
-    if (change.to.line > last) {
-      change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),
-                text: [change.text[0]], origin: change.origin};
-    }
-
-    change.removed = getBetween(doc, change.from, change.to);
-
-    if (!selAfter) selAfter = computeSelAfterChange(doc, change);
-    if (doc.cm) makeChangeSingleDocInEditor(doc.cm, change, spans);
-    else updateDoc(doc, change, spans);
-    setSelectionNoUndo(doc, selAfter, sel_dontScroll);
-  }
-
-  // Handle the interaction of a change to a document with the editor
-  // that this document is part of.
-  function makeChangeSingleDocInEditor(cm, change, spans) {
-    var doc = cm.doc, display = cm.display, from = change.from, to = change.to;
-
-    var recomputeMaxLength = false, checkWidthStart = from.line;
-    if (!cm.options.lineWrapping) {
-      checkWidthStart = lineNo(visualLine(getLine(doc, from.line)));
-      doc.iter(checkWidthStart, to.line + 1, function(line) {
-        if (line == display.maxLine) {
-          recomputeMaxLength = true;
-          return true;
-        }
-      });
-    }
-
-    if (doc.sel.contains(change.from, change.to) > -1)
-      signalCursorActivity(cm);
-
-    updateDoc(doc, change, spans, estimateHeight(cm));
-
-    if (!cm.options.lineWrapping) {
-      doc.iter(checkWidthStart, from.line + change.text.length, function(line) {
-        var len = lineLength(line);
-        if (len > display.maxLineLength) {
-          display.maxLine = line;
-          display.maxLineLength = len;
-          display.maxLineChanged = true;
-          recomputeMaxLength = false;
-        }
-      });
-      if (recomputeMaxLength) cm.curOp.updateMaxLine = true;
-    }
-
-    // Adjust frontier, schedule worker
-    doc.frontier = Math.min(doc.frontier, from.line);
-    startWorker(cm, 400);
-
-    var lendiff = change.text.length - (to.line - from.line) - 1;
-    // Remember that these lines changed, for updating the display
-    if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change))
-      regLineChange(cm, from.line, "text");
-    else
-      regChange(cm, from.line, to.line + 1, lendiff);
-
-    var changesHandler = hasHandler(cm, "changes"), changeHandler = hasHandler(cm, "change");
-    if (changeHandler || changesHandler) {
-      var obj = {
-        from: from, to: to,
-        text: change.text,
-        removed: change.removed,
-        origin: change.origin
-      };
-      if (changeHandler) signalLater(cm, "change", cm, obj);
-      if (changesHandler) (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj);
-    }
-    cm.display.selForContextMenu = null;
-  }
-
-  function replaceRange(doc, code, from, to, origin) {
-    if (!to) to = from;
-    if (cmp(to, from) < 0) { var tmp = to; to = from; from = tmp; }
-    if (typeof code == "string") code = splitLines(code);
-    makeChange(doc, {from: from, to: to, text: code, origin: origin});
-  }
-
-  // SCROLLING THINGS INTO VIEW
-
-  // If an editor sits on the top or bottom of the window, partially
-  // scrolled out of view, this ensures that the cursor is visible.
-  function maybeScrollWindow(cm, coords) {
-    if (signalDOMEvent(cm, "scrollCursorIntoView")) return;
-
-    var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;
-    if (coords.top + box.top < 0) doScroll = true;
-    else if (coords.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) doScroll = false;
-    if (doScroll != null && !phantom) {
-      var scrollNode = elt("div", "\u200b", null, "position: absolute; top: " +
-                           (coords.top - display.viewOffset - paddingTop(cm.display)) + "px; height: " +
-                           (coords.bottom - coords.top + scrollGap(cm) + display.barHeight) + "px; left: " +
-                           coords.left + "px; width: 2px;");
-      cm.display.lineSpace.appendChild(scrollNode);
-      scrollNode.scrollIntoView(doScroll);
-      cm.display.lineSpace.removeChild(scrollNode);
-    }
-  }
-
-  // Scroll a given position into view (immediately), verifying that
-  // it actually became visible (as line heights are accurately
-  // measured, the position of something may 'drift' during drawing).
-  function scrollPosIntoView(cm, pos, end, margin) {
-    if (margin == null) margin = 0;
-    for (var limit = 0; limit < 5; limit++) {
-      var changed = false, coords = cursorCoords(cm, pos);
-      var endCoords = !end || end == pos ? coords : cursorCoords(cm, end);
-      var scrollPos = calculateScrollPos(cm, Math.min(coords.left, endCoords.left),
-                                         Math.min(coords.top, endCoords.top) - margin,
-                                         Math.max(coords.left, endCoords.left),
-                                         Math.max(coords.bottom, endCoords.bottom) + margin);
-      var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;
-      if (scrollPos.scrollTop != null) {
-        setScrollTop(cm, scrollPos.scrollTop);
-        if (Math.abs(cm.doc.scrollTop - startTop) > 1) changed = true;
-      }
-      if (scrollPos.scrollLeft != null) {
-        setScrollLeft(cm, scrollPos.scrollLeft);
-        if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) changed = true;
-      }
-      if (!changed) break;
-    }
-    return coords;
-  }
-
-  // Scroll a given set of coordinates into view (immediately).
-  function scrollIntoView(cm, x1, y1, x2, y2) {
-    var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);
-    if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);
-    if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);
-  }
-
-  // Calculate a new scroll position needed to scroll the given
-  // rectangle into view. Returns an object with scrollTop and
-  // scrollLeft properties. When these are undefined, the
-  // vertical/horizontal position does not need to be adjusted.
-  function calculateScrollPos(cm, x1, y1, x2, y2) {
-    var display = cm.display, snapMargin = textHeight(cm.display);
-    if (y1 < 0) y1 = 0;
-    var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;
-    var screen = displayHeight(cm), result = {};
-    if (y2 - y1 > screen) y2 = y1 + screen;
-    var docBottom = cm.doc.height + paddingVert(display);
-    var atTop = y1 < snapMargin, atBottom = y2 > docBottom - snapMargin;
-    if (y1 < screentop) {
-      result.scrollTop = atTop ? 0 : y1;
-    } else if (y2 > screentop + screen) {
-      var newTop = Math.min(y1, (atBottom ? docBottom : y2) - screen);
-      if (newTop != screentop) result.scrollTop = newTop;
-    }
-
-    var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;
-    var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);
-    var tooWide = x2 - x1 > screenw;
-    if (tooWide) x2 = x1 + screenw;
-    if (x1 < 10)
-      result.scrollLeft = 0;
-    else if (x1 < screenleft)
-      result.scrollLeft = Math.max(0, x1 - (tooWide ? 0 : 10));
-    else if (x2 > screenw + screenleft - 3)
-      result.scrollLeft = x2 + (tooWide ? 0 : 10) - screenw;
-    return result;
-  }
-
-  // Store a relative adjustment to the scroll position in the current
-  // operation (to be applied when the operation finishes).
-  function addToScrollPos(cm, left, top) {
-    if (left != null || top != null) resolveScrollToPos(cm);
-    if (left != null)
-      cm.curOp.scrollLeft = (cm.curOp.scrollLeft == null ? cm.doc.scrollLeft : cm.curOp.scrollLeft) + left;
-    if (top != null)
-      cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top;
-  }
-
-  // Make sure that at the end of the operation the current cursor is
-  // shown.
-  function ensureCursorVisible(cm) {
-    resolveScrollToPos(cm);
-    var cur = cm.getCursor(), from = cur, to = cur;
-    if (!cm.options.lineWrapping) {
-      from = cur.ch ? Pos(cur.line, cur.ch - 1) : cur;
-      to = Pos(cur.line, cur.ch + 1);
-    }
-    cm.curOp.scrollToPos = {from: from, to: to, margin: cm.options.cursorScrollMargin, isCursor: true};
-  }
-
-  // When an operation has its scrollToPos property set, and another
-  // scroll action is applied before the end of the operation, this
-  // 'simulates' scrolling that position into view in a cheap way, so
-  // that the effect of intermediate scroll commands is not ignored.
-  function resolveScrollToPos(cm) {
-    var range = cm.curOp.scrollToPos;
-    if (range) {
-      cm.curOp.scrollToPos = null;
-      var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);
-      var sPos = calculateScrollPos(cm, Math.min(from.left, to.left),
-                                    Math.min(from.top, to.top) - range.margin,
-                                    Math.max(from.right, to.right),
-                                    Math.max(from.bottom, to.bottom) + range.margin);
-      cm.scrollTo(sPos.scrollLeft, sPos.scrollTop);
-    }
-  }
-
-  // API UTILITIES
-
-  // Indent the given line. The how parameter can be "smart",
-  // "add"/null, "subtract", or "prev". When aggressive is false
-  // (typically set to true for forced single-line indents), empty
-  // lines are not indented, and places where the mode returns Pass
-  // are left alone.
-  function indentLine(cm, n, how, aggressive) {
-    var doc = cm.doc, state;
-    if (how == null) how = "add";
-    if (how == "smart") {
-      // Fall back to "prev" when the mode doesn't have an indentation
-      // method.
-      if (!doc.mode.indent) how = "prev";
-      else state = getStateBefore(cm, n);
-    }
-
-    var tabSize = cm.options.tabSize;
-    var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);
-    if (line.stateAfter) line.stateAfter = null;
-    var curSpaceString = line.text.match(/^\s*/)[0], indentation;
-    if (!aggressive && !/\S/.test(line.text)) {
-      indentation = 0;
-      how = "not";
-    } else if (how == "smart") {
-      indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);
-      if (indentation == Pass || indentation > 150) {
-        if (!aggressive) return;
-        how = "prev";
-      }
-    }
-    if (how == "prev") {
-      if (n > doc.first) indentation = countColumn(getLine(doc, n-1).text, null, tabSize);
-      else indentation = 0;
-    } else if (how == "add") {
-      indentation = curSpace + cm.options.indentUnit;
-    } else if (how == "subtract") {
-      indentation = curSpace - cm.options.indentUnit;
-    } else if (typeof how == "number") {
-      indentation = curSpace + how;
-    }
-    indentation = Math.max(0, indentation);
-
-    var indentString = "", pos = 0;
-    if (cm.options.indentWithTabs)
-      for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";}
-    if (pos < indentation) indentString += spaceStr(indentation - pos);
-
-    if (indentString != curSpaceString) {
-      replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input");
-    } else {
-      // Ensure that, if the cursor was in the whitespace at the start
-      // of the line, it is moved to the end of that space.
-      for (var i = 0; i < doc.sel.ranges.length; i++) {
-        var range = doc.sel.ranges[i];
-        if (range.head.line == n && range.head.ch < curSpaceString.length) {
-          var pos = Pos(n, curSpaceString.length);
-          replaceOneSelection(doc, i, new Range(pos, pos));
-          break;
-        }
-      }
-    }
-    line.stateAfter = null;
-  }
-
-  // Utility for applying a change to a line by handle or number,
-  // returning the number and optionally registering the line as
-  // changed.
-  function changeLine(doc, handle, changeType, op) {
-    var no = handle, line = handle;
-    if (typeof handle == "number") line = getLine(doc, clipLine(doc, handle));
-    else no = lineNo(handle);
-    if (no == null) return null;
-    if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType);
-    return line;
-  }
-
-  // Helper for deleting text near the selection(s), used to implement
-  // backspace, delete, and similar functionality.
-  function deleteNearSelection(cm, compute) {
-    var ranges = cm.doc.sel.ranges, kill = [];
-    // Build up a set of ranges to kill first, merging overlapping
-    // ranges.
-    for (var i = 0; i < ranges.length; i++) {
-      var toKill = compute(ranges[i]);
-      while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) {
-        var replaced = kill.pop();
-        if (cmp(replaced.from, toKill.from) < 0) {
-          toKill.from = replaced.from;
-          break;
-        }
-      }
-      kill.push(toKill);
-    }
-    // Next, remove those actual ranges.
-    runInOp(cm, function() {
-      for (var i = kill.length - 1; i >= 0; i--)
-        replaceRange(cm.doc, "", kill[i].from, kill[i].to, "+delete");
-      ensureCursorVisible(cm);
-    });
-  }
-
-  // Used for horizontal relative motion. Dir is -1 or 1 (left or
-  // right), unit can be "char", "column" (like char, but doesn't
-  // cross line boundaries), "word" (across next word), or "group" (to
-  // the start of next group of word or non-word-non-whitespace
-  // chars). The visually param controls whether, in right-to-left
-  // text, direction 1 means to move towards the next index in the
-  // string, or towards the character to the right of the current
-  // position. The resulting position will have a hitSide=true
-  // property if it reached the end of the document.
-  function findPosH(doc, pos, dir, unit, visually) {
-    var line = pos.line, ch = pos.ch, origDir = dir;
-    var lineObj = getLine(doc, line);
-    var possible = true;
-    function findNextLine() {
-      var l = line + dir;
-      if (l < doc.first || l >= doc.first + doc.size) return (possible = false);
-      line = l;
-      return lineObj = getLine(doc, l);
-    }
-    function moveOnce(boundToLine) {
-      var next = (visually ? moveVisually : moveLogically)(lineObj, ch, dir, true);
-      if (next == null) {
-        if (!boundToLine && findNextLine()) {
-          if (visually) ch = (dir < 0 ? lineRight : lineLeft)(lineObj);
-          else ch = dir < 0 ? lineObj.text.length : 0;
-        } else return (possible = false);
-      } else ch = next;
-      return true;
-    }
-
-    if (unit == "char") moveOnce();
-    else if (unit == "column") moveOnce(true);
-    else if (unit == "word" || unit == "group") {
-      var sawType = null, group = unit == "group";
-      var helper = doc.cm && doc.cm.getHelper(pos, "wordChars");
-      for (var first = true;; first = false) {
-        if (dir < 0 && !moveOnce(!first)) break;
-        var cur = lineObj.text.charAt(ch) || "\n";
-        var type = isWordChar(cur, helper) ? "w"
-          : group && cur == "\n" ? "n"
-          : !group || /\s/.test(cur) ? null
-          : "p";
-        if (group && !first && !type) type = "s";
-        if (sawType && sawType != type) {
-          if (dir < 0) {dir = 1; moveOnce();}
-          break;
-        }
-
-        if (type) sawType = type;
-        if (dir > 0 && !moveOnce(!first)) break;
-      }
-    }
-    var result = skipAtomic(doc, Pos(line, ch), origDir, true);
-    if (!possible) result.hitSide = true;
-    return result;
-  }
-
-  // For relative vertical movement. Dir may be -1 or 1. Unit can be
-  // "page" or "line". The resulting position will have a hitSide=true
-  // property if it reached the end of the document.
-  function findPosV(cm, pos, dir, unit) {
-    var doc = cm.doc, x = pos.left, y;
-    if (unit == "page") {
-      var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);
-      y = pos.top + dir * (pageSize - (dir < 0 ? 1.5 : .5) * textHeight(cm.display));
-    } else if (unit == "line") {
-      y = dir > 0 ? pos.bottom + 3 : pos.top - 3;
-    }
-    for (;;) {
-      var target = coordsChar(cm, x, y);
-      if (!target.outside) break;
-      if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break; }
-      y += dir * 5;
-    }
-    return target;
-  }
-
-  // EDITOR METHODS
-
-  // The publicly visible API. Note that methodOp(f) means
-  // 'wrap f in an operation, performed on its `this` parameter'.
-
-  // This is not the complete set of editor methods. Most of the
-  // methods defined on the Doc type are also injected into
-  // CodeMirror.prototype, for backwards compatibility and
-  // convenience.
-
-  CodeMirror.prototype = {
-    constructor: CodeMirror,
-    focus: function(){window.focus(); focusInput(this); fastPoll(this);},
-
-    setOption: function(option, value) {
-      var options = this.options, old = options[option];
-      if (options[option] == value && option != "mode") return;
-      options[option] = value;
-      if (optionHandlers.hasOwnProperty(option))
-        operation(this, optionHandlers[option])(this, value, old);
-    },
-
-    getOption: function(option) {return this.options[option];},
-    getDoc: function() {return this.doc;},
-
-    addKeyMap: function(map, bottom) {
-      this.state.keyMaps[bottom ? "push" : "unshift"](getKeyMap(map));
-    },
-    removeKeyMap: function(map) {
-      var maps = this.state.keyMaps;
-      for (var i = 0; i < maps.length; ++i)
-        if (maps[i] == map || maps[i].name == map) {
-          maps.splice(i, 1);
-          return true;
-        }
-    },
-
-    addOverlay: methodOp(function(spec, options) {
-      var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);
-      if (mode.startState) throw new Error("Overlays may not be stateful.");
-      this.state.overlays.push({mode: mode, modeSpec: spec, opaque: options && options.opaque});
-      this.state.modeGen++;
-      regChange(this);
-    }),
-    removeOverlay: methodOp(function(spec) {
-      var overlays = this.state.overlays;
-      for (var i = 0; i < overlays.length; ++i) {
-        var cur = overlays[i].modeSpec;
-        if (cur == spec || typeof spec == "string" && cur.name == spec) {
-          overlays.splice(i, 1);
-          this.state.modeGen++;
-          regChange(this);
-          return;
-        }
-      }
-    }),
-
-    indentLine: methodOp(function(n, dir, aggressive) {
-      if (typeof dir != "string" && typeof dir != "number") {
-        if (dir == null) dir = this.options.smartIndent ? "smart" : "prev";
-        else dir = dir ? "add" : "subtract";
-      }
-      if (isLine(this.doc, n)) indentLine(this, n, dir, aggressive);
-    }),
-    indentSelection: methodOp(function(how) {
-      var ranges = this.doc.sel.ranges, end = -1;
-      for (var i = 0; i < ranges.length; i++) {
-        var range = ranges[i];
-        if (!range.empty()) {
-          var from = range.from(), to = range.to();
-          var start = Math.max(end, from.line);
-          end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1;
-          for (var j = start; j < end; ++j)
-            indentLine(this, j, how);
-          var newRanges = this.doc.sel.ranges;
-          if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0)
-            replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll);
-        } else if (range.head.line > end) {
-          indentLine(this, range.head.line, how, true);
-          end = range.head.line;
-          if (i == this.doc.sel.primIndex) ensureCursorVisible(this);
-        }
-      }
-    }),
-
-    // Fetch the parser token for a given character. Useful for hacks
-    // that want to inspect the mode state (say, for completion).
-    getTokenAt: function(pos, precise) {
-      return takeToken(this, pos, precise);
-    },
-
-    getLineTokens: function(line, precise) {
-      return takeToken(this, Pos(line), precise, true);
-    },
-
-    getTokenTypeAt: function(pos) {
-      pos = clipPos(this.doc, pos);
-      var styles = getLineStyles(this, getLine(this.doc, pos.line));
-      var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;
-      var type;
-      if (ch == 0) type = styles[2];
-      else for (;;) {
-        var mid = (before + after) >> 1;
-        if ((mid ? styles[mid * 2 - 1] : 0) >= ch) after = mid;
-        else if (styles[mid * 2 + 1] < ch) before = mid + 1;
-        else { type = styles[mid * 2 + 2]; break; }
-      }
-      var cut = type ? type.indexOf("cm-overlay ") : -1;
-      return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1);
-    },
-
-    getModeAt: function(pos) {
-      var mode = this.doc.mode;
-      if (!mode.innerMode) return mode;
-      return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode;
-    },
-
-    getHelper: function(pos, type) {
-      return this.getHelpers(pos, type)[0];
-    },
-
-    getHelpers: function(pos, type) {
-      var found = [];
-      if (!helpers.hasOwnProperty(type)) return helpers;
-      var help = helpers[type], mode = this.getModeAt(pos);
-      if (typeof mode[type] == "string") {
-        if (help[mode[type]]) found.push(help[mode[type]]);
-      } else if (mode[type]) {
-        for (var i = 0; i < mode[type].length; i++) {
-          var val = help[mode[type][i]];
-          if (val) found.push(val);
-        }
-      } else if (mode.helperType && help[mode.helperType]) {
-        found.push(help[mode.helperType]);
-      } else if (help[mode.name]) {
-        found.push(help[mode.name]);
-      }
-      for (var i = 0; i < help._global.length; i++) {
-        var cur = help._global[i];
-        if (cur.pred(mode, this) && indexOf(found, cur.val) == -1)
-          found.push(cur.val);
-      }
-      return found;
-    },
-
-    getStateAfter: function(line, precise) {
-      var doc = this.doc;
-      line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);
-      return getStateBefore(this, line + 1, precise);
-    },
-
-    cursorCoords: function(start, mode) {
-      var pos, range = this.doc.sel.primary();
-      if (start == null) pos = range.head;
-      else if (typeof start == "object") pos = clipPos(this.doc, start);
-      else pos = start ? range.from() : range.to();
-      return cursorCoords(this, pos, mode || "page");
-    },
-
-    charCoords: function(pos, mode) {
-      return charCoords(this, clipPos(this.doc, pos), mode || "page");
-    },
-
-    coordsChar: function(coords, mode) {
-      coords = fromCoordSystem(this, coords, mode || "page");
-      return coordsChar(this, coords.left, coords.top);
-    },
-
-    lineAtHeight: function(height, mode) {
-      height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top;
-      return lineAtHeight(this.doc, height + this.display.viewOffset);
-    },
-    heightAtLine: function(line, mode) {
-      var end = false, last = this.doc.first + this.doc.size - 1;
-      if (line < this.doc.first) line = this.doc.first;
-      else if (line > last) { line = last; end = true; }
-      var lineObj = getLine(this.doc, line);
-      return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || "page").top +
-        (end ? this.doc.height - heightAtLine(lineObj) : 0);
-    },
-
-    defaultTextHeight: function() { return textHeight(this.display); },
-    defaultCharWidth: function() { return charWidth(this.display); },
-
-    setGutterMarker: methodOp(function(line, gutterID, value) {
-      return changeLine(this.doc, line, "gutter", function(line) {
-        var markers = line.gutterMarkers || (line.gutterMarkers = {});
-        markers[gutterID] = value;
-        if (!value && isEmpty(markers)) line.gutterMarkers = null;
-        return true;
-      });
-    }),
-
-    clearGutter: methodOp(function(gutterID) {
-      var cm = this, doc = cm.doc, i = doc.first;
-      doc.iter(function(line) {
-        if (line.gutterMarkers && line.gutterMarkers[gutterID]) {
-          line.gutterMarkers[gutterID] = null;
-          regLineChange(cm, i, "gutter");
-          if (isEmpty(line.gutterMarkers)) line.gutterMarkers = null;
-        }
-        ++i;
-      });
-    }),
-
-    addLineWidget: methodOp(function(handle, node, options) {
-      return addLineWidget(this, handle, node, options);
-    }),
-
-    removeLineWidget: function(widget) { widget.clear(); },
-
-    lineInfo: function(line) {
-      if (typeof line == "number") {
-        if (!isLine(this.doc, line)) return null;
-        var n = line;
-        line = getLine(this.doc, line);
-        if (!line) return null;
-      } else {
-        var n = lineNo(line);
-        if (n == null) return null;
-      }
-      return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,
-              textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass,
-              widgets: line.widgets};
-    },
-
-    getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo};},
-
-    addWidget: function(pos, node, scroll, vert, horiz) {
-      var display = this.display;
-      pos = cursorCoords(this, clipPos(this.doc, pos));
-      var top = pos.bottom, left = pos.left;
-      node.style.position = "absolute";
-      node.setAttribute("cm-ignore-events", "true");
-      display.sizer.appendChild(node);
-      if (vert == "over") {
-        top = pos.top;
-      } else if (vert == "above" || vert == "near") {
-        var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),
-        hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);
-        // Default to positioning above (if specified and possible); otherwise default to positioning below
-        if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)
-          top = pos.top - node.offsetHeight;
-        else if (pos.bottom + node.offsetHeight <= vspace)
-          top = pos.bottom;
-        if (left + node.offsetWidth > hspace)
-          left = hspace - node.offsetWidth;
-      }
-      node.style.top = top + "px";
-      node.style.left = node.style.right = "";
-      if (horiz == "right") {
-        left = display.sizer.clientWidth - node.offsetWidth;
-        node.style.right = "0px";
-      } else {
-        if (horiz == "left") left = 0;
-        else if (horiz == "middle") left = (display.sizer.clientWidth - node.offsetWidth) / 2;
-        node.style.left = left + "px";
-      }
-      if (scroll)
-        scrollIntoView(this, left, top, left + node.offsetWidth, top + node.offsetHeight);
-    },
-
-    triggerOnKeyDown: methodOp(onKeyDown),
-    triggerOnKeyPress: methodOp(onKeyPress),
-    triggerOnKeyUp: onKeyUp,
-
-    execCommand: function(cmd) {
-      if (commands.hasOwnProperty(cmd))
-        return commands[cmd](this);
-    },
-
-    findPosH: function(from, amount, unit, visually) {
-      var dir = 1;
-      if (amount < 0) { dir = -1; amount = -amount; }
-      for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) {
-        cur = findPosH(this.doc, cur, dir, unit, visually);
-        if (cur.hitSide) break;
-      }
-      return cur;
-    },
-
-    moveH: methodOp(function(dir, unit) {
-      var cm = this;
-      cm.extendSelectionsBy(function(range) {
-        if (cm.display.shift || cm.doc.extend || range.empty())
-          return findPosH(cm.doc, range.head, dir, unit, cm.options.rtlMoveVisually);
-        else
-          return dir < 0 ? range.from() : range.to();
-      }, sel_move);
-    }),
-
-    deleteH: methodOp(function(dir, unit) {
-      var sel = this.doc.sel, doc = this.doc;
-      if (sel.somethingSelected())
-        doc.replaceSelection("", null, "+delete");
-      else
-        deleteNearSelection(this, function(range) {
-          var other = findPosH(doc, range.head, dir, unit, false);
-          return dir < 0 ? {from: other, to: range.head} : {from: range.head, to: other};
-        });
-    }),
-
-    findPosV: function(from, amount, unit, goalColumn) {
-      var dir = 1, x = goalColumn;
-      if (amount < 0) { dir = -1; amount = -amount; }
-      for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) {
-        var coords = cursorCoords(this, cur, "div");
-        if (x == null) x = coords.left;
-        else coords.left = x;
-        cur = findPosV(this, coords, dir, unit);
-        if (cur.hitSide) break;
-      }
-      return cur;
-    },
-
-    moveV: methodOp(function(dir, unit) {
-      var cm = this, doc = this.doc, goals = [];
-      var collapse = !cm.display.shift && !doc.extend && doc.sel.somethingSelected();
-      doc.extendSelectionsBy(function(range) {
-        if (collapse)
-          return dir < 0 ? range.from() : range.to();
-        var headPos = cursorCoords(cm, range.head, "div");
-        if (range.goalColumn != null) headPos.left = range.goalColumn;
-        goals.push(headPos.left);
-        var pos = findPosV(cm, headPos, dir, unit);
-        if (unit == "page" && range == doc.sel.primary())
-          addToScrollPos(cm, null, charCoords(cm, pos, "div").top - headPos.top);
-        return pos;
-      }, sel_move);
-      if (goals.length) for (var i = 0; i < doc.sel.ranges.length; i++)
-        doc.sel.ranges[i].goalColumn = goals[i];
-    }),
-
-    // Find the word at the given position (as returned by coordsChar).
-    findWordAt: function(pos) {
-      var doc = this.doc, line = getLine(doc, pos.line).text;
-      var start = pos.ch, end = pos.ch;
-      if (line) {
-        var helper = this.getHelper(pos, "wordChars");
-        if ((pos.xRel < 0 || end == line.length) && start) --start; else ++end;
-        var startChar = line.charAt(start);
-        var check = isWordChar(startChar, helper)
-          ? function(ch) { return isWordChar(ch, helper); }
-          : /\s/.test(startChar) ? function(ch) {return /\s/.test(ch);}
-          : function(ch) {return !/\s/.test(ch) && !isWordChar(ch);};
-        while (start > 0 && check(line.charAt(start - 1))) --start;
-        while (end < line.length && check(line.charAt(end))) ++end;
-      }
-      return new Range(Pos(pos.line, start), Pos(pos.line, end));
-    },
-
-    toggleOverwrite: function(value) {
-      if (value != null && value == this.state.overwrite) return;
-      if (this.state.overwrite = !this.state.overwrite)
-        addClass(this.display.cursorDiv, "CodeMirror-overwrite");
-      else
-        rmClass(this.display.cursorDiv, "CodeMirror-overwrite");
-
-      signal(this, "overwriteToggle", this, this.state.overwrite);
-    },
-    hasFocus: function() { return activeElt() == this.display.input; },
-
-    scrollTo: methodOp(function(x, y) {
-      if (x != null || y != null) resolveScrollToPos(this);
-      if (x != null) this.curOp.scrollLeft = x;
-      if (y != null) this.curOp.scrollTop = y;
-    }),
-    getScrollInfo: function() {
-      var scroller = this.display.scroller;
-      return {left: scroller.scrollLeft, top: scroller.scrollTop,
-              height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,
-              width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,
-              clientHeight: displayHeight(this), clientWidth: displayWidth(this)};
-    },
-
-    scrollIntoView: methodOp(function(range, margin) {
-      if (range == null) {
-        range = {from: this.doc.sel.primary().head, to: null};
-        if (margin == null) margin = this.options.cursorScrollMargin;
-      } else if (typeof range == "number") {
-        range = {from: Pos(range, 0), to: null};
-      } else if (range.from == null) {
-        range = {from: range, to: null};
-      }
-      if (!range.to) range.to = range.from;
-      range.margin = margin || 0;
-
-      if (range.from.line != null) {
-        resolveScrollToPos(this);
-        this.curOp.scrollToPos = range;
-      } else {
-        var sPos = calculateScrollPos(this, Math.min(range.from.left, range.to.left),
-                                      Math.min(range.from.top, range.to.top) - range.margin,
-                                      Math.max(range.from.right, range.to.right),
-                                      Math.max(range.from.bottom, range.to.bottom) + range.margin);
-        this.scrollTo(sPos.scrollLeft, sPos.scrollTop);
-      }
-    }),
-
-    setSize: methodOp(function(width, height) {
-      var cm = this;
-      function interpret(val) {
-        return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val;
-      }
-      if (width != null) cm.display.wrapper.style.width = interpret(width);
-      if (height != null) cm.display.wrapper.style.height = interpret(height);
-      if (cm.options.lineWrapping) clearLineMeasurementCache(this);
-      var lineNo = cm.display.viewFrom;
-      cm.doc.iter(lineNo, cm.display.viewTo, function(line) {
-        if (line.widgets) for (var i = 0; i < line.widgets.length; i++)
-          if (line.widgets[i].noHScroll) { regLineChange(cm, lineNo, "widget"); break; }
-        ++lineNo;
-      });
-      cm.curOp.forceUpdate = true;
-      signal(cm, "refresh", this);
-    }),
-
-    operation: function(f){return runInOp(this, f);},
-
-    refresh: methodOp(function() {
-      var oldHeight = this.display.cachedTextHeight;
-      regChange(this);
-      this.curOp.forceUpdate = true;
-      clearCaches(this);
-      this.scrollTo(this.doc.scrollLeft, this.doc.scrollTop);
-      updateGutterSpace(this);
-      if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5)
-        estimateLineHeights(this);
-      signal(this, "refresh", this);
-    }),
-
-    swapDoc: methodOp(function(doc) {
-      var old = this.doc;
-      old.cm = null;
-      attachDoc(this, doc);
-      clearCaches(this);
-      resetInput(this);
-      this.scrollTo(doc.scrollLeft, doc.scrollTop);
-      this.curOp.forceScroll = true;
-      signalLater(this, "swapDoc", this, old);
-      return old;
-    }),
-
-    getInputField: function(){return this.display.input;},
-    getWrapperElement: function(){return this.display.wrapper;},
-    getScrollerElement: function(){return this.display.scroller;},
-    getGutterElement: function(){return this.display.gutters;}
-  };
-  eventMixin(CodeMirror);
-
-  // OPTION DEFAULTS
-
-  // The default configuration options.
-  var defaults = CodeMirror.defaults = {};
-  // Functions to run when options are changed.
-  var optionHandlers = CodeMirror.optionHandlers = {};
-
-  function option(name, deflt, handle, notOnInit) {
-    CodeMirror.defaults[name] = deflt;
-    if (handle) optionHandlers[name] =
-      notOnInit ? function(cm, val, old) {if (old != Init) handle(cm, val, old);} : handle;
-  }
-
-  // Passed to option handlers when there is no old value.
-  var Init = CodeMirror.Init = {toString: function(){return "CodeMirror.Init";}};
-
-  // These two are, on init, called from the constructor because they
-  // have to be initialized before the editor can start at all.
-  option("value", "", function(cm, val) {
-    cm.setValue(val);
-  }, true);
-  option("mode", null, function(cm, val) {
-    cm.doc.modeOption = val;
-    loadMode(cm);
-  }, true);
-
-  option("indentUnit", 2, loadMode, true);
-  option("indentWithTabs", false);
-  option("smartIndent", true);
-  option("tabSize", 4, function(cm) {
-    resetModeState(cm);
-    clearCaches(cm);
-    regChange(cm);
-  }, true);
-  option("specialChars", /[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g, function(cm, val) {
-    cm.options.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g");
-    cm.refresh();
-  }, true);
-  option("specialCharPlaceholder", defaultSpecialCharPlaceholder, function(cm) {cm.refresh();}, true);
-  option("electricChars", true);
-  option("rtlMoveVisually", !windows);
-  option("wholeLineUpdateBefore", true);
-
-  option("theme", "default", function(cm) {
-    themeChanged(cm);
-    guttersChanged(cm);
-  }, true);
-  option("keyMap", "default", function(cm, val, old) {
-    var next = getKeyMap(val);
-    var prev = old != CodeMirror.Init && getKeyMap(old);
-    if (prev && prev.detach) prev.detach(cm, next);
-    if (next.attach) next.attach(cm, prev || null);
-  });
-  option("extraKeys", null);
-
-  option("lineWrapping", false, wrappingChanged, true);
-  option("gutters", [], function(cm) {
-    setGuttersForLineNumbers(cm.options);
-    guttersChanged(cm);
-  }, true);
-  option("fixedGutter", true, function(cm, val) {
-    cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0";
-    cm.refresh();
-  }, true);
-  option("coverGutterNextToScrollbar", false, function(cm) {updateScrollbars(cm);}, true);
-  option("scrollbarStyle", "native", function(cm) {
-    initScrollbars(cm);
-    updateScrollbars(cm);
-    cm.display.scrollbars.setScrollTop(cm.doc.scrollTop);
-    cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft);
-  }, true);
-  option("lineNumbers", false, function(cm) {
-    setGuttersForLineNumbers(cm.options);
-    guttersChanged(cm);
-  }, true);
-  option("firstLineNumber", 1, guttersChanged, true);
-  option("lineNumberFormatter", function(integer) {return integer;}, guttersChanged, true);
-  option("showCursorWhenSelecting", false, updateSelection, true);
-
-  option("resetSelectionOnContextMenu", true);
-
-  option("readOnly", false, function(cm, val) {
-    if (val == "nocursor") {
-      onBlur(cm);
-      cm.display.input.blur();
-      cm.display.disabled = true;
-    } else {
-      cm.display.disabled = false;
-      if (!val) resetInput(cm);
-    }
-  });
-  option("disableInput", false, function(cm, val) {if (!val) resetInput(cm);}, true);
-  option("dragDrop", true);
-
-  option("cursorBlinkRate", 530);
-  option("cursorScrollMargin", 0);
-  option("cursorHeight", 1, updateSelection, true);
-  option("singleCursorHeightPerLine", true, updateSelection, true);
-  option("workTime", 100);
-  option("workDelay", 100);
-  option("flattenSpans", true, resetModeState, true);
-  option("addModeClass", false, resetModeState, true);
-  option("pollInterval", 100);
-  option("undoDepth", 200, function(cm, val){cm.doc.history.undoDepth = val;});
-  option("historyEventDelay", 1250);
-  option("viewportMargin", 10, function(cm){cm.refresh();}, true);
-  option("maxHighlightLength", 10000, resetModeState, true);
-  option("moveInputWithCursor", true, function(cm, val) {
-    if (!val) cm.display.inputDiv.style.top = cm.display.inputDiv.style.left = 0;
-  });
-
-  option("tabindex", null, function(cm, val) {
-    cm.display.input.tabIndex = val || "";
-  });
-  option("autofocus", null);
-
-  // MODE DEFINITION AND QUERYING
-
-  // Known modes, by name and by MIME
-  var modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {};
-
-  // Extra arguments are stored as the mode's dependencies, which is
-  // used by (legacy) mechanisms like loadmode.js to automatically
-  // load a mode. (Preferred mechanism is the require/define calls.)
-  CodeMirror.defineMode = function(name, mode) {
-    if (!CodeMirror.defaults.mode && name != "null") CodeMirror.defaults.mode = name;
-    if (arguments.length > 2)
-      mode.dependencies = Array.prototype.slice.call(arguments, 2);
-    modes[name] = mode;
-  };
-
-  CodeMirror.defineMIME = function(mime, spec) {
-    mimeModes[mime] = spec;
-  };
-
-  // Given a MIME type, a {name, ...options} config object, or a name
-  // string, return a mode config object.
-  CodeMirror.resolveMode = function(spec) {
-    if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) {
-      spec = mimeModes[spec];
-    } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) {
-      var found = mimeModes[spec.name];
-      if (typeof found == "string") found = {name: found};
-      spec = createObj(found, spec);
-      spec.name = found.name;
-    } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) {
-      return CodeMirror.resolveMode("application/xml");
-    }
-    if (typeof spec == "string") return {name: spec};
-    else return spec || {name: "null"};
-  };
-
-  // Given a mode spec (anything that resolveMode accepts), find and
-  // initialize an actual mode object.
-  CodeMirror.getMode = function(options, spec) {
-    var spec = CodeMirror.resolveMode(spec);
-    var mfactory = modes[spec.name];
-    if (!mfactory) return CodeMirror.getMode(options, "text/plain");
-    var modeObj = mfactory(options, spec);
-    if (modeExtensions.hasOwnProperty(spec.name)) {
-      var exts = modeExtensions[spec.name];
-      for (var prop in exts) {
-        if (!exts.hasOwnProperty(prop)) continue;
-        if (modeObj.hasOwnProperty(prop)) modeObj["_" + prop] = modeObj[prop];
-        modeObj[prop] = exts[prop];
-      }
-    }
-    modeObj.name = spec.name;
-    if (spec.helperType) modeObj.helperType = spec.helperType;
-    if (spec.modeProps) for (var prop in spec.modeProps)
-      modeObj[prop] = spec.modeProps[prop];
-
-    return modeObj;
-  };
-
-  // Minimal default mode.
-  CodeMirror.defineMode("null", function() {
-    return {token: function(stream) {stream.skipToEnd();}};
-  });
-  CodeMirror.defineMIME("text/plain", "null");
-
-  // This can be used to attach properties to mode objects from
-  // outside the actual mode definition.
-  var modeExtensions = CodeMirror.modeExtensions = {};
-  CodeMirror.extendMode = function(mode, properties) {
-    var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});
-    copyObj(properties, exts);
-  };
-
-  // EXTENSIONS
-
-  CodeMirror.defineExtension = function(name, func) {
-    CodeMirror.prototype[name] = func;
-  };
-  CodeMirror.defineDocExtension = function(name, func) {
-    Doc.prototype[name] = func;
-  };
-  CodeMirror.defineOption = option;
-
-  var initHooks = [];
-  CodeMirror.defineInitHook = function(f) {initHooks.push(f);};
-
-  var helpers = CodeMirror.helpers = {};
-  CodeMirror.registerHelper = function(type, name, value) {
-    if (!helpers.hasOwnProperty(type)) helpers[type] = CodeMirror[type] = {_global: []};
-    helpers[type][name] = value;
-  };
-  CodeMirror.registerGlobalHelper = function(type, name, predicate, value) {
-    CodeMirror.registerHelper(type, name, value);
-    helpers[type]._global.push({pred: predicate, val: value});
-  };
-
-  // MODE STATE HANDLING
-
-  // Utility functions for working with state. Exported because nested
-  // modes need to do this for their inner modes.
-
-  var copyState = CodeMirror.copyState = function(mode, state) {
-    if (state === true) return state;
-    if (mode.copyState) return mode.copyState(state);
-    var nstate = {};
-    for (var n in state) {
-      var val = state[n];
-      if (val instanceof Array) val = val.concat([]);
-      nstate[n] = val;
-    }
-    return nstate;
-  };
-
-  var startState = CodeMirror.startState = function(mode, a1, a2) {
-    return mode.startState ? mode.startState(a1, a2) : true;
-  };
-
-  // Given a mode and a state (for that mode), find the inner mode and
-  // state at the position that the state refers to.
-  CodeMirror.innerMode = function(mode, state) {
-    while (mode.innerMode) {
-      var info = mode.innerMode(state);
-      if (!info || info.mode == mode) break;
-      state = info.state;
-      mode = info.mode;
-    }
-    return info || {mode: mode, state: state};
-  };
-
-  // STANDARD COMMANDS
-
-  // Commands are parameter-less actions that can be performed on an
-  // editor, mostly used for keybindings.
-  var commands = CodeMirror.commands = {
-    selectAll: function(cm) {cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);},
-    singleSelection: function(cm) {
-      cm.setSelection(cm.getCursor("anchor"), cm.getCursor("head"), sel_dontScroll);
-    },
-    killLine: function(cm) {
-      deleteNearSelection(cm, function(range) {
-        if (range.empty()) {
-          var len = getLine(cm.doc, range.head.line).text.length;
-          if (range.head.ch == len && range.head.line < cm.lastLine())
-            return {from: range.head, to: Pos(range.head.line + 1, 0)};
-          else
-            return {from: range.head, to: Pos(range.head.line, len)};
-        } else {
-          return {from: range.from(), to: range.to()};
-        }
-      });
-    },
-    deleteLine: function(cm) {
-      deleteNearSelection(cm, function(range) {
-        return {from: Pos(range.from().line, 0),
-                to: clipPos(cm.doc, Pos(range.to().line + 1, 0))};
-      });
-    },
-    delLineLeft: function(cm) {
-      deleteNearSelection(cm, function(range) {
-        return {from: Pos(range.from().line, 0), to: range.from()};
-      });
-    },
-    delWrappedLineLeft: function(cm) {
-      deleteNearSelection(cm, function(range) {
-        var top = cm.charCoords(range.head, "div").top + 5;
-        var leftPos = cm.coordsChar({left: 0, top: top}, "div");
-        return {from: leftPos, to: range.from()};
-      });
-    },
-    delWrappedLineRight: function(cm) {
-      deleteNearSelection(cm, function(range) {
-        var top = cm.charCoords(range.head, "div").top + 5;
-        var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div");
-        return {from: range.from(), to: rightPos };
-      });
-    },
-    undo: function(cm) {cm.undo();},
-    redo: function(cm) {cm.redo();},
-    undoSelection: function(cm) {cm.undoSelection();},
-    redoSelection: function(cm) {cm.redoSelection();},
-    goDocStart: function(cm) {cm.extendSelection(Pos(cm.firstLine(), 0));},
-    goDocEnd: function(cm) {cm.extendSelection(Pos(cm.lastLine()));},
-    goLineStart: function(cm) {
-      cm.extendSelectionsBy(function(range) { return lineStart(cm, range.head.line); },
-                            {origin: "+move", bias: 1});
-    },
-    goLineStartSmart: function(cm) {
-      cm.extendSelectionsBy(function(range) {
-        return lineStartSmart(cm, range.head);
-      }, {origin: "+move", bias: 1});
-    },
-    goLineEnd: function(cm) {
-      cm.extendSelectionsBy(function(range) { return lineEnd(cm, range.head.line); },
-                            {origin: "+move", bias: -1});
-    },
-    goLineRight: function(cm) {
-      cm.extendSelectionsBy(function(range) {
-        var top = cm.charCoords(range.head, "div").top + 5;
-        return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div");
-      }, sel_move);
-    },
-    goLineLeft: function(cm) {
-      cm.extendSelectionsBy(function(range) {
-        var top = cm.charCoords(range.head, "div").top + 5;
-        return cm.coordsChar({left: 0, top: top}, "div");
-      }, sel_move);
-    },
-    goLineLeftSmart: function(cm) {
-      cm.extendSelectionsBy(function(range) {
-        var top = cm.charCoords(range.head, "div").top + 5;
-        var pos = cm.coordsChar({left: 0, top: top}, "div");
-        if (pos.ch < cm.getLine(pos.line).search(/\S/)) return lineStartSmart(cm, range.head);
-        return pos;
-      }, sel_move);
-    },
-    goLineUp: function(cm) {cm.moveV(-1, "line");},
-    goLineDown: function(cm) {cm.moveV(1, "line");},
-    goPageUp: function(cm) {cm.moveV(-1, "page");},
-    goPageDown: function(cm) {cm.moveV(1, "page");},
-    goCharLeft: function(cm) {cm.moveH(-1, "char");},
-    goCharRight: function(cm) {cm.moveH(1, "char");},
-    goColumnLeft: function(cm) {cm.moveH(-1, "column");},
-    goColumnRight: function(cm) {cm.moveH(1, "column");},
-    goWordLeft: function(cm) {cm.moveH(-1, "word");},
-    goGroupRight: function(cm) {cm.moveH(1, "group");},
-    goGroupLeft: function(cm) {cm.moveH(-1, "group");},
-    goWordRight: function(cm) {cm.moveH(1, "word");},
-    delCharBefore: function(cm) {cm.deleteH(-1, "char");},
-    delCharAfter: function(cm) {cm.deleteH(1, "char");},
-    delWordBefore: function(cm) {cm.deleteH(-1, "word");},
-    delWordAfter: function(cm) {cm.deleteH(1, "word");},
-    delGroupBefore: function(cm) {cm.deleteH(-1, "group");},
-    delGroupAfter: function(cm) {cm.deleteH(1, "group");},
-    indentAuto: function(cm) {cm.indentSelection("smart");},
-    indentMore: function(cm) {cm.indentSelection("add");},
-    indentLess: function(cm) {cm.indentSelection("subtract");},
-    insertTab: function(cm) {cm.replaceSelection("\t");},
-    insertSoftTab: function(cm) {
-      var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize;
-      for (var i = 0; i < ranges.length; i++) {
-        var pos = ranges[i].from();
-        var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);
-        spaces.push(new Array(tabSize - col % tabSize + 1).join(" "));
-      }
-      cm.replaceSelections(spaces);
-    },
-    defaultTab: function(cm) {
-      if (cm.somethingSelected()) cm.indentSelection("add");
-      else cm.execCommand("insertTab");
-    },
-    transposeChars: function(cm) {
-      runInOp(cm, function() {
-        var ranges = cm.listSelections(), newSel = [];
-        for (var i = 0; i < ranges.length; i++) {
-          var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text;
-          if (line) {
-            if (cur.ch == line.length) cur = new Pos(cur.line, cur.ch - 1);
-            if (cur.ch > 0) {
-              cur = new Pos(cur.line, cur.ch + 1);
-              cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),
-                              Pos(cur.line, cur.ch - 2), cur, "+transpose");
-            } else if (cur.line > cm.doc.first) {
-              var prev = getLine(cm.doc, cur.line - 1).text;
-              if (prev)
-                cm.replaceRange(line.charAt(0) + "\n" + prev.charAt(prev.length - 1),
-                                Pos(cur.line - 1, prev.length - 1), Pos(cur.line, 1), "+transpose");
-            }
-          }
-          newSel.push(new Range(cur, cur));
-        }
-        cm.setSelections(newSel);
-      });
-    },
-    newlineAndIndent: function(cm) {
-      runInOp(cm, function() {
-        var len = cm.listSelections().length;
-        for (var i = 0; i < len; i++) {
-          var range = cm.listSelections()[i];
-          cm.replaceRange("\n", range.anchor, range.head, "+input");
-          cm.indentLine(range.from().line + 1, null, true);
-          ensureCursorVisible(cm);
-        }
-      });
-    },
-    toggleOverwrite: function(cm) {cm.toggleOverwrite();}
-  };
-
-
-  // STANDARD KEYMAPS
-
-  var keyMap = CodeMirror.keyMap = {};
-
-  keyMap.basic = {
-    "Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown",
-    "End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown",
-    "Delete": "delCharAfter", "Backspace": "delCharBefore", "Shift-Backspace": "delCharBefore",
-    "Tab": "defaultTab", "Shift-Tab": "indentAuto",
-    "Enter": "newlineAndIndent", "Insert": "toggleOverwrite",
-    "Esc": "singleSelection"
-  };
-  // Note that the save and find-related commands aren't defined by
-  // default. User code or addons can define them. Unknown commands
-  // are simply ignored.
-  keyMap.pcDefault = {
-    "Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo",
-    "Ctrl-Home": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Up": "goLineUp", "Ctrl-Down": "goLineDown",
-    "Ctrl-Left": "goGroupLeft", "Ctrl-Right": "goGroupRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd",
-    "Ctrl-Backspace": "delGroupBefore", "Ctrl-Delete": "delGroupAfter", "Ctrl-S": "save", "Ctrl-F": "find",
-    "Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll",
-    "Ctrl-[": "indentLess", "Ctrl-]": "indentMore",
-    "Ctrl-U": "undoSelection", "Shift-Ctrl-U": "redoSelection", "Alt-U": "redoSelection",
-    fallthrough: "basic"
-  };
-  // Very basic readline/emacs-style bindings, which are standard on Mac.
-  keyMap.emacsy = {
-    "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown",
-    "Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd",
-    "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore",
-    "Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars"
-  };
-  keyMap.macDefault = {
-    "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo",
-    "Cmd-Home": "goDocStart", "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft",
-    "Alt-Right": "goGroupRight", "Cmd-Left": "goLineLeft", "Cmd-Right": "goLineRight", "Alt-Backspace": "delGroupBefore",
-    "Ctrl-Alt-Backspace": "delGroupAfter", "Alt-Delete": "delGroupAfter", "Cmd-S": "save", "Cmd-F": "find",
-    "Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll",
-    "Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delWrappedLineLeft", "Cmd-Delete": "delWrappedLineRight",
-    "Cmd-U": "undoSelection", "Shift-Cmd-U": "redoSelection", "Ctrl-Up": "goDocStart", "Ctrl-Down": "goDocEnd",
-    fallthrough: ["basic", "emacsy"]
-  };
-  keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault;
-
-  // KEYMAP DISPATCH
-
-  function normalizeKeyName(name) {
-    var parts = name.split(/-(?!$)/), name = parts[parts.length - 1];
-    var alt, ctrl, shift, cmd;
-    for (var i = 0; i < parts.length - 1; i++) {
-      var mod = parts[i];
-      if (/^(cmd|meta|m)$/i.test(mod)) cmd = true;
-      else if (/^a(lt)?$/i.test(mod)) alt = true;
-      else if (/^(c|ctrl|control)$/i.test(mod)) ctrl = true;
-      else if (/^s(hift)$/i.test(mod)) shift = true;
-      else throw new Error("Unrecognized modifier name: " + mod);
-    }
-    if (alt) name = "Alt-" + name;
-    if (ctrl) name = "Ctrl-" + name;
-    if (cmd) name = "Cmd-" + name;
-    if (shift) name = "Shift-" + name;
-    return name;
-  }
-
-  // This is a kludge to keep keymaps mostly working as raw objects
-  // (backwards compatibility) while at the same time support features
-  // like normalization and multi-stroke key bindings. It compiles a
-  // new normalized keymap, and then updates the old object to reflect
-  // this.
-  CodeMirror.normalizeKeyMap = function(keymap) {
-    var copy = {};
-    for (var keyname in keymap) if (keymap.hasOwnProperty(keyname)) {
-      var value = keymap[keyname];
-      if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) continue;
-      if (value == "...") { delete keymap[keyname]; continue; }
-
-      var keys = map(keyname.split(" "), normalizeKeyName);
-      for (var i = 0; i < keys.length; i++) {
-        var val, name;
-        if (i == keys.length - 1) {
-          name = keyname;
-          val = value;
-        } else {
-          name = keys.slice(0, i + 1).join(" ");
-          val = "...";
-        }
-        var prev = copy[name];
-        if (!prev) copy[name] = val;
-        else if (prev != val) throw new Error("Inconsistent bindings for " + name);
-      }
-      delete keymap[keyname];
-    }
-    for (var prop in copy) keymap[prop] = copy[prop];
-    return keymap;
-  };
-
-  var lookupKey = CodeMirror.lookupKey = function(key, map, handle, context) {
-    map = getKeyMap(map);
-    var found = map.call ? map.call(key, context) : map[key];
-    if (found === false) return "nothing";
-    if (found === "...") return "multi";
-    if (found != null && handle(found)) return "handled";
-
-    if (map.fallthrough) {
-      if (Object.prototype.toString.call(map.fallthrough) != "[object Array]")
-        return lookupKey(key, map.fallthrough, handle, context);
-      for (var i = 0; i < map.fallthrough.length; i++) {
-        var result = lookupKey(key, map.fallthrough[i], handle, context);
-        if (result) return result;
-      }
-    }
-  };
-
-  // Modifier key presses don't count as 'real' key presses for the
-  // purpose of keymap fallthrough.
-  var isModifierKey = CodeMirror.isModifierKey = function(value) {
-    var name = typeof value == "string" ? value : keyNames[value.keyCode];
-    return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod";
-  };
-
-  // Look up the name of a key as indicated by an event object.
-  var keyName = CodeMirror.keyName = function(event, noShift) {
-    if (presto && event.keyCode == 34 && event["char"]) return false;
-    var base = keyNames[event.keyCode], name = base;
-    if (name == null || event.altGraphKey) return false;
-    if (event.altKey && base != "Alt") name = "Alt-" + name;
-    if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") name = "Ctrl-" + name;
-    if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Cmd") name = "Cmd-" + name;
-    if (!noShift && event.shiftKey && base != "Shift") name = "Shift-" + name;
-    return name;
-  };
-
-  function getKeyMap(val) {
-    return typeof val == "string" ? keyMap[val] : val;
-  }
-
-  // FROMTEXTAREA
-
-  CodeMirror.fromTextArea = function(textarea, options) {
-    if (!options) options = {};
-    options.value = textarea.value;
-    if (!options.tabindex && textarea.tabindex)
-      options.tabindex = textarea.tabindex;
-    if (!options.placeholder && textarea.placeholder)
-      options.placeholder = textarea.placeholder;
-    // Set autofocus to true if this textarea is focused, or if it has
-    // autofocus and no other element is focused.
-    if (options.autofocus == null) {
-      var hasFocus = activeElt();
-      options.autofocus = hasFocus == textarea ||
-        textarea.getAttribute("autofocus") != null && hasFocus == document.body;
-    }
-
-    function save() {textarea.value = cm.getValue();}
-    if (textarea.form) {
-      on(textarea.form, "submit", save);
-      // Deplorable hack to make the submit method do the right thing.
-      if (!options.leaveSubmitMethodAlone) {
-        var form = textarea.form, realSubmit = form.submit;
-        try {
-          var wrappedSubmit = form.submit = function() {
-            save();
-            form.submit = realSubmit;
-            form.submit();
-            form.submit = wrappedSubmit;
-          };
-        } catch(e) {}
-      }
-    }
-
-    textarea.style.display = "none";
-    var cm = CodeMirror(function(node) {
-      textarea.parentNode.insertBefore(node, textarea.nextSibling);
-    }, options);
-    cm.save = save;
-    cm.getTextArea = function() { return textarea; };
-    cm.toTextArea = function() {
-      cm.toTextArea = isNaN; // Prevent this from being ran twice
-      save();
-      textarea.parentNode.removeChild(cm.getWrapperElement());
-      textarea.style.display = "";
-      if (textarea.form) {
-        off(textarea.form, "submit", save);
-        if (typeof textarea.form.submit == "function")
-          textarea.form.submit = realSubmit;
-      }
-    };
-    return cm;
-  };
-
-  // STRING STREAM
-
-  // Fed to the mode parsers, provides helper functions to make
-  // parsers more succinct.
-
-  var StringStream = CodeMirror.StringStream = function(string, tabSize) {
-    this.pos = this.start = 0;
-    this.string = string;
-    this.tabSize = tabSize || 8;
-    this.lastColumnPos = this.lastColumnValue = 0;
-    this.lineStart = 0;
-  };
-
-  StringStream.prototype = {
-    eol: function() {return this.pos >= this.string.length;},
-    sol: function() {return this.pos == this.lineStart;},
-    peek: function() {return this.string.charAt(this.pos) || undefined;},
-    next: function() {
-      if (this.pos < this.string.length)
-        return this.string.charAt(this.pos++);
-    },
-    eat: function(match) {
-      var ch = this.string.charAt(this.pos);
-      if (typeof match == "string") var ok = ch == match;
-      else var ok = ch && (match.test ? match.test(ch) : match(ch));
-      if (ok) {++this.pos; return ch;}
-    },
-    eatWhile: function(match) {
-      var start = this.pos;
-      while (this.eat(match)){}
-      return this.pos > start;
-    },
-    eatSpace: function() {
-      var start = this.pos;
-      while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos;
-      return this.pos > start;
-    },
-    skipToEnd: function() {this.pos = this.string.length;},
-    skipTo: function(ch) {
-      var found = this.string.indexOf(ch, this.pos);
-      if (found > -1) {this.pos = found; return true;}
-    },
-    backUp: function(n) {this.pos -= n;},
-    column: function() {
-      if (this.lastColumnPos < this.start) {
-        this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);
-        this.lastColumnPos = this.start;
-      }
-      return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0);
-    },
-    indentation: function() {
-      return countColumn(this.string, null, this.tabSize) -
-        (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0);
-    },
-    match: function(pattern, consume, caseInsensitive) {
-      if (typeof pattern == "string") {
-        var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;};
-        var substr = this.string.substr(this.pos, pattern.length);
-        if (cased(substr) == cased(pattern)) {
-          if (consume !== false) this.pos += pattern.length;
-          return true;
-        }
-      } else {
-        var match = this.string.slice(this.pos).match(pattern);
-        if (match && match.index > 0) return null;
-        if (match && consume !== false) this.pos += match[0].length;
-        return match;
-      }
-    },
-    current: function(){return this.string.slice(this.start, this.pos);},
-    hideFirstChars: function(n, inner) {
-      this.lineStart += n;
-      try { return inner(); }
-      finally { this.lineStart -= n; }
-    }
-  };
-
-  // TEXTMARKERS
-
-  // Created with markText and setBookmark methods. A TextMarker is a
-  // handle that can be used to clear or find a marked position in the
-  // document. Line objects hold arrays (markedSpans) containing
-  // {from, to, marker} object pointing to such marker objects, and
-  // indicating that such a marker is present on that line. Multiple
-  // lines may point to the same marker when it spans across lines.
-  // The spans will have null for their from/to properties when the
-  // marker continues beyond the start/end of the line. Markers have
-  // links back to the lines they currently touch.
-
-  var TextMarker = CodeMirror.TextMarker = function(doc, type) {
-    this.lines = [];
-    this.type = type;
-    this.doc = doc;
-  };
-  eventMixin(TextMarker);
-
-  // Clear the marker.
-  TextMarker.prototype.clear = function() {
-    if (this.explicitlyCleared) return;
-    var cm = this.doc.cm, withOp = cm && !cm.curOp;
-    if (withOp) startOperation(cm);
-    if (hasHandler(this, "clear")) {
-      var found = this.find();
-      if (found) signalLater(this, "clear", found.from, found.to);
-    }
-    var min = null, max = null;
-    for (var i = 0; i < this.lines.length; ++i) {
-      var line = this.lines[i];
-      var span = getMarkedSpanFor(line.markedSpans, this);
-      if (cm && !this.collapsed) regLineChange(cm, lineNo(line), "text");
-      else if (cm) {
-        if (span.to != null) max = lineNo(line);
-        if (span.from != null) min = lineNo(line);
-      }
-      line.markedSpans = removeMarkedSpan(line.markedSpans, span);
-      if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm)
-        updateLineHeight(line, textHeight(cm.display));
-    }
-    if (cm && this.collapsed && !cm.options.lineWrapping) for (var i = 0; i < this.lines.length; ++i) {
-      var visual = visualLine(this.lines[i]), len = lineLength(visual);
-      if (len > cm.display.maxLineLength) {
-        cm.display.maxLine = visual;
-        cm.display.maxLineLength = len;
-        cm.display.maxLineChanged = true;
-      }
-    }
-
-    if (min != null && cm && this.collapsed) regChange(cm, min, max + 1);
-    this.lines.length = 0;
-    this.explicitlyCleared = true;
-    if (this.atomic && this.doc.cantEdit) {
-      this.doc.cantEdit = false;
-      if (cm) reCheckSelection(cm.doc);
-    }
-    if (cm) signalLater(cm, "markerCleared", cm, this);
-    if (withOp) endOperation(cm);
-    if (this.parent) this.parent.clear();
-  };
-
-  // Find the position of the marker in the document. Returns a {from,
-  // to} object by default. Side can be passed to get a specific side
-  // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the
-  // Pos objects returned contain a line object, rather than a line
-  // number (used to prevent looking up the same line twice).
-  TextMarker.prototype.find = function(side, lineObj) {
-    if (side == null && this.type == "bookmark") side = 1;
-    var from, to;
-    for (var i = 0; i < this.lines.length; ++i) {
-      var line = this.lines[i];
-      var span = getMarkedSpanFor(line.markedSpans, this);
-      if (span.from != null) {
-        from = Pos(lineObj ? line : lineNo(line), span.from);
-        if (side == -1) return from;
-      }
-      if (span.to != null) {
-        to = Pos(lineObj ? line : lineNo(line), span.to);
-        if (side == 1) return to;
-      }
-    }
-    return from && {from: from, to: to};
-  };
-
-  // Signals that the marker's widget changed, and surrounding layout
-  // should be recomputed.
-  TextMarker.prototype.changed = function() {
-    var pos = this.find(-1, true), widget = this, cm = this.doc.cm;
-    if (!pos || !cm) return;
-    runInOp(cm, function() {
-      var line = pos.line, lineN = lineNo(pos.line);
-      var view = findViewForLine(cm, lineN);
-      if (view) {
-        clearLineMeasurementCacheFor(view);
-        cm.curOp.selectionChanged = cm.curOp.forceUpdate = true;
-      }
-      cm.curOp.updateMaxLine = true;
-      if (!lineIsHidden(widget.doc, line) && widget.height != null) {
-        var oldHeight = widget.height;
-        widget.height = null;
-        var dHeight = widgetHeight(widget) - oldHeight;
-        if (dHeight)
-          updateLineHeight(line, line.height + dHeight);
-      }
-    });
-  };
-
-  TextMarker.prototype.attachLine = function(line) {
-    if (!this.lines.length && this.doc.cm) {
-      var op = this.doc.cm.curOp;
-      if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)
-        (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this);
-    }
-    this.lines.push(line);
-  };
-  TextMarker.prototype.detachLine = function(line) {
-    this.lines.splice(indexOf(this.lines, line), 1);
-    if (!this.lines.length && this.doc.cm) {
-      var op = this.doc.cm.curOp;
-      (op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);
-    }
-  };
-
-  // Collapsed markers have unique ids, in order to be able to order
-  // them, which is needed for uniquely determining an outer marker
-  // when they overlap (they may nest, but not partially overlap).
-  var nextMarkerId = 0;
-
-  // Create a marker, wire it up to the right lines, and
-  function markText(doc, from, to, options, type) {
-    // Shared markers (across linked documents) are handled separately
-    // (markTextShared will call out to this again, once per
-    // document).
-    if (options && options.shared) return markTextShared(doc, from, to, options, type);
-    // Ensure we are in an operation.
-    if (doc.cm && !doc.cm.curOp) return operation(doc.cm, markText)(doc, from, to, options, type);
-
-    var marker = new TextMarker(doc, type), diff = cmp(from, to);
-    if (options) copyObj(options, marker, false);
-    // Don't connect empty markers unless clearWhenEmpty is false
-    if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false)
-      return marker;
-    if (marker.replacedWith) {
-      // Showing up as a widget implies collapsed (widget replaces text)
-      marker.collapsed = true;
-      marker.widgetNode = elt("span", [marker.replacedWith], "CodeMirror-widget");
-      if (!options.handleMouseEvents) marker.widgetNode.setAttribute("cm-ignore-events", "true");
-      if (options.insertLeft) marker.widgetNode.insertLeft = true;
-    }
-    if (marker.collapsed) {
-      if (conflictingCollapsedRange(doc, from.line, from, to, marker) ||
-          from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker))
-        throw new Error("Inserting collapsed marker partially overlapping an existing one");
-      sawCollapsedSpans = true;
-    }
-
-    if (marker.addToHistory)
-      addChangeToHistory(doc, {from: from, to: to, origin: "markText"}, doc.sel, NaN);
-
-    var curLine = from.line, cm = doc.cm, updateMaxLine;
-    doc.iter(curLine, to.line + 1, function(line) {
-      if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine)
-        updateMaxLine = true;
-      if (marker.collapsed && curLine != from.line) updateLineHeight(line, 0);
-      addMarkedSpan(line, new MarkedSpan(marker,
-                                         curLine == from.line ? from.ch : null,
-                                         curLine == to.line ? to.ch : null));
-      ++curLine;
-    });
-    // lineIsHidden depends on the presence of the spans, so needs a second pass
-    if (marker.collapsed) doc.iter(from.line, to.line + 1, function(line) {
-      if (lineIsHidden(doc, line)) updateLineHeight(line, 0);
-    });
-
-    if (marker.clearOnEnter) on(marker, "beforeCursorEnter", function() { marker.clear(); });
-
-    if (marker.readOnly) {
-      sawReadOnlySpans = true;
-      if (doc.history.done.length || doc.history.undone.length)
-        doc.clearHistory();
-    }
-    if (marker.collapsed) {
-      marker.id = ++nextMarkerId;
-      marker.atomic = true;
-    }
-    if (cm) {
-      // Sync editor state
-      if (updateMaxLine) cm.curOp.updateMaxLine = true;
-      if (marker.collapsed)
-        regChange(cm, from.line, to.line + 1);
-      else if (marker.className || marker.title || marker.startStyle || marker.endStyle || marker.css)
-        for (var i = from.line; i <= to.line; i++) regLineChange(cm, i, "text");
-      if (marker.atomic) reCheckSelection(cm.doc);
-      signalLater(cm, "markerAdded", cm, marker);
-    }
-    return marker;
-  }
-
-  // SHARED TEXTMARKERS
-
-  // A shared marker spans multiple linked documents. It is
-  // implemented as a meta-marker-object controlling multiple normal
-  // markers.
-  var SharedTextMarker = CodeMirror.SharedTextMarker = function(markers, primary) {
-    this.markers = markers;
-    this.primary = primary;
-    for (var i = 0; i < markers.length; ++i)
-      markers[i].parent = this;
-  };
-  eventMixin(SharedTextMarker);
-
-  SharedTextMarker.prototype.clear = function() {
-    if (this.explicitlyCleared) return;
-    this.explicitlyCleared = true;
-    for (var i = 0; i < this.markers.length; ++i)
-      this.markers[i].clear();
-    signalLater(this, "clear");
-  };
-  SharedTextMarker.prototype.find = function(side, lineObj) {
-    return this.primary.find(side, lineObj);
-  };
-
-  function markTextShared(doc, from, to, options, type) {
-    options = copyObj(options);
-    options.shared = false;
-    var markers = [markText(doc, from, to, options, type)], primary = markers[0];
-    var widget = options.widgetNode;
-    linkedDocs(doc, function(doc) {
-      if (widget) options.widgetNode = widget.cloneNode(true);
-      markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));
-      for (var i = 0; i < doc.linked.length; ++i)
-        if (doc.linked[i].isParent) return;
-      primary = lst(markers);
-    });
-    return new SharedTextMarker(markers, primary);
-  }
-
-  function findSharedMarkers(doc) {
-    return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())),
-                         function(m) { return m.parent; });
-  }
-
-  function copySharedMarkers(doc, markers) {
-    for (var i = 0; i < markers.length; i++) {
-      var marker = markers[i], pos = marker.find();
-      var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to);
-      if (cmp(mFrom, mTo)) {
-        var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type);
-        marker.markers.push(subMark);
-        subMark.parent = marker;
-      }
-    }
-  }
-
-  function detachSharedMarkers(markers) {
-    for (var i = 0; i < markers.length; i++) {
-      var marker = markers[i], linked = [marker.primary.doc];;
-      linkedDocs(marker.primary.doc, function(d) { linked.push(d); });
-      for (var j = 0; j < marker.markers.length; j++) {
-        var subMarker = marker.markers[j];
-        if (indexOf(linked, subMarker.doc) == -1) {
-          subMarker.parent = null;
-          marker.markers.splice(j--, 1);
-        }
-      }
-    }
-  }
-
-  // TEXTMARKER SPANS
-
-  function MarkedSpan(marker, from, to) {
-    this.marker = marker;
-    this.from = from; this.to = to;
-  }
-
-  // Search an array of spans for a span matching the given marker.
-  function getMarkedSpanFor(spans, marker) {
-    if (spans) for (var i = 0; i < spans.length; ++i) {
-      var span = spans[i];
-      if (span.marker == marker) return span;
-    }
-  }
-  // Remove a span from an array, returning undefined if no spans are
-  // left (we don't store arrays for lines without spans).
-  function removeMarkedSpan(spans, span) {
-    for (var r, i = 0; i < spans.length; ++i)
-      if (spans[i] != span) (r || (r = [])).push(spans[i]);
-    return r;
-  }
-  // Add a span to a line.
-  function addMarkedSpan(line, span) {
-    line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];
-    span.marker.attachLine(line);
-  }
-
-  // Used for the algorithm that adjusts markers for a change in the
-  // document. These functions cut an array of spans at a given
-  // character position, returning an array of remaining chunks (or
-  // undefined if nothing remains).
-  function markedSpansBefore(old, startCh, isInsert) {
-    if (old) for (var i = 0, nw; i < old.length; ++i) {
-      var span = old[i], marker = span.marker;
-      var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);
-      if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) {
-        var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh);
-        (nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));
-      }
-    }
-    return nw;
-  }
-  function markedSpansAfter(old, endCh, isInsert) {
-    if (old) for (var i = 0, nw; i < old.length; ++i) {
-      var span = old[i], marker = span.marker;
-      var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);
-      if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) {
-        var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh);
-        (nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,
-                                              span.to == null ? null : span.to - endCh));
-      }
-    }
-    return nw;
-  }
-
-  // Given a change object, compute the new set of marker spans that
-  // cover the line in which the change took place. Removes spans
-  // entirely within the change, reconnects spans belonging to the
-  // same marker that appear on both sides of the change, and cuts off
-  // spans partially within the change. Returns an array of span
-  // arrays with one element for each line in (after) the change.
-  function stretchSpansOverChange(doc, change) {
-    var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;
-    var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;
-    if (!oldFirst && !oldLast) return null;
-
-    var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;
-    // Get the spans that 'stick out' on both sides
-    var first = markedSpansBefore(oldFirst, startCh, isInsert);
-    var last = markedSpansAfter(oldLast, endCh, isInsert);
-
-    // Next, merge those two ends
-    var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);
-    if (first) {
-      // Fix up .to properties of first
-      for (var i = 0; i < first.length; ++i) {
-        var span = first[i];
-        if (span.to == null) {
-          var found = getMarkedSpanFor(last, span.marker);
-          if (!found) span.to = startCh;
-          else if (sameLine) span.to = found.to == null ? null : found.to + offset;
-        }
-      }
-    }
-    if (last) {
-      // Fix up .from in last (or move them into first in case of sameLine)
-      for (var i = 0; i < last.length; ++i) {
-        var span = last[i];
-        if (span.to != null) span.to += offset;
-        if (span.from == null) {
-          var found = getMarkedSpanFor(first, span.marker);
-          if (!found) {
-            span.from = offset;
-            if (sameLine) (first || (first = [])).push(span);
-          }
-        } else {
-          span.from += offset;
-          if (sameLine) (first || (first = [])).push(span);
-        }
-      }
-    }
-    // Make sure we didn't create any zero-length spans
-    if (first) first = clearEmptySpans(first);
-    if (last && last != first) last = clearEmptySpans(last);
-
-    var newMarkers = [first];
-    if (!sameLine) {
-      // Fill gap with whole-line-spans
-      var gap = change.text.length - 2, gapMarkers;
-      if (gap > 0 && first)
-        for (var i = 0; i < first.length; ++i)
-          if (first[i].to == null)
-            (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null));
-      for (var i = 0; i < gap; ++i)
-        newMarkers.push(gapMarkers);
-      newMarkers.push(last);
-    }
-    return newMarkers;
-  }
-
-  // Remove spans that are empty and don't have a clearWhenEmpty
-  // option of false.
-  function clearEmptySpans(spans) {
-    for (var i = 0; i < spans.length; ++i) {
-      var span = spans[i];
-      if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)
-        spans.splice(i--, 1);
-    }
-    if (!spans.length) return null;
-    return spans;
-  }
-
-  // Used for un/re-doing changes from the history. Combines the
-  // result of computing the existing spans with the set of spans that
-  // existed in the history (so that deleting around a span and then
-  // undoing brings back the span).
-  function mergeOldSpans(doc, change) {
-    var old = getOldSpans(doc, change);
-    var stretched = stretchSpansOverChange(doc, change);
-    if (!old) return stretched;
-    if (!stretched) return old;
-
-    for (var i = 0; i < old.length; ++i) {
-      var oldCur = old[i], stretchCur = stretched[i];
-      if (oldCur && stretchCur) {
-        spans: for (var j = 0; j < stretchCur.length; ++j) {
-          var span = stretchCur[j];
-          for (var k = 0; k < oldCur.length; ++k)
-            if (oldCur[k].marker == span.marker) continue spans;
-          oldCur.push(span);
-        }
-      } else if (stretchCur) {
-        old[i] = stretchCur;
-      }
-    }
-    return old;
-  }
-
-  // Used to 'clip' out readOnly ranges when making a change.
-  function removeReadOnlyRanges(doc, from, to) {
-    var markers = null;
-    doc.iter(from.line, to.line + 1, function(line) {
-      if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {
-        var mark = line.markedSpans[i].marker;
-        if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))
-          (markers || (markers = [])).push(mark);
-      }
-    });
-    if (!markers) return null;
-    var parts = [{from: from, to: to}];
-    for (var i = 0; i < markers.length; ++i) {
-      var mk = markers[i], m = mk.find(0);
-      for (var j = 0; j < parts.length; ++j) {
-        var p = parts[j];
-        if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue;
-        var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);
-        if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)
-          newParts.push({from: p.from, to: m.from});
-        if (dto > 0 || !mk.inclusiveRight && !dto)
-          newParts.push({from: m.to, to: p.to});
-        parts.splice.apply(parts, newParts);
-        j += newParts.length - 1;
-      }
-    }
-    return parts;
-  }
-
-  // Connect or disconnect spans from a line.
-  function detachMarkedSpans(line) {
-    var spans = line.markedSpans;
-    if (!spans) return;
-    for (var i = 0; i < spans.length; ++i)
-      spans[i].marker.detachLine(line);
-    line.markedSpans = null;
-  }
-  function attachMarkedSpans(line, spans) {
-    if (!spans) return;
-    for (var i = 0; i < spans.length; ++i)
-      spans[i].marker.attachLine(line);
-    line.markedSpans = spans;
-  }
-
-  // Helpers used when computing which overlapping collapsed span
-  // counts as the larger one.
-  function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0; }
-  function extraRight(marker) { return marker.inclusiveRight ? 1 : 0; }
-
-  // Returns a number indicating which of two overlapping collapsed
-  // spans is larger (and thus includes the other). Falls back to
-  // comparing ids when the spans cover exactly the same range.
-  function compareCollapsedMarkers(a, b) {
-    var lenDiff = a.lines.length - b.lines.length;
-    if (lenDiff != 0) return lenDiff;
-    var aPos = a.find(), bPos = b.find();
-    var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);
-    if (fromCmp) return -fromCmp;
-    var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);
-    if (toCmp) return toCmp;
-    return b.id - a.id;
-  }
-
-  // Find out whether a line ends or starts in a collapsed span. If
-  // so, return the marker for that span.
-  function collapsedSpanAtSide(line, start) {
-    var sps = sawCollapsedSpans && line.markedSpans, found;
-    if (sps) for (var sp, i = 0; i < sps.length; ++i) {
-      sp = sps[i];
-      if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&
-          (!found || compareCollapsedMarkers(found, sp.marker) < 0))
-        found = sp.marker;
-    }
-    return found;
-  }
-  function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true); }
-  function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false); }
-
-  // Test whether there exists a collapsed span that partially
-  // overlaps (covers the start or end, but not both) of a new span.
-  // Such overlap is not allowed.
-  function conflictingCollapsedRange(doc, lineNo, from, to, marker) {
-    var line = getLine(doc, lineNo);
-    var sps = sawCollapsedSpans && line.markedSpans;
-    if (sps) for (var i = 0; i < sps.length; ++i) {
-      var sp = sps[i];
-      if (!sp.marker.collapsed) continue;
-      var found = sp.marker.find(0);
-      var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);
-      var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);
-      if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue;
-      if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) ||
-          fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight)))
-        return true;
-    }
-  }
-
-  // A visual line is a line as drawn on the screen. Folding, for
-  // example, can cause multiple logical lines to appear on the same
-  // visual line. This finds the start of the visual line that the
-  // given line is part of (usually that is the line itself).
-  function visualLine(line) {
-    var merged;
-    while (merged = collapsedSpanAtStart(line))
-      line = merged.find(-1, true).line;
-    return line;
-  }
-
-  // Returns an array of logical lines that continue the visual line
-  // started by the argument, or undefined if there are no such lines.
-  function visualLineContinued(line) {
-    var merged, lines;
-    while (merged = collapsedSpanAtEnd(line)) {
-      line = merged.find(1, true).line;
-      (lines || (lines = [])).push(line);
-    }
-    return lines;
-  }
-
-  // Get the line number of the start of the visual line that the
-  // given line number is part of.
-  function visualLineNo(doc, lineN) {
-    var line = getLine(doc, lineN), vis = visualLine(line);
-    if (line == vis) return lineN;
-    return lineNo(vis);
-  }
-  // Get the line number of the start of the next visual line after
-  // the given line.
-  function visualLineEndNo(doc, lineN) {
-    if (lineN > doc.lastLine()) return lineN;
-    var line = getLine(doc, lineN), merged;
-    if (!lineIsHidden(doc, line)) return lineN;
-    while (merged = collapsedSpanAtEnd(line))
-      line = merged.find(1, true).line;
-    return lineNo(line) + 1;
-  }
-
-  // Compute whether a line is hidden. Lines count as hidden when they
-  // are part of a visual line that starts with another line, or when
-  // they are entirely covered by collapsed, non-widget span.
-  function lineIsHidden(doc, line) {
-    var sps = sawCollapsedSpans && line.markedSpans;
-    if (sps) for (var sp, i = 0; i < sps.length; ++i) {
-      sp = sps[i];
-      if (!sp.marker.collapsed) continue;
-      if (sp.from == null) return true;
-      if (sp.marker.widgetNode) continue;
-      if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))
-        return true;
-    }
-  }
-  function lineIsHiddenInner(doc, line, span) {
-    if (span.to == null) {
-      var end = span.marker.find(1, true);
-      return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker));
-    }
-    if (span.marker.inclusiveRight && span.to == line.text.length)
-      return true;
-    for (var sp, i = 0; i < line.markedSpans.length; ++i) {
-      sp = line.markedSpans[i];
-      if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&
-          (sp.to == null || sp.to != span.from) &&
-          (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&
-          lineIsHiddenInner(doc, line, sp)) return true;
-    }
-  }
-
-  // LINE WIDGETS
-
-  // Line widgets are block elements displayed above or below a line.
-
-  var LineWidget = CodeMirror.LineWidget = function(cm, node, options) {
-    if (options) for (var opt in options) if (options.hasOwnProperty(opt))
-      this[opt] = options[opt];
-    this.cm = cm;
-    this.node = node;
-  };
-  eventMixin(LineWidget);
-
-  function adjustScrollWhenAboveVisible(cm, line, diff) {
-    if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop))
-      addToScrollPos(cm, null, diff);
-  }
-
-  LineWidget.prototype.clear = function() {
-    var cm = this.cm, ws = this.line.widgets, line = this.line, no = lineNo(line);
-    if (no == null || !ws) return;
-    for (var i = 0; i < ws.length; ++i) if (ws[i] == this) ws.splice(i--, 1);
-    if (!ws.length) line.widgets = null;
-    var height = widgetHeight(this);
-    runInOp(cm, function() {
-      adjustScrollWhenAboveVisible(cm, line, -height);
-      regLineChange(cm, no, "widget");
-      updateLineHeight(line, Math.max(0, line.height - height));
-    });
-  };
-  LineWidget.prototype.changed = function() {
-    var oldH = this.height, cm = this.cm, line = this.line;
-    this.height = null;
-    var diff = widgetHeight(this) - oldH;
-    if (!diff) return;
-    runInOp(cm, function() {
-      cm.curOp.forceUpdate = true;
-      adjustScrollWhenAboveVisible(cm, line, diff);
-      updateLineHeight(line, line.height + diff);
-    });
-  };
-
-  function widgetHeight(widget) {
-    if (widget.height != null) return widget.height;
-    if (!contains(document.body, widget.node)) {
-      var parentStyle = "position: relative;";
-      if (widget.coverGutter)
-        parentStyle += "margin-left: -" + widget.cm.getGutterElement().offsetWidth + "px;";
-      removeChildrenAndAdd(widget.cm.display.measure, elt("div", [widget.node], null, parentStyle));
-    }
-    return widget.height = widget.node.offsetHeight;
-  }
-
-  function addLineWidget(cm, handle, node, options) {
-    var widget = new LineWidget(cm, node, options);
-    if (widget.noHScroll) cm.display.alignWidgets = true;
-    changeLine(cm.doc, handle, "widget", function(line) {
-      var widgets = line.widgets || (line.widgets = []);
-      if (widget.insertAt == null) widgets.push(widget);
-      else widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget);
-      widget.line = line;
-      if (!lineIsHidden(cm.doc, line)) {
-        var aboveVisible = heightAtLine(line) < cm.doc.scrollTop;
-        updateLineHeight(line, line.height + widgetHeight(widget));
-        if (aboveVisible) addToScrollPos(cm, null, widget.height);
-        cm.curOp.forceUpdate = true;
-      }
-      return true;
-    });
-    return widget;
-  }
-
-  // LINE DATA STRUCTURE
-
-  // Line objects. These hold state related to a line, including
-  // highlighting info (the styles array).
-  var Line = CodeMirror.Line = function(text, markedSpans, estimateHeight) {
-    this.text = text;
-    attachMarkedSpans(this, markedSpans);
-    this.height = estimateHeight ? estimateHeight(this) : 1;
-  };
-  eventMixin(Line);
-  Line.prototype.lineNo = function() { return lineNo(this); };
-
-  // Change the content (text, markers) of a line. Automatically
-  // invalidates cached information and tries to re-estimate the
-  // line's height.
-  function updateLine(line, text, markedSpans, estimateHeight) {
-    line.text = text;
-    if (line.stateAfter) line.stateAfter = null;
-    if (line.styles) line.styles = null;
-    if (line.order != null) line.order = null;
-    detachMarkedSpans(line);
-    attachMarkedSpans(line, markedSpans);
-    var estHeight = estimateHeight ? estimateHeight(line) : 1;
-    if (estHeight != line.height) updateLineHeight(line, estHeight);
-  }
-
-  // Detach a line from the document tree and its markers.
-  function cleanUpLine(line) {
-    line.parent = null;
-    detachMarkedSpans(line);
-  }
-
-  function extractLineClasses(type, output) {
-    if (type) for (;;) {
-      var lineClass = type.match(/(?:^|\s+)line-(background-)?(\S+)/);
-      if (!lineClass) break;
-      type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);
-      var prop = lineClass[1] ? "bgClass" : "textClass";
-      if (output[prop] == null)
-        output[prop] = lineClass[2];
-      else if (!(new RegExp("(?:^|\s)" + lineClass[2] + "(?:$|\s)")).test(output[prop]))
-        output[prop] += " " + lineClass[2];
-    }
-    return type;
-  }
-
-  function callBlankLine(mode, state) {
-    if (mode.blankLine) return mode.blankLine(state);
-    if (!mode.innerMode) return;
-    var inner = CodeMirror.innerMode(mode, state);
-    if (inner.mode.blankLine) return inner.mode.blankLine(inner.state);
-  }
-
-  function readToken(mode, stream, state, inner) {
-    for (var i = 0; i < 10; i++) {
-      if (inner) inner[0] = CodeMirror.innerMode(mode, state).mode;
-      var style = mode.token(stream, state);
-      if (stream.pos > stream.start) return style;
-    }
-    throw new Error("Mode " + mode.name + " failed to advance stream.");
-  }
-
-  // Utility for getTokenAt and getLineTokens
-  function takeToken(cm, pos, precise, asArray) {
-    function getObj(copy) {
-      return {start: stream.start, end: stream.pos,
-              string: stream.current(),
-              type: style || null,
-              state: copy ? copyState(doc.mode, state) : state};
-    }
-
-    var doc = cm.doc, mode = doc.mode, style;
-    pos = clipPos(doc, pos);
-    var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise);
-    var stream = new StringStream(line.text, cm.options.tabSize), tokens;
-    if (asArray) tokens = [];
-    while ((asArray || stream.pos < pos.ch) && !stream.eol()) {
-      stream.start = stream.pos;
-      style = readToken(mode, stream, state);
-      if (asArray) tokens.push(getObj(true));
-    }
-    return asArray ? tokens : getObj();
-  }
-
-  // Run the given mode's parser over a line, calling f for each token.
-  function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) {
-    var flattenSpans = mode.flattenSpans;
-    if (flattenSpans == null) flattenSpans = cm.options.flattenSpans;
-    var curStart = 0, curStyle = null;
-    var stream = new StringStream(text, cm.options.tabSize), style;
-    var inner = cm.options.addModeClass && [null];
-    if (text == "") extractLineClasses(callBlankLine(mode, state), lineClasses);
-    while (!stream.eol()) {
-      if (stream.pos > cm.options.maxHighlightLength) {
-        flattenSpans = false;
-        if (forceToEnd) processLine(cm, text, state, stream.pos);
-        stream.pos = text.length;
-        style = null;
-      } else {
-        style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses);
-      }
-      if (inner) {
-        var mName = inner[0].name;
-        if (mName) style = "m-" + (style ? mName + " " + style : mName);
-      }
-      if (!flattenSpans || curStyle != style) {
-        while (curStart < stream.start) {
-          curStart = Math.min(stream.start, curStart + 50000);
-          f(curStart, curStyle);
-        }
-        curStyle = style;
-      }
-      stream.start = stream.pos;
-    }
-    while (curStart < stream.pos) {
-      // Webkit seems to refuse to render text nodes longer than 57444 characters
-      var pos = Math.min(stream.pos, curStart + 50000);
-      f(pos, curStyle);
-      curStart = pos;
-    }
-  }
-
-  // Compute a style array (an array starting with a mode generation
-  // -- for invalidation -- followed by pairs of end positions and
-  // style strings), which is used to highlight the tokens on the
-  // line.
-  function highlightLine(cm, line, state, forceToEnd) {
-    // A styles array always starts with a number identifying the
-    // mode/overlays that it is based on (for easy invalidation).
-    var st = [cm.state.modeGen], lineClasses = {};
-    // Compute the base array of styles
-    runMode(cm, line.text, cm.doc.mode, state, function(end, style) {
-      st.push(end, style);
-    }, lineClasses, forceToEnd);
-
-    // Run overlays, adjust style array.
-    for (var o = 0; o < cm.state.overlays.length; ++o) {
-      var overlay = cm.state.overlays[o], i = 1, at = 0;
-      runMode(cm, line.text, overlay.mode, true, function(end, style) {
-        var start = i;
-        // Ensure there's a token end at the current position, and that i points at it
-        while (at < end) {
-          var i_end = st[i];
-          if (i_end > end)
-            st.splice(i, 1, end, st[i+1], i_end);
-          i += 2;
-          at = Math.min(end, i_end);
-        }
-        if (!style) return;
-        if (overlay.opaque) {
-          st.splice(start, i - start, end, "cm-overlay " + style);
-          i = start + 2;
-        } else {
-          for (; start < i; start += 2) {
-            var cur = st[start+1];
-            st[start+1] = (cur ? cur + " " : "") + "cm-overlay " + style;
-          }
-        }
-      }, lineClasses);
-    }
-
-    return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null};
-  }
-
-  function getLineStyles(cm, line, updateFrontier) {
-    if (!line.styles || line.styles[0] != cm.state.modeGen) {
-      var result = highlightLine(cm, line, line.stateAfter = getStateBefore(cm, lineNo(line)));
-      line.styles = result.styles;
-      if (result.classes) line.styleClasses = result.classes;
-      else if (line.styleClasses) line.styleClasses = null;
-      if (updateFrontier === cm.doc.frontier) cm.doc.frontier++;
-    }
-    return line.styles;
-  }
-
-  // Lightweight form of highlight -- proceed over this line and
-  // update state, but don't save a style array. Used for lines that
-  // aren't currently visible.
-  function processLine(cm, text, state, startAt) {
-    var mode = cm.doc.mode;
-    var stream = new StringStream(text, cm.options.tabSize);
-    stream.start = stream.pos = startAt || 0;
-    if (text == "") callBlankLine(mode, state);
-    while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) {
-      readToken(mode, stream, state);
-      stream.start = stream.pos;
-    }
-  }
-
-  // Convert a style as returned by a mode (either null, or a string
-  // containing one or more styles) to a CSS style. This is cached,
-  // and also looks for line-wide styles.
-  var styleToClassCache = {}, styleToClassCacheWithMode = {};
-  function interpretTokenStyle(style, options) {
-    if (!style || /^\s*$/.test(style)) return null;
-    var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;
-    return cache[style] ||
-      (cache[style] = style.replace(/\S+/g, "cm-$&"));
-  }
-
-  // Render the DOM representation of the text of a line. Also builds
-  // up a 'line map', which points at the DOM nodes that represent
-  // specific stretches of text, and is used by the measuring code.
-  // The returned object contains the DOM node, this map, and
-  // information about line-wide styles that were set by the mode.
-  function buildLineContent(cm, lineView) {
-    // The padding-right forces the element to have a 'border', which
-    // is needed on Webkit to be able to get line-level bounding
-    // rectangles for it (in measureChar).
-    var content = elt("span", null, null, webkit ? "padding-right: .1px" : null);
-    var builder = {pre: elt("pre", [content]), content: content, col: 0, pos: 0, cm: cm};
-    lineView.measure = {};
-
-    // Iterate over the logical lines that make up this visual line.
-    for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {
-      var line = i ? lineView.rest[i - 1] : lineView.line, order;
-      builder.pos = 0;
-      builder.addToken = buildToken;
-      // Optionally wire in some hacks into the token-rendering
-      // algorithm, to deal with browser quirks.
-      if ((ie || webkit) && cm.getOption("lineWrapping"))
-        builder.addToken = buildTokenSplitSpaces(builder.addToken);
-      if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line)))
-        builder.addToken = buildTokenBadBidi(builder.addToken, order);
-      builder.map = [];
-      var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);
-      insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));
-      if (line.styleClasses) {
-        if (line.styleClasses.bgClass)
-          builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || "");
-        if (line.styleClasses.textClass)
-          builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || "");
-      }
-
-      // Ensure at least a single node is present, for measuring.
-      if (builder.map.length == 0)
-        builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure)));
-
-      // Store the map and a cache object for the current logical line
-      if (i == 0) {
-        lineView.measure.map = builder.map;
-        lineView.measure.cache = {};
-      } else {
-        (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map);
-        (lineView.measure.caches || (lineView.measure.caches = [])).push({});
-      }
-    }
-
-    // See issue #2901
-    if (webkit && /\bcm-tab\b/.test(builder.content.lastChild.className))
-      builder.content.className = "cm-tab-wrap-hack";
-
-    signal(cm, "renderLine", cm, lineView.line, builder.pre);
-    if (builder.pre.className)
-      builder.textClass = joinClasses(builder.pre.className, builder.textClass || "");
-
-    return builder;
-  }
-
-  function defaultSpecialCharPlaceholder(ch) {
-    var token = elt("span", "\u2022", "cm-invalidchar");
-    token.title = "\\u" + ch.charCodeAt(0).toString(16);
-    return token;
-  }
-
-  // Build up the DOM representation for a single token, and add it to
-  // the line map. Takes care to render special characters separately.
-  function buildToken(builder, text, style, startStyle, endStyle, title, css) {
-    if (!text) return;
-    var special = builder.cm.options.specialChars, mustWrap = false;
-    if (!special.test(text)) {
-      builder.col += text.length;
-      var content = document.createTextNode(text);
-      builder.map.push(builder.pos, builder.pos + text.length, content);
-      if (ie && ie_version < 9) mustWrap = true;
-      builder.pos += text.length;
-    } else {
-      var content = document.createDocumentFragment(), pos = 0;
-      while (true) {
-        special.lastIndex = pos;
-        var m = special.exec(text);
-        var skipped = m ? m.index - pos : text.length - pos;
-        if (skipped) {
-          var txt = document.createTextNode(text.slice(pos, pos + skipped));
-          if (ie && ie_version < 9) content.appendChild(elt("span", [txt]));
-          else content.appendChild(txt);
-          builder.map.push(builder.pos, builder.pos + skipped, txt);
-          builder.col += skipped;
-          builder.pos += skipped;
-        }
-        if (!m) break;
-        pos += skipped + 1;
-        if (m[0] == "\t") {
-          var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;
-          var txt = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab"));
-          builder.col += tabWidth;
-        } else {
-          var txt = builder.cm.options.specialCharPlaceholder(m[0]);
-          if (ie && ie_version < 9) content.appendChild(elt("span", [txt]));
-          else content.appendChild(txt);
-          builder.col += 1;
-        }
-        builder.map.push(builder.pos, builder.pos + 1, txt);
-        builder.pos++;
-      }
-    }
-    if (style || startStyle || endStyle || mustWrap || css) {
-      var fullStyle = style || "";
-      if (startStyle) fullStyle += startStyle;
-      if (endStyle) fullStyle += endStyle;
-      var token = elt("span", [content], fullStyle, css);
-      if (title) token.title = title;
-      return builder.content.appendChild(token);
-    }
-    builder.content.appendChild(content);
-  }
-
-  function buildTokenSplitSpaces(inner) {
-    function split(old) {
-      var out = " ";
-      for (var i = 0; i < old.length - 2; ++i) out += i % 2 ? " " : "\u00a0";
-      out += " ";
-      return out;
-    }
-    return function(builder, text, style, startStyle, endStyle, title) {
-      inner(builder, text.replace(/ {3,}/g, split), style, startStyle, endStyle, title);
-    };
-  }
-
-  // Work around nonsense dimensions being reported for stretches of
-  // right-to-left text.
-  function buildTokenBadBidi(inner, order) {
-    return function(builder, text, style, startStyle, endStyle, title) {
-      style = style ? style + " cm-force-border" : "cm-force-border";
-      var start = builder.pos, end = start + text.length;
-      for (;;) {
-        // Find the part that overlaps with the start of this text
-        for (var i = 0; i < order.length; i++) {
-          var part = order[i];
-          if (part.to > start && part.from <= start) break;
-        }
-        if (part.to >= end) return inner(builder, text, style, startStyle, endStyle, title);
-        inner(builder, text.slice(0, part.to - start), style, startStyle, null, title);
-        startStyle = null;
-        text = text.slice(part.to - start);
-        start = part.to;
-      }
-    };
-  }
-
-  function buildCollapsedSpan(builder, size, marker, ignoreWidget) {
-    var widget = !ignoreWidget && marker.widgetNode;
-    if (widget) {
-      builder.map.push(builder.pos, builder.pos + size, widget);
-      builder.content.appendChild(widget);
-    }
-    builder.pos += size;
-  }
-
-  // Outputs a number of spans to make up a line, taking highlighting
-  // and marked text into account.
-  function insertLineContent(line, builder, styles) {
-    var spans = line.markedSpans, allText = line.text, at = 0;
-    if (!spans) {
-      for (var i = 1; i < styles.length; i+=2)
-        builder.addToken(builder, allText.slice(at, at = styles[i]), interpretTokenStyle(styles[i+1], builder.cm.options));
-      return;
-    }
-
-    var len = allText.length, pos = 0, i = 1, text = "", style, css;
-    var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed;
-    for (;;) {
-      if (nextChange == pos) { // Update current marker set
-        spanStyle = spanEndStyle = spanStartStyle = title = css = "";
-        collapsed = null; nextChange = Infinity;
-        var foundBookmarks = [];
-        for (var j = 0; j < spans.length; ++j) {
-          var sp = spans[j], m = sp.marker;
-          if (sp.from <= pos && (sp.to == null || sp.to > pos)) {
-            if (sp.to != null && nextChange > sp.to) { nextChange = sp.to; spanEndStyle = ""; }
-            if (m.className) spanStyle += " " + m.className;
-            if (m.css) css = m.css;
-            if (m.startStyle && sp.from == pos) spanStartStyle += " " + m.startStyle;
-            if (m.endStyle && sp.to == nextChange) spanEndStyle += " " + m.endStyle;
-            if (m.title && !title) title = m.title;
-            if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))
-              collapsed = sp;
-          } else if (sp.from > pos && nextChange > sp.from) {
-            nextChange = sp.from;
-          }
-          if (m.type == "bookmark" && sp.from == pos && m.widgetNode) foundBookmarks.push(m);
-        }
-        if (collapsed && (collapsed.from || 0) == pos) {
-          buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,
-                             collapsed.marker, collapsed.from == null);
-          if (collapsed.to == null) return;
-        }
-        if (!collapsed && foundBookmarks.length) for (var j = 0; j < foundBookmarks.length; ++j)
-          buildCollapsedSpan(builder, 0, foundBookmarks[j]);
-      }
-      if (pos >= len) break;
-
-      var upto = Math.min(len, nextChange);
-      while (true) {
-        if (text) {
-          var end = pos + text.length;
-          if (!collapsed) {
-            var tokenText = end > upto ? text.slice(0, upto - pos) : text;
-            builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,
-                             spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", title, css);
-          }
-          if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}
-          pos = end;
-          spanStartStyle = "";
-        }
-        text = allText.slice(at, at = styles[i++]);
-        style = interpretTokenStyle(styles[i++], builder.cm.options);
-      }
-    }
-  }
-
-  // DOCUMENT DATA STRUCTURE
-
-  // By default, updates that start and end at the beginning of a line
-  // are treated specially, in order to make the association of line
-  // widgets and marker elements with the text behave more intuitive.
-  function isWholeLineUpdate(doc, change) {
-    return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == "" &&
-      (!doc.cm || doc.cm.options.wholeLineUpdateBefore);
-  }
-
-  // Perform a change on the document data structure.
-  function updateDoc(doc, change, markedSpans, estimateHeight) {
-    function spansFor(n) {return markedSpans ? markedSpans[n] : null;}
-    function update(line, text, spans) {
-      updateLine(line, text, spans, estimateHeight);
-      signalLater(line, "change", line, change);
-    }
-
-    var from = change.from, to = change.to, text = change.text;
-    var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);
-    var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;
-
-    // Adjust the line structure
-    if (isWholeLineUpdate(doc, change)) {
-      // This is a whole-line replace. Treated specially to make
-      // sure line objects move the way they are supposed to.
-      for (var i = 0, added = []; i < text.length - 1; ++i)
-        added.push(new Line(text[i], spansFor(i), estimateHeight));
-      update(lastLine, lastLine.text, lastSpans);
-      if (nlines) doc.remove(from.line, nlines);
-      if (added.length) doc.insert(from.line, added);
-    } else if (firstLine == lastLine) {
-      if (text.length == 1) {
-        update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);
-      } else {
-        for (var added = [], i = 1; i < text.length - 1; ++i)
-          added.push(new Line(text[i], spansFor(i), estimateHeight));
-        added.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight));
-        update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
-        doc.insert(from.line + 1, added);
-      }
-    } else if (text.length == 1) {
-      update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));
-      doc.remove(from.line + 1, nlines);
-    } else {
-      update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
-      update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);
-      for (var i = 1, added = []; i < text.length - 1; ++i)
-        added.push(new Line(text[i], spansFor(i), estimateHeight));
-      if (nlines > 1) doc.remove(from.line + 1, nlines - 1);
-      doc.insert(from.line + 1, added);
-    }
-
-    signalLater(doc, "change", doc, change);
-  }
-
-  // The document is represented as a BTree consisting of leaves, with
-  // chunk of lines in them, and branches, with up to ten leaves or
-  // other branch nodes below them. The top node is always a branch
-  // node, and is the document object itself (meaning it has
-  // additional methods and properties).
-  //
-  // All nodes have parent links. The tree is used both to go from
-  // line numbers to line objects, and to go from objects to numbers.
-  // It also indexes by height, and is used to convert between height
-  // and line object, and to find the total height of the document.
-  //
-  // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html
-
-  function LeafChunk(lines) {
-    this.lines = lines;
-    this.parent = null;
-    for (var i = 0, height = 0; i < lines.length; ++i) {
-      lines[i].parent = this;
-      height += lines[i].height;
-    }
-    this.height = height;
-  }
-
-  LeafChunk.prototype = {
-    chunkSize: function() { return this.lines.length; },
-    // Remove the n lines at offset 'at'.
-    removeInner: function(at, n) {
-      for (var i = at, e = at + n; i < e; ++i) {
-        var line = this.lines[i];
-        this.height -= line.height;
-        cleanUpLine(line);
-        signalLater(line, "delete");
-      }
-      this.lines.splice(at, n);
-    },
-    // Helper used to collapse a small branch into a single leaf.
-    collapse: function(lines) {
-      lines.push.apply(lines, this.lines);
-    },
-    // Insert the given array of lines at offset 'at', count them as
-    // having the given height.
-    insertInner: function(at, lines, height) {
-      this.height += height;
-      this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));
-      for (var i = 0; i < lines.length; ++i) lines[i].parent = this;
-    },
-    // Used to iterate over a part of the tree.
-    iterN: function(at, n, op) {
-      for (var e = at + n; at < e; ++at)
-        if (op(this.lines[at])) return true;
-    }
-  };
-
-  function BranchChunk(children) {
-    this.children = children;
-    var size = 0, height = 0;
-    for (var i = 0; i < children.length; ++i) {
-      var ch = children[i];
-      size += ch.chunkSize(); height += ch.height;
-      ch.parent = this;
-    }
-    this.size = size;
-    this.height = height;
-    this.parent = null;
-  }
-
-  BranchChunk.prototype = {
-    chunkSize: function() { return this.size; },
-    removeInner: function(at, n) {
-      this.size -= n;
-      for (var i = 0; i < this.children.length; ++i) {
-        var child = this.children[i], sz = child.chunkSize();
-        if (at < sz) {
-          var rm = Math.min(n, sz - at), oldHeight = child.height;
-          child.removeInner(at, rm);
-          this.height -= oldHeight - child.height;
-          if (sz == rm) { this.children.splice(i--, 1); child.parent = null; }
-          if ((n -= rm) == 0) break;
-          at = 0;
-        } else at -= sz;
-      }
-      // If the result is smaller than 25 lines, ensure that it is a
-      // single leaf node.
-      if (this.size - n < 25 &&
-          (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) {
-        var lines = [];
-        this.collapse(lines);
-        this.children = [new LeafChunk(lines)];
-        this.children[0].parent = this;
-      }
-    },
-    collapse: function(lines) {
-      for (var i = 0; i < this.children.length; ++i) this.children[i].collapse(lines);
-    },
-    insertInner: function(at, lines, height) {
-      this.size += lines.length;
-      this.height += height;
-      for (var i = 0; i < this.children.length; ++i) {
-        var child = this.children[i], sz = child.chunkSize();
-        if (at <= sz) {
-          child.insertInner(at, lines, height);
-          if (child.lines && child.lines.length > 50) {
-            while (child.lines.length > 50) {
-              var spilled = child.lines.splice(child.lines.length - 25, 25);
-              var newleaf = new LeafChunk(spilled);
-              child.height -= newleaf.height;
-              this.children.splice(i + 1, 0, newleaf);
-              newleaf.parent = this;
-            }
-            this.maybeSpill();
-          }
-          break;
-        }
-        at -= sz;
-      }
-    },
-    // When a node has grown, check whether it should be split.
-    maybeSpill: function() {
-      if (this.children.length <= 10) return;
-      var me = this;
-      do {
-        var spilled = me.children.splice(me.children.length - 5, 5);
-        var sibling = new BranchChunk(spilled);
-        if (!me.parent) { // Become the parent node
-          var copy = new BranchChunk(me.children);
-          copy.parent = me;
-          me.children = [copy, sibling];
-          me = copy;
-        } else {
-          me.size -= sibling.size;
-          me.height -= sibling.height;
-          var myIndex = indexOf(me.parent.children, me);
-          me.parent.children.splice(myIndex + 1, 0, sibling);
-        }
-        sibling.parent = me.parent;
-      } while (me.children.length > 10);
-      me.parent.maybeSpill();
-    },
-    iterN: function(at, n, op) {
-      for (var i = 0; i < this.children.length; ++i) {
-        var child = this.children[i], sz = child.chunkSize();
-        if (at < sz) {
-          var used = Math.min(n, sz - at);
-          if (child.iterN(at, used, op)) return true;
-          if ((n -= used) == 0) break;
-          at = 0;
-        } else at -= sz;
-      }
-    }
-  };
-
-  var nextDocId = 0;
-  var Doc = CodeMirror.Doc = function(text, mode, firstLine) {
-    if (!(this instanceof Doc)) return new Doc(text, mode, firstLine);
-    if (firstLine == null) firstLine = 0;
-
-    BranchChunk.call(this, [new LeafChunk([new Line("", null)])]);
-    this.first = firstLine;
-    this.scrollTop = this.scrollLeft = 0;
-    this.cantEdit = false;
-    this.cleanGeneration = 1;
-    this.frontier = firstLine;
-    var start = Pos(firstLine, 0);
-    this.sel = simpleSelection(start);
-    this.history = new History(null);
-    this.id = ++nextDocId;
-    this.modeOption = mode;
-
-    if (typeof text == "string") text = splitLines(text);
-    updateDoc(this, {from: start, to: start, text: text});
-    setSelection(this, simpleSelection(start), sel_dontScroll);
-  };
-
-  Doc.prototype = createObj(BranchChunk.prototype, {
-    constructor: Doc,
-    // Iterate over the document. Supports two forms -- with only one
-    // argument, it calls that for each line in the document. With
-    // three, it iterates over the range given by the first two (with
-    // the second being non-inclusive).
-    iter: function(from, to, op) {
-      if (op) this.iterN(from - this.first, to - from, op);
-      else this.iterN(this.first, this.first + this.size, from);
-    },
-
-    // Non-public interface for adding and removing lines.
-    insert: function(at, lines) {
-      var height = 0;
-      for (var i = 0; i < lines.length; ++i) height += lines[i].height;
-      this.insertInner(at - this.first, lines, height);
-    },
-    remove: function(at, n) { this.removeInner(at - this.first, n); },
-
-    // From here, the methods are part of the public interface. Most
-    // are also available from CodeMirror (editor) instances.
-
-    getValue: function(lineSep) {
-      var lines = getLines(this, this.first, this.first + this.size);
-      if (lineSep === false) return lines;
-      return lines.join(lineSep || "\n");
-    },
-    setValue: docMethodOp(function(code) {
-      var top = Pos(this.first, 0), last = this.first + this.size - 1;
-      makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),
-                        text: splitLines(code), origin: "setValue"}, true);
-      setSelection(this, simpleSelection(top));
-    }),
-    replaceRange: function(code, from, to, origin) {
-      from = clipPos(this, from);
-      to = to ? clipPos(this, to) : from;
-      replaceRange(this, code, from, to, origin);
-    },
-    getRange: function(from, to, lineSep) {
-      var lines = getBetween(this, clipPos(this, from), clipPos(this, to));
-      if (lineSep === false) return lines;
-      return lines.join(lineSep || "\n");
-    },
-
-    getLine: function(line) {var l = this.getLineHandle(line); return l && l.text;},
-
-    getLineHandle: function(line) {if (isLine(this, line)) return getLine(this, line);},
-    getLineNumber: function(line) {return lineNo(line);},
-
-    getLineHandleVisualStart: function(line) {
-      if (typeof line == "number") line = getLine(this, line);
-      return visualLine(line);
-    },
-
-    lineCount: function() {return this.size;},
-    firstLine: function() {return this.first;},
-    lastLine: function() {return this.first + this.size - 1;},
-
-    clipPos: function(pos) {return clipPos(this, pos);},
-
-    getCursor: function(start) {
-      var range = this.sel.primary(), pos;
-      if (start == null || start == "head") pos = range.head;
-      else if (start == "anchor") pos = range.anchor;
-      else if (start == "end" || start == "to" || start === false) pos = range.to();
-      else pos = range.from();
-      return pos;
-    },
-    listSelections: function() { return this.sel.ranges; },
-    somethingSelected: function() {return this.sel.somethingSelected();},
-
-    setCursor: docMethodOp(function(line, ch, options) {
-      setSimpleSelection(this, clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line), null, options);
-    }),
-    setSelection: docMethodOp(function(anchor, head, options) {
-      setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options);
-    }),
-    extendSelection: docMethodOp(function(head, other, options) {
-      extendSelection(this, clipPos(this, head), other && clipPos(this, other), options);
-    }),
-    extendSelections: docMethodOp(function(heads, options) {
-      extendSelections(this, clipPosArray(this, heads, options));
-    }),
-    extendSelectionsBy: docMethodOp(function(f, options) {
-      extendSelections(this, map(this.sel.ranges, f), options);
-    }),
-    setSelections: docMethodOp(function(ranges, primary, options) {
-      if (!ranges.length) return;
-      for (var i = 0, out = []; i < ranges.length; i++)
-        out[i] = new Range(clipPos(this, ranges[i].anchor),
-                           clipPos(this, ranges[i].head));
-      if (primary == null) primary = Math.min(ranges.length - 1, this.sel.primIndex);
-      setSelection(this, normalizeSelection(out, primary), options);
-    }),
-    addSelection: docMethodOp(function(anchor, head, options) {
-      var ranges = this.sel.ranges.slice(0);
-      ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor)));
-      setSelection(this, normalizeSelection(ranges, ranges.length - 1), options);
-    }),
-
-    getSelection: function(lineSep) {
-      var ranges = this.sel.ranges, lines;
-      for (var i = 0; i < ranges.length; i++) {
-        var sel = getBetween(this, ranges[i].from(), ranges[i].to());
-        lines = lines ? lines.concat(sel) : sel;
-      }
-      if (lineSep === false) return lines;
-      else return lines.join(lineSep || "\n");
-    },
-    getSelections: function(lineSep) {
-      var parts = [], ranges = this.sel.ranges;
-      for (var i = 0; i < ranges.length; i++) {
-        var sel = getBetween(this, ranges[i].from(), ranges[i].to());
-        if (lineSep !== false) sel = sel.join(lineSep || "\n");
-        parts[i] = sel;
-      }
-      return parts;
-    },
-    replaceSelection: function(code, collapse, origin) {
-      var dup = [];
-      for (var i = 0; i < this.sel.ranges.length; i++)
-        dup[i] = code;
-      this.replaceSelections(dup, collapse, origin || "+input");
-    },
-    replaceSelections: docMethodOp(function(code, collapse, origin) {
-      var changes = [], sel = this.sel;
-      for (var i = 0; i < sel.ranges.length; i++) {
-        var range = sel.ranges[i];
-        changes[i] = {from: range.from(), to: range.to(), text: splitLines(code[i]), origin: origin};
-      }
-      var newSel = collapse && collapse != "end" && computeReplacedSel(this, changes, collapse);
-      for (var i = changes.length - 1; i >= 0; i--)
-        makeChange(this, changes[i]);
-      if (newSel) setSelectionReplaceHistory(this, newSel);
-      else if (this.cm) ensureCursorVisible(this.cm);
-    }),
-    undo: docMethodOp(function() {makeChangeFromHistory(this, "undo");}),
-    redo: docMethodOp(function() {makeChangeFromHistory(this, "redo");}),
-    undoSelection: docMethodOp(function() {makeChangeFromHistory(this, "undo", true);}),
-    redoSelection: docMethodOp(function() {makeChangeFromHistory(this, "redo", true);}),
-
-    setExtending: function(val) {this.extend = val;},
-    getExtending: function() {return this.extend;},
-
-    historySize: function() {
-      var hist = this.history, done = 0, undone = 0;
-      for (var i = 0; i < hist.done.length; i++) if (!hist.done[i].ranges) ++done;
-      for (var i = 0; i < hist.undone.length; i++) if (!hist.undone[i].ranges) ++undone;
-      return {undo: done, redo: undone};
-    },
-    clearHistory: function() {this.history = new History(this.history.maxGeneration);},
-
-    markClean: function() {
-      this.cleanGeneration = this.changeGeneration(true);
-    },
-    changeGeneration: function(forceSplit) {
-      if (forceSplit)
-        this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null;
-      return this.history.generation;
-    },
-    isClean: function (gen) {
-      return this.history.generation == (gen || this.cleanGeneration);
-    },
-
-    getHistory: function() {
-      return {done: copyHistoryArray(this.history.done),
-              undone: copyHistoryArray(this.history.undone)};
-    },
-    setHistory: function(histData) {
-      var hist = this.history = new History(this.history.maxGeneration);
-      hist.done = copyHistoryArray(histData.done.slice(0), null, true);
-      hist.undone = copyHistoryArray(histData.undone.slice(0), null, true);
-    },
-
-    addLineClass: docMethodOp(function(handle, where, cls) {
-      return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function(line) {
-        var prop = where == "text" ? "textClass"
-                 : where == "background" ? "bgClass"
-                 : where == "gutter" ? "gutterClass" : "wrapClass";
-        if (!line[prop]) line[prop] = cls;
-        else if (classTest(cls).test(line[prop])) return false;
-        else line[prop] += " " + cls;
-        return true;
-      });
-    }),
-    removeLineClass: docMethodOp(function(handle, where, cls) {
-      return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function(line) {
-        var prop = where == "text" ? "textClass"
-                 : where == "background" ? "bgClass"
-                 : where == "gutter" ? "gutterClass" : "wrapClass";
-        var cur = line[prop];
-        if (!cur) return false;
-        else if (cls == null) line[prop] = null;
-        else {
-          var found = cur.match(classTest(cls));
-          if (!found) return false;
-          var end = found.index + found[0].length;
-          line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null;
-        }
-        return true;
-      });
-    }),
-
-    markText: function(from, to, options) {
-      return markText(this, clipPos(this, from), clipPos(this, to), options, "range");
-    },
-    setBookmark: function(pos, options) {
-      var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),
-                      insertLeft: options && options.insertLeft,
-                      clearWhenEmpty: false, shared: options && options.shared};
-      pos = clipPos(this, pos);
-      return markText(this, pos, pos, realOpts, "bookmark");
-    },
-    findMarksAt: function(pos) {
-      pos = clipPos(this, pos);
-      var markers = [], spans = getLine(this, pos.line).markedSpans;
-      if (spans) for (var i = 0; i < spans.length; ++i) {
-        var span = spans[i];
-        if ((span.from == null || span.from <= pos.ch) &&
-            (span.to == null || span.to >= pos.ch))
-          markers.push(span.marker.parent || span.marker);
-      }
-      return markers;
-    },
-    findMarks: function(from, to, filter) {
-      from = clipPos(this, from); to = clipPos(this, to);
-      var found = [], lineNo = from.line;
-      this.iter(from.line, to.line + 1, function(line) {
-        var spans = line.markedSpans;
-        if (spans) for (var i = 0; i < spans.length; i++) {
-          var span = spans[i];
-          if (!(lineNo == from.line && from.ch > span.to ||
-                span.from == null && lineNo != from.line||
-                lineNo == to.line && span.from > to.ch) &&
-              (!filter || filter(span.marker)))
-            found.push(span.marker.parent || span.marker);
-        }
-        ++lineNo;
-      });
-      return found;
-    },
-    getAllMarks: function() {
-      var markers = [];
-      this.iter(function(line) {
-        var sps = line.markedSpans;
-        if (sps) for (var i = 0; i < sps.length; ++i)
-          if (sps[i].from != null) markers.push(sps[i].marker);
-      });
-      return markers;
-    },
-
-    posFromIndex: function(off) {
-      var ch, lineNo = this.first;
-      this.iter(function(line) {
-        var sz = line.text.length + 1;
-        if (sz > off) { ch = off; return true; }
-        off -= sz;
-        ++lineNo;
-      });
-      return clipPos(this, Pos(lineNo, ch));
-    },
-    indexFromPos: function (coords) {
-      coords = clipPos(this, coords);
-      var index = coords.ch;
-      if (coords.line < this.first || coords.ch < 0) return 0;
-      this.iter(this.first, coords.line, function (line) {
-        index += line.text.length + 1;
-      });
-      return index;
-    },
-
-    copy: function(copyHistory) {
-      var doc = new Doc(getLines(this, this.first, this.first + this.size), this.modeOption, this.first);
-      doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;
-      doc.sel = this.sel;
-      doc.extend = false;
-      if (copyHistory) {
-        doc.history.undoDepth = this.history.undoDepth;
-        doc.setHistory(this.getHistory());
-      }
-      return doc;
-    },
-
-    linkedDoc: function(options) {
-      if (!options) options = {};
-      var from = this.first, to = this.first + this.size;
-      if (options.from != null && options.from > from) from = options.from;
-      if (options.to != null && options.to < to) to = options.to;
-      var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from);
-      if (options.sharedHist) copy.history = this.history;
-      (this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});
-      copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];
-      copySharedMarkers(copy, findSharedMarkers(this));
-      return copy;
-    },
-    unlinkDoc: function(other) {
-      if (other instanceof CodeMirror) other = other.doc;
-      if (this.linked) for (var i = 0; i < this.linked.length; ++i) {
-        var link = this.linked[i];
-        if (link.doc != other) continue;
-        this.linked.splice(i, 1);
-        other.unlinkDoc(this);
-        detachSharedMarkers(findSharedMarkers(this));
-        break;
-      }
-      // If the histories were shared, split them again
-      if (other.history == this.history) {
-        var splitIds = [other.id];
-        linkedDocs(other, function(doc) {splitIds.push(doc.id);}, true);
-        other.history = new History(null);
-        other.history.done = copyHistoryArray(this.history.done, splitIds);
-        other.history.undone = copyHistoryArray(this.history.undone, splitIds);
-      }
-    },
-    iterLinkedDocs: function(f) {linkedDocs(this, f);},
-
-    getMode: function() {return this.mode;},
-    getEditor: function() {return this.cm;}
-  });
-
-  // Public alias.
-  Doc.prototype.eachLine = Doc.prototype.iter;
-
-  // Set up methods on CodeMirror's prototype to redirect to the editor's document.
-  var dontDelegate = "iter insert remove copy getEditor".split(" ");
-  for (var prop in Doc.prototype) if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)
-    CodeMirror.prototype[prop] = (function(method) {
-      return function() {return method.apply(this.doc, arguments);};
-    })(Doc.prototype[prop]);
-
-  eventMixin(Doc);
-
-  // Call f for all linked documents.
-  function linkedDocs(doc, f, sharedHistOnly) {
-    function propagate(doc, skip, sharedHist) {
-      if (doc.linked) for (var i = 0; i < doc.linked.length; ++i) {
-        var rel = doc.linked[i];
-        if (rel.doc == skip) continue;
-        var shared = sharedHist && rel.sharedHist;
-        if (sharedHistOnly && !shared) continue;
-        f(rel.doc, shared);
-        propagate(rel.doc, doc, shared);
-      }
-    }
-    propagate(doc, null, true);
-  }
-
-  // Attach a document to an editor.
-  function attachDoc(cm, doc) {
-    if (doc.cm) throw new Error("This document is already in use.");
-    cm.doc = doc;
-    doc.cm = cm;
-    estimateLineHeights(cm);
-    loadMode(cm);
-    if (!cm.options.lineWrapping) findMaxLine(cm);
-    cm.options.mode = doc.modeOption;
-    regChange(cm);
-  }
-
-  // LINE UTILITIES
-
-  // Find the line object corresponding to the given line number.
-  function getLine(doc, n) {
-    n -= doc.first;
-    if (n < 0 || n >= doc.size) throw new Error("There is no line " + (n + doc.first) + " in the document.");
-    for (var chunk = doc; !chunk.lines;) {
-      for (var i = 0;; ++i) {
-        var child = chunk.children[i], sz = child.chunkSize();
-        if (n < sz) { chunk = child; break; }
-        n -= sz;
-      }
-    }
-    return chunk.lines[n];
-  }
-
-  // Get the part of a document between two positions, as an array of
-  // strings.
-  function getBetween(doc, start, end) {
-    var out = [], n = start.line;
-    doc.iter(start.line, end.line + 1, function(line) {
-      var text = line.text;
-      if (n == end.line) text = text.slice(0, end.ch);
-      if (n == start.line) text = text.slice(start.ch);
-      out.push(text);
-      ++n;
-    });
-    return out;
-  }
-  // Get the lines between from and to, as array of strings.
-  function getLines(doc, from, to) {
-    var out = [];
-    doc.iter(from, to, function(line) { out.push(line.text); });
-    return out;
-  }
-
-  // Update the height of a line, propagating the height change
-  // upwards to parent nodes.
-  function updateLineHeight(line, height) {
-    var diff = height - line.height;
-    if (diff) for (var n = line; n; n = n.parent) n.height += diff;
-  }
-
-  // Given a line object, find its line number by walking up through
-  // its parent links.
-  function lineNo(line) {
-    if (line.parent == null) return null;
-    var cur = line.parent, no = indexOf(cur.lines, line);
-    for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {
-      for (var i = 0;; ++i) {
-        if (chunk.children[i] == cur) break;
-        no += chunk.children[i].chunkSize();
-      }
-    }
-    return no + cur.first;
-  }
-
-  // Find the line at the given vertical position, using the height
-  // information in the document tree.
-  function lineAtHeight(chunk, h) {
-    var n = chunk.first;
-    outer: do {
-      for (var i = 0; i < chunk.children.length; ++i) {
-        var child = chunk.children[i], ch = child.height;
-        if (h < ch) { chunk = child; continue outer; }
-        h -= ch;
-        n += child.chunkSize();
-      }
-      return n;
-    } while (!chunk.lines);
-    for (var i = 0; i < chunk.lines.length; ++i) {
-      var line = chunk.lines[i], lh = line.height;
-      if (h < lh) break;
-      h -= lh;
-    }
-    return n + i;
-  }
-
-
-  // Find the height above the given line.
-  function heightAtLine(lineObj) {
-    lineObj = visualLine(lineObj);
-
-    var h = 0, chunk = lineObj.parent;
-    for (var i = 0; i < chunk.lines.length; ++i) {
-      var line = chunk.lines[i];
-      if (line == lineObj) break;
-      else h += line.height;
-    }
-    for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {
-      for (var i = 0; i < p.children.length; ++i) {
-        var cur = p.children[i];
-        if (cur == chunk) break;
-        else h += cur.height;
-      }
-    }
-    return h;
-  }
-
-  // Get the bidi ordering for the given line (and cache it). Returns
-  // false for lines that are fully left-to-right, and an array of
-  // BidiSpan objects otherwise.
-  function getOrder(line) {
-    var order = line.order;
-    if (order == null) order = line.order = bidiOrdering(line.text);
-    return order;
-  }
-
-  // HISTORY
-
-  function History(startGen) {
-    // Arrays of change events and selections. Doing something adds an
-    // event to done and clears undo. Undoing moves events from done
-    // to undone, redoing moves them in the other direction.
-    this.done = []; this.undone = [];
-    this.undoDepth = Infinity;
-    // Used to track when changes can be merged into a single undo
-    // event
-    this.lastModTime = this.lastSelTime = 0;
-    this.lastOp = this.lastSelOp = null;
-    this.lastOrigin = this.lastSelOrigin = null;
-    // Used by the isClean() method
-    this.generation = this.maxGeneration = startGen || 1;
-  }
-
-  // Create a history change event from an updateDoc-style change
-  // object.
-  function historyChangeFromChange(doc, change) {
-    var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)};
-    attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);
-    linkedDocs(doc, function(doc) {attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);}, true);
-    return histChange;
-  }
-
-  // Pop all selection events off the end of a history array. Stop at
-  // a change event.
-  function clearSelectionEvents(array) {
-    while (array.length) {
-      var last = lst(array);
-      if (last.ranges) array.pop();
-      else break;
-    }
-  }
-
-  // Find the top change event in the history. Pop off selection
-  // events that are in the way.
-  function lastChangeEvent(hist, force) {
-    if (force) {
-      clearSelectionEvents(hist.done);
-      return lst(hist.done);
-    } else if (hist.done.length && !lst(hist.done).ranges) {
-      return lst(hist.done);
-    } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {
-      hist.done.pop();
-      return lst(hist.done);
-    }
-  }
-
-  // Register a change in the history. Merges changes that are within
-  // a single operation, ore are close together with an origin that
-  // allows merging (starting with "+") into a single event.
-  function addChangeToHistory(doc, change, selAfter, opId) {
-    var hist = doc.history;
-    hist.undone.length = 0;
-    var time = +new Date, cur;
-
-    if ((hist.lastOp == opId ||
-         hist.lastOrigin == change.origin && change.origin &&
-         ((change.origin.charAt(0) == "+" && doc.cm && hist.lastModTime > time - doc.cm.options.historyEventDelay) ||
-          change.origin.charAt(0) == "*")) &&
-        (cur = lastChangeEvent(hist, hist.lastOp == opId))) {
-      // Merge this change into the last event
-      var last = lst(cur.changes);
-      if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) {
-        // Optimized case for simple insertion -- don't want to add
-        // new changesets for every character typed
-        last.to = changeEnd(change);
-      } else {
-        // Add new sub-event
-        cur.changes.push(historyChangeFromChange(doc, change));
-      }
-    } else {
-      // Can not be merged, start a new event.
-      var before = lst(hist.done);
-      if (!before || !before.ranges)
-        pushSelectionToHistory(doc.sel, hist.done);
-      cur = {changes: [historyChangeFromChange(doc, change)],
-             generation: hist.generation};
-      hist.done.push(cur);
-      while (hist.done.length > hist.undoDepth) {
-        hist.done.shift();
-        if (!hist.done[0].ranges) hist.done.shift();
-      }
-    }
-    hist.done.push(selAfter);
-    hist.generation = ++hist.maxGeneration;
-    hist.lastModTime = hist.lastSelTime = time;
-    hist.lastOp = hist.lastSelOp = opId;
-    hist.lastOrigin = hist.lastSelOrigin = change.origin;
-
-    if (!last) signal(doc, "historyAdded");
-  }
-
-  function selectionEventCanBeMerged(doc, origin, prev, sel) {
-    var ch = origin.charAt(0);
-    return ch == "*" ||
-      ch == "+" &&
-      prev.ranges.length == sel.ranges.length &&
-      prev.somethingSelected() == sel.somethingSelected() &&
-      new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500);
-  }
-
-  // Called whenever the selection changes, sets the new selection as
-  // the pending selection in the history, and pushes the old pending
-  // selection into the 'done' array when it was significantly
-  // different (in number of selected ranges, emptiness, or time).
-  function addSelectionToHistory(doc, sel, opId, options) {
-    var hist = doc.history, origin = options && options.origin;
-
-    // A new event is started when the previous origin does not match
-    // the current, or the origins don't allow matching. Origins
-    // starting with * are always merged, those starting with + are
-    // merged when similar and close together in time.
-    if (opId == hist.lastSelOp ||
-        (origin && hist.lastSelOrigin == origin &&
-         (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin ||
-          selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))))
-      hist.done[hist.done.length - 1] = sel;
-    else
-      pushSelectionToHistory(sel, hist.done);
-
-    hist.lastSelTime = +new Date;
-    hist.lastSelOrigin = origin;
-    hist.lastSelOp = opId;
-    if (options && options.clearRedo !== false)
-      clearSelectionEvents(hist.undone);
-  }
-
-  function pushSelectionToHistory(sel, dest) {
-    var top = lst(dest);
-    if (!(top && top.ranges && top.equals(sel)))
-      dest.push(sel);
-  }
-
-  // Used to store marked span information in the history.
-  function attachLocalSpans(doc, change, from, to) {
-    var existing = change["spans_" + doc.id], n = 0;
-    doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function(line) {
-      if (line.markedSpans)
-        (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans;
-      ++n;
-    });
-  }
-
-  // When un/re-doing restores text containing marked spans, those
-  // that have been explicitly cleared should not be restored.
-  function removeClearedSpans(spans) {
-    if (!spans) return null;
-    for (var i = 0, out; i < spans.length; ++i) {
-      if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); }
-      else if (out) out.push(spans[i]);
-    }
-    return !out ? spans : out.length ? out : null;
-  }
-
-  // Retrieve and filter the old marked spans stored in a change event.
-  function getOldSpans(doc, change) {
-    var found = change["spans_" + doc.id];
-    if (!found) return null;
-    for (var i = 0, nw = []; i < change.text.length; ++i)
-      nw.push(removeClearedSpans(found[i]));
-    return nw;
-  }
-
-  // Used both to provide a JSON-safe object in .getHistory, and, when
-  // detaching a document, to split the history in two
-  function copyHistoryArray(events, newGroup, instantiateSel) {
-    for (var i = 0, copy = []; i < events.length; ++i) {
-      var event = events[i];
-      if (event.ranges) {
-        copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);
-        continue;
-      }
-      var changes = event.changes, newChanges = [];
-      copy.push({changes: newChanges});
-      for (var j = 0; j < changes.length; ++j) {
-        var change = changes[j], m;
-        newChanges.push({from: change.from, to: change.to, text: change.text});
-        if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\d+)$/)) {
-          if (indexOf(newGroup, Number(m[1])) > -1) {
-            lst(newChanges)[prop] = change[prop];
-            delete change[prop];
-          }
-        }
-      }
-    }
-    return copy;
-  }
-
-  // Rebasing/resetting history to deal with externally-sourced changes
-
-  function rebaseHistSelSingle(pos, from, to, diff) {
-    if (to < pos.line) {
-      pos.line += diff;
-    } else if (from < pos.line) {
-      pos.line = from;
-      pos.ch = 0;
-    }
-  }
-
-  // Tries to rebase an array of history events given a change in the
-  // document. If the change touches the same lines as the event, the
-  // event, and everything 'behind' it, is discarded. If the change is
-  // before the event, the event's positions are updated. Uses a
-  // copy-on-write scheme for the positions, to avoid having to
-  // reallocate them all on every rebase, but also avoid problems with
-  // shared position objects being unsafely updated.
-  function rebaseHistArray(array, from, to, diff) {
-    for (var i = 0; i < array.length; ++i) {
-      var sub = array[i], ok = true;
-      if (sub.ranges) {
-        if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; }
-        for (var j = 0; j < sub.ranges.length; j++) {
-          rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff);
-          rebaseHistSelSingle(sub.ranges[j].head, from, to, diff);
-        }
-        continue;
-      }
-      for (var j = 0; j < sub.changes.length; ++j) {
-        var cur = sub.changes[j];
-        if (to < cur.from.line) {
-          cur.from = Pos(cur.from.line + diff, cur.from.ch);
-          cur.to = Pos(cur.to.line + diff, cur.to.ch);
-        } else if (from <= cur.to.line) {
-          ok = false;
-          break;
-        }
-      }
-      if (!ok) {
-        array.splice(0, i + 1);
-        i = 0;
-      }
-    }
-  }
-
-  function rebaseHist(hist, change) {
-    var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;
-    rebaseHistArray(hist.done, from, to, diff);
-    rebaseHistArray(hist.undone, from, to, diff);
-  }
-
-  // EVENT UTILITIES
-
-  // Due to the fact that we still support jurassic IE versions, some
-  // compatibility wrappers are needed.
-
-  var e_preventDefault = CodeMirror.e_preventDefault = function(e) {
-    if (e.preventDefault) e.preventDefault();
-    else e.returnValue = false;
-  };
-  var e_stopPropagation = CodeMirror.e_stopPropagation = function(e) {
-    if (e.stopPropagation) e.stopPropagation();
-    else e.cancelBubble = true;
-  };
-  function e_defaultPrevented(e) {
-    return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false;
-  }
-  var e_stop = CodeMirror.e_stop = function(e) {e_preventDefault(e); e_stopPropagation(e);};
-
-  function e_target(e) {return e.target || e.srcElement;}
-  function e_button(e) {
-    var b = e.which;
-    if (b == null) {
-      if (e.button & 1) b = 1;
-      else if (e.button & 2) b = 3;
-      else if (e.button & 4) b = 2;
-    }
-    if (mac && e.ctrlKey && b == 1) b = 3;
-    return b;
-  }
-
-  // EVENT HANDLING
-
-  // Lightweight event framework. on/off also work on DOM nodes,
-  // registering native DOM handlers.
-
-  var on = CodeMirror.on = function(emitter, type, f) {
-    if (emitter.addEventListener)
-      emitter.addEventListener(type, f, false);
-    else if (emitter.attachEvent)
-      emitter.attachEvent("on" + type, f);
-    else {
-      var map = emitter._handlers || (emitter._handlers = {});
-      var arr = map[type] || (map[type] = []);
-      arr.push(f);
-    }
-  };
-
-  var off = CodeMirror.off = function(emitter, type, f) {
-    if (emitter.removeEventListener)
-      emitter.removeEventListener(type, f, false);
-    else if (emitter.detachEvent)
-      emitter.detachEvent("on" + type, f);
-    else {
-      var arr = emitter._handlers && emitter._handlers[type];
-      if (!arr) return;
-      for (var i = 0; i < arr.length; ++i)
-        if (arr[i] == f) { arr.splice(i, 1); break; }
-    }
-  };
-
-  var signal = CodeMirror.signal = function(emitter, type /*, values...*/) {
-    var arr = emitter._handlers && emitter._handlers[type];
-    if (!arr) return;
-    var args = Array.prototype.slice.call(arguments, 2);
-    for (var i = 0; i < arr.length; ++i) arr[i].apply(null, args);
-  };
-
-  var orphanDelayedCallbacks = null;
-
-  // Often, we want to signal events at a point where we are in the
-  // middle of some work, but don't want the handler to start calling
-  // other methods on the editor, which might be in an inconsistent
-  // state or simply not expect any other events to happen.
-  // signalLater looks whether there are any handlers, and schedules
-  // them to be executed when the last operation ends, or, if no
-  // operation is active, when a timeout fires.
-  function signalLater(emitter, type /*, values...*/) {
-    var arr = emitter._handlers && emitter._handlers[type];
-    if (!arr) return;
-    var args = Array.prototype.slice.call(arguments, 2), list;
-    if (operationGroup) {
-      list = operationGroup.delayedCallbacks;
-    } else if (orphanDelayedCallbacks) {
-      list = orphanDelayedCallbacks;
-    } else {
-      list = orphanDelayedCallbacks = [];
-      setTimeout(fireOrphanDelayed, 0);
-    }
-    function bnd(f) {return function(){f.apply(null, args);};};
-    for (var i = 0; i < arr.length; ++i)
-      list.push(bnd(arr[i]));
-  }
-
-  function fireOrphanDelayed() {
-    var delayed = orphanDelayedCallbacks;
-    orphanDelayedCallbacks = null;
-    for (var i = 0; i < delayed.length; ++i) delayed[i]();
-  }
-
-  // The DOM events that CodeMirror handles can be overridden by
-  // registering a (non-DOM) handler on the editor for the event name,
-  // and preventDefault-ing the event in that handler.
-  function signalDOMEvent(cm, e, override) {
-    if (typeof e == "string")
-      e = {type: e, preventDefault: function() { this.defaultPrevented = true; }};
-    signal(cm, override || e.type, cm, e);
-    return e_defaultPrevented(e) || e.codemirrorIgnore;
-  }
-
-  function signalCursorActivity(cm) {
-    var arr = cm._handlers && cm._handlers.cursorActivity;
-    if (!arr) return;
-    var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);
-    for (var i = 0; i < arr.length; ++i) if (indexOf(set, arr[i]) == -1)
-      set.push(arr[i]);
-  }
-
-  function hasHandler(emitter, type) {
-    var arr = emitter._handlers && emitter._handlers[type];
-    return arr && arr.length > 0;
-  }
-
-  // Add on and off methods to a constructor's prototype, to make
-  // registering events on such objects more convenient.
-  function eventMixin(ctor) {
-    ctor.prototype.on = function(type, f) {on(this, type, f);};
-    ctor.prototype.off = function(type, f) {off(this, type, f);};
-  }
-
-  // MISC UTILITIES
-
-  // Number of pixels added to scroller and sizer to hide scrollbar
-  var scrollerGap = 30;
-
-  // Returned or thrown by various protocols to signal 'I'm not
-  // handling this'.
-  var Pass = CodeMirror.Pass = {toString: function(){return "CodeMirror.Pass";}};
-
-  // Reused option objects for setSelection & friends
-  var sel_dontScroll = {scroll: false}, sel_mouse = {origin: "*mouse"}, sel_move = {origin: "+move"};
-
-  function Delayed() {this.id = null;}
-  Delayed.prototype.set = function(ms, f) {
-    clearTimeout(this.id);
-    this.id = setTimeout(f, ms);
-  };
-
-  // Counts the column offset in a string, taking tabs into account.
-  // Used mostly to find indentation.
-  var countColumn = CodeMirror.countColumn = function(string, end, tabSize, startIndex, startValue) {
-    if (end == null) {
-      end = string.search(/[^\s\u00a0]/);
-      if (end == -1) end = string.length;
-    }
-    for (var i = startIndex || 0, n = startValue || 0;;) {
-      var nextTab = string.indexOf("\t", i);
-      if (nextTab < 0 || nextTab >= end)
-        return n + (end - i);
-      n += nextTab - i;
-      n += tabSize - (n % tabSize);
-      i = nextTab + 1;
-    }
-  };
-
-  // The inverse of countColumn -- find the offset that corresponds to
-  // a particular column.
-  function findColumn(string, goal, tabSize) {
-    for (var pos = 0, col = 0;;) {
-      var nextTab = string.indexOf("\t", pos);
-      if (nextTab == -1) nextTab = string.length;
-      var skipped = nextTab - pos;
-      if (nextTab == string.length || col + skipped >= goal)
-        return pos + Math.min(skipped, goal - col);
-      col += nextTab - pos;
-      col += tabSize - (col % tabSize);
-      pos = nextTab + 1;
-      if (col >= goal) return pos;
-    }
-  }
-
-  var spaceStrs = [""];
-  function spaceStr(n) {
-    while (spaceStrs.length <= n)
-      spaceStrs.push(lst(spaceStrs) + " ");
-    return spaceStrs[n];
-  }
-
-  function lst(arr) { return arr[arr.length-1]; }
-
-  var selectInput = function(node) { node.select(); };
-  if (ios) // Mobile Safari apparently has a bug where select() is broken.
-    selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; };
-  else if (ie) // Suppress mysterious IE10 errors
-    selectInput = function(node) { try { node.select(); } catch(_e) {} };
-
-  function indexOf(array, elt) {
-    for (var i = 0; i < array.length; ++i)
-      if (array[i] == elt) return i;
-    return -1;
-  }
-  if ([].indexOf) indexOf = function(array, elt) { return array.indexOf(elt); };
-  function map(array, f) {
-    var out = [];
-    for (var i = 0; i < array.length; i++) out[i] = f(array[i], i);
-    return out;
-  }
-  if ([].map) map = function(array, f) { return array.map(f); };
-
-  function createObj(base, props) {
-    var inst;
-    if (Object.create) {
-      inst = Object.create(base);
-    } else {
-      var ctor = function() {};
-      ctor.prototype = base;
-      inst = new ctor();
-    }
-    if (props) copyObj(props, inst);
-    return inst;
-  };
-
-  function copyObj(obj, target, overwrite) {
-    if (!target) target = {};
-    for (var prop in obj)
-      if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))
-        target[prop] = obj[prop];
-    return target;
-  }
-
-  function bind(f) {
-    var args = Array.prototype.slice.call(arguments, 1);
-    return function(){return f.apply(null, args);};
-  }
-
-  var nonASCIISingleCaseWordChar = /[\u00df\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
-  var isWordCharBasic = CodeMirror.isWordChar = function(ch) {
-    return /\w/.test(ch) || ch > "\x80" &&
-      (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch));
-  };
-  function isWordChar(ch, helper) {
-    if (!helper) return isWordCharBasic(ch);
-    if (helper.source.indexOf("\\w") > -1 && isWordCharBasic(ch)) return true;
-    return helper.test(ch);
-  }
-
-  function isEmpty(obj) {
-    for (var n in obj) if (obj.hasOwnProperty(n) && obj[n]) return false;
-    return true;
-  }
-
-  // Extending unicode characters. A series of a non-extending char +
-  // any number of extending chars is treated as a single unit as far
-  // as editing and measuring is concerned. This is not fully correct,
-  // since some scripts/fonts/browsers also treat other configurations
-  // of code points as a group.
-  var extendingChars = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;
-  function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch); }
-
-  // DOM UTILITIES
-
-  function elt(tag, content, className, style) {
-    var e = document.createElement(tag);
-    if (className) e.className = className;
-    if (style) e.style.cssText = style;
-    if (typeof content == "string") e.appendChild(document.createTextNode(content));
-    else if (content) for (var i = 0; i < content.length; ++i) e.appendChild(content[i]);
-    return e;
-  }
-
-  var range;
-  if (document.createRange) range = function(node, start, end) {
-    var r = document.createRange();
-    r.setEnd(node, end);
-    r.setStart(node, start);
-    return r;
-  };
-  else range = function(node, start, end) {
-    var r = document.body.createTextRange();
-    try { r.moveToElementText(node.parentNode); }
-    catch(e) { return r; }
-    r.collapse(true);
-    r.moveEnd("character", end);
-    r.moveStart("character", start);
-    return r;
-  };
-
-  function removeChildren(e) {
-    for (var count = e.childNodes.length; count > 0; --count)
-      e.removeChild(e.firstChild);
-    return e;
-  }
-
-  function removeChildrenAndAdd(parent, e) {
-    return removeChildren(parent).appendChild(e);
-  }
-
-  function contains(parent, child) {
-    if (parent.contains)
-      return parent.contains(child);
-    while (child = child.parentNode)
-      if (child == parent) return true;
-  }
-
-  function activeElt() { return document.activeElement; }
-  // Older versions of IE throws unspecified error when touching
-  // document.activeElement in some cases (during loading, in iframe)
-  if (ie && ie_version < 11) activeElt = function() {
-    try { return document.activeElement; }
-    catch(e) { return document.body; }
-  };
-
-  function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*"); }
-  var rmClass = CodeMirror.rmClass = function(node, cls) {
-    var current = node.className;
-    var match = classTest(cls).exec(current);
-    if (match) {
-      var after = current.slice(match.index + match[0].length);
-      node.className = current.slice(0, match.index) + (after ? match[1] + after : "");
-    }
-  };
-  var addClass = CodeMirror.addClass = function(node, cls) {
-    var current = node.className;
-    if (!classTest(cls).test(current)) node.className += (current ? " " : "") + cls;
-  };
-  function joinClasses(a, b) {
-    var as = a.split(" ");
-    for (var i = 0; i < as.length; i++)
-      if (as[i] && !classTest(as[i]).test(b)) b += " " + as[i];
-    return b;
-  }
-
-  // WINDOW-WIDE EVENTS
-
-  // These must be handled carefully, because naively registering a
-  // handler for each editor will cause the editors to never be
-  // garbage collected.
-
-  function forEachCodeMirror(f) {
-    if (!document.body.getElementsByClassName) return;
-    var byClass = document.body.getElementsByClassName("CodeMirror");
-    for (var i = 0; i < byClass.length; i++) {
-      var cm = byClass[i].CodeMirror;
-      if (cm) f(cm);
-    }
-  }
-
-  var globalsRegistered = false;
-  function ensureGlobalHandlers() {
-    if (globalsRegistered) return;
-    registerGlobalHandlers();
-    globalsRegistered = true;
-  }
-  function registerGlobalHandlers() {
-    // When the window resizes, we need to refresh active editors.
-    var resizeTimer;
-    on(window, "resize", function() {
-      if (resizeTimer == null) resizeTimer = setTimeout(function() {
-        resizeTimer = null;
-        forEachCodeMirror(onResize);
-      }, 100);
-    });
-    // When the window loses focus, we want to show the editor as blurred
-    on(window, "blur", function() {
-      forEachCodeMirror(onBlur);
-    });
-  }
-
-  // FEATURE DETECTION
-
-  // Detect drag-and-drop
-  var dragAndDrop = function() {
-    // There is *some* kind of drag-and-drop support in IE6-8, but I
-    // couldn't get it to work yet.
-    if (ie && ie_version < 9) return false;
-    var div = elt('div');
-    return "draggable" in div || "dragDrop" in div;
-  }();
-
-  var zwspSupported;
-  function zeroWidthElement(measure) {
-    if (zwspSupported == null) {
-      var test = elt("span", "\u200b");
-      removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")]));
-      if (measure.firstChild.offsetHeight != 0)
-        zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8);
-    }
-    if (zwspSupported) return elt("span", "\u200b");
-    else return elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px");
-  }
-
-  // Feature-detect IE's crummy client rect reporting for bidi text
-  var badBidiRects;
-  function hasBadBidiRects(measure) {
-    if (badBidiRects != null) return badBidiRects;
-    var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA"));
-    var r0 = range(txt, 0, 1).getBoundingClientRect();
-    if (!r0 || r0.left == r0.right) return false; // Safari returns null in some cases (#2780)
-    var r1 = range(txt, 1, 2).getBoundingClientRect();
-    return badBidiRects = (r1.right - r0.right < 3);
-  }
-
-  // See if "".split is the broken IE version, if so, provide an
-  // alternative way to split lines.
-  var splitLines = CodeMirror.splitLines = "\n\nb".split(/\n/).length != 3 ? function(string) {
-    var pos = 0, result = [], l = string.length;
-    while (pos <= l) {
-      var nl = string.indexOf("\n", pos);
-      if (nl == -1) nl = string.length;
-      var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl);
-      var rt = line.indexOf("\r");
-      if (rt != -1) {
-        result.push(line.slice(0, rt));
-        pos += rt + 1;
-      } else {
-        result.push(line);
-        pos = nl + 1;
-      }
-    }
-    return result;
-  } : function(string){return string.split(/\r\n?|\n/);};
-
-  var hasSelection = window.getSelection ? function(te) {
-    try { return te.selectionStart != te.selectionEnd; }
-    catch(e) { return false; }
-  } : function(te) {
-    try {var range = te.ownerDocument.selection.createRange();}
-    catch(e) {}
-    if (!range || range.parentElement() != te) return false;
-    return range.compareEndPoints("StartToEnd", range) != 0;
-  };
-
-  var hasCopyEvent = (function() {
-    var e = elt("div");
-    if ("oncopy" in e) return true;
-    e.setAttribute("oncopy", "return;");
-    return typeof e.oncopy == "function";
-  })();
-
-  var badZoomedRects = null;
-  function hasBadZoomedRects(measure) {
-    if (badZoomedRects != null) return badZoomedRects;
-    var node = removeChildrenAndAdd(measure, elt("span", "x"));
-    var normal = node.getBoundingClientRect();
-    var fromRange = range(node, 0, 1).getBoundingClientRect();
-    return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1;
-  }
-
-  // KEY NAMES
-
-  var keyNames = {3: "Enter", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt",
-                  19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End",
-                  36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert",
-                  46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod", 107: "=", 109: "-", 127: "Delete",
-                  173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\",
-                  221: "]", 222: "'", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete",
-                  63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert"};
-  CodeMirror.keyNames = keyNames;
-  (function() {
-    // Number keys
-    for (var i = 0; i < 10; i++) keyNames[i + 48] = keyNames[i + 96] = String(i);
-    // Alphabetic keys
-    for (var i = 65; i <= 90; i++) keyNames[i] = String.fromCharCode(i);
-    // Function keys
-    for (var i = 1; i <= 12; i++) keyNames[i + 111] = keyNames[i + 63235] = "F" + i;
-  })();
-
-  // BIDI HELPERS
-
-  function iterateBidiSections(order, from, to, f) {
-    if (!order) return f(from, to, "ltr");
-    var found = false;
-    for (var i = 0; i < order.length; ++i) {
-      var part = order[i];
-      if (part.from < to && part.to > from || from == to && part.to == from) {
-        f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr");
-        found = true;
-      }
-    }
-    if (!found) f(from, to, "ltr");
-  }
-
-  function bidiLeft(part) { return part.level % 2 ? part.to : part.from; }
-  function bidiRight(part) { return part.level % 2 ? part.from : part.to; }
-
-  function lineLeft(line) { var order = getOrder(line); return order ? bidiLeft(order[0]) : 0; }
-  function lineRight(line) {
-    var order = getOrder(line);
-    if (!order) return line.text.length;
-    return bidiRight(lst(order));
-  }
-
-  function lineStart(cm, lineN) {
-    var line = getLine(cm.doc, lineN);
-    var visual = visualLine(line);
-    if (visual != line) lineN = lineNo(visual);
-    var order = getOrder(visual);
-    var ch = !order ? 0 : order[0].level % 2 ? lineRight(visual) : lineLeft(visual);
-    return Pos(lineN, ch);
-  }
-  function lineEnd(cm, lineN) {
-    var merged, line = getLine(cm.doc, lineN);
-    while (merged = collapsedSpanAtEnd(line)) {
-      line = merged.find(1, true).line;
-      lineN = null;
-    }
-    var order = getOrder(line);
-    var ch = !order ? line.text.length : order[0].level % 2 ? lineLeft(line) : lineRight(line);
-    return Pos(lineN == null ? lineNo(line) : lineN, ch);
-  }
-  function lineStartSmart(cm, pos) {
-    var start = lineStart(cm, pos.line);
-    var line = getLine(cm.doc, start.line);
-    var order = getOrder(line);
-    if (!order || order[0].level == 0) {
-      var firstNonWS = Math.max(0, line.text.search(/\S/));
-      var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch;
-      return Pos(start.line, inWS ? 0 : firstNonWS);
-    }
-    return start;
-  }
-
-  function compareBidiLevel(order, a, b) {
-    var linedir = order[0].level;
-    if (a == linedir) return true;
-    if (b == linedir) return false;
-    return a < b;
-  }
-  var bidiOther;
-  function getBidiPartAt(order, pos) {
-    bidiOther = null;
-    for (var i = 0, found; i < order.length; ++i) {
-      var cur = order[i];
-      if (cur.from < pos && cur.to > pos) return i;
-      if ((cur.from == pos || cur.to == pos)) {
-        if (found == null) {
-          found = i;
-        } else if (compareBidiLevel(order, cur.level, order[found].level)) {
-          if (cur.from != cur.to) bidiOther = found;
-          return i;
-        } else {
-          if (cur.from != cur.to) bidiOther = i;
-          return found;
-        }
-      }
-    }
-    return found;
-  }
-
-  function moveInLine(line, pos, dir, byUnit) {
-    if (!byUnit) return pos + dir;
-    do pos += dir;
-    while (pos > 0 && isExtendingChar(line.text.charAt(pos)));
-    return pos;
-  }
-
-  // This is needed in order to move 'visually' through bi-directional
-  // text -- i.e., pressing left should make the cursor go left, even
-  // when in RTL text. The tricky part is the 'jumps', where RTL and
-  // LTR text touch each other. This often requires the cursor offset
-  // to move more than one unit, in order to visually move one unit.
-  function moveVisually(line, start, dir, byUnit) {
-    var bidi = getOrder(line);
-    if (!bidi) return moveLogically(line, start, dir, byUnit);
-    var pos = getBidiPartAt(bidi, start), part = bidi[pos];
-    var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit);
-
-    for (;;) {
-      if (target > part.from && target < part.to) return target;
-      if (target == part.from || target == part.to) {
-        if (getBidiPartAt(bidi, target) == pos) return target;
-        part = bidi[pos += dir];
-        return (dir > 0) == part.level % 2 ? part.to : part.from;
-      } else {
-        part = bidi[pos += dir];
-        if (!part) return null;
-        if ((dir > 0) == part.level % 2)
-          target = moveInLine(line, part.to, -1, byUnit);
-        else
-          target = moveInLine(line, part.from, 1, byUnit);
-      }
-    }
-  }
-
-  function moveLogically(line, start, dir, byUnit) {
-    var target = start + dir;
-    if (byUnit) while (target > 0 && isExtendingChar(line.text.charAt(target))) target += dir;
-    return target < 0 || target > line.text.length ? null : target;
-  }
-
-  // Bidirectional ordering algorithm
-  // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm
-  // that this (partially) implements.
-
-  // One-char codes used for character types:
-  // L (L):   Left-to-Right
-  // R (R):   Right-to-Left
-  // r (AL):  Right-to-Left Arabic
-  // 1 (EN):  European Number
-  // + (ES):  European Number Separator
-  // % (ET):  European Number Terminator
-  // n (AN):  Arabic Number
-  // , (CS):  Common Number Separator
-  // m (NSM): Non-Spacing Mark
-  // b (BN):  Boundary Neutral
-  // s (B):   Paragraph Separator
-  // t (S):   Segment Separator
-  // w (WS):  Whitespace
-  // N (ON):  Other Neutrals
-
-  // Returns null if characters are ordered as they appear
-  // (left-to-right), or an array of sections ({from, to, level}
-  // objects) in the order in which they occur visually.
-  var bidiOrdering = (function() {
-    // Character types for codepoints 0 to 0xff
-    var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";
-    // Character types for codepoints 0x600 to 0x6ff
-    var arabicTypes = "rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm";
-    function charType(code) {
-      if (code <= 0xf7) return lowTypes.charAt(code);
-      else if (0x590 <= code && code <= 0x5f4) return "R";
-      else if (0x600 <= code && code <= 0x6ed) return arabicTypes.charAt(code - 0x600);
-      else if (0x6ee <= code && code <= 0x8ac) return "r";
-      else if (0x2000 <= code && code <= 0x200b) return "w";
-      else if (code == 0x200c) return "b";
-      else return "L";
-    }
-
-    var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
-    var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;
-    // Browsers seem to always treat the boundaries of block elements as being L.
-    var outerType = "L";
-
-    function BidiSpan(level, from, to) {
-      this.level = level;
-      this.from = from; this.to = to;
-    }
-
-    return function(str) {
-      if (!bidiRE.test(str)) return false;
-      var len = str.length, types = [];
-      for (var i = 0, type; i < len; ++i)
-        types.push(type = charType(str.charCodeAt(i)));
-
-      // W1. Examine each non-spacing mark (NSM) in the level run, and
-      // change the type of the NSM to the type of the previous
-      // character. If the NSM is at the start of the level run, it will
-      // get the type of sor.
-      for (var i = 0, prev = outerType; i < len; ++i) {
-        var type = types[i];
-        if (type == "m") types[i] = prev;
-        else prev = type;
-      }
-
-      // W2. Search backwards from each instance of a European number
-      // until the first strong type (R, L, AL, or sor) is found. If an
-      // AL is found, change the type of the European number to Arabic
-      // number.
-      // W3. Change all ALs to R.
-      for (var i = 0, cur = outerType; i < len; ++i) {
-        var type = types[i];
-        if (type == "1" && cur == "r") types[i] = "n";
-        else if (isStrong.test(type)) { cur = type; if (type == "r") types[i] = "R"; }
-      }
-
-      // W4. A single European separator between two European numbers
-      // changes to a European number. A single common separator between
-      // two numbers of the same type changes to that type.
-      for (var i = 1, prev = types[0]; i < len - 1; ++i) {
-        var type = types[i];
-        if (type == "+" && prev == "1" && types[i+1] == "1") types[i] = "1";
-        else if (type == "," && prev == types[i+1] &&
-                 (prev == "1" || prev == "n")) types[i] = prev;
-        prev = type;
-      }
-
-      // W5. A sequence of European terminators adjacent to European
-      // numbers changes to all European numbers.
-      // W6. Otherwise, separators and terminators change to Other
-      // Neutral.
-      for (var i = 0; i < len; ++i) {
-        var type = types[i];
-        if (type == ",") types[i] = "N";
-        else if (type == "%") {
-          for (var end = i + 1; end < len && types[end] == "%"; ++end) {}
-          var replace = (i && types[i-1] == "!") || (end < len && types[end] == "1") ? "1" : "N";
-          for (var j = i; j < end; ++j) types[j] = replace;
-          i = end - 1;
-        }
-      }
-
-      // W7. Search backwards from each instance of a European number
-      // until the first strong type (R, L, or sor) is found. If an L is
-      // found, then change the type of the European number to L.
-      for (var i = 0, cur = outerType; i < len; ++i) {
-        var type = types[i];
-        if (cur == "L" && type == "1") types[i] = "L";
-        else if (isStrong.test(type)) cur = type;
-      }
-
-      // N1. A sequence of neutrals takes the direction of the
-      // surrounding strong text if the text on both sides has the same
-      // direction. European and Arabic numbers act as if they were R in
-      // terms of their influence on neutrals. Start-of-level-run (sor)
-      // and end-of-level-run (eor) are used at level run boundaries.
-      // N2. Any remaining neutrals take the embedding direction.
-      for (var i = 0; i < len; ++i) {
-        if (isNeutral.test(types[i])) {
-          for (var end = i + 1; end < len && isNeutral.test(types[end]); ++end) {}
-          var before = (i ? types[i-1] : outerType) == "L";
-          var after = (end < len ? types[end] : outerType) == "L";
-          var replace = before || after ? "L" : "R";
-          for (var j = i; j < end; ++j) types[j] = replace;
-          i = end - 1;
-        }
-      }
-
-      // Here we depart from the documented algorithm, in order to avoid
-      // building up an actual levels array. Since there are only three
-      // levels (0, 1, 2) in an implementation that doesn't take
-      // explicit embedding into account, we can build up the order on
-      // the fly, without following the level-based algorithm.
-      var order = [], m;
-      for (var i = 0; i < len;) {
-        if (countsAsLeft.test(types[i])) {
-          var start = i;
-          for (++i; i < len && countsAsLeft.test(types[i]); ++i) {}
-          order.push(new BidiSpan(0, start, i));
-        } else {
-          var pos = i, at = order.length;
-          for (++i; i < len && types[i] != "L"; ++i) {}
-          for (var j = pos; j < i;) {
-            if (countsAsNum.test(types[j])) {
-              if (pos < j) order.splice(at, 0, new BidiSpan(1, pos, j));
-              var nstart = j;
-              for (++j; j < i && countsAsNum.test(types[j]); ++j) {}
-              order.splice(at, 0, new BidiSpan(2, nstart, j));
-              pos = j;
-            } else ++j;
-          }
-          if (pos < i) order.splice(at, 0, new BidiSpan(1, pos, i));
-        }
-      }
-      if (order[0].level == 1 && (m = str.match(/^\s+/))) {
-        order[0].from = m[0].length;
-        order.unshift(new BidiSpan(0, 0, m[0].length));
-      }
-      if (lst(order).level == 1 && (m = str.match(/\s+$/))) {
-        lst(order).to -= m[0].length;
-        order.push(new BidiSpan(0, len - m[0].length, len));
-      }
-      if (order[0].level != lst(order).level)
-        order.push(new BidiSpan(order[0].level, len, len));
-
-      return order;
-    };
-  })();
-
-  // THE END
-
-  CodeMirror.version = "4.10.0";
-
-  return CodeMirror;
-});
diff --git a/public/js/lib/codemirror/mode/css/css.js b/public/js/lib/codemirror/mode/css/css.js
deleted file mode 100644
index 55082bf..0000000
--- a/public/js/lib/codemirror/mode/css/css.js
+++ /dev/null
@@ -1,717 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("css", function(config, parserConfig) {
-  if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode("text/css");
-
-  var indentUnit = config.indentUnit,
-      tokenHooks = parserConfig.tokenHooks,
-      mediaTypes = parserConfig.mediaTypes || {},
-      mediaFeatures = parserConfig.mediaFeatures || {},
-      propertyKeywords = parserConfig.propertyKeywords || {},
-      nonStandardPropertyKeywords = parserConfig.nonStandardPropertyKeywords || {},
-      colorKeywords = parserConfig.colorKeywords || {},
-      valueKeywords = parserConfig.valueKeywords || {},
-      fontProperties = parserConfig.fontProperties || {},
-      allowNested = parserConfig.allowNested;
-
-  var type, override;
-  function ret(style, tp) { type = tp; return style; }
-
-  // Tokenizers
-
-  function tokenBase(stream, state) {
-    var ch = stream.next();
-    if (tokenHooks[ch]) {
-      var result = tokenHooks[ch](stream, state);
-      if (result !== false) return result;
-    }
-    if (ch == "@") {
-      stream.eatWhile(/[\w\\\-]/);
-      return ret("def", stream.current());
-    } else if (ch == "=" || (ch == "~" || ch == "|") && stream.eat("=")) {
-      return ret(null, "compare");
-    } else if (ch == "\"" || ch == "'") {
-      state.tokenize = tokenString(ch);
-      return state.tokenize(stream, state);
-    } else if (ch == "#") {
-      stream.eatWhile(/[\w\\\-]/);
-      return ret("atom", "hash");
-    } else if (ch == "!") {
-      stream.match(/^\s*\w*/);
-      return ret("keyword", "important");
-    } else if (/\d/.test(ch) || ch == "." && stream.eat(/\d/)) {
-      stream.eatWhile(/[\w.%]/);
-      return ret("number", "unit");
-    } else if (ch === "-") {
-      if (/[\d.]/.test(stream.peek())) {
-        stream.eatWhile(/[\w.%]/);
-        return ret("number", "unit");
-      } else if (stream.match(/^\w+-/)) {
-        return ret("meta", "meta");
-      }
-    } else if (/[,+>*\/]/.test(ch)) {
-      return ret(null, "select-op");
-    } else if (ch == "." && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) {
-      return ret("qualifier", "qualifier");
-    } else if (/[:;{}\[\]\(\)]/.test(ch)) {
-      return ret(null, ch);
-    } else if (ch == "u" && stream.match("rl(")) {
-      stream.backUp(1);
-      state.tokenize = tokenParenthesized;
-      return ret("property", "word");
-    } else if (/[\w\\\-]/.test(ch)) {
-      stream.eatWhile(/[\w\\\-]/);
-      return ret("property", "word");
-    } else {
-      return ret(null, null);
-    }
-  }
-
-  function tokenString(quote) {
-    return function(stream, state) {
-      var escaped = false, ch;
-      while ((ch = stream.next()) != null) {
-        if (ch == quote && !escaped) {
-          if (quote == ")") stream.backUp(1);
-          break;
-        }
-        escaped = !escaped && ch == "\\";
-      }
-      if (ch == quote || !escaped && quote != ")") state.tokenize = null;
-      return ret("string", "string");
-    };
-  }
-
-  function tokenParenthesized(stream, state) {
-    stream.next(); // Must be '('
-    if (!stream.match(/\s*[\"\')]/, false))
-      state.tokenize = tokenString(")");
-    else
-      state.tokenize = null;
-    return ret(null, "(");
-  }
-
-  // Context management
-
-  function Context(type, indent, prev) {
-    this.type = type;
-    this.indent = indent;
-    this.prev = prev;
-  }
-
-  function pushContext(state, stream, type) {
-    state.context = new Context(type, stream.indentation() + indentUnit, state.context);
-    return type;
-  }
-
-  function popContext(state) {
-    state.context = state.context.prev;
-    return state.context.type;
-  }
-
-  function pass(type, stream, state) {
-    return states[state.context.type](type, stream, state);
-  }
-  function popAndPass(type, stream, state, n) {
-    for (var i = n || 1; i > 0; i--)
-      state.context = state.context.prev;
-    return pass(type, stream, state);
-  }
-
-  // Parser
-
-  function wordAsValue(stream) {
-    var word = stream.current().toLowerCase();
-    if (valueKeywords.hasOwnProperty(word))
-      override = "atom";
-    else if (colorKeywords.hasOwnProperty(word))
-      override = "keyword";
-    else
-      override = "variable";
-  }
-
-  var states = {};
-
-  states.top = function(type, stream, state) {
-    if (type == "{") {
-      return pushContext(state, stream, "block");
-    } else if (type == "}" && state.context.prev) {
-      return popContext(state);
-    } else if (type == "@media") {
-      return pushContext(state, stream, "media");
-    } else if (type == "@font-face") {
-      return "font_face_before";
-    } else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(type)) {
-      return "keyframes";
-    } else if (type && type.charAt(0) == "@") {
-      return pushContext(state, stream, "at");
-    } else if (type == "hash") {
-      override = "builtin";
-    } else if (type == "word") {
-      override = "tag";
-    } else if (type == "variable-definition") {
-      return "maybeprop";
-    } else if (type == "interpolation") {
-      return pushContext(state, stream, "interpolation");
-    } else if (type == ":") {
-      return "pseudo";
-    } else if (allowNested && type == "(") {
-      return pushContext(state, stream, "parens");
-    }
-    return state.context.type;
-  };
-
-  states.block = function(type, stream, state) {
-    if (type == "word") {
-      var word = stream.current().toLowerCase();
-      if (propertyKeywords.hasOwnProperty(word)) {
-        override = "property";
-        return "maybeprop";
-      } else if (nonStandardPropertyKeywords.hasOwnProperty(word)) {
-        override = "string-2";
-        return "maybeprop";
-      } else if (allowNested) {
-        override = stream.match(/^\s*:(?:\s|$)/, false) ? "property" : "tag";
-        return "block";
-      } else {
-        override += " error";
-        return "maybeprop";
-      }
-    } else if (type == "meta") {
-      return "block";
-    } else if (!allowNested && (type == "hash" || type == "qualifier")) {
-      override = "error";
-      return "block";
-    } else {
-      return states.top(type, stream, state);
-    }
-  };
-
-  states.maybeprop = function(type, stream, state) {
-    if (type == ":") return pushContext(state, stream, "prop");
-    return pass(type, stream, state);
-  };
-
-  states.prop = function(type, stream, state) {
-    if (type == ";") return popContext(state);
-    if (type == "{" && allowNested) return pushContext(state, stream, "propBlock");
-    if (type == "}" || type == "{") return popAndPass(type, stream, state);
-    if (type == "(") return pushContext(state, stream, "parens");
-
-    if (type == "hash" && !/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(stream.current())) {
-      override += " error";
-    } else if (type == "word") {
-      wordAsValue(stream);
-    } else if (type == "interpolation") {
-      return pushContext(state, stream, "interpolation");
-    }
-    return "prop";
-  };
-
-  states.propBlock = function(type, _stream, state) {
-    if (type == "}") return popContext(state);
-    if (type == "word") { override = "property"; return "maybeprop"; }
-    return state.context.type;
-  };
-
-  states.parens = function(type, stream, state) {
-    if (type == "{" || type == "}") return popAndPass(type, stream, state);
-    if (type == ")") return popContext(state);
-    if (type == "(") return pushContext(state, stream, "parens");
-    if (type == "word") wordAsValue(stream);
-    return "parens";
-  };
-
-  states.pseudo = function(type, stream, state) {
-    if (type == "word") {
-      override = "variable-3";
-      return state.context.type;
-    }
-    return pass(type, stream, state);
-  };
-
-  states.media = function(type, stream, state) {
-    if (type == "(") return pushContext(state, stream, "media_parens");
-    if (type == "}") return popAndPass(type, stream, state);
-    if (type == "{") return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top");
-
-    if (type == "word") {
-      var word = stream.current().toLowerCase();
-      if (word == "only" || word == "not" || word == "and")
-        override = "keyword";
-      else if (mediaTypes.hasOwnProperty(word))
-        override = "attribute";
-      else if (mediaFeatures.hasOwnProperty(word))
-        override = "property";
-      else
-        override = "error";
-    }
-    return state.context.type;
-  };
-
-  states.media_parens = function(type, stream, state) {
-    if (type == ")") return popContext(state);
-    if (type == "{" || type == "}") return popAndPass(type, stream, state, 2);
-    return states.media(type, stream, state);
-  };
-
-  states.font_face_before = function(type, stream, state) {
-    if (type == "{")
-      return pushContext(state, stream, "font_face");
-    return pass(type, stream, state);
-  };
-
-  states.font_face = function(type, stream, state) {
-    if (type == "}") return popContext(state);
-    if (type == "word") {
-      if (!fontProperties.hasOwnProperty(stream.current().toLowerCase()))
-        override = "error";
-      else
-        override = "property";
-      return "maybeprop";
-    }
-    return "font_face";
-  };
-
-  states.keyframes = function(type, stream, state) {
-    if (type == "word") { override = "variable"; return "keyframes"; }
-    if (type == "{") return pushContext(state, stream, "top");
-    return pass(type, stream, state);
-  };
-
-  states.at = function(type, stream, state) {
-    if (type == ";") return popContext(state);
-    if (type == "{" || type == "}") return popAndPass(type, stream, state);
-    if (type == "word") override = "tag";
-    else if (type == "hash") override = "builtin";
-    return "at";
-  };
-
-  states.interpolation = function(type, stream, state) {
-    if (type == "}") return popContext(state);
-    if (type == "{" || type == ";") return popAndPass(type, stream, state);
-    if (type != "variable") override = "error";
-    return "interpolation";
-  };
-
-  return {
-    startState: function(base) {
-      return {tokenize: null,
-              state: "top",
-              context: new Context("top", base || 0, null)};
-    },
-
-    token: function(stream, state) {
-      if (!state.tokenize && stream.eatSpace()) return null;
-      var style = (state.tokenize || tokenBase)(stream, state);
-      if (style && typeof style == "object") {
-        type = style[1];
-        style = style[0];
-      }
-      override = style;
-      state.state = states[state.state](type, stream, state);
-      return override;
-    },
-
-    indent: function(state, textAfter) {
-      var cx = state.context, ch = textAfter && textAfter.charAt(0);
-      var indent = cx.indent;
-      if (cx.type == "prop" && (ch == "}" || ch == ")")) cx = cx.prev;
-      if (cx.prev &&
-          (ch == "}" && (cx.type == "block" || cx.type == "top" || cx.type == "interpolation" || cx.type == "font_face") ||
-           ch == ")" && (cx.type == "parens" || cx.type == "media_parens") ||
-           ch == "{" && (cx.type == "at" || cx.type == "media"))) {
-        indent = cx.indent - indentUnit;
-        cx = cx.prev;
-      }
-      return indent;
-    },
-
-    electricChars: "}",
-    blockCommentStart: "/*",
-    blockCommentEnd: "*/",
-    fold: "brace"
-  };
-});
-
-  function keySet(array) {
-    var keys = {};
-    for (var i = 0; i < array.length; ++i) {
-      keys[array[i]] = true;
-    }
-    return keys;
-  }
-
-  var mediaTypes_ = [
-    "all", "aural", "braille", "handheld", "print", "projection", "screen",
-    "tty", "tv", "embossed"
-  ], mediaTypes = keySet(mediaTypes_);
-
-  var mediaFeatures_ = [
-    "width", "min-width", "max-width", "height", "min-height", "max-height",
-    "device-width", "min-device-width", "max-device-width", "device-height",
-    "min-device-height", "max-device-height", "aspect-ratio",
-    "min-aspect-ratio", "max-aspect-ratio", "device-aspect-ratio",
-    "min-device-aspect-ratio", "max-device-aspect-ratio", "color", "min-color",
-    "max-color", "color-index", "min-color-index", "max-color-index",
-    "monochrome", "min-monochrome", "max-monochrome", "resolution",
-    "min-resolution", "max-resolution", "scan", "grid"
-  ], mediaFeatures = keySet(mediaFeatures_);
-
-  var propertyKeywords_ = [
-    "align-content", "align-items", "align-self", "alignment-adjust",
-    "alignment-baseline", "anchor-point", "animation", "animation-delay",
-    "animation-direction", "animation-duration", "animation-fill-mode",
-    "animation-iteration-count", "animation-name", "animation-play-state",
-    "animation-timing-function", "appearance", "azimuth", "backface-visibility",
-    "background", "background-attachment", "background-clip", "background-color",
-    "background-image", "background-origin", "background-position",
-    "background-repeat", "background-size", "baseline-shift", "binding",
-    "bleed", "bookmark-label", "bookmark-level", "bookmark-state",
-    "bookmark-target", "border", "border-bottom", "border-bottom-color",
-    "border-bottom-left-radius", "border-bottom-right-radius",
-    "border-bottom-style", "border-bottom-width", "border-collapse",
-    "border-color", "border-image", "border-image-outset",
-    "border-image-repeat", "border-image-slice", "border-image-source",
-    "border-image-width", "border-left", "border-left-color",
-    "border-left-style", "border-left-width", "border-radius", "border-right",
-    "border-right-color", "border-right-style", "border-right-width",
-    "border-spacing", "border-style", "border-top", "border-top-color",
-    "border-top-left-radius", "border-top-right-radius", "border-top-style",
-    "border-top-width", "border-width", "bottom", "box-decoration-break",
-    "box-shadow", "box-sizing", "break-after", "break-before", "break-inside",
-    "caption-side", "clear", "clip", "color", "color-profile", "column-count",
-    "column-fill", "column-gap", "column-rule", "column-rule-color",
-    "column-rule-style", "column-rule-width", "column-span", "column-width",
-    "columns", "content", "counter-increment", "counter-reset", "crop", "cue",
-    "cue-after", "cue-before", "cursor", "direction", "display",
-    "dominant-baseline", "drop-initial-after-adjust",
-    "drop-initial-after-align", "drop-initial-before-adjust",
-    "drop-initial-before-align", "drop-initial-size", "drop-initial-value",
-    "elevation", "empty-cells", "fit", "fit-position", "flex", "flex-basis",
-    "flex-direction", "flex-flow", "flex-grow", "flex-shrink", "flex-wrap",
-    "float", "float-offset", "flow-from", "flow-into", "font", "font-feature-settings",
-    "font-family", "font-kerning", "font-language-override", "font-size", "font-size-adjust",
-    "font-stretch", "font-style", "font-synthesis", "font-variant",
-    "font-variant-alternates", "font-variant-caps", "font-variant-east-asian",
-    "font-variant-ligatures", "font-variant-numeric", "font-variant-position",
-    "font-weight", "grid", "grid-area", "grid-auto-columns", "grid-auto-flow",
-    "grid-auto-position", "grid-auto-rows", "grid-column", "grid-column-end",
-    "grid-column-start", "grid-row", "grid-row-end", "grid-row-start",
-    "grid-template", "grid-template-areas", "grid-template-columns",
-    "grid-template-rows", "hanging-punctuation", "height", "hyphens",
-    "icon", "image-orientation", "image-rendering", "image-resolution",
-    "inline-box-align", "justify-content", "left", "letter-spacing",
-    "line-break", "line-height", "line-stacking", "line-stacking-ruby",
-    "line-stacking-shift", "line-stacking-strategy", "list-style",
-    "list-style-image", "list-style-position", "list-style-type", "margin",
-    "margin-bottom", "margin-left", "margin-right", "margin-top",
-    "marker-offset", "marks", "marquee-direction", "marquee-loop",
-    "marquee-play-count", "marquee-speed", "marquee-style", "max-height",
-    "max-width", "min-height", "min-width", "move-to", "nav-down", "nav-index",
-    "nav-left", "nav-right", "nav-up", "object-fit", "object-position",
-    "opacity", "order", "orphans", "outline",
-    "outline-color", "outline-offset", "outline-style", "outline-width",
-    "overflow", "overflow-style", "overflow-wrap", "overflow-x", "overflow-y",
-    "padding", "padding-bottom", "padding-left", "padding-right", "padding-top",
-    "page", "page-break-after", "page-break-before", "page-break-inside",
-    "page-policy", "pause", "pause-after", "pause-before", "perspective",
-    "perspective-origin", "pitch", "pitch-range", "play-during", "position",
-    "presentation-level", "punctuation-trim", "quotes", "region-break-after",
-    "region-break-before", "region-break-inside", "region-fragment",
-    "rendering-intent", "resize", "rest", "rest-after", "rest-before", "richness",
-    "right", "rotation", "rotation-point", "ruby-align", "ruby-overhang",
-    "ruby-position", "ruby-span", "shape-image-threshold", "shape-inside", "shape-margin",
-    "shape-outside", "size", "speak", "speak-as", "speak-header",
-    "speak-numeral", "speak-punctuation", "speech-rate", "stress", "string-set",
-    "tab-size", "table-layout", "target", "target-name", "target-new",
-    "target-position", "text-align", "text-align-last", "text-decoration",
-    "text-decoration-color", "text-decoration-line", "text-decoration-skip",
-    "text-decoration-style", "text-emphasis", "text-emphasis-color",
-    "text-emphasis-position", "text-emphasis-style", "text-height",
-    "text-indent", "text-justify", "text-outline", "text-overflow", "text-shadow",
-    "text-size-adjust", "text-space-collapse", "text-transform", "text-underline-position",
-    "text-wrap", "top", "transform", "transform-origin", "transform-style",
-    "transition", "transition-delay", "transition-duration",
-    "transition-property", "transition-timing-function", "unicode-bidi",
-    "vertical-align", "visibility", "voice-balance", "voice-duration",
-    "voice-family", "voice-pitch", "voice-range", "voice-rate", "voice-stress",
-    "voice-volume", "volume", "white-space", "widows", "width", "word-break",
-    "word-spacing", "word-wrap", "z-index",
-    // SVG-specific
-    "clip-path", "clip-rule", "mask", "enable-background", "filter", "flood-color",
-    "flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events",
-    "color-interpolation", "color-interpolation-filters",
-    "color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering",
-    "marker", "marker-end", "marker-mid", "marker-start", "shape-rendering", "stroke",
-    "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin",
-    "stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering",
-    "baseline-shift", "dominant-baseline", "glyph-orientation-horizontal",
-    "glyph-orientation-vertical", "text-anchor", "writing-mode"
-  ], propertyKeywords = keySet(propertyKeywords_);
-
-  var nonStandardPropertyKeywords_ = [
-    "scrollbar-arrow-color", "scrollbar-base-color", "scrollbar-dark-shadow-color",
-    "scrollbar-face-color", "scrollbar-highlight-color", "scrollbar-shadow-color",
-    "scrollbar-3d-light-color", "scrollbar-track-color", "shape-inside",
-    "searchfield-cancel-button", "searchfield-decoration", "searchfield-results-button",
-    "searchfield-results-decoration", "zoom"
-  ], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_);
-
-  var colorKeywords_ = [
-    "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige",
-    "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown",
-    "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue",
-    "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod",
-    "darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen",
-    "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen",
-    "darkslateblue", "darkslategray", "darkturquoise", "darkviolet",
-    "deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick",
-    "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite",
-    "gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew",
-    "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender",
-    "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral",
-    "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightpink",
-    "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray",
-    "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta",
-    "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple",
-    "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise",
-    "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin",
-    "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered",
-    "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred",
-    "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue",
-    "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown",
-    "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue",
-    "slateblue", "slategray", "snow", "springgreen", "steelblue", "tan",
-    "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white",
-    "whitesmoke", "yellow", "yellowgreen"
-  ], colorKeywords = keySet(colorKeywords_);
-
-  var valueKeywords_ = [
-    "above", "absolute", "activeborder", "activecaption", "afar",
-    "after-white-space", "ahead", "alias", "all", "all-scroll", "alternate",
-    "always", "amharic", "amharic-abegede", "antialiased", "appworkspace",
-    "arabic-indic", "armenian", "asterisks", "auto", "avoid", "avoid-column", "avoid-page",
-    "avoid-region", "background", "backwards", "baseline", "below", "bidi-override", "binary",
-    "bengali", "blink", "block", "block-axis", "bold", "bolder", "border", "border-box",
-    "both", "bottom", "break", "break-all", "break-word", "button", "button-bevel",
-    "buttonface", "buttonhighlight", "buttonshadow", "buttontext", "cambodian",
-    "capitalize", "caps-lock-indicator", "caption", "captiontext", "caret",
-    "cell", "center", "checkbox", "circle", "cjk-earthly-branch",
-    "cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote",
-    "col-resize", "collapse", "column", "compact", "condensed", "contain", "content",
-    "content-box", "context-menu", "continuous", "copy", "cover", "crop",
-    "cross", "crosshair", "currentcolor", "cursive", "dashed", "decimal",
-    "decimal-leading-zero", "default", "default-button", "destination-atop",
-    "destination-in", "destination-out", "destination-over", "devanagari",
-    "disc", "discard", "document", "dot-dash", "dot-dot-dash", "dotted",
-    "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out",
-    "element", "ellipse", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede",
-    "ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er",
-    "ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er",
-    "ethiopic-halehame-aa-et", "ethiopic-halehame-am-et",
-    "ethiopic-halehame-gez", "ethiopic-halehame-om-et",
-    "ethiopic-halehame-sid-et", "ethiopic-halehame-so-et",
-    "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et",
-    "ethiopic-halehame-tig", "ew-resize", "expanded", "extra-condensed",
-    "extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "footnotes",
-    "forwards", "from", "geometricPrecision", "georgian", "graytext", "groove",
-    "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hebrew",
-    "help", "hidden", "hide", "higher", "highlight", "highlighttext",
-    "hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "icon", "ignore",
-    "inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite",
-    "infobackground", "infotext", "inherit", "initial", "inline", "inline-axis",
-    "inline-block", "inline-table", "inset", "inside", "intrinsic", "invert",
-    "italic", "justify", "kannada", "katakana", "katakana-iroha", "keep-all", "khmer",
-    "landscape", "lao", "large", "larger", "left", "level", "lighter",
-    "line-through", "linear", "lines", "list-item", "listbox", "listitem",
-    "local", "logical", "loud", "lower", "lower-alpha", "lower-armenian",
-    "lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian",
-    "lower-roman", "lowercase", "ltr", "malayalam", "match",
-    "media-controls-background", "media-current-time-display",
-    "media-fullscreen-button", "media-mute-button", "media-play-button",
-    "media-return-to-realtime-button", "media-rewind-button",
-    "media-seek-back-button", "media-seek-forward-button", "media-slider",
-    "media-sliderthumb", "media-time-remaining-display", "media-volume-slider",
-    "media-volume-slider-container", "media-volume-sliderthumb", "medium",
-    "menu", "menulist", "menulist-button", "menulist-text",
-    "menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic",
-    "mix", "mongolian", "monospace", "move", "multiple", "myanmar", "n-resize",
-    "narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop",
-    "no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap",
-    "ns-resize", "nw-resize", "nwse-resize", "oblique", "octal", "open-quote",
-    "optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset",
-    "outside", "outside-shape", "overlay", "overline", "padding", "padding-box",
-    "painted", "page", "paused", "persian", "plus-darker", "plus-lighter", "pointer",
-    "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d", "progress", "push-button",
-    "radio", "read-only", "read-write", "read-write-plaintext-only", "rectangle", "region",
-    "relative", "repeat", "repeat-x", "repeat-y", "reset", "reverse", "rgb", "rgba",
-    "ridge", "right", "round", "row-resize", "rtl", "run-in", "running",
-    "s-resize", "sans-serif", "scroll", "scrollbar", "se-resize", "searchfield",
-    "searchfield-cancel-button", "searchfield-decoration",
-    "searchfield-results-button", "searchfield-results-decoration",
-    "semi-condensed", "semi-expanded", "separate", "serif", "show", "sidama",
-    "single", "skip-white-space", "slide", "slider-horizontal",
-    "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",
-    "small", "small-caps", "small-caption", "smaller", "solid", "somali",
-    "source-atop", "source-in", "source-out", "source-over", "space", "square",
-    "square-button", "start", "static", "status-bar", "stretch", "stroke",
-    "sub", "subpixel-antialiased", "super", "sw-resize", "table",
-    "table-caption", "table-cell", "table-column", "table-column-group",
-    "table-footer-group", "table-header-group", "table-row", "table-row-group",
-    "telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai",
-    "thick", "thin", "threeddarkshadow", "threedface", "threedhighlight",
-    "threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er",
-    "tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top",
-    "transparent", "ultra-condensed", "ultra-expanded", "underline", "up",
-    "upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal",
-    "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url",
-    "vertical", "vertical-text", "visible", "visibleFill", "visiblePainted",
-    "visibleStroke", "visual", "w-resize", "wait", "wave", "wider",
-    "window", "windowframe", "windowtext", "x-large", "x-small", "xor",
-    "xx-large", "xx-small"
-  ], valueKeywords = keySet(valueKeywords_);
-
-  var fontProperties_ = [
-    "font-family", "src", "unicode-range", "font-variant", "font-feature-settings",
-    "font-stretch", "font-weight", "font-style"
-  ], fontProperties = keySet(fontProperties_);
-
-  var allWords = mediaTypes_.concat(mediaFeatures_).concat(propertyKeywords_)
-    .concat(nonStandardPropertyKeywords_).concat(colorKeywords_).concat(valueKeywords_);
-  CodeMirror.registerHelper("hintWords", "css", allWords);
-
-  function tokenCComment(stream, state) {
-    var maybeEnd = false, ch;
-    while ((ch = stream.next()) != null) {
-      if (maybeEnd && ch == "/") {
-        state.tokenize = null;
-        break;
-      }
-      maybeEnd = (ch == "*");
-    }
-    return ["comment", "comment"];
-  }
-
-  function tokenSGMLComment(stream, state) {
-    if (stream.skipTo("-->")) {
-      stream.match("-->");
-      state.tokenize = null;
-    } else {
-      stream.skipToEnd();
-    }
-    return ["comment", "comment"];
-  }
-
-  CodeMirror.defineMIME("text/css", {
-    mediaTypes: mediaTypes,
-    mediaFeatures: mediaFeatures,
-    propertyKeywords: propertyKeywords,
-    nonStandardPropertyKeywords: nonStandardPropertyKeywords,
-    colorKeywords: colorKeywords,
-    valueKeywords: valueKeywords,
-    fontProperties: fontProperties,
-    tokenHooks: {
-      "<": function(stream, state) {
-        if (!stream.match("!--")) return false;
-        state.tokenize = tokenSGMLComment;
-        return tokenSGMLComment(stream, state);
-      },
-      "/": function(stream, state) {
-        if (!stream.eat("*")) return false;
-        state.tokenize = tokenCComment;
-        return tokenCComment(stream, state);
-      }
-    },
-    name: "css"
-  });
-
-  CodeMirror.defineMIME("text/x-scss", {
-    mediaTypes: mediaTypes,
-    mediaFeatures: mediaFeatures,
-    propertyKeywords: propertyKeywords,
-    nonStandardPropertyKeywords: nonStandardPropertyKeywords,
-    colorKeywords: colorKeywords,
-    valueKeywords: valueKeywords,
-    fontProperties: fontProperties,
-    allowNested: true,
-    tokenHooks: {
-      "/": function(stream, state) {
-        if (stream.eat("/")) {
-          stream.skipToEnd();
-          return ["comment", "comment"];
-        } else if (stream.eat("*")) {
-          state.tokenize = tokenCComment;
-          return tokenCComment(stream, state);
-        } else {
-          return ["operator", "operator"];
-        }
-      },
-      ":": function(stream) {
-        if (stream.match(/\s*\{/))
-          return [null, "{"];
-        return false;
-      },
-      "$": function(stream) {
-        stream.match(/^[\w-]+/);
-        if (stream.match(/^\s*:/, false))
-          return ["variable-2", "variable-definition"];
-        return ["variable-2", "variable"];
-      },
-      "#": function(stream) {
-        if (!stream.eat("{")) return false;
-        return [null, "interpolation"];
-      }
-    },
-    name: "css",
-    helperType: "scss"
-  });
-
-  CodeMirror.defineMIME("text/x-less", {
-    mediaTypes: mediaTypes,
-    mediaFeatures: mediaFeatures,
-    propertyKeywords: propertyKeywords,
-    nonStandardPropertyKeywords: nonStandardPropertyKeywords,
-    colorKeywords: colorKeywords,
-    valueKeywords: valueKeywords,
-    fontProperties: fontProperties,
-    allowNested: true,
-    tokenHooks: {
-      "/": function(stream, state) {
-        if (stream.eat("/")) {
-          stream.skipToEnd();
-          return ["comment", "comment"];
-        } else if (stream.eat("*")) {
-          state.tokenize = tokenCComment;
-          return tokenCComment(stream, state);
-        } else {
-          return ["operator", "operator"];
-        }
-      },
-      "@": function(stream) {
-        if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/, false)) return false;
-        stream.eatWhile(/[\w\\\-]/);
-        if (stream.match(/^\s*:/, false))
-          return ["variable-2", "variable-definition"];
-        return ["variable-2", "variable"];
-      },
-      "&": function() {
-        return ["atom", "atom"];
-      }
-    },
-    name: "css",
-    helperType: "less"
-  });
-
-});
diff --git a/public/js/lib/codemirror/mode/css/index.html b/public/js/lib/codemirror/mode/css/index.html
deleted file mode 100644
index 2d2b9b0..0000000
--- a/public/js/lib/codemirror/mode/css/index.html
+++ /dev/null
@@ -1,75 +0,0 @@
-<!doctype html>
-
-<title>CodeMirror: CSS mode</title>
-<meta charset="utf-8"/>
-<link rel=stylesheet href="../../doc/docs.css">
-
-<link rel="stylesheet" href="../../lib/codemirror.css">
-<link rel="stylesheet" href="../../addon/hint/show-hint.css">
-<script src="../../lib/codemirror.js"></script>
-<script src="css.js"></script>
-<script src="../../addon/hint/show-hint.js"></script>
-<script src="../../addon/hint/css-hint.js"></script>
-<style>.CodeMirror {background: #f8f8f8;}</style>
-<div id=nav>
-  <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
-
-  <ul>
-    <li><a href="../../index.html">Home</a>
-    <li><a href="../../doc/manual.html">Manual</a>
-    <li><a href="https://github.com/codemirror/codemirror">Code</a>
-  </ul>
-  <ul>
-    <li><a href="../index.html">Language modes</a>
-    <li><a class=active href="#">CSS</a>
-  </ul>
-</div>
-
-<article>
-<h2>CSS mode</h2>
-<form><textarea id="code" name="code">
-/* Some example CSS */
-
-@import url("something.css");
-
-body {
-  margin: 0;
-  padding: 3em 6em;
-  font-family: tahoma, arial, sans-serif;
-  color: #000;
-}
-
-#navigation a {
-  font-weight: bold;
-  text-decoration: none !important;
-}
-
-h1 {
-  font-size: 2.5em;
-}
-
-h2 {
-  font-size: 1.7em;
-}
-
-h1:before, h2:before {
-  content: "::";
-}
-
-code {
-  font-family: courier, monospace;
-  font-size: 80%;
-  color: #418A8A;
-}
-</textarea></form>
-    <script>
-      var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
-        extraKeys: {"Ctrl-Space": "autocomplete"},
-      });
-    </script>
-
-    <p><strong>MIME types defined:</strong> <code>text/css</code>, <code>text/x-scss</code> (<a href="scss.html">demo</a>), <code>text/x-less</code> (<a href="less.html">demo</a>).</p>
-
-    <p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#css_*">normal</a>,  <a href="../../test/index.html#verbose,css_*">verbose</a>.</p>
-
-  </article>
diff --git a/public/js/lib/codemirror/mode/css/less.html b/public/js/lib/codemirror/mode/css/less.html
deleted file mode 100644
index 6ccb721..0000000
--- a/public/js/lib/codemirror/mode/css/less.html
+++ /dev/null
@@ -1,152 +0,0 @@
-<!doctype html>
-
-<title>CodeMirror: LESS mode</title>
-<meta charset="utf-8"/>
-<link rel=stylesheet href="../../doc/docs.css">
-
-<link rel="stylesheet" href="../../lib/codemirror.css">
-<script src="../../lib/codemirror.js"></script>
-<script src="../../addon/edit/matchbrackets.js"></script>
-<script src="css.js"></script>
-<style>.CodeMirror {border: 1px solid #ddd; line-height: 1.2;}</style>
-<div id=nav>
-  <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
-
-  <ul>
-    <li><a href="../../index.html">Home</a>
-    <li><a href="../../doc/manual.html">Manual</a>
-    <li><a href="https://github.com/codemirror/codemirror">Code</a>
-  </ul>
-  <ul>
-    <li><a href="../index.html">Language modes</a>
-    <li><a class=active href="#">LESS</a>
-  </ul>
-</div>
-
-<article>
-<h2>LESS mode</h2>
-<form><textarea id="code" name="code">@media screen and (device-aspect-ratio: 16/9) { … }
-@media screen and (device-aspect-ratio: 1280/720) { … }
-@media screen and (device-aspect-ratio: 2560/1440) { … }
-
-html:lang(fr-be)
-
-tr:nth-child(2n+1) /* represents every odd row of an HTML table */
-
-img:nth-of-type(2n+1) { float: right; }
-img:nth-of-type(2n) { float: left; }
-
-body > h2:not(:first-of-type):not(:last-of-type)
-
-html|*:not(:link):not(:visited)
-*|*:not(:hover)
-p::first-line { text-transform: uppercase }
-
-@namespace foo url(http://www.example.com);
-foo|h1 { color: blue }  /* first rule */
-
-span[hello="Ocean"][goodbye="Land"]
-
-E[foo]{
-  padding:65px;
-}
-
-input[type="search"]::-webkit-search-decoration,
-input[type="search"]::-webkit-search-cancel-button {
-  -webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5
-}
-button::-moz-focus-inner,
-input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
-  padding: 0;
-  border: 0;
-}
-.btn {
-  // reset here as of 2.0.3 due to Recess property order
-  border-color: #ccc;
-  border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);
-}
-fieldset span button, fieldset span input[type="file"] {
-  font-size:12px;
-	font-family:Arial, Helvetica, sans-serif;
-}
-
-.rounded-corners (@radius: 5px) {
-  border-radius: @radius;
-  -webkit-border-radius: @radius;
-  -moz-border-radius: @radius;
-}
-
-@import url("something.css");
-
-@light-blue:   hsl(190, 50%, 65%);
-
-#menu {
-  position: absolute;
-  width: 100%;
-  z-index: 3;
-  clear: both;
-  display: block;
-  background-color: @blue;
-  height: 42px;
-  border-top: 2px solid lighten(@alpha-blue, 20%);
-  border-bottom: 2px solid darken(@alpha-blue, 25%);
-  .box-shadow(0, 1px, 8px, 0.6);
-  -moz-box-shadow: 0 0 0 #000; // Because firefox sucks.
-
-  &.docked {
-    background-color: hsla(210, 60%, 40%, 0.4);
-  }
-  &:hover {
-    background-color: @blue;
-  }
-
-  #dropdown {
-    margin: 0 0 0 117px;
-    padding: 0;
-    padding-top: 5px;
-    display: none;
-    width: 190px;
-    border-top: 2px solid @medium;
-    color: @highlight;
-    border: 2px solid darken(@medium, 25%);
-    border-left-color: darken(@medium, 15%);
-    border-right-color: darken(@medium, 15%);
-    border-top-width: 0;
-    background-color: darken(@medium, 10%);
-    ul {
-      padding: 0px;  
-    }
-    li {
-      font-size: 14px;
-      display: block;
-      text-align: left;
-      padding: 0;
-      border: 0;
-      a {
-        display: block;
-        padding: 0px 15px;  
-        text-decoration: none;
-        color: white;  
-        &:hover {
-          background-color: darken(@medium, 15%);
-          text-decoration: none;
-        }
-      }
-    }
-    .border-radius(5px, bottom);
-    .box-shadow(0, 6px, 8px, 0.5);
-  }
-}
-</textarea></form>
-    <script>
-      var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
-        lineNumbers : true,
-        matchBrackets : true,
-        mode: "text/x-less"
-      });
-    </script>
-
-    <p>The LESS mode is a sub-mode of the <a href="index.html">CSS mode</a> (defined in <code>css.js</code>.</p>
-
-    <p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#less_*">normal</a>,  <a href="../../test/index.html#verbose,less_*">verbose</a>.</p>
-  </article>
diff --git a/public/js/lib/codemirror/mode/css/less_test.js b/public/js/lib/codemirror/mode/css/less_test.js
deleted file mode 100644
index 2ba6998..0000000
--- a/public/js/lib/codemirror/mode/css/less_test.js
+++ /dev/null
@@ -1,51 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function() {
-  "use strict";
-
-  var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-less");
-  function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "less"); }
-
-  MT("variable",
-     "[variable-2 @base]: [atom #f04615];",
-     "[qualifier .class] {",
-     "  [property width]: [variable percentage]([number 0.5]); [comment // returns `50%`]",
-     "  [property color]: [variable saturate]([variable-2 @base], [number 5%]);",
-     "}");
-
-  MT("amp",
-     "[qualifier .child], [qualifier .sibling] {",
-     "  [qualifier .parent] [atom &] {",
-     "    [property color]: [keyword black];",
-     "  }",
-     "  [atom &] + [atom &] {",
-     "    [property color]: [keyword red];",
-     "  }",
-     "}");
-
-  MT("mixin",
-     "[qualifier .mixin] ([variable dark]; [variable-2 @color]) {",
-     "  [property color]: [variable darken]([variable-2 @color], [number 10%]);",
-     "}",
-     "[qualifier .mixin] ([variable light]; [variable-2 @color]) {",
-     "  [property color]: [variable lighten]([variable-2 @color], [number 10%]);",
-     "}",
-     "[qualifier .mixin] ([variable-2 @_]; [variable-2 @color]) {",
-     "  [property display]: [atom block];",
-     "}",
-     "[variable-2 @switch]: [variable light];",
-     "[qualifier .class] {",
-     "  [qualifier .mixin]([variable-2 @switch]; [atom #888]);",
-     "}");
-
-  MT("nest",
-     "[qualifier .one] {",
-     "  [def @media] ([property width]: [number 400px]) {",
-     "    [property font-size]: [number 1.2em];",
-     "    [def @media] [attribute print] [keyword and] [property color] {",
-     "      [property color]: [keyword blue];",
-     "    }",
-     "  }",
-     "}");
-})();
diff --git a/public/js/lib/codemirror/mode/css/scss.html b/public/js/lib/codemirror/mode/css/scss.html
deleted file mode 100644
index 21f20e0..0000000
--- a/public/js/lib/codemirror/mode/css/scss.html
+++ /dev/null
@@ -1,157 +0,0 @@
-<!doctype html>
-
-<title>CodeMirror: SCSS mode</title>
-<meta charset="utf-8"/>
-<link rel=stylesheet href="../../doc/docs.css">
-
-<link rel="stylesheet" href="../../lib/codemirror.css">
-<script src="../../lib/codemirror.js"></script>
-<script src="css.js"></script>
-<style>.CodeMirror {background: #f8f8f8;}</style>
-<div id=nav>
-  <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
-
-  <ul>
-    <li><a href="../../index.html">Home</a>
-    <li><a href="../../doc/manual.html">Manual</a>
-    <li><a href="https://github.com/codemirror/codemirror">Code</a>
-  </ul>
-  <ul>
-    <li><a href="../index.html">Language modes</a>
-    <li><a class=active href="#">SCSS</a>
-  </ul>
-</div>
-
-<article>
-<h2>SCSS mode</h2>
-<form><textarea id="code" name="code">
-/* Some example SCSS */
-
-@import "compass/css3";
-$variable: #333;
-
-$blue: #3bbfce;
-$margin: 16px;
-
-.content-navigation {
-  #nested {
-    background-color: black;
-  }
-  border-color: $blue;
-  color:
-    darken($blue, 9%);
-}
-
-.border {
-  padding: $margin / 2;
-  margin: $margin / 2;
-  border-color: $blue;
-}
-
-@mixin table-base {
-  th {
-    text-align: center;
-    font-weight: bold;
-  }
-  td, th {padding: 2px}
-}
-
-table.hl {
-  margin: 2em 0;
-  td.ln {
-    text-align: right;
-  }
-}
-
-li {
-  font: {
-    family: serif;
-    weight: bold;
-    size: 1.2em;
-  }
-}
-
-@mixin left($dist) {
-  float: left;
-  margin-left: $dist;
-}
-
-#data {
-  @include left(10px);
-  @include table-base;
-}
-
-.source {
-  @include flow-into(target);
-  border: 10px solid green;
-  margin: 20px;
-  width: 200px; }
-
-.new-container {
-  @include flow-from(target);
-  border: 10px solid red;
-  margin: 20px;
-  width: 200px; }
-
-body {
-  margin: 0;
-  padding: 3em 6em;
-  font-family: tahoma, arial, sans-serif;
-  color: #000;
-}
-
-@mixin yellow() {
-  background: yellow;
-}
-
-.big {
-  font-size: 14px;
-}
-
-.nested {
-  @include border-radius(3px);
-  @extend .big;
-  p {
-    background: whitesmoke;
-    a {
-      color: red;
-    }
-  }
-}
-
-#navigation a {
-  font-weight: bold;
-  text-decoration: none !important;
-}
-
-h1 {
-  font-size: 2.5em;
-}
-
-h2 {
-  font-size: 1.7em;
-}
-
-h1:before, h2:before {
-  content: "::";
-}
-
-code {
-  font-family: courier, monospace;
-  font-size: 80%;
-  color: #418A8A;
-}
-</textarea></form>
-    <script>
-      var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
-        lineNumbers: true,
-        matchBrackets: true,
-        mode: "text/x-scss"
-      });
-    </script>
-
-    <p>The SCSS mode is a sub-mode of the <a href="index.html">CSS mode</a> (defined in <code>css.js</code>.</p>
-
-    <p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#scss_*">normal</a>,  <a href="../../test/index.html#verbose,scss_*">verbose</a>.</p>
-
-  </article>
diff --git a/public/js/lib/codemirror/mode/css/scss_test.js b/public/js/lib/codemirror/mode/css/scss_test.js
deleted file mode 100644
index 8dcea9e..0000000
--- a/public/js/lib/codemirror/mode/css/scss_test.js
+++ /dev/null
@@ -1,110 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function() {
-  var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-scss");
-  function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "scss"); }
-
-  MT('url_with_quotation',
-    "[tag foo] { [property background]:[atom url]([string test.jpg]) }");
-
-  MT('url_with_double_quotes',
-    "[tag foo] { [property background]:[atom url]([string \"test.jpg\"]) }");
-
-  MT('url_with_single_quotes',
-    "[tag foo] { [property background]:[atom url]([string \'test.jpg\']) }");
-
-  MT('string',
-    "[def @import] [string \"compass/css3\"]");
-
-  MT('important_keyword',
-    "[tag foo] { [property background]:[atom url]([string \'test.jpg\']) [keyword !important] }");
-
-  MT('variable',
-    "[variable-2 $blue]:[atom #333]");
-
-  MT('variable_as_attribute',
-    "[tag foo] { [property color]:[variable-2 $blue] }");
-
-  MT('numbers',
-    "[tag foo] { [property padding]:[number 10px] [number 10] [number 10em] [number 8in] }");
-
-  MT('number_percentage',
-    "[tag foo] { [property width]:[number 80%] }");
-
-  MT('selector',
-    "[builtin #hello][qualifier .world]{}");
-
-  MT('singleline_comment',
-    "[comment // this is a comment]");
-
-  MT('multiline_comment',
-    "[comment /*foobar*/]");
-
-  MT('attribute_with_hyphen',
-    "[tag foo] { [property font-size]:[number 10px] }");
-
-  MT('string_after_attribute',
-    "[tag foo] { [property content]:[string \"::\"] }");
-
-  MT('directives',
-    "[def @include] [qualifier .mixin]");
-
-  MT('basic_structure',
-    "[tag p] { [property background]:[keyword red]; }");
-
-  MT('nested_structure',
-    "[tag p] { [tag a] { [property color]:[keyword red]; } }");
-
-  MT('mixin',
-    "[def @mixin] [tag table-base] {}");
-
-  MT('number_without_semicolon',
-    "[tag p] {[property width]:[number 12]}",
-    "[tag a] {[property color]:[keyword red];}");
-
-  MT('atom_in_nested_block',
-    "[tag p] { [tag a] { [property color]:[atom #000]; } }");
-
-  MT('interpolation_in_property',
-    "[tag foo] { #{[variable-2 $hello]}:[number 2]; }");
-
-  MT('interpolation_in_selector',
-    "[tag foo]#{[variable-2 $hello]} { [property color]:[atom #000]; }");
-
-  MT('interpolation_error',
-    "[tag foo]#{[error foo]} { [property color]:[atom #000]; }");
-
-  MT("divide_operator",
-    "[tag foo] { [property width]:[number 4] [operator /] [number 2] }");
-
-  MT('nested_structure_with_id_selector',
-    "[tag p] { [builtin #hello] { [property color]:[keyword red]; } }");
-
-  MT('indent_mixin',
-     "[def @mixin] [tag container] (",
-     "  [variable-2 $a]: [number 10],",
-     "  [variable-2 $b]: [number 10])",
-     "{}");
-
-  MT('indent_nested',
-     "[tag foo] {",
-     "  [tag bar] {",
-     "  }",
-     "}");
-
-  MT('indent_parentheses',
-     "[tag foo] {",
-     "  [property color]: [variable darken]([variable-2 $blue],",
-     "    [number 9%]);",
-     "}");
-
-  MT('indent_vardef',
-     "[variable-2 $name]:",
-     "  [string 'val'];",
-     "[tag tag] {",
-     "  [tag inner] {",
-     "    [property margin]: [number 3px];",
-     "  }",
-     "}");
-})();
diff --git a/public/js/lib/codemirror/mode/css/test.js b/public/js/lib/codemirror/mode/css/test.js
deleted file mode 100644
index d236e2a..0000000
--- a/public/js/lib/codemirror/mode/css/test.js
+++ /dev/null
@@ -1,135 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function() {
-  var mode = CodeMirror.getMode({indentUnit: 2}, "css");
-  function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
-
-  // Error, because "foobarhello" is neither a known type or property, but
-  // property was expected (after "and"), and it should be in parenthese.
-  MT("atMediaUnknownType",
-     "[def @media] [attribute screen] [keyword and] [error foobarhello] { }");
-
-  // Soft error, because "foobarhello" is not a known property or type.
-  MT("atMediaUnknownProperty",
-     "[def @media] [attribute screen] [keyword and] ([error foobarhello]) { }");
-
-  // Make sure nesting works with media queries
-  MT("atMediaMaxWidthNested",
-     "[def @media] [attribute screen] [keyword and] ([property max-width]: [number 25px]) { [tag foo] { } }");
-
-  MT("tagSelector",
-     "[tag foo] { }");
-
-  MT("classSelector",
-     "[qualifier .foo-bar_hello] { }");
-
-  MT("idSelector",
-     "[builtin #foo] { [error #foo] }");
-
-  MT("tagSelectorUnclosed",
-     "[tag foo] { [property margin]: [number 0] } [tag bar] { }");
-
-  MT("tagStringNoQuotes",
-     "[tag foo] { [property font-family]: [variable hello] [variable world]; }");
-
-  MT("tagStringDouble",
-     "[tag foo] { [property font-family]: [string \"hello world\"]; }");
-
-  MT("tagStringSingle",
-     "[tag foo] { [property font-family]: [string 'hello world']; }");
-
-  MT("tagColorKeyword",
-     "[tag foo] {",
-     "  [property color]: [keyword black];",
-     "  [property color]: [keyword navy];",
-     "  [property color]: [keyword yellow];",
-     "}");
-
-  MT("tagColorHex3",
-     "[tag foo] { [property background]: [atom #fff]; }");
-
-  MT("tagColorHex6",
-     "[tag foo] { [property background]: [atom #ffffff]; }");
-
-  MT("tagColorHex4",
-     "[tag foo] { [property background]: [atom&error #ffff]; }");
-
-  MT("tagColorHexInvalid",
-     "[tag foo] { [property background]: [atom&error #ffg]; }");
-
-  MT("tagNegativeNumber",
-     "[tag foo] { [property margin]: [number -5px]; }");
-
-  MT("tagPositiveNumber",
-     "[tag foo] { [property padding]: [number 5px]; }");
-
-  MT("tagVendor",
-     "[tag foo] { [meta -foo-][property box-sizing]: [meta -foo-][atom border-box]; }");
-
-  MT("tagBogusProperty",
-     "[tag foo] { [property&error barhelloworld]: [number 0]; }");
-
-  MT("tagTwoProperties",
-     "[tag foo] { [property margin]: [number 0]; [property padding]: [number 0]; }");
-
-  MT("tagTwoPropertiesURL",
-     "[tag foo] { [property background]: [atom url]([string //example.com/foo.png]); [property padding]: [number 0]; }");
-
-  MT("commentSGML",
-     "[comment <!--comment-->]");
-
-  MT("commentSGML2",
-     "[comment <!--comment]",
-     "[comment -->] [tag div] {}");
-
-  MT("indent_tagSelector",
-     "[tag strong], [tag em] {",
-     "  [property background]: [atom rgba](",
-     "    [number 255], [number 255], [number 0], [number .2]",
-     "  );",
-     "}");
-
-  MT("indent_atMedia",
-     "[def @media] {",
-     "  [tag foo] {",
-     "    [property color]:",
-     "      [keyword yellow];",
-     "  }",
-     "}");
-
-  MT("indent_comma",
-     "[tag foo] {",
-     "  [property font-family]: [variable verdana],",
-     "    [atom sans-serif];",
-     "}");
-
-  MT("indent_parentheses",
-     "[tag foo]:[variable-3 before] {",
-     "  [property background]: [atom url](",
-     "[string     blahblah]",
-     "[string     etc]",
-     "[string   ]) [keyword !important];",
-     "}");
-
-  MT("font_face",
-     "[def @font-face] {",
-     "  [property font-family]: [string 'myfont'];",
-     "  [error nonsense]: [string 'abc'];",
-     "  [property src]: [atom url]([string http://blah]),",
-     "    [atom url]([string http://foo]);",
-     "}");
-
-  MT("empty_url",
-     "[def @import] [tag url]() [tag screen];");
-
-  MT("parens",
-     "[qualifier .foo] {",
-     "  [property background-image]: [variable fade]([atom #000], [number 20%]);",
-     "  [property border-image]: [variable linear-gradient](",
-     "    [atom to] [atom bottom],",
-     "    [variable fade]([atom #000], [number 20%]) [number 0%],",
-     "    [variable fade]([atom #000], [number 20%]) [number 100%]",
-     "  );",
-     "}");
-})();
diff --git a/public/js/lib/codemirror/mode/htmlembedded/htmlembedded.js b/public/js/lib/codemirror/mode/htmlembedded/htmlembedded.js
deleted file mode 100644
index e8f7ba8..0000000
--- a/public/js/lib/codemirror/mode/htmlembedded/htmlembedded.js
+++ /dev/null
@@ -1,86 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror", "../htmlmixed/htmlmixed"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("htmlembedded", function(config, parserConfig) {
-
-  //config settings
-  var scriptStartRegex = parserConfig.scriptStartRegex || /^<%/i,
-      scriptEndRegex = parserConfig.scriptEndRegex || /^%>/i;
-
-  //inner modes
-  var scriptingMode, htmlMixedMode;
-
-  //tokenizer when in html mode
-  function htmlDispatch(stream, state) {
-      if (stream.match(scriptStartRegex, false)) {
-          state.token=scriptingDispatch;
-          return scriptingMode.token(stream, state.scriptState);
-          }
-      else
-          return htmlMixedMode.token(stream, state.htmlState);
-    }
-
-  //tokenizer when in scripting mode
-  function scriptingDispatch(stream, state) {
-      if (stream.match(scriptEndRegex, false))  {
-          state.token=htmlDispatch;
-          return htmlMixedMode.token(stream, state.htmlState);
-         }
-      else
-          return scriptingMode.token(stream, state.scriptState);
-         }
-
-
-  return {
-    startState: function() {
-      scriptingMode = scriptingMode || CodeMirror.getMode(config, parserConfig.scriptingModeSpec);
-      htmlMixedMode = htmlMixedMode || CodeMirror.getMode(config, "htmlmixed");
-      return {
-          token :  parserConfig.startOpen ? scriptingDispatch : htmlDispatch,
-          htmlState : CodeMirror.startState(htmlMixedMode),
-          scriptState : CodeMirror.startState(scriptingMode)
-      };
-    },
-
-    token: function(stream, state) {
-      return state.token(stream, state);
-    },
-
-    indent: function(state, textAfter) {
-      if (state.token == htmlDispatch)
-        return htmlMixedMode.indent(state.htmlState, textAfter);
-      else if (scriptingMode.indent)
-        return scriptingMode.indent(state.scriptState, textAfter);
-    },
-
-    copyState: function(state) {
-      return {
-       token : state.token,
-       htmlState : CodeMirror.copyState(htmlMixedMode, state.htmlState),
-       scriptState : CodeMirror.copyState(scriptingMode, state.scriptState)
-      };
-    },
-
-    innerMode: function(state) {
-      if (state.token == scriptingDispatch) return {state: state.scriptState, mode: scriptingMode};
-      else return {state: state.htmlState, mode: htmlMixedMode};
-    }
-  };
-}, "htmlmixed");
-
-CodeMirror.defineMIME("application/x-ejs", { name: "htmlembedded", scriptingModeSpec:"javascript"});
-CodeMirror.defineMIME("application/x-aspx", { name: "htmlembedded", scriptingModeSpec:"text/x-csharp"});
-CodeMirror.defineMIME("application/x-jsp", { name: "htmlembedded", scriptingModeSpec:"text/x-java"});
-CodeMirror.defineMIME("application/x-erb", { name: "htmlembedded", scriptingModeSpec:"ruby"});
-
-});
diff --git a/public/js/lib/codemirror/mode/htmlembedded/index.html b/public/js/lib/codemirror/mode/htmlembedded/index.html
deleted file mode 100644
index 93d01c4..0000000
--- a/public/js/lib/codemirror/mode/htmlembedded/index.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!doctype html>
-
-<title>CodeMirror: Html Embedded Scripts mode</title>
-<meta charset="utf-8"/>
-<link rel=stylesheet href="../../doc/docs.css">
-
-<link rel="stylesheet" href="../../lib/codemirror.css">
-<script src="../../lib/codemirror.js"></script>
-<script src="../xml/xml.js"></script>
-<script src="../javascript/javascript.js"></script>
-<script src="../css/css.js"></script>
-<script src="../htmlmixed/htmlmixed.js"></script>
-<script src="htmlembedded.js"></script>
-<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
-<div id=nav>
-  <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
-
-  <ul>
-    <li><a href="../../index.html">Home</a>
-    <li><a href="../../doc/manual.html">Manual</a>
-    <li><a href="https://github.com/codemirror/codemirror">Code</a>
-  </ul>
-  <ul>
-    <li><a href="../index.html">Language modes</a>
-    <li><a class=active href="#">Html Embedded Scripts</a>
-  </ul>
-</div>
-
-<article>
-<h2>Html Embedded Scripts mode</h2>
-<form><textarea id="code" name="code">
-<%
-function hello(who) {
-	return "Hello " + who;
-}
-%>
-This is an example of EJS (embedded javascript)
-<p>The program says <%= hello("world") %>.</p>
-<script>
-	alert("And here is some normal JS code"); // also colored
-</script>
-</textarea></form>
-
-    <script>
-      var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
-        lineNumbers: true,
-        mode: "application/x-ejs",
-        indentUnit: 4,
-        indentWithTabs: true
-      });
-    </script>
-
-    <p>Mode for html embedded scripts like JSP and ASP.NET. Depends on HtmlMixed which in turn depends on
-    JavaScript, CSS and XML.<br />Other dependancies include those of the scriping language chosen.</p>
-
-    <p><strong>MIME types defined:</strong> <code>application/x-aspx</code> (ASP.NET), 
-    <code>application/x-ejs</code> (Embedded Javascript), <code>application/x-jsp</code> (JavaServer Pages)</p>
-  </article>
diff --git a/public/js/lib/codemirror/mode/htmlmixed/htmlmixed.js b/public/js/lib/codemirror/mode/htmlmixed/htmlmixed.js
deleted file mode 100644
index 1cc438f..0000000
--- a/public/js/lib/codemirror/mode/htmlmixed/htmlmixed.js
+++ /dev/null
@@ -1,121 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"), require("../xml/xml"), require("../javascript/javascript"), require("../css/css"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror", "../xml/xml", "../javascript/javascript", "../css/css"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("htmlmixed", function(config, parserConfig) {
-  var htmlMode = CodeMirror.getMode(config, {name: "xml",
-                                             htmlMode: true,
-                                             multilineTagIndentFactor: parserConfig.multilineTagIndentFactor,
-                                             multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag});
-  var cssMode = CodeMirror.getMode(config, "css");
-
-  var scriptTypes = [], scriptTypesConf = parserConfig && parserConfig.scriptTypes;
-  scriptTypes.push({matches: /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,
-                    mode: CodeMirror.getMode(config, "javascript")});
-  if (scriptTypesConf) for (var i = 0; i < scriptTypesConf.length; ++i) {
-    var conf = scriptTypesConf[i];
-    scriptTypes.push({matches: conf.matches, mode: conf.mode && CodeMirror.getMode(config, conf.mode)});
-  }
-  scriptTypes.push({matches: /./,
-                    mode: CodeMirror.getMode(config, "text/plain")});
-
-  function html(stream, state) {
-    var tagName = state.htmlState.tagName;
-    if (tagName) tagName = tagName.toLowerCase();
-    var style = htmlMode.token(stream, state.htmlState);
-    if (tagName == "script" && /\btag\b/.test(style) && stream.current() == ">") {
-      // Script block: mode to change to depends on type attribute
-      var scriptType = stream.string.slice(Math.max(0, stream.pos - 100), stream.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);
-      scriptType = scriptType ? scriptType[1] : "";
-      if (scriptType && /[\"\']/.test(scriptType.charAt(0))) scriptType = scriptType.slice(1, scriptType.length - 1);
-      for (var i = 0; i < scriptTypes.length; ++i) {
-        var tp = scriptTypes[i];
-        if (typeof tp.matches == "string" ? scriptType == tp.matches : tp.matches.test(scriptType)) {
-          if (tp.mode) {
-            state.token = script;
-            state.localMode = tp.mode;
-            state.localState = tp.mode.startState && tp.mode.startState(htmlMode.indent(state.htmlState, ""));
-          }
-          break;
-        }
-      }
-    } else if (tagName == "style" && /\btag\b/.test(style) && stream.current() == ">") {
-      state.token = css;
-      state.localMode = cssMode;
-      state.localState = cssMode.startState(htmlMode.indent(state.htmlState, ""));
-    }
-    return style;
-  }
-  function maybeBackup(stream, pat, style) {
-    var cur = stream.current();
-    var close = cur.search(pat), m;
-    if (close > -1) stream.backUp(cur.length - close);
-    else if (m = cur.match(/<\/?$/)) {
-      stream.backUp(cur.length);
-      if (!stream.match(pat, false)) stream.match(cur);
-    }
-    return style;
-  }
-  function script(stream, state) {
-    if (stream.match(/^<\/\s*script\s*>/i, false)) {
-      state.token = html;
-      state.localState = state.localMode = null;
-      return null;
-    }
-    return maybeBackup(stream, /<\/\s*script\s*>/,
-                       state.localMode.token(stream, state.localState));
-  }
-  function css(stream, state) {
-    if (stream.match(/^<\/\s*style\s*>/i, false)) {
-      state.token = html;
-      state.localState = state.localMode = null;
-      return null;
-    }
-    return maybeBackup(stream, /<\/\s*style\s*>/,
-                       cssMode.token(stream, state.localState));
-  }
-
-  return {
-    startState: function() {
-      var state = htmlMode.startState();
-      return {token: html, localMode: null, localState: null, htmlState: state};
-    },
-
-    copyState: function(state) {
-      if (state.localState)
-        var local = CodeMirror.copyState(state.localMode, state.localState);
-      return {token: state.token, localMode: state.localMode, localState: local,
-              htmlState: CodeMirror.copyState(htmlMode, state.htmlState)};
-    },
-
-    token: function(stream, state) {
-      return state.token(stream, state);
-    },
-
-    indent: function(state, textAfter) {
-      if (!state.localMode || /^\s*<\//.test(textAfter))
-        return htmlMode.indent(state.htmlState, textAfter);
-      else if (state.localMode.indent)
-        return state.localMode.indent(state.localState, textAfter);
-      else
-        return CodeMirror.Pass;
-    },
-
-    innerMode: function(state) {
-      return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode};
-    }
-  };
-}, "xml", "javascript", "css");
-
-CodeMirror.defineMIME("text/html", "htmlmixed");
-
-});
diff --git a/public/js/lib/codemirror/mode/htmlmixed/index.html b/public/js/lib/codemirror/mode/htmlmixed/index.html
deleted file mode 100644
index 6163029..0000000
--- a/public/js/lib/codemirror/mode/htmlmixed/index.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<!doctype html>
-
-<title>CodeMirror: HTML mixed mode</title>
-<meta charset="utf-8"/>
-<link rel=stylesheet href="../../doc/docs.css">
-
-<link rel="stylesheet" href="../../lib/codemirror.css">
-<script src="../../lib/codemirror.js"></script>
-<script src="../xml/xml.js"></script>
-<script src="../javascript/javascript.js"></script>
-<script src="../css/css.js"></script>
-<script src="../vbscript/vbscript.js"></script>
-<script src="htmlmixed.js"></script>
-<style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
-<div id=nav>
-  <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
-
-  <ul>
-    <li><a href="../../index.html">Home</a>
-    <li><a href="../../doc/manual.html">Manual</a>
-    <li><a href="https://github.com/codemirror/codemirror">Code</a>
-  </ul>
-  <ul>
-    <li><a href="../index.html">Language modes</a>
-    <li><a class=active href="#">HTML mixed</a>
-  </ul>
-</div>
-
-<article>
-<h2>HTML mixed mode</h2>
-<form><textarea id="code" name="code">
-<html style="color: green">
-  <!-- this is a comment -->
-  <head>
-    <title>Mixed HTML Example</title>
-    <style type="text/css">
-      h1 {font-family: comic sans; color: #f0f;}
-      div {background: yellow !important;}
-      body {
-        max-width: 50em;
-        margin: 1em 2em 1em 5em;
-      }
-    </style>
-  </head>
-  <body>
-    <h1>Mixed HTML Example</h1>
-    <script>
-      function jsFunc(arg1, arg2) {
-        if (arg1 && arg2) document.body.innerHTML = "achoo";
-      }
-    </script>
-  </body>
-</html>
-</textarea></form>
-    <script>
-      // Define an extended mixed-mode that understands vbscript and
-      // leaves mustache/handlebars embedded templates in html mode
-      var mixedMode = {
-        name: "htmlmixed",
-        scriptTypes: [{matches: /\/x-handlebars-template|\/x-mustache/i,
-                       mode: null},
-                      {matches: /(text|application)\/(x-)?vb(a|script)/i,
-                       mode: "vbscript"}]
-      };
-      var editor = CodeMirror.fromTextArea(document.getElementById("code"), {mode: mixedMode});
-    </script>
-
-    <p>The HTML mixed mode depends on the XML, JavaScript, and CSS modes.</p>
-
-    <p>It takes an optional mode configuration
-    option, <code>scriptTypes</code>, which can be used to add custom
-    behavior for specific <code>&lt;script type="..."></code> tags. If
-    given, it should hold an array of <code>{matches, mode}</code>
-    objects, where <code>matches</code> is a string or regexp that
-    matches the script type, and <code>mode</code> is
-    either <code>null</code>, for script types that should stay in
-    HTML mode, or a <a href="../../doc/manual.html#option_mode">mode
-    spec</a> corresponding to the mode that should be used for the
-    script.</p>
-
-    <p><strong>MIME types defined:</strong> <code>text/html</code>
-    (redefined, only takes effect if you load this parser after the
-    XML parser).</p>
-
-  </article>
diff --git a/public/js/lib/codemirror/mode/jade/index.html b/public/js/lib/codemirror/mode/jade/index.html
deleted file mode 100644
index e534981..0000000
--- a/public/js/lib/codemirror/mode/jade/index.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!doctype html>
-
-<title>CodeMirror: Jade Templating Mode</title>
-<meta charset="utf-8"/>
-<link rel=stylesheet href="../../doc/docs.css">
-
-<link rel="stylesheet" href="../../lib/codemirror.css">
-<script src="../../lib/codemirror.js"></script>
-<script src="../javascript/javascript.js"></script>
-<script src="../css/css.js"></script>
-<script src="../xml/xml.js"></script>
-<script src="../htmlmixed/htmlmixed.js"></script>
-<script src="jade.js"></script>
-<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
-<div id=nav>
-  <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
-
-  <ul>
-    <li><a href="../../index.html">Home</a>
-    <li><a href="../../doc/manual.html">Manual</a>
-    <li><a href="https://github.com/codemirror/codemirror">Code</a>
-  </ul>
-  <ul>
-    <li><a href="../index.html">Language modes</a>
-    <li><a class=active href="#">Jade Templating Mode</a>
-  </ul>
-</div>
-
-<article>
-<h2>Jade Templating Mode</h2>
-<form><textarea id="code" name="code">
-doctype html
-  html
-    head
-      title= "Jade Templating CodeMirror Mode Example"
-      link(rel='stylesheet', href='/css/bootstrap.min.css')
-      link(rel='stylesheet', href='/css/index.css')
-      script(type='text/javascript', src='/js/jquery-1.9.1.min.js')
-      script(type='text/javascript', src='/js/bootstrap.min.js')
-    body
-      div.header
-        h1 Welcome to this Example
-      div.spots
-        if locals.spots
-          each spot in spots
-            div.spot.well
-         div
-           if spot.logo
-             img.img-rounded.logo(src=spot.logo)
-           else
-             img.img-rounded.logo(src="img/placeholder.png")
-         h3
-           a(href=spot.hash) ##{spot.hash}
-           if spot.title
-             span.title #{spot.title}
-           if spot.desc
-             div #{spot.desc}
-        else
-          h3 There are no spots currently available.
-</textarea></form>
-    <script>
-      var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
-        mode: {name: "jade", alignCDATA: true},
-        lineNumbers: true
-      });
-    </script>
-    <h3>The Jade Templating Mode</h3>
-      <p> Created by Forbes Lindesay. Managed as part of a Brackets extension at <a href="https://github.com/ForbesLindesay/jade-brackets">https://github.com/ForbesLindesay/jade-brackets</a>.</p>
-    <p><strong>MIME type defined:</strong> <code>text/x-jade</code>.</p>
-  </article>
diff --git a/public/js/lib/codemirror/mode/jade/jade.js b/public/js/lib/codemirror/mode/jade/jade.js
deleted file mode 100644
index 96fadb1..0000000
--- a/public/js/lib/codemirror/mode/jade/jade.js
+++ /dev/null
@@ -1,590 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"), require("../javascript/javascript"), require("../css/css"), require("../htmlmixed/htmlmixed"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror", "../javascript/javascript", "../css/css", "../htmlmixed/htmlmixed"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode('jade', function (config) {
-  // token types
-  var KEYWORD = 'keyword';
-  var DOCTYPE = 'meta';
-  var ID = 'builtin';
-  var CLASS = 'qualifier';
-
-  var ATTRS_NEST = {
-    '{': '}',
-    '(': ')',
-    '[': ']'
-  };
-
-  var jsMode = CodeMirror.getMode(config, 'javascript');
-
-  function State() {
-    this.javaScriptLine = false;
-    this.javaScriptLineExcludesColon = false;
-
-    this.javaScriptArguments = false;
-    this.javaScriptArgumentsDepth = 0;
-
-    this.isInterpolating = false;
-    this.interpolationNesting = 0;
-
-    this.jsState = jsMode.startState();
-
-    this.restOfLine = '';
-
-    this.isIncludeFiltered = false;
-    this.isEach = false;
-
-    this.lastTag = '';
-    this.scriptType = '';
-
-    // Attributes Mode
-    this.isAttrs = false;
-    this.attrsNest = [];
-    this.inAttributeName = true;
-    this.attributeIsType = false;
-    this.attrValue = '';
-
-    // Indented Mode
-    this.indentOf = Infinity;
-    this.indentToken = '';
-
-    this.innerMode = null;
-    this.innerState = null;
-
-    this.innerModeForLine = false;
-  }
-  /**
-   * Safely copy a state
-   *
-   * @return {State}
-   */
-  State.prototype.copy = function () {
-    var res = new State();
-    res.javaScriptLine = this.javaScriptLine;
-    res.javaScriptLineExcludesColon = this.javaScriptLineExcludesColon;
-    res.javaScriptArguments = this.javaScriptArguments;
-    res.javaScriptArgumentsDepth = this.javaScriptArgumentsDepth;
-    res.isInterpolating = this.isInterpolating;
-    res.interpolationNesting = this.intpolationNesting;
-
-    res.jsState = CodeMirror.copyState(jsMode, this.jsState);
-
-    res.innerMode = this.innerMode;
-    if (this.innerMode && this.innerState) {
-      res.innerState = CodeMirror.copyState(this.innerMode, this.innerState);
-    }
-
-    res.restOfLine = this.restOfLine;
-
-    res.isIncludeFiltered = this.isIncludeFiltered;
-    res.isEach = this.isEach;
-    res.lastTag = this.lastTag;
-    res.scriptType = this.scriptType;
-    res.isAttrs = this.isAttrs;
-    res.attrsNest = this.attrsNest.slice();
-    res.inAttributeName = this.inAttributeName;
-    res.attributeIsType = this.attributeIsType;
-    res.attrValue = this.attrValue;
-    res.indentOf = this.indentOf;
-    res.indentToken = this.indentToken;
-
-    res.innerModeForLine = this.innerModeForLine;
-
-    return res;
-  };
-
-  function javaScript(stream, state) {
-    if (stream.sol()) {
-      // if javaScriptLine was set at end of line, ignore it
-      state.javaScriptLine = false;
-      state.javaScriptLineExcludesColon = false;
-    }
-    if (state.javaScriptLine) {
-      if (state.javaScriptLineExcludesColon && stream.peek() === ':') {
-        state.javaScriptLine = false;
-        state.javaScriptLineExcludesColon = false;
-        return;
-      }
-      var tok = jsMode.token(stream, state.jsState);
-      if (stream.eol()) state.javaScriptLine = false;
-      return tok || true;
-    }
-  }
-  function javaScriptArguments(stream, state) {
-    if (state.javaScriptArguments) {
-      if (state.javaScriptArgumentsDepth === 0 && stream.peek() !== '(') {
-        state.javaScriptArguments = false;
-        return;
-      }
-      if (stream.peek() === '(') {
-        state.javaScriptArgumentsDepth++;
-      } else if (stream.peek() === ')') {
-        state.javaScriptArgumentsDepth--;
-      }
-      if (state.javaScriptArgumentsDepth === 0) {
-        state.javaScriptArguments = false;
-        return;
-      }
-
-      var tok = jsMode.token(stream, state.jsState);
-      return tok || true;
-    }
-  }
-
-  function yieldStatement(stream) {
-    if (stream.match(/^yield\b/)) {
-        return 'keyword';
-    }
-  }
-
-  function doctype(stream) {
-    if (stream.match(/^(?:doctype) *([^\n]+)?/)) {
-        return DOCTYPE;
-    }
-  }
-
-  function interpolation(stream, state) {
-    if (stream.match('#{')) {
-      state.isInterpolating = true;
-      state.interpolationNesting = 0;
-      return 'punctuation';
-    }
-  }
-
-  function interpolationContinued(stream, state) {
-    if (state.isInterpolating) {
-      if (stream.peek() === '}') {
-        state.interpolationNesting--;
-        if (state.interpolationNesting < 0) {
-          stream.next();
-          state.isInterpolating = false;
-          return 'puncutation';
-        }
-      } else if (stream.peek() === '{') {
-        state.interpolationNesting++;
-      }
-      return jsMode.token(stream, state.jsState) || true;
-    }
-  }
-
-  function caseStatement(stream, state) {
-    if (stream.match(/^case\b/)) {
-      state.javaScriptLine = true;
-      return KEYWORD;
-    }
-  }
-
-  function when(stream, state) {
-    if (stream.match(/^when\b/)) {
-      state.javaScriptLine = true;
-      state.javaScriptLineExcludesColon = true;
-      return KEYWORD;
-    }
-  }
-
-  function defaultStatement(stream) {
-    if (stream.match(/^default\b/)) {
-      return KEYWORD;
-    }
-  }
-
-  function extendsStatement(stream, state) {
-    if (stream.match(/^extends?\b/)) {
-      state.restOfLine = 'string';
-      return KEYWORD;
-    }
-  }
-
-  function append(stream, state) {
-    if (stream.match(/^append\b/)) {
-      state.restOfLine = 'variable';
-      return KEYWORD;
-    }
-  }
-  function prepend(stream, state) {
-    if (stream.match(/^prepend\b/)) {
-      state.restOfLine = 'variable';
-      return KEYWORD;
-    }
-  }
-  function block(stream, state) {
-    if (stream.match(/^block\b *(?:(prepend|append)\b)?/)) {
-      state.restOfLine = 'variable';
-      return KEYWORD;
-    }
-  }
-
-  function include(stream, state) {
-    if (stream.match(/^include\b/)) {
-      state.restOfLine = 'string';
-      return KEYWORD;
-    }
-  }
-
-  function includeFiltered(stream, state) {
-    if (stream.match(/^include:([a-zA-Z0-9\-]+)/, false) && stream.match('include')) {
-      state.isIncludeFiltered = true;
-      return KEYWORD;
-    }
-  }
-
-  function includeFilteredContinued(stream, state) {
-    if (state.isIncludeFiltered) {
-      var tok = filter(stream, state);
-      state.isIncludeFiltered = false;
-      state.restOfLine = 'string';
-      return tok;
-    }
-  }
-
-  function mixin(stream, state) {
-    if (stream.match(/^mixin\b/)) {
-      state.javaScriptLine = true;
-      return KEYWORD;
-    }
-  }
-
-  function call(stream, state) {
-    if (stream.match(/^\+([-\w]+)/)) {
-      if (!stream.match(/^\( *[-\w]+ *=/, false)) {
-        state.javaScriptArguments = true;
-        state.javaScriptArgumentsDepth = 0;
-      }
-      return 'variable';
-    }
-    if (stream.match(/^\+#{/, false)) {
-      stream.next();
-      state.mixinCallAfter = true;
-      return interpolation(stream, state);
-    }
-  }
-  function callArguments(stream, state) {
-    if (state.mixinCallAfter) {
-      state.mixinCallAfter = false;
-      if (!stream.match(/^\( *[-\w]+ *=/, false)) {
-        state.javaScriptArguments = true;
-        state.javaScriptArgumentsDepth = 0;
-      }
-      return true;
-    }
-  }
-
-  function conditional(stream, state) {
-    if (stream.match(/^(if|unless|else if|else)\b/)) {
-      state.javaScriptLine = true;
-      return KEYWORD;
-    }
-  }
-
-  function each(stream, state) {
-    if (stream.match(/^(- *)?(each|for)\b/)) {
-      state.isEach = true;
-      return KEYWORD;
-    }
-  }
-  function eachContinued(stream, state) {
-    if (state.isEach) {
-      if (stream.match(/^ in\b/)) {
-        state.javaScriptLine = true;
-        state.isEach = false;
-        return KEYWORD;
-      } else if (stream.sol() || stream.eol()) {
-        state.isEach = false;
-      } else if (stream.next()) {
-        while (!stream.match(/^ in\b/, false) && stream.next());
-        return 'variable';
-      }
-    }
-  }
-
-  function whileStatement(stream, state) {
-    if (stream.match(/^while\b/)) {
-      state.javaScriptLine = true;
-      return KEYWORD;
-    }
-  }
-
-  function tag(stream, state) {
-    var captures;
-    if (captures = stream.match(/^(\w(?:[-:\w]*\w)?)\/?/)) {
-      state.lastTag = captures[1].toLowerCase();
-      if (state.lastTag === 'script') {
-        state.scriptType = 'application/javascript';
-      }
-      return 'tag';
-    }
-  }
-
-  function filter(stream, state) {
-    if (stream.match(/^:([\w\-]+)/)) {
-      var innerMode;
-      if (config && config.innerModes) {
-        innerMode = config.innerModes(stream.current().substring(1));
-      }
-      if (!innerMode) {
-        innerMode = stream.current().substring(1);
-      }
-      if (typeof innerMode === 'string') {
-        innerMode = CodeMirror.getMode(config, innerMode);
-      }
-      setInnerMode(stream, state, innerMode);
-      return 'atom';
-    }
-  }
-
-  function code(stream, state) {
-    if (stream.match(/^(!?=|-)/)) {
-      state.javaScriptLine = true;
-      return 'punctuation';
-    }
-  }
-
-  function id(stream) {
-    if (stream.match(/^#([\w-]+)/)) {
-      return ID;
-    }
-  }
-
-  function className(stream) {
-    if (stream.match(/^\.([\w-]+)/)) {
-      return CLASS;
-    }
-  }
-
-  function attrs(stream, state) {
-    if (stream.peek() == '(') {
-      stream.next();
-      state.isAttrs = true;
-      state.attrsNest = [];
-      state.inAttributeName = true;
-      state.attrValue = '';
-      state.attributeIsType = false;
-      return 'punctuation';
-    }
-  }
-
-  function attrsContinued(stream, state) {
-    if (state.isAttrs) {
-      if (ATTRS_NEST[stream.peek()]) {
-        state.attrsNest.push(ATTRS_NEST[stream.peek()]);
-      }
-      if (state.attrsNest[state.attrsNest.length - 1] === stream.peek()) {
-        state.attrsNest.pop();
-      } else  if (stream.eat(')')) {
-        state.isAttrs = false;
-        return 'punctuation';
-      }
-      if (state.inAttributeName && stream.match(/^[^=,\)!]+/)) {
-        if (stream.peek() === '=' || stream.peek() === '!') {
-          state.inAttributeName = false;
-          state.jsState = jsMode.startState();
-          if (state.lastTag === 'script' && stream.current().trim().toLowerCase() === 'type') {
-            state.attributeIsType = true;
-          } else {
-            state.attributeIsType = false;
-          }
-        }
-        return 'attribute';
-      }
-
-      var tok = jsMode.token(stream, state.jsState);
-      if (state.attributeIsType && tok === 'string') {
-        state.scriptType = stream.current().toString();
-      }
-      if (state.attrsNest.length === 0 && (tok === 'string' || tok === 'variable' || tok === 'keyword')) {
-        try {
-          Function('', 'var x ' + state.attrValue.replace(/,\s*$/, '').replace(/^!/, ''));
-          state.inAttributeName = true;
-          state.attrValue = '';
-          stream.backUp(stream.current().length);
-          return attrsContinued(stream, state);
-        } catch (ex) {
-          //not the end of an attribute
-        }
-      }
-      state.attrValue += stream.current();
-      return tok || true;
-    }
-  }
-
-  function attributesBlock(stream, state) {
-    if (stream.match(/^&attributes\b/)) {
-      state.javaScriptArguments = true;
-      state.javaScriptArgumentsDepth = 0;
-      return 'keyword';
-    }
-  }
-
-  function indent(stream) {
-    if (stream.sol() && stream.eatSpace()) {
-      return 'indent';
-    }
-  }
-
-  function comment(stream, state) {
-    if (stream.match(/^ *\/\/(-)?([^\n]*)/)) {
-      state.indentOf = stream.indentation();
-      state.indentToken = 'comment';
-      return 'comment';
-    }
-  }
-
-  function colon(stream) {
-    if (stream.match(/^: */)) {
-      return 'colon';
-    }
-  }
-
-  function text(stream, state) {
-    if (stream.match(/^(?:\| ?| )([^\n]+)/)) {
-      return 'string';
-    }
-    if (stream.match(/^(<[^\n]*)/, false)) {
-      // html string
-      setInnerMode(stream, state, 'htmlmixed');
-      state.innerModeForLine = true;
-      return innerMode(stream, state, true);
-    }
-  }
-
-  function dot(stream, state) {
-    if (stream.eat('.')) {
-      var innerMode = null;
-      if (state.lastTag === 'script' && state.scriptType.toLowerCase().indexOf('javascript') != -1) {
-        innerMode = state.scriptType.toLowerCase().replace(/"|'/g, '');
-      } else if (state.lastTag === 'style') {
-        innerMode = 'css';
-      }
-      setInnerMode(stream, state, innerMode);
-      return 'dot';
-    }
-  }
-
-  function fail(stream) {
-    stream.next();
-    return null;
-  }
-
-
-  function setInnerMode(stream, state, mode) {
-    mode = CodeMirror.mimeModes[mode] || mode;
-    mode = config.innerModes ? config.innerModes(mode) || mode : mode;
-    mode = CodeMirror.mimeModes[mode] || mode;
-    mode = CodeMirror.getMode(config, mode);
-    state.indentOf = stream.indentation();
-
-    if (mode && mode.name !== 'null') {
-      state.innerMode = mode;
-    } else {
-      state.indentToken = 'string';
-    }
-  }
-  function innerMode(stream, state, force) {
-    if (stream.indentation() > state.indentOf || (state.innerModeForLine && !stream.sol()) || force) {
-      if (state.innerMode) {
-        if (!state.innerState) {
-          state.innerState = state.innerMode.startState ? state.innerMode.startState(stream.indentation()) : {};
-        }
-        return stream.hideFirstChars(state.indentOf + 2, function () {
-          return state.innerMode.token(stream, state.innerState) || true;
-        });
-      } else {
-        stream.skipToEnd();
-        return state.indentToken;
-      }
-    } else if (stream.sol()) {
-      state.indentOf = Infinity;
-      state.indentToken = null;
-      state.innerMode = null;
-      state.innerState = null;
-    }
-  }
-  function restOfLine(stream, state) {
-    if (stream.sol()) {
-      // if restOfLine was set at end of line, ignore it
-      state.restOfLine = '';
-    }
-    if (state.restOfLine) {
-      stream.skipToEnd();
-      var tok = state.restOfLine;
-      state.restOfLine = '';
-      return tok;
-    }
-  }
-
-
-  function startState() {
-    return new State();
-  }
-  function copyState(state) {
-    return state.copy();
-  }
-  /**
-   * Get the next token in the stream
-   *
-   * @param {Stream} stream
-   * @param {State} state
-   */
-  function nextToken(stream, state) {
-    var tok = innerMode(stream, state)
-      || restOfLine(stream, state)
-      || interpolationContinued(stream, state)
-      || includeFilteredContinued(stream, state)
-      || eachContinued(stream, state)
-      || attrsContinued(stream, state)
-      || javaScript(stream, state)
-      || javaScriptArguments(stream, state)
-      || callArguments(stream, state)
-
-      || yieldStatement(stream, state)
-      || doctype(stream, state)
-      || interpolation(stream, state)
-      || caseStatement(stream, state)
-      || when(stream, state)
-      || defaultStatement(stream, state)
-      || extendsStatement(stream, state)
-      || append(stream, state)
-      || prepend(stream, state)
-      || block(stream, state)
-      || include(stream, state)
-      || includeFiltered(stream, state)
-      || mixin(stream, state)
-      || call(stream, state)
-      || conditional(stream, state)
-      || each(stream, state)
-      || whileStatement(stream, state)
-      || tag(stream, state)
-      || filter(stream, state)
-      || code(stream, state)
-      || id(stream, state)
-      || className(stream, state)
-      || attrs(stream, state)
-      || attributesBlock(stream, state)
-      || indent(stream, state)
-      || text(stream, state)
-      || comment(stream, state)
-      || colon(stream, state)
-      || dot(stream, state)
-      || fail(stream, state);
-
-    return tok === true ? null : tok;
-  }
-  return {
-    startState: startState,
-    copyState: copyState,
-    token: nextToken
-  };
-});
-
-CodeMirror.defineMIME('text/x-jade', 'jade');
-
-});
diff --git a/public/js/lib/codemirror/mode/javascript/index.html b/public/js/lib/codemirror/mode/javascript/index.html
deleted file mode 100644
index 592a133..0000000
--- a/public/js/lib/codemirror/mode/javascript/index.html
+++ /dev/null
@@ -1,114 +0,0 @@
-<!doctype html>
-
-<title>CodeMirror: JavaScript mode</title>
-<meta charset="utf-8"/>
-<link rel=stylesheet href="../../doc/docs.css">
-
-<link rel="stylesheet" href="../../lib/codemirror.css">
-<script src="../../lib/codemirror.js"></script>
-<script src="../../addon/edit/matchbrackets.js"></script>
-<script src="../../addon/comment/continuecomment.js"></script>
-<script src="../../addon/comment/comment.js"></script>
-<script src="javascript.js"></script>
-<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
-<div id=nav>
-  <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
-
-  <ul>
-    <li><a href="../../index.html">Home</a>
-    <li><a href="../../doc/manual.html">Manual</a>
-    <li><a href="https://github.com/codemirror/codemirror">Code</a>
-  </ul>
-  <ul>
-    <li><a href="../index.html">Language modes</a>
-    <li><a class=active href="#">JavaScript</a>
-  </ul>
-</div>
-
-<article>
-<h2>JavaScript mode</h2>
-
-
-<div><textarea id="code" name="code">
-// Demo code (the actual new parser character stream implementation)
-
-function StringStream(string) {
-  this.pos = 0;
-  this.string = string;
-}
-
-StringStream.prototype = {
-  done: function() {return this.pos >= this.string.length;},
-  peek: function() {return this.string.charAt(this.pos);},
-  next: function() {
-    if (this.pos &lt; this.string.length)
-      return this.string.charAt(this.pos++);
-  },
-  eat: function(match) {
-    var ch = this.string.charAt(this.pos);
-    if (typeof match == "string") var ok = ch == match;
-    else var ok = ch &amp;&amp; match.test ? match.test(ch) : match(ch);
-    if (ok) {this.pos++; return ch;}
-  },
-  eatWhile: function(match) {
-    var start = this.pos;
-    while (this.eat(match));
-    if (this.pos > start) return this.string.slice(start, this.pos);
-  },
-  backUp: function(n) {this.pos -= n;},
-  column: function() {return this.pos;},
-  eatSpace: function() {
-    var start = this.pos;
-    while (/\s/.test(this.string.charAt(this.pos))) this.pos++;
-    return this.pos - start;
-  },
-  match: function(pattern, consume, caseInsensitive) {
-    if (typeof pattern == "string") {
-      function cased(str) {return caseInsensitive ? str.toLowerCase() : str;}
-      if (cased(this.string).indexOf(cased(pattern), this.pos) == this.pos) {
-        if (consume !== false) this.pos += str.length;
-        return true;
-      }
-    }
-    else {
-      var match = this.string.slice(this.pos).match(pattern);
-      if (match &amp;&amp; consume !== false) this.pos += match[0].length;
-      return match;
-    }
-  }
-};
-</textarea></div>
-
-    <script>
-      var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
-        lineNumbers: true,
-        matchBrackets: true,
-        continueComments: "Enter",
-        extraKeys: {"Ctrl-Q": "toggleComment"}
-      });
-    </script>
-
-    <p>
-      JavaScript mode supports several configuration options:
-      <ul>
-        <li><code>json</code> which will set the mode to expect JSON
-        data rather than a JavaScript program.</li>
-        <li><code>jsonld</code> which will set the mode to expect
-        <a href="http://json-ld.org">JSON-LD</a> linked data rather
-        than a JavaScript program (<a href="json-ld.html">demo</a>).</li>
-        <li><code>typescript</code> which will activate additional
-        syntax highlighting and some other things for TypeScript code
-        (<a href="typescript.html">demo</a>).</li>
-        <li><code>statementIndent</code> which (given a number) will
-        determine the amount of indentation to use for statements
-        continued on a new line.</li>
-        <li><code>wordCharacters</code>, a regexp that indicates which
-        characters should be considered part of an identifier.
-        Defaults to <code>/[\w$]/</code>, which does not handle
-        non-ASCII identifiers. Can be set to something more elaborate
-        to improve Unicode support.</li>
-      </ul>
-    </p>
-
-    <p><strong>MIME types defined:</strong> <code>text/javascript</code>, <code>application/json</code>, <code>application/ld+json</code>, <code>text/typescript</code>, <code>application/typescript</code>.</p>
-  </article>
diff --git a/public/js/lib/codemirror/mode/javascript/javascript.js b/public/js/lib/codemirror/mode/javascript/javascript.js
deleted file mode 100644
index fac8d57..0000000
--- a/public/js/lib/codemirror/mode/javascript/javascript.js
+++ /dev/null
@@ -1,686 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// TODO actually recognize syntax of TypeScript constructs
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("javascript", function(config, parserConfig) {
-  var indentUnit = config.indentUnit;
-  var statementIndent = parserConfig.statementIndent;
-  var jsonldMode = parserConfig.jsonld;
-  var jsonMode = parserConfig.json || jsonldMode;
-  var isTS = parserConfig.typescript;
-  var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/;
-
-  // Tokenizer
-
-  var keywords = function(){
-    function kw(type) {return {type: type, style: "keyword"};}
-    var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c");
-    var operator = kw("operator"), atom = {type: "atom", style: "atom"};
-
-    var jsKeywords = {
-      "if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
-      "return": C, "break": C, "continue": C, "new": C, "delete": C, "throw": C, "debugger": C,
-      "var": kw("var"), "const": kw("var"), "let": kw("var"),
-      "function": kw("function"), "catch": kw("catch"),
-      "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"),
-      "in": operator, "typeof": operator, "instanceof": operator,
-      "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom,
-      "this": kw("this"), "module": kw("module"), "class": kw("class"), "super": kw("atom"),
-      "yield": C, "export": kw("export"), "import": kw("import"), "extends": C
-    };
-
-    // Extend the 'normal' keywords with the TypeScript language extensions
-    if (isTS) {
-      var type = {type: "variable", style: "variable-3"};
-      var tsKeywords = {
-        // object-like things
-        "interface": kw("interface"),
-        "extends": kw("extends"),
-        "constructor": kw("constructor"),
-
-        // scope modifiers
-        "public": kw("public"),
-        "private": kw("private"),
-        "protected": kw("protected"),
-        "static": kw("static"),
-
-        // types
-        "string": type, "number": type, "bool": type, "any": type
-      };
-
-      for (var attr in tsKeywords) {
-        jsKeywords[attr] = tsKeywords[attr];
-      }
-    }
-
-    return jsKeywords;
-  }();
-
-  var isOperatorChar = /[+\-*&%=<>!?|~^]/;
-  var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;
-
-  function readRegexp(stream) {
-    var escaped = false, next, inSet = false;
-    while ((next = stream.next()) != null) {
-      if (!escaped) {
-        if (next == "/" && !inSet) return;
-        if (next == "[") inSet = true;
-        else if (inSet && next == "]") inSet = false;
-      }
-      escaped = !escaped && next == "\\";
-    }
-  }
-
-  // Used as scratch variables to communicate multiple values without
-  // consing up tons of objects.
-  var type, content;
-  function ret(tp, style, cont) {
-    type = tp; content = cont;
-    return style;
-  }
-  function tokenBase(stream, state) {
-    var ch = stream.next();
-    if (ch == '"' || ch == "'") {
-      state.tokenize = tokenString(ch);
-      return state.tokenize(stream, state);
-    } else if (ch == "." && stream.match(/^\d+(?:[eE][+\-]?\d+)?/)) {
-      return ret("number", "number");
-    } else if (ch == "." && stream.match("..")) {
-      return ret("spread", "meta");
-    } else if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
-      return ret(ch);
-    } else if (ch == "=" && stream.eat(">")) {
-      return ret("=>", "operator");
-    } else if (ch == "0" && stream.eat(/x/i)) {
-      stream.eatWhile(/[\da-f]/i);
-      return ret("number", "number");
-    } else if (/\d/.test(ch)) {
-      stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);
-      return ret("number", "number");
-    } else if (ch == "/") {
-      if (stream.eat("*")) {
-        state.tokenize = tokenComment;
-        return tokenComment(stream, state);
-      } else if (stream.eat("/")) {
-        stream.skipToEnd();
-        return ret("comment", "comment");
-      } else if (state.lastType == "operator" || state.lastType == "keyword c" ||
-               state.lastType == "sof" || /^[\[{}\(,;:]$/.test(state.lastType)) {
-        readRegexp(stream);
-        stream.eatWhile(/[gimy]/); // 'y' is "sticky" option in Mozilla
-        return ret("regexp", "string-2");
-      } else {
-        stream.eatWhile(isOperatorChar);
-        return ret("operator", "operator", stream.current());
-      }
-    } else if (ch == "`") {
-      state.tokenize = tokenQuasi;
-      return tokenQuasi(stream, state);
-    } else if (ch == "#") {
-      stream.skipToEnd();
-      return ret("error", "error");
-    } else if (isOperatorChar.test(ch)) {
-      stream.eatWhile(isOperatorChar);
-      return ret("operator", "operator", stream.current());
-    } else if (wordRE.test(ch)) {
-      stream.eatWhile(wordRE);
-      var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word];
-      return (known && state.lastType != ".") ? ret(known.type, known.style, word) :
-                     ret("variable", "variable", word);
-    }
-  }
-
-  function tokenString(quote) {
-    return function(stream, state) {
-      var escaped = false, next;
-      if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)){
-        state.tokenize = tokenBase;
-        return ret("jsonld-keyword", "meta");
-      }
-      while ((next = stream.next()) != null) {
-        if (next == quote && !escaped) break;
-        escaped = !escaped && next == "\\";
-      }
-      if (!escaped) state.tokenize = tokenBase;
-      return ret("string", "string");
-    };
-  }
-
-  function tokenComment(stream, state) {
-    var maybeEnd = false, ch;
-    while (ch = stream.next()) {
-      if (ch == "/" && maybeEnd) {
-        state.tokenize = tokenBase;
-        break;
-      }
-      maybeEnd = (ch == "*");
-    }
-    return ret("comment", "comment");
-  }
-
-  function tokenQuasi(stream, state) {
-    var escaped = false, next;
-    while ((next = stream.next()) != null) {
-      if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) {
-        state.tokenize = tokenBase;
-        break;
-      }
-      escaped = !escaped && next == "\\";
-    }
-    return ret("quasi", "string-2", stream.current());
-  }
-
-  var brackets = "([{}])";
-  // This is a crude lookahead trick to try and notice that we're
-  // parsing the argument patterns for a fat-arrow function before we
-  // actually hit the arrow token. It only works if the arrow is on
-  // the same line as the arguments and there's no strange noise
-  // (comments) in between. Fallback is to only notice when we hit the
-  // arrow, and not declare the arguments as locals for the arrow
-  // body.
-  function findFatArrow(stream, state) {
-    if (state.fatArrowAt) state.fatArrowAt = null;
-    var arrow = stream.string.indexOf("=>", stream.start);
-    if (arrow < 0) return;
-
-    var depth = 0, sawSomething = false;
-    for (var pos = arrow - 1; pos >= 0; --pos) {
-      var ch = stream.string.charAt(pos);
-      var bracket = brackets.indexOf(ch);
-      if (bracket >= 0 && bracket < 3) {
-        if (!depth) { ++pos; break; }
-        if (--depth == 0) break;
-      } else if (bracket >= 3 && bracket < 6) {
-        ++depth;
-      } else if (wordRE.test(ch)) {
-        sawSomething = true;
-      } else if (/["'\/]/.test(ch)) {
-        return;
-      } else if (sawSomething && !depth) {
-        ++pos;
-        break;
-      }
-    }
-    if (sawSomething && !depth) state.fatArrowAt = pos;
-  }
-
-  // Parser
-
-  var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true, "this": true, "jsonld-keyword": true};
-
-  function JSLexical(indented, column, type, align, prev, info) {
-    this.indented = indented;
-    this.column = column;
-    this.type = type;
-    this.prev = prev;
-    this.info = info;
-    if (align != null) this.align = align;
-  }
-
-  function inScope(state, varname) {
-    for (var v = state.localVars; v; v = v.next)
-      if (v.name == varname) return true;
-    for (var cx = state.context; cx; cx = cx.prev) {
-      for (var v = cx.vars; v; v = v.next)
-        if (v.name == varname) return true;
-    }
-  }
-
-  function parseJS(state, style, type, content, stream) {
-    var cc = state.cc;
-    // Communicate our context to the combinators.
-    // (Less wasteful than consing up a hundred closures on every call.)
-    cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style;
-
-    if (!state.lexical.hasOwnProperty("align"))
-      state.lexical.align = true;
-
-    while(true) {
-      var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;
-      if (combinator(type, content)) {
-        while(cc.length && cc[cc.length - 1].lex)
-          cc.pop()();
-        if (cx.marked) return cx.marked;
-        if (type == "variable" && inScope(state, content)) return "variable-2";
-        return style;
-      }
-    }
-  }
-
-  // Combinator utils
-
-  var cx = {state: null, column: null, marked: null, cc: null};
-  function pass() {
-    for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);
-  }
-  function cont() {
-    pass.apply(null, arguments);
-    return true;
-  }
-  function register(varname) {
-    function inList(list) {
-      for (var v = list; v; v = v.next)
-        if (v.name == varname) return true;
-      return false;
-    }
-    var state = cx.state;
-    if (state.context) {
-      cx.marked = "def";
-      if (inList(state.localVars)) return;
-      state.localVars = {name: varname, next: state.localVars};
-    } else {
-      if (inList(state.globalVars)) return;
-      if (parserConfig.globalVars)
-        state.globalVars = {name: varname, next: state.globalVars};
-    }
-  }
-
-  // Combinators
-
-  var defaultVars = {name: "this", next: {name: "arguments"}};
-  function pushcontext() {
-    cx.state.context = {prev: cx.state.context, vars: cx.state.localVars};
-    cx.state.localVars = defaultVars;
-  }
-  function popcontext() {
-    cx.state.localVars = cx.state.context.vars;
-    cx.state.context = cx.state.context.prev;
-  }
-  function pushlex(type, info) {
-    var result = function() {
-      var state = cx.state, indent = state.indented;
-      if (state.lexical.type == "stat") indent = state.lexical.indented;
-      else for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev)
-        indent = outer.indented;
-      state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);
-    };
-    result.lex = true;
-    return result;
-  }
-  function poplex() {
-    var state = cx.state;
-    if (state.lexical.prev) {
-      if (state.lexical.type == ")")
-        state.indented = state.lexical.indented;
-      state.lexical = state.lexical.prev;
-    }
-  }
-  poplex.lex = true;
-
-  function expect(wanted) {
-    function exp(type) {
-      if (type == wanted) return cont();
-      else if (wanted == ";") return pass();
-      else return cont(exp);
-    };
-    return exp;
-  }
-
-  function statement(type, value) {
-    if (type == "var") return cont(pushlex("vardef", value.length), vardef, expect(";"), poplex);
-    if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex);
-    if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
-    if (type == "{") return cont(pushlex("}"), block, poplex);
-    if (type == ";") return cont();
-    if (type == "if") {
-      if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
-        cx.state.cc.pop()();
-      return cont(pushlex("form"), expression, statement, poplex, maybeelse);
-    }
-    if (type == "function") return cont(functiondef);
-    if (type == "for") return cont(pushlex("form"), forspec, statement, poplex);
-    if (type == "variable") return cont(pushlex("stat"), maybelabel);
-    if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"),
-                                      block, poplex, poplex);
-    if (type == "case") return cont(expression, expect(":"));
-    if (type == "default") return cont(expect(":"));
-    if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"),
-                                     statement, poplex, popcontext);
-    if (type == "module") return cont(pushlex("form"), pushcontext, afterModule, popcontext, poplex);
-    if (type == "class") return cont(pushlex("form"), className, poplex);
-    if (type == "export") return cont(pushlex("form"), afterExport, poplex);
-    if (type == "import") return cont(pushlex("form"), afterImport, poplex);
-    return pass(pushlex("stat"), expression, expect(";"), poplex);
-  }
-  function expression(type) {
-    return expressionInner(type, false);
-  }
-  function expressionNoComma(type) {
-    return expressionInner(type, true);
-  }
-  function expressionInner(type, noComma) {
-    if (cx.state.fatArrowAt == cx.stream.start) {
-      var body = noComma ? arrowBodyNoComma : arrowBody;
-      if (type == "(") return cont(pushcontext, pushlex(")"), commasep(pattern, ")"), poplex, expect("=>"), body, popcontext);
-      else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext);
-    }
-
-    var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
-    if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
-    if (type == "function") return cont(functiondef, maybeop);
-    if (type == "keyword c") return cont(noComma ? maybeexpressionNoComma : maybeexpression);
-    if (type == "(") return cont(pushlex(")"), maybeexpression, comprehension, expect(")"), poplex, maybeop);
-    if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
-    if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop);
-    if (type == "{") return contCommasep(objprop, "}", null, maybeop);
-    if (type == "quasi") { return pass(quasi, maybeop); }
-    return cont();
-  }
-  function maybeexpression(type) {
-    if (type.match(/[;\}\)\],]/)) return pass();
-    return pass(expression);
-  }
-  function maybeexpressionNoComma(type) {
-    if (type.match(/[;\}\)\],]/)) return pass();
-    return pass(expressionNoComma);
-  }
-
-  function maybeoperatorComma(type, value) {
-    if (type == ",") return cont(expression);
-    return maybeoperatorNoComma(type, value, false);
-  }
-  function maybeoperatorNoComma(type, value, noComma) {
-    var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;
-    var expr = noComma == false ? expression : expressionNoComma;
-    if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
-    if (type == "operator") {
-      if (/\+\+|--/.test(value)) return cont(me);
-      if (value == "?") return cont(expression, expect(":"), expr);
-      return cont(expr);
-    }
-    if (type == "quasi") { return pass(quasi, me); }
-    if (type == ";") return;
-    if (type == "(") return contCommasep(expressionNoComma, ")", "call", me);
-    if (type == ".") return cont(property, me);
-    if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me);
-  }
-  function quasi(type, value) {
-    if (type != "quasi") return pass();
-    if (value.slice(value.length - 2) != "${") return cont(quasi);
-    return cont(expression, continueQuasi);
-  }
-  function continueQuasi(type) {
-    if (type == "}") {
-      cx.marked = "string-2";
-      cx.state.tokenize = tokenQuasi;
-      return cont(quasi);
-    }
-  }
-  function arrowBody(type) {
-    findFatArrow(cx.stream, cx.state);
-    return pass(type == "{" ? statement : expression);
-  }
-  function arrowBodyNoComma(type) {
-    findFatArrow(cx.stream, cx.state);
-    return pass(type == "{" ? statement : expressionNoComma);
-  }
-  function maybelabel(type) {
-    if (type == ":") return cont(poplex, statement);
-    return pass(maybeoperatorComma, expect(";"), poplex);
-  }
-  function property(type) {
-    if (type == "variable") {cx.marked = "property"; return cont();}
-  }
-  function objprop(type, value) {
-    if (type == "variable" || cx.style == "keyword") {
-      cx.marked = "property";
-      if (value == "get" || value == "set") return cont(getterSetter);
-      return cont(afterprop);
-    } else if (type == "number" || type == "string") {
-      cx.marked = jsonldMode ? "property" : (cx.style + " property");
-      return cont(afterprop);
-    } else if (type == "jsonld-keyword") {
-      return cont(afterprop);
-    } else if (type == "[") {
-      return cont(expression, expect("]"), afterprop);
-    }
-  }
-  function getterSetter(type) {
-    if (type != "variable") return pass(afterprop);
-    cx.marked = "property";
-    return cont(functiondef);
-  }
-  function afterprop(type) {
-    if (type == ":") return cont(expressionNoComma);
-    if (type == "(") return pass(functiondef);
-  }
-  function commasep(what, end) {
-    function proceed(type) {
-      if (type == ",") {
-        var lex = cx.state.lexical;
-        if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;
-        return cont(what, proceed);
-      }
-      if (type == end) return cont();
-      return cont(expect(end));
-    }
-    return function(type) {
-      if (type == end) return cont();
-      return pass(what, proceed);
-    };
-  }
-  function contCommasep(what, end, info) {
-    for (var i = 3; i < arguments.length; i++)
-      cx.cc.push(arguments[i]);
-    return cont(pushlex(end, info), commasep(what, end), poplex);
-  }
-  function block(type) {
-    if (type == "}") return cont();
-    return pass(statement, block);
-  }
-  function maybetype(type) {
-    if (isTS && type == ":") return cont(typedef);
-  }
-  function typedef(type) {
-    if (type == "variable"){cx.marked = "variable-3"; return cont();}
-  }
-  function vardef() {
-    return pass(pattern, maybetype, maybeAssign, vardefCont);
-  }
-  function pattern(type, value) {
-    if (type == "variable") { register(value); return cont(); }
-    if (type == "[") return contCommasep(pattern, "]");
-    if (type == "{") return contCommasep(proppattern, "}");
-  }
-  function proppattern(type, value) {
-    if (type == "variable" && !cx.stream.match(/^\s*:/, false)) {
-      register(value);
-      return cont(maybeAssign);
-    }
-    if (type == "variable") cx.marked = "property";
-    return cont(expect(":"), pattern, maybeAssign);
-  }
-  function maybeAssign(_type, value) {
-    if (value == "=") return cont(expressionNoComma);
-  }
-  function vardefCont(type) {
-    if (type == ",") return cont(vardef);
-  }
-  function maybeelse(type, value) {
-    if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex);
-  }
-  function forspec(type) {
-    if (type == "(") return cont(pushlex(")"), forspec1, expect(")"), poplex);
-  }
-  function forspec1(type) {
-    if (type == "var") return cont(vardef, expect(";"), forspec2);
-    if (type == ";") return cont(forspec2);
-    if (type == "variable") return cont(formaybeinof);
-    return pass(expression, expect(";"), forspec2);
-  }
-  function formaybeinof(_type, value) {
-    if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); }
-    return cont(maybeoperatorComma, forspec2);
-  }
-  function forspec2(type, value) {
-    if (type == ";") return cont(forspec3);
-    if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); }
-    return pass(expression, expect(";"), forspec3);
-  }
-  function forspec3(type) {
-    if (type != ")") cont(expression);
-  }
-  function functiondef(type, value) {
-    if (value == "*") {cx.marked = "keyword"; return cont(functiondef);}
-    if (type == "variable") {register(value); return cont(functiondef);}
-    if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, statement, popcontext);
-  }
-  function funarg(type) {
-    if (type == "spread") return cont(funarg);
-    return pass(pattern, maybetype);
-  }
-  function className(type, value) {
-    if (type == "variable") {register(value); return cont(classNameAfter);}
-  }
-  function classNameAfter(type, value) {
-    if (value == "extends") return cont(expression, classNameAfter);
-    if (type == "{") return cont(pushlex("}"), classBody, poplex);
-  }
-  function classBody(type, value) {
-    if (type == "variable" || cx.style == "keyword") {
-      cx.marked = "property";
-      if (value == "get" || value == "set") return cont(classGetterSetter, functiondef, classBody);
-      return cont(functiondef, classBody);
-    }
-    if (value == "*") {
-      cx.marked = "keyword";
-      return cont(classBody);
-    }
-    if (type == ";") return cont(classBody);
-    if (type == "}") return cont();
-  }
-  function classGetterSetter(type) {
-    if (type != "variable") return pass();
-    cx.marked = "property";
-    return cont();
-  }
-  function afterModule(type, value) {
-    if (type == "string") return cont(statement);
-    if (type == "variable") { register(value); return cont(maybeFrom); }
-  }
-  function afterExport(_type, value) {
-    if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); }
-    if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); }
-    return pass(statement);
-  }
-  function afterImport(type) {
-    if (type == "string") return cont();
-    return pass(importSpec, maybeFrom);
-  }
-  function importSpec(type, value) {
-    if (type == "{") return contCommasep(importSpec, "}");
-    if (type == "variable") register(value);
-    return cont();
-  }
-  function maybeFrom(_type, value) {
-    if (value == "from") { cx.marked = "keyword"; return cont(expression); }
-  }
-  function arrayLiteral(type) {
-    if (type == "]") return cont();
-    return pass(expressionNoComma, maybeArrayComprehension);
-  }
-  function maybeArrayComprehension(type) {
-    if (type == "for") return pass(comprehension, expect("]"));
-    if (type == ",") return cont(commasep(maybeexpressionNoComma, "]"));
-    return pass(commasep(expressionNoComma, "]"));
-  }
-  function comprehension(type) {
-    if (type == "for") return cont(forspec, comprehension);
-    if (type == "if") return cont(expression, comprehension);
-  }
-
-  // Interface
-
-  return {
-    startState: function(basecolumn) {
-      var state = {
-        tokenize: tokenBase,
-        lastType: "sof",
-        cc: [],
-        lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
-        localVars: parserConfig.localVars,
-        context: parserConfig.localVars && {vars: parserConfig.localVars},
-        indented: 0
-      };
-      if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
-        state.globalVars = parserConfig.globalVars;
-      return state;
-    },
-
-    token: function(stream, state) {
-      if (stream.sol()) {
-        if (!state.lexical.hasOwnProperty("align"))
-          state.lexical.align = false;
-        state.indented = stream.indentation();
-        findFatArrow(stream, state);
-      }
-      if (state.tokenize != tokenComment && stream.eatSpace()) return null;
-      var style = state.tokenize(stream, state);
-      if (type == "comment") return style;
-      state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type;
-      return parseJS(state, style, type, content, stream);
-    },
-
-    indent: function(state, textAfter) {
-      if (state.tokenize == tokenComment) return CodeMirror.Pass;
-      if (state.tokenize != tokenBase) return 0;
-      var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical;
-      // Kludge to prevent 'maybelse' from blocking lexical scope pops
-      if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {
-        var c = state.cc[i];
-        if (c == poplex) lexical = lexical.prev;
-        else if (c != maybeelse) break;
-      }
-      if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev;
-      if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat")
-        lexical = lexical.prev;
-      var type = lexical.type, closing = firstChar == type;
-
-      if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info + 1 : 0);
-      else if (type == "form" && firstChar == "{") return lexical.indented;
-      else if (type == "form") return lexical.indented + indentUnit;
-      else if (type == "stat")
-        return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? statementIndent || indentUnit : 0);
-      else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false)
-        return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
-      else if (lexical.align) return lexical.column + (closing ? 0 : 1);
-      else return lexical.indented + (closing ? 0 : indentUnit);
-    },
-
-    electricInput: /^\s*(?:case .*?:|default:|\{|\})$/,
-    blockCommentStart: jsonMode ? null : "/*",
-    blockCommentEnd: jsonMode ? null : "*/",
-    lineComment: jsonMode ? null : "//",
-    fold: "brace",
-
-    helperType: jsonMode ? "json" : "javascript",
-    jsonldMode: jsonldMode,
-    jsonMode: jsonMode
-  };
-});
-
-CodeMirror.registerHelper("wordChars", "javascript", /[\w$]/);
-
-CodeMirror.defineMIME("text/javascript", "javascript");
-CodeMirror.defineMIME("text/ecmascript", "javascript");
-CodeMirror.defineMIME("application/javascript", "javascript");
-CodeMirror.defineMIME("application/x-javascript", "javascript");
-CodeMirror.defineMIME("application/ecmascript", "javascript");
-CodeMirror.defineMIME("application/json", {name: "javascript", json: true});
-CodeMirror.defineMIME("application/x-json", {name: "javascript", json: true});
-CodeMirror.defineMIME("application/ld+json", {name: "javascript", jsonld: true});
-CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true });
-CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true });
-
-});
diff --git a/public/js/lib/codemirror/mode/javascript/json-ld.html b/public/js/lib/codemirror/mode/javascript/json-ld.html
deleted file mode 100644
index 3a37f0b..0000000
--- a/public/js/lib/codemirror/mode/javascript/json-ld.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!doctype html>
-
-<title>CodeMirror: JSON-LD mode</title>
-<meta charset="utf-8"/>
-<link rel=stylesheet href="../../doc/docs.css">
-
-<link rel="stylesheet" href="../../lib/codemirror.css">
-<script src="../../lib/codemirror.js"></script>
-<script src="../../addon/edit/matchbrackets.js"></script>
-<script src="../../addon/comment/continuecomment.js"></script>
-<script src="../../addon/comment/comment.js"></script>
-<script src="javascript.js"></script>
-<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
-<div id="nav">
-  <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"/></a>
-
-  <ul>
-    <li><a href="../../index.html">Home</a>
-    <li><a href="../../doc/manual.html">Manual</a>
-    <li><a href="https://github.com/codemirror/codemirror">Code</a>
-  </ul>
-  <ul>
-    <li><a href="../index.html">Language modes</a>
-    <li><a class=active href="#">JSON-LD</a>
-  </ul>
-</div>
-
-<article>
-<h2>JSON-LD mode</h2>
-
-
-<div><textarea id="code" name="code">
-{
-  "@context": {
-    "name": "http://schema.org/name",
-    "description": "http://schema.org/description",
-    "image": {
-      "@id": "http://schema.org/image",
-      "@type": "@id"
-    },
-    "geo": "http://schema.org/geo",
-    "latitude": {
-      "@id": "http://schema.org/latitude",
-      "@type": "xsd:float"
-    },
-    "longitude": {
-      "@id": "http://schema.org/longitude",
-      "@type": "xsd:float"
-    },
-    "xsd": "http://www.w3.org/2001/XMLSchema#"
-  },
-  "name": "The Empire State Building",
-  "description": "The Empire State Building is a 102-story landmark in New York City.",
-  "image": "http://www.civil.usherbrooke.ca/cours/gci215a/empire-state-building.jpg",
-  "geo": {
-    "latitude": "40.75",
-    "longitude": "73.98"
-  }
-}
-</textarea></div>
-
-    <script>
-      var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
-        matchBrackets: true,
-        autoCloseBrackets: true,
-        mode: "application/ld+json",
-        lineWrapping: true
-      });
-    </script>
-    
-    <p>This is a specialization of the <a href="index.html">JavaScript mode</a>.</p>
-  </article>
diff --git a/public/js/lib/codemirror/mode/javascript/test.js b/public/js/lib/codemirror/mode/javascript/test.js
deleted file mode 100644
index 91b0e89..0000000
--- a/public/js/lib/codemirror/mode/javascript/test.js
+++ /dev/null
@@ -1,200 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function() {
-  var mode = CodeMirror.getMode({indentUnit: 2}, "javascript");
-  function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
-
-  MT("locals",
-     "[keyword function] [variable foo]([def a], [def b]) { [keyword var] [def c] [operator =] [number 10]; [keyword return] [variable-2 a] [operator +] [variable-2 c] [operator +] [variable d]; }");
-
-  MT("comma-and-binop",
-     "[keyword function](){ [keyword var] [def x] [operator =] [number 1] [operator +] [number 2], [def y]; }");
-
-  MT("destructuring",
-     "([keyword function]([def a], [[[def b], [def c] ]]) {",
-     "  [keyword let] {[def d], [property foo]: [def c][operator =][number 10], [def x]} [operator =] [variable foo]([variable-2 a]);",
-     "  [[[variable-2 c], [variable y] ]] [operator =] [variable-2 c];",
-     "})();");
-
-  MT("class_body",
-     "[keyword class] [variable Foo] {",
-     "  [property constructor]() {}",
-     "  [property sayName]() {",
-     "    [keyword return] [string-2 `foo${][variable foo][string-2 }oo`];",
-     "  }",
-     "}");
-
-  MT("class",
-     "[keyword class] [variable Point] [keyword extends] [variable SuperThing] {",
-     "  [property get] [property prop]() { [keyword return] [number 24]; }",
-     "  [property constructor]([def x], [def y]) {",
-     "    [keyword super]([string 'something']);",
-     "    [keyword this].[property x] [operator =] [variable-2 x];",
-     "  }",
-     "}");
-
-  MT("module",
-     "[keyword module] [string 'foo'] {",
-     "  [keyword export] [keyword let] [def x] [operator =] [number 42];",
-     "  [keyword export] [keyword *] [keyword from] [string 'somewhere'];",
-     "}");
-
-  MT("import",
-     "[keyword function] [variable foo]() {",
-     "  [keyword import] [def $] [keyword from] [string 'jquery'];",
-     "  [keyword module] [def crypto] [keyword from] [string 'crypto'];",
-     "  [keyword import] { [def encrypt], [def decrypt] } [keyword from] [string 'crypto'];",
-     "}");
-
-  MT("const",
-     "[keyword function] [variable f]() {",
-     "  [keyword const] [[ [def a], [def b] ]] [operator =] [[ [number 1], [number 2] ]];",
-     "}");
-
-  MT("for/of",
-     "[keyword for]([keyword let] [variable of] [keyword of] [variable something]) {}");
-
-  MT("generator",
-     "[keyword function*] [variable repeat]([def n]) {",
-     "  [keyword for]([keyword var] [def i] [operator =] [number 0]; [variable-2 i] [operator <] [variable-2 n]; [operator ++][variable-2 i])",
-     "    [keyword yield] [variable-2 i];",
-     "}");
-
-  MT("quotedStringAddition",
-     "[keyword let] [variable f] [operator =] [variable a] [operator +] [string 'fatarrow'] [operator +] [variable c];");
-
-  MT("quotedFatArrow",
-     "[keyword let] [variable f] [operator =] [variable a] [operator +] [string '=>'] [operator +] [variable c];");
-
-  MT("fatArrow",
-     "[variable array].[property filter]([def a] [operator =>] [variable-2 a] [operator +] [number 1]);",
-     "[variable a];", // No longer in scope
-     "[keyword let] [variable f] [operator =] ([[ [def a], [def b] ]], [def c]) [operator =>] [variable-2 a] [operator +] [variable-2 c];",
-     "[variable c];");
-
-  MT("spread",
-     "[keyword function] [variable f]([def a], [meta ...][def b]) {",
-     "  [variable something]([variable-2 a], [meta ...][variable-2 b]);",
-     "}");
-
-  MT("comprehension",
-     "[keyword function] [variable f]() {",
-     "  [[([variable x] [operator +] [number 1]) [keyword for] ([keyword var] [def x] [keyword in] [variable y]) [keyword if] [variable pred]([variable-2 x]) ]];",
-     "  ([variable u] [keyword for] ([keyword var] [def u] [keyword of] [variable generateValues]()) [keyword if] ([variable-2 u].[property color] [operator ===] [string 'blue']));",
-     "}");
-
-  MT("quasi",
-     "[variable re][string-2 `fofdlakj${][variable x] [operator +] ([variable re][string-2 `foo`]) [operator +] [number 1][string-2 }fdsa`] [operator +] [number 2]");
-
-  MT("quasi_no_function",
-     "[variable x] [operator =] [string-2 `fofdlakj${][variable x] [operator +] [string-2 `foo`] [operator +] [number 1][string-2 }fdsa`] [operator +] [number 2]");
-
-  MT("indent_statement",
-     "[keyword var] [variable x] [operator =] [number 10]",
-     "[variable x] [operator +=] [variable y] [operator +]",
-     "  [atom Infinity]",
-     "[keyword debugger];");
-
-  MT("indent_if",
-     "[keyword if] ([number 1])",
-     "  [keyword break];",
-     "[keyword else] [keyword if] ([number 2])",
-     "  [keyword continue];",
-     "[keyword else]",
-     "  [number 10];",
-     "[keyword if] ([number 1]) {",
-     "  [keyword break];",
-     "} [keyword else] [keyword if] ([number 2]) {",
-     "  [keyword continue];",
-     "} [keyword else] {",
-     "  [number 10];",
-     "}");
-
-  MT("indent_for",
-     "[keyword for] ([keyword var] [variable i] [operator =] [number 0];",
-     "     [variable i] [operator <] [number 100];",
-     "     [variable i][operator ++])",
-     "  [variable doSomething]([variable i]);",
-     "[keyword debugger];");
-
-  MT("indent_c_style",
-     "[keyword function] [variable foo]()",
-     "{",
-     "  [keyword debugger];",
-     "}");
-
-  MT("indent_else",
-     "[keyword for] (;;)",
-     "  [keyword if] ([variable foo])",
-     "    [keyword if] ([variable bar])",
-     "      [number 1];",
-     "    [keyword else]",
-     "      [number 2];",
-     "  [keyword else]",
-     "    [number 3];");
-
-  MT("indent_funarg",
-     "[variable foo]([number 10000],",
-     "    [keyword function]([def a]) {",
-     "  [keyword debugger];",
-     "};");
-
-  MT("indent_below_if",
-     "[keyword for] (;;)",
-     "  [keyword if] ([variable foo])",
-     "    [number 1];",
-     "[number 2];");
-
-  MT("multilinestring",
-     "[keyword var] [variable x] [operator =] [string 'foo\\]",
-     "[string bar'];");
-
-  MT("scary_regexp",
-     "[string-2 /foo[[/]]bar/];");
-
-  MT("indent_strange_array",
-     "[keyword var] [variable x] [operator =] [[",
-     "  [number 1],,",
-     "  [number 2],",
-     "]];",
-     "[number 10];");
-
-  var jsonld_mode = CodeMirror.getMode(
-    {indentUnit: 2},
-    {name: "javascript", jsonld: true}
-  );
-  function LD(name) {
-    test.mode(name, jsonld_mode, Array.prototype.slice.call(arguments, 1));
-  }
-
-  LD("json_ld_keywords",
-    '{',
-    '  [meta "@context"]: {',
-    '    [meta "@base"]: [string "http://example.com"],',
-    '    [meta "@vocab"]: [string "http://xmlns.com/foaf/0.1/"],',
-    '    [property "likesFlavor"]: {',
-    '      [meta "@container"]: [meta "@list"]',
-    '      [meta "@reverse"]: [string "@beFavoriteOf"]',
-    '    },',
-    '    [property "nick"]: { [meta "@container"]: [meta "@set"] },',
-    '    [property "nick"]: { [meta "@container"]: [meta "@index"] }',
-    '  },',
-    '  [meta "@graph"]: [[ {',
-    '    [meta "@id"]: [string "http://dbpedia.org/resource/John_Lennon"],',
-    '    [property "name"]: [string "John Lennon"],',
-    '    [property "modified"]: {',
-    '      [meta "@value"]: [string "2010-05-29T14:17:39+02:00"],',
-    '      [meta "@type"]: [string "http://www.w3.org/2001/XMLSchema#dateTime"]',
-    '    }',
-    '  } ]]',
-    '}');
-
-  LD("json_ld_fake",
-    '{',
-    '  [property "@fake"]: [string "@fake"],',
-    '  [property "@contextual"]: [string "@identifier"],',
-    '  [property "user@domain.com"]: [string "@graphical"],',
-    '  [property "@ID"]: [string "@@ID"]',
-    '}');
-})();
diff --git a/public/js/lib/codemirror/mode/javascript/typescript.html b/public/js/lib/codemirror/mode/javascript/typescript.html
deleted file mode 100644
index 2cfc538..0000000
--- a/public/js/lib/codemirror/mode/javascript/typescript.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<!doctype html>
-
-<title>CodeMirror: TypeScript mode</title>
-<meta charset="utf-8"/>
-<link rel=stylesheet href="../../doc/docs.css">
-
-<link rel="stylesheet" href="../../lib/codemirror.css">
-<script src="../../lib/codemirror.js"></script>
-<script src="javascript.js"></script>
-<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
-<div id=nav>
-  <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
-
-  <ul>
-    <li><a href="../../index.html">Home</a>
-    <li><a href="../../doc/manual.html">Manual</a>
-    <li><a href="https://github.com/codemirror/codemirror">Code</a>
-  </ul>
-  <ul>
-    <li><a href="../index.html">Language modes</a>
-    <li><a class=active href="#">TypeScript</a>
-  </ul>
-</div>
-
-<article>
-<h2>TypeScript mode</h2>
-
-
-<div><textarea id="code" name="code">
-class Greeter {
-	greeting: string;
-	constructor (message: string) {
-		this.greeting = message;
-	}
-	greet() {
-		return "Hello, " + this.greeting;
-	}
-}   
-
-var greeter = new Greeter("world");
-
-var button = document.createElement('button')
-button.innerText = "Say Hello"
-button.onclick = function() {
-	alert(greeter.greet())
-}
-
-document.body.appendChild(button)
-
-</textarea></div>
-
-    <script>
-      var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
-        lineNumbers: true,
-        matchBrackets: true,
-        mode: "text/typescript"
-      });
-    </script>
-
-    <p>This is a specialization of the <a href="index.html">JavaScript mode</a>.</p>
-  </article>
diff --git a/public/js/lib/codemirror/mode/markdown/index.html b/public/js/lib/codemirror/mode/markdown/index.html
deleted file mode 100644
index c3bb8df..0000000
--- a/public/js/lib/codemirror/mode/markdown/index.html
+++ /dev/null
@@ -1,359 +0,0 @@
-<!doctype html>
-
-<title>CodeMirror: Markdown mode</title>
-<meta charset="utf-8"/>
-<link rel=stylesheet href="../../doc/docs.css">
-
-<link rel="stylesheet" href="../../lib/codemirror.css">
-<script src="../../lib/codemirror.js"></script>
-<script src="../../addon/edit/continuelist.js"></script>
-<script src="../xml/xml.js"></script>
-<script src="markdown.js"></script>
-<style type="text/css">
-      .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
-      .cm-s-default .cm-trailing-space-a:before,
-      .cm-s-default .cm-trailing-space-b:before {position: absolute; content: "\00B7"; color: #777;}
-      .cm-s-default .cm-trailing-space-new-line:before {position: absolute; content: "\21B5"; color: #777;}
-    </style>
-<div id=nav>
-  <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
-
-  <ul>
-    <li><a href="../../index.html">Home</a>
-    <li><a href="../../doc/manual.html">Manual</a>
-    <li><a href="https://github.com/codemirror/codemirror">Code</a>
-  </ul>
-  <ul>
-    <li><a href="../index.html">Language modes</a>
-    <li><a class=active href="#">Markdown</a>
-  </ul>
-</div>
-
-<article>
-<h2>Markdown mode</h2>
-<form><textarea id="code" name="code">
-Markdown: Basics
-================
-
-&lt;ul id="ProjectSubmenu"&gt;
-    &lt;li&gt;&lt;a href="/projects/markdown/" title="Markdown Project Page"&gt;Main&lt;/a&gt;&lt;/li&gt;
-    &lt;li&gt;&lt;a class="selected" title="Markdown Basics"&gt;Basics&lt;/a&gt;&lt;/li&gt;
-    &lt;li&gt;&lt;a href="/projects/markdown/syntax" title="Markdown Syntax Documentation"&gt;Syntax&lt;/a&gt;&lt;/li&gt;
-    &lt;li&gt;&lt;a href="/projects/markdown/license" title="Pricing and License Information"&gt;License&lt;/a&gt;&lt;/li&gt;
-    &lt;li&gt;&lt;a href="/projects/markdown/dingus" title="Online Markdown Web Form"&gt;Dingus&lt;/a&gt;&lt;/li&gt;
-&lt;/ul&gt;
-
-
-Getting the Gist of Markdown's Formatting Syntax
-------------------------------------------------
-
-This page offers a brief overview of what it's like to use Markdown.
-The [syntax page] [s] provides complete, detailed documentation for
-every feature, but Markdown should be very easy to pick up simply by
-looking at a few examples of it in action. The examples on this page
-are written in a before/after style, showing example syntax and the
-HTML output produced by Markdown.
-
-It's also helpful to simply try Markdown out; the [Dingus] [d] is a
-web application that allows you type your own Markdown-formatted text
-and translate it to XHTML.
-
-**Note:** This document is itself written using Markdown; you
-can [see the source for it by adding '.text' to the URL] [src].
-
-  [s]: /projects/markdown/syntax  "Markdown Syntax"
-  [d]: /projects/markdown/dingus  "Markdown Dingus"
-  [src]: /projects/markdown/basics.text
-
-
-## Paragraphs, Headers, Blockquotes ##
-
-A paragraph is simply one or more consecutive lines of text, separated
-by one or more blank lines. (A blank line is any line that looks like
-a blank line -- a line containing nothing but spaces or tabs is
-considered blank.) Normal paragraphs should not be indented with
-spaces or tabs.
-
-Markdown offers two styles of headers: *Setext* and *atx*.
-Setext-style headers for `&lt;h1&gt;` and `&lt;h2&gt;` are created by
-"underlining" with equal signs (`=`) and hyphens (`-`), respectively.
-To create an atx-style header, you put 1-6 hash marks (`#`) at the
-beginning of the line -- the number of hashes equals the resulting
-HTML header level.
-
-Blockquotes are indicated using email-style '`&gt;`' angle brackets.
-
-Markdown:
-
-    A First Level Header
-    ====================
-    
-    A Second Level Header
-    ---------------------
-
-    Now is the time for all good men to come to
-    the aid of their country. This is just a
-    regular paragraph.
-
-    The quick brown fox jumped over the lazy
-    dog's back.
-    
-    ### Header 3
-
-    &gt; This is a blockquote.
-    &gt; 
-    &gt; This is the second paragraph in the blockquote.
-    &gt;
-    &gt; ## This is an H2 in a blockquote
-
-
-Output:
-
-    &lt;h1&gt;A First Level Header&lt;/h1&gt;
-    
-    &lt;h2&gt;A Second Level Header&lt;/h2&gt;
-    
-    &lt;p&gt;Now is the time for all good men to come to
-    the aid of their country. This is just a
-    regular paragraph.&lt;/p&gt;
-    
-    &lt;p&gt;The quick brown fox jumped over the lazy
-    dog's back.&lt;/p&gt;
-    
-    &lt;h3&gt;Header 3&lt;/h3&gt;
-    
-    &lt;blockquote&gt;
-        &lt;p&gt;This is a blockquote.&lt;/p&gt;
-        
-        &lt;p&gt;This is the second paragraph in the blockquote.&lt;/p&gt;
-        
-        &lt;h2&gt;This is an H2 in a blockquote&lt;/h2&gt;
-    &lt;/blockquote&gt;
-
-
-
-### Phrase Emphasis ###
-
-Markdown uses asterisks and underscores to indicate spans of emphasis.
-
-Markdown:
-
-    Some of these words *are emphasized*.
-    Some of these words _are emphasized also_.
-    
-    Use two asterisks for **strong emphasis**.
-    Or, if you prefer, __use two underscores instead__.
-
-Output:
-
-    &lt;p&gt;Some of these words &lt;em&gt;are emphasized&lt;/em&gt;.
-    Some of these words &lt;em&gt;are emphasized also&lt;/em&gt;.&lt;/p&gt;
-    
-    &lt;p&gt;Use two asterisks for &lt;strong&gt;strong emphasis&lt;/strong&gt;.
-    Or, if you prefer, &lt;strong&gt;use two underscores instead&lt;/strong&gt;.&lt;/p&gt;
-   
-
-
-## Lists ##
-
-Unordered (bulleted) lists use asterisks, pluses, and hyphens (`*`,
-`+`, and `-`) as list markers. These three markers are
-interchangable; this:
-
-    *   Candy.
-    *   Gum.
-    *   Booze.
-
-this:
-
-    +   Candy.
-    +   Gum.
-    +   Booze.
-
-and this:
-
-    -   Candy.
-    -   Gum.
-    -   Booze.
-
-all produce the same output:
-
-    &lt;ul&gt;
-    &lt;li&gt;Candy.&lt;/li&gt;
-    &lt;li&gt;Gum.&lt;/li&gt;
-    &lt;li&gt;Booze.&lt;/li&gt;
-    &lt;/ul&gt;
-
-Ordered (numbered) lists use regular numbers, followed by periods, as
-list markers:
-
-    1.  Red
-    2.  Green
-    3.  Blue
-
-Output:
-
-    &lt;ol&gt;
-    &lt;li&gt;Red&lt;/li&gt;
-    &lt;li&gt;Green&lt;/li&gt;
-    &lt;li&gt;Blue&lt;/li&gt;
-    &lt;/ol&gt;
-
-If you put blank lines between items, you'll get `&lt;p&gt;` tags for the
-list item text. You can create multi-paragraph list items by indenting
-the paragraphs by 4 spaces or 1 tab:
-
-    *   A list item.
-    
-        With multiple paragraphs.
-
-    *   Another item in the list.
-
-Output:
-
-    &lt;ul&gt;
-    &lt;li&gt;&lt;p&gt;A list item.&lt;/p&gt;
-    &lt;p&gt;With multiple paragraphs.&lt;/p&gt;&lt;/li&gt;
-    &lt;li&gt;&lt;p&gt;Another item in the list.&lt;/p&gt;&lt;/li&gt;
-    &lt;/ul&gt;
-    
-
-
-### Links ###
-
-Markdown supports two styles for creating links: *inline* and
-*reference*. With both styles, you use square brackets to delimit the
-text you want to turn into a link.
-
-Inline-style links use parentheses immediately after the link text.
-For example:
-
-    This is an [example link](http://example.com/).
-
-Output:
-
-    &lt;p&gt;This is an &lt;a href="http://example.com/"&gt;
-    example link&lt;/a&gt;.&lt;/p&gt;
-
-Optionally, you may include a title attribute in the parentheses:
-
-    This is an [example link](http://example.com/ "With a Title").
-
-Output:
-
-    &lt;p&gt;This is an &lt;a href="http://example.com/" title="With a Title"&gt;
-    example link&lt;/a&gt;.&lt;/p&gt;
-
-Reference-style links allow you to refer to your links by names, which
-you define elsewhere in your document:
-
-    I get 10 times more traffic from [Google][1] than from
-    [Yahoo][2] or [MSN][3].
-
-    [1]: http://google.com/        "Google"
-    [2]: http://search.yahoo.com/  "Yahoo Search"
-    [3]: http://search.msn.com/    "MSN Search"
-
-Output:
-
-    &lt;p&gt;I get 10 times more traffic from &lt;a href="http://google.com/"
-    title="Google"&gt;Google&lt;/a&gt; than from &lt;a href="http://search.yahoo.com/"
-    title="Yahoo Search"&gt;Yahoo&lt;/a&gt; or &lt;a href="http://search.msn.com/"
-    title="MSN Search"&gt;MSN&lt;/a&gt;.&lt;/p&gt;
-
-The title attribute is optional. Link names may contain letters,
-numbers and spaces, but are *not* case sensitive:
-
-    I start my morning with a cup of coffee and
-    [The New York Times][NY Times].
-
-    [ny times]: http://www.nytimes.com/
-
-Output:
-
-    &lt;p&gt;I start my morning with a cup of coffee and
-    &lt;a href="http://www.nytimes.com/"&gt;The New York Times&lt;/a&gt;.&lt;/p&gt;
-
-
-### Images ###
-
-Image syntax is very much like link syntax.
-
-Inline (titles are optional):
-
-    ![alt text](/path/to/img.jpg "Title")
-
-Reference-style:
-
-    ![alt text][id]
-
-    [id]: /path/to/img.jpg "Title"
-
-Both of the above examples produce the same output:
-
-    &lt;img src="/path/to/img.jpg" alt="alt text" title="Title" /&gt;
-
-
-
-### Code ###
-
-In a regular paragraph, you can create code span by wrapping text in
-backtick quotes. Any ampersands (`&amp;`) and angle brackets (`&lt;` or
-`&gt;`) will automatically be translated into HTML entities. This makes
-it easy to use Markdown to write about HTML example code:
-
-    I strongly recommend against using any `&lt;blink&gt;` tags.
-
-    I wish SmartyPants used named entities like `&amp;mdash;`
-    instead of decimal-encoded entites like `&amp;#8212;`.
-
-Output:
-
-    &lt;p&gt;I strongly recommend against using any
-    &lt;code&gt;&amp;lt;blink&amp;gt;&lt;/code&gt; tags.&lt;/p&gt;
-    
-    &lt;p&gt;I wish SmartyPants used named entities like
-    &lt;code&gt;&amp;amp;mdash;&lt;/code&gt; instead of decimal-encoded
-    entites like &lt;code&gt;&amp;amp;#8212;&lt;/code&gt;.&lt;/p&gt;
-
-
-To specify an entire block of pre-formatted code, indent every line of
-the block by 4 spaces or 1 tab. Just like with code spans, `&amp;`, `&lt;`,
-and `&gt;` characters will be escaped automatically.
-
-Markdown:
-
-    If you want your page to validate under XHTML 1.0 Strict,
-    you've got to put paragraph tags in your blockquotes:
-
-        &lt;blockquote&gt;
-            &lt;p&gt;For example.&lt;/p&gt;
-        &lt;/blockquote&gt;
-
-Output:
-
-    &lt;p&gt;If you want your page to validate under XHTML 1.0 Strict,
-    you've got to put paragraph tags in your blockquotes:&lt;/p&gt;
-    
-    &lt;pre&gt;&lt;code&gt;&amp;lt;blockquote&amp;gt;
-        &amp;lt;p&amp;gt;For example.&amp;lt;/p&amp;gt;
-    &amp;lt;/blockquote&amp;gt;
-    &lt;/code&gt;&lt;/pre&gt;
-</textarea></form>
-
-    <script>
-      var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
-        mode: 'markdown',
-        lineNumbers: true,
-        theme: "default",
-        extraKeys: {"Enter": "newlineAndIndentContinueMarkdownList"}
-      });
-    </script>
-
-    <p>Optionally depends on the XML mode for properly highlighted inline XML blocks.</p>
-
-    <p><strong>MIME types defined:</strong> <code>text/x-markdown</code>.</p>
-
-    <p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#markdown_*">normal</a>,  <a href="../../test/index.html#verbose,markdown_*">verbose</a>.</p>
-
-  </article>
diff --git a/public/js/lib/codemirror/mode/markdown/markdown.js b/public/js/lib/codemirror/mode/markdown/markdown.js
deleted file mode 100644
index 3c80311..0000000
--- a/public/js/lib/codemirror/mode/markdown/markdown.js
+++ /dev/null
@@ -1,765 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"), require("../xml/xml"), require("../meta"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror", "../xml/xml", "../meta"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
-
-  var htmlFound = CodeMirror.modes.hasOwnProperty("xml");
-  var htmlMode = CodeMirror.getMode(cmCfg, htmlFound ? {name: "xml", htmlMode: true} : "text/plain");
-
-  function getMode(name) {
-    if (CodeMirror.findModeByName) {
-      var found = CodeMirror.findModeByName(name);
-      if (found) name = found.mime || found.mimes[0];
-    }
-    var mode = CodeMirror.getMode(cmCfg, name);
-    return mode.name == "null" ? null : mode;
-  }
-
-  // Should characters that affect highlighting be highlighted separate?
-  // Does not include characters that will be output (such as `1.` and `-` for lists)
-  if (modeCfg.highlightFormatting === undefined)
-    modeCfg.highlightFormatting = false;
-
-  // Maximum number of nested blockquotes. Set to 0 for infinite nesting.
-  // Excess `>` will emit `error` token.
-  if (modeCfg.maxBlockquoteDepth === undefined)
-    modeCfg.maxBlockquoteDepth = 0;
-
-  // Should underscores in words open/close em/strong?
-  if (modeCfg.underscoresBreakWords === undefined)
-    modeCfg.underscoresBreakWords = true;
-
-  // Turn on fenced code blocks? ("```" to start/end)
-  if (modeCfg.fencedCodeBlocks === undefined) modeCfg.fencedCodeBlocks = false;
-
-  // Turn on task lists? ("- [ ] " and "- [x] ")
-  if (modeCfg.taskLists === undefined) modeCfg.taskLists = false;
-
-  // Turn on strikethrough syntax
-  if (modeCfg.strikethrough === undefined)
-    modeCfg.strikethrough = false;
-
-  var codeDepth = 0;
-
-  var header   = 'header'
-  ,   code     = 'comment'
-  ,   quote    = 'quote'
-  ,   list1    = 'variable-2'
-  ,   list2    = 'variable-3'
-  ,   list3    = 'keyword'
-  ,   hr       = 'hr'
-  ,   image    = 'tag'
-  ,   formatting = 'formatting'
-  ,   linkinline = 'link'
-  ,   linkemail = 'link'
-  ,   linktext = 'link'
-  ,   linkhref = 'string'
-  ,   em       = 'em'
-  ,   strong   = 'strong'
-  ,   strikethrough = 'strikethrough';
-
-  var hrRE = /^([*\-=_])(?:\s*\1){2,}\s*$/
-  ,   ulRE = /^[*\-+]\s+/
-  ,   olRE = /^[0-9]+\.\s+/
-  ,   taskListRE = /^\[(x| )\](?=\s)/ // Must follow ulRE or olRE
-  ,   atxHeaderRE = /^#+/
-  ,   setextHeaderRE = /^(?:\={1,}|-{1,})$/
-  ,   textRE = /^[^#!\[\]*_\\<>` "'(~]+/;
-
-  function switchInline(stream, state, f) {
-    state.f = state.inline = f;
-    return f(stream, state);
-  }
-
-  function switchBlock(stream, state, f) {
-    state.f = state.block = f;
-    return f(stream, state);
-  }
-
-
-  // Blocks
-
-  function blankLine(state) {
-    // Reset linkTitle state
-    state.linkTitle = false;
-    // Reset EM state
-    state.em = false;
-    // Reset STRONG state
-    state.strong = false;
-    // Reset strikethrough state
-    state.strikethrough = false;
-    // Reset state.quote
-    state.quote = 0;
-    if (!htmlFound && state.f == htmlBlock) {
-      state.f = inlineNormal;
-      state.block = blockNormal;
-    }
-    // Reset state.trailingSpace
-    state.trailingSpace = 0;
-    state.trailingSpaceNewLine = false;
-    // Mark this line as blank
-    state.thisLineHasContent = false;
-    return null;
-  }
-
-  function blockNormal(stream, state) {
-
-    var sol = stream.sol();
-
-    var prevLineIsList = (state.list !== false);
-    if (state.list !== false && state.indentationDiff >= 0) { // Continued list
-      if (state.indentationDiff < 4) { // Only adjust indentation if *not* a code block
-        state.indentation -= state.indentationDiff;
-      }
-      state.list = null;
-    } else if (state.list !== false && state.indentation > 0) {
-      state.list = null;
-      state.listDepth = Math.floor(state.indentation / 4);
-    } else if (state.list !== false) { // No longer a list
-      state.list = false;
-      state.listDepth = 0;
-    }
-
-    var match = null;
-    if (state.indentationDiff >= 4) {
-      state.indentation -= 4;
-      stream.skipToEnd();
-      return code;
-    } else if (stream.eatSpace()) {
-      return null;
-    } else if (match = stream.match(atxHeaderRE)) {
-      state.header = match[0].length <= 6 ? match[0].length : 6;
-      if (modeCfg.highlightFormatting) state.formatting = "header";
-      state.f = state.inline;
-      return getType(state);
-    } else if (state.prevLineHasContent && (match = stream.match(setextHeaderRE))) {
-      state.header = match[0].charAt(0) == '=' ? 1 : 2;
-      if (modeCfg.highlightFormatting) state.formatting = "header";
-      state.f = state.inline;
-      return getType(state);
-    } else if (stream.eat('>')) {
-      state.indentation++;
-      state.quote = sol ? 1 : state.quote + 1;
-      if (modeCfg.highlightFormatting) state.formatting = "quote";
-      stream.eatSpace();
-      return getType(state);
-    } else if (stream.peek() === '[') {
-      return switchInline(stream, state, footnoteLink);
-    } else if (stream.match(hrRE, true)) {
-      return hr;
-    } else if ((!state.prevLineHasContent || prevLineIsList) && (stream.match(ulRE, false) || stream.match(olRE, false))) {
-      var listType = null;
-      if (stream.match(ulRE, true)) {
-        listType = 'ul';
-      } else {
-        stream.match(olRE, true);
-        listType = 'ol';
-      }
-      state.indentation += 4;
-      state.list = true;
-      state.listDepth++;
-      if (modeCfg.taskLists && stream.match(taskListRE, false)) {
-        state.taskList = true;
-      }
-      state.f = state.inline;
-      if (modeCfg.highlightFormatting) state.formatting = ["list", "list-" + listType];
-      return getType(state);
-    } else if (modeCfg.fencedCodeBlocks && stream.match(/^```[ \t]*([\w+#]*)/, true)) {
-      // try switching mode
-      state.localMode = getMode(RegExp.$1);
-      if (state.localMode) state.localState = state.localMode.startState();
-      state.f = state.block = local;
-      if (modeCfg.highlightFormatting) state.formatting = "code-block";
-      state.code = true;
-      return getType(state);
-    }
-
-    return switchInline(stream, state, state.inline);
-  }
-
-  function htmlBlock(stream, state) {
-    var style = htmlMode.token(stream, state.htmlState);
-    if ((htmlFound && state.htmlState.tagStart === null && !state.htmlState.context) ||
-        (state.md_inside && stream.current().indexOf(">") > -1)) {
-      state.f = inlineNormal;
-      state.block = blockNormal;
-      state.htmlState = null;
-    }
-    return style;
-  }
-
-  function local(stream, state) {
-    if (stream.sol() && stream.match("```", false)) {
-      state.localMode = state.localState = null;
-      state.f = state.block = leavingLocal;
-      return null;
-    } else if (state.localMode) {
-      return state.localMode.token(stream, state.localState);
-    } else {
-      stream.skipToEnd();
-      return code;
-    }
-  }
-
-  function leavingLocal(stream, state) {
-    stream.match("```");
-    state.block = blockNormal;
-    state.f = inlineNormal;
-    if (modeCfg.highlightFormatting) state.formatting = "code-block";
-    state.code = true;
-    var returnType = getType(state);
-    state.code = false;
-    return returnType;
-  }
-
-  // Inline
-  function getType(state) {
-    var styles = [];
-
-    if (state.formatting) {
-      styles.push(formatting);
-
-      if (typeof state.formatting === "string") state.formatting = [state.formatting];
-
-      for (var i = 0; i < state.formatting.length; i++) {
-        styles.push(formatting + "-" + state.formatting[i]);
-
-        if (state.formatting[i] === "header") {
-          styles.push(formatting + "-" + state.formatting[i] + "-" + state.header);
-        }
-
-        // Add `formatting-quote` and `formatting-quote-#` for blockquotes
-        // Add `error` instead if the maximum blockquote nesting depth is passed
-        if (state.formatting[i] === "quote") {
-          if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {
-            styles.push(formatting + "-" + state.formatting[i] + "-" + state.quote);
-          } else {
-            styles.push("error");
-          }
-        }
-      }
-    }
-
-    if (state.taskOpen) {
-      styles.push("meta");
-      return styles.length ? styles.join(' ') : null;
-    }
-    if (state.taskClosed) {
-      styles.push("property");
-      return styles.length ? styles.join(' ') : null;
-    }
-
-    if (state.linkHref) {
-      styles.push(linkhref);
-      return styles.length ? styles.join(' ') : null;
-    }
-
-    if (state.strong) { styles.push(strong); }
-    if (state.em) { styles.push(em); }
-    if (state.strikethrough) { styles.push(strikethrough); }
-
-    if (state.linkText) { styles.push(linktext); }
-
-    if (state.code) { styles.push(code); }
-
-    if (state.header) { styles.push(header); styles.push(header + "-" + state.header); }
-
-    if (state.quote) {
-      styles.push(quote);
-
-      // Add `quote-#` where the maximum for `#` is modeCfg.maxBlockquoteDepth
-      if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {
-        styles.push(quote + "-" + state.quote);
-      } else {
-        styles.push(quote + "-" + modeCfg.maxBlockquoteDepth);
-      }
-    }
-
-    if (state.list !== false) {
-      var listMod = (state.listDepth - 1) % 3;
-      if (!listMod) {
-        styles.push(list1);
-      } else if (listMod === 1) {
-        styles.push(list2);
-      } else {
-        styles.push(list3);
-      }
-    }
-
-    if (state.trailingSpaceNewLine) {
-      styles.push("trailing-space-new-line");
-    } else if (state.trailingSpace) {
-      styles.push("trailing-space-" + (state.trailingSpace % 2 ? "a" : "b"));
-    }
-
-    return styles.length ? styles.join(' ') : null;
-  }
-
-  function handleText(stream, state) {
-    if (stream.match(textRE, true)) {
-      return getType(state);
-    }
-    return undefined;
-  }
-
-  function inlineNormal(stream, state) {
-    var style = state.text(stream, state);
-    if (typeof style !== 'undefined')
-      return style;
-
-    if (state.list) { // List marker (*, +, -, 1., etc)
-      state.list = null;
-      return getType(state);
-    }
-
-    if (state.taskList) {
-      var taskOpen = stream.match(taskListRE, true)[1] !== "x";
-      if (taskOpen) state.taskOpen = true;
-      else state.taskClosed = true;
-      if (modeCfg.highlightFormatting) state.formatting = "task";
-      state.taskList = false;
-      return getType(state);
-    }
-
-    state.taskOpen = false;
-    state.taskClosed = false;
-
-    if (state.header && stream.match(/^#+$/, true)) {
-      if (modeCfg.highlightFormatting) state.formatting = "header";
-      return getType(state);
-    }
-
-    // Get sol() value now, before character is consumed
-    var sol = stream.sol();
-
-    var ch = stream.next();
-
-    if (ch === '\\') {
-      stream.next();
-      if (modeCfg.highlightFormatting) {
-        var type = getType(state);
-        return type ? type + " formatting-escape" : "formatting-escape";
-      }
-    }
-
-    // Matches link titles present on next line
-    if (state.linkTitle) {
-      state.linkTitle = false;
-      var matchCh = ch;
-      if (ch === '(') {
-        matchCh = ')';
-      }
-      matchCh = (matchCh+'').replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1");
-      var regex = '^\\s*(?:[^' + matchCh + '\\\\]+|\\\\\\\\|\\\\.)' + matchCh;
-      if (stream.match(new RegExp(regex), true)) {
-        return linkhref;
-      }
-    }
-
-    // If this block is changed, it may need to be updated in GFM mode
-    if (ch === '`') {
-      var previousFormatting = state.formatting;
-      if (modeCfg.highlightFormatting) state.formatting = "code";
-      var t = getType(state);
-      var before = stream.pos;
-      stream.eatWhile('`');
-      var difference = 1 + stream.pos - before;
-      if (!state.code) {
-        codeDepth = difference;
-        state.code = true;
-        return getType(state);
-      } else {
-        if (difference === codeDepth) { // Must be exact
-          state.code = false;
-          return t;
-        }
-        state.formatting = previousFormatting;
-        return getType(state);
-      }
-    } else if (state.code) {
-      return getType(state);
-    }
-
-    if (ch === '!' && stream.match(/\[[^\]]*\] ?(?:\(|\[)/, false)) {
-      stream.match(/\[[^\]]*\]/);
-      state.inline = state.f = linkHref;
-      return image;
-    }
-
-    if (ch === '[' && stream.match(/.*\](\(.*\)| ?\[.*\])/, false)) {
-      state.linkText = true;
-      if (modeCfg.highlightFormatting) state.formatting = "link";
-      return getType(state);
-    }
-
-    if (ch === ']' && state.linkText && stream.match(/\(.*\)| ?\[.*\]/, false)) {
-      if (modeCfg.highlightFormatting) state.formatting = "link";
-      var type = getType(state);
-      state.linkText = false;
-      state.inline = state.f = linkHref;
-      return type;
-    }
-
-    if (ch === '<' && stream.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/, false)) {
-      state.f = state.inline = linkInline;
-      if (modeCfg.highlightFormatting) state.formatting = "link";
-      var type = getType(state);
-      if (type){
-        type += " ";
-      } else {
-        type = "";
-      }
-      return type + linkinline;
-    }
-
-    if (ch === '<' && stream.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/, false)) {
-      state.f = state.inline = linkInline;
-      if (modeCfg.highlightFormatting) state.formatting = "link";
-      var type = getType(state);
-      if (type){
-        type += " ";
-      } else {
-        type = "";
-      }
-      return type + linkemail;
-    }
-
-    if (ch === '<' && stream.match(/^\w/, false)) {
-      if (stream.string.indexOf(">") != -1) {
-        var atts = stream.string.substring(1,stream.string.indexOf(">"));
-        if (/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(atts)) {
-          state.md_inside = true;
-        }
-      }
-      stream.backUp(1);
-      state.htmlState = CodeMirror.startState(htmlMode);
-      return switchBlock(stream, state, htmlBlock);
-    }
-
-    if (ch === '<' && stream.match(/^\/\w*?>/)) {
-      state.md_inside = false;
-      return "tag";
-    }
-
-    var ignoreUnderscore = false;
-    if (!modeCfg.underscoresBreakWords) {
-      if (ch === '_' && stream.peek() !== '_' && stream.match(/(\w)/, false)) {
-        var prevPos = stream.pos - 2;
-        if (prevPos >= 0) {
-          var prevCh = stream.string.charAt(prevPos);
-          if (prevCh !== '_' && prevCh.match(/(\w)/, false)) {
-            ignoreUnderscore = true;
-          }
-        }
-      }
-    }
-    if (ch === '*' || (ch === '_' && !ignoreUnderscore)) {
-      if (sol && stream.peek() === ' ') {
-        // Do nothing, surrounded by newline and space
-      } else if (state.strong === ch && stream.eat(ch)) { // Remove STRONG
-        if (modeCfg.highlightFormatting) state.formatting = "strong";
-        var t = getType(state);
-        state.strong = false;
-        return t;
-      } else if (!state.strong && stream.eat(ch)) { // Add STRONG
-        state.strong = ch;
-        if (modeCfg.highlightFormatting) state.formatting = "strong";
-        return getType(state);
-      } else if (state.em === ch) { // Remove EM
-        if (modeCfg.highlightFormatting) state.formatting = "em";
-        var t = getType(state);
-        state.em = false;
-        return t;
-      } else if (!state.em) { // Add EM
-        state.em = ch;
-        if (modeCfg.highlightFormatting) state.formatting = "em";
-        return getType(state);
-      }
-    } else if (ch === ' ') {
-      if (stream.eat('*') || stream.eat('_')) { // Probably surrounded by spaces
-        if (stream.peek() === ' ') { // Surrounded by spaces, ignore
-          return getType(state);
-        } else { // Not surrounded by spaces, back up pointer
-          stream.backUp(1);
-        }
-      }
-    }
-
-    if (modeCfg.strikethrough) {
-      if (ch === '~' && stream.eatWhile(ch)) {
-        if (state.strikethrough) {// Remove strikethrough
-          if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
-          var t = getType(state);
-          state.strikethrough = false;
-          return t;
-        } else if (stream.match(/^[^\s]/, false)) {// Add strikethrough
-          state.strikethrough = true;
-          if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
-          return getType(state);
-        }
-      } else if (ch === ' ') {
-        if (stream.match(/^~~/, true)) { // Probably surrounded by space
-          if (stream.peek() === ' ') { // Surrounded by spaces, ignore
-            return getType(state);
-          } else { // Not surrounded by spaces, back up pointer
-            stream.backUp(2);
-          }
-        }
-      }
-    }
-
-    if (ch === ' ') {
-      if (stream.match(/ +$/, false)) {
-        state.trailingSpace++;
-      } else if (state.trailingSpace) {
-        state.trailingSpaceNewLine = true;
-      }
-    }
-
-    return getType(state);
-  }
-
-  function linkInline(stream, state) {
-    var ch = stream.next();
-
-    if (ch === ">") {
-      state.f = state.inline = inlineNormal;
-      if (modeCfg.highlightFormatting) state.formatting = "link";
-      var type = getType(state);
-      if (type){
-        type += " ";
-      } else {
-        type = "";
-      }
-      return type + linkinline;
-    }
-
-    stream.match(/^[^>]+/, true);
-
-    return linkinline;
-  }
-
-  function linkHref(stream, state) {
-    // Check if space, and return NULL if so (to avoid marking the space)
-    if(stream.eatSpace()){
-      return null;
-    }
-    var ch = stream.next();
-    if (ch === '(' || ch === '[') {
-      state.f = state.inline = getLinkHrefInside(ch === "(" ? ")" : "]");
-      if (modeCfg.highlightFormatting) state.formatting = "link-string";
-      state.linkHref = true;
-      return getType(state);
-    }
-    return 'error';
-  }
-
-  function getLinkHrefInside(endChar) {
-    return function(stream, state) {
-      var ch = stream.next();
-
-      if (ch === endChar) {
-        state.f = state.inline = inlineNormal;
-        if (modeCfg.highlightFormatting) state.formatting = "link-string";
-        var returnState = getType(state);
-        state.linkHref = false;
-        return returnState;
-      }
-
-      if (stream.match(inlineRE(endChar), true)) {
-        stream.backUp(1);
-      }
-
-      state.linkHref = true;
-      return getType(state);
-    };
-  }
-
-  function footnoteLink(stream, state) {
-    if (stream.match(/^[^\]]*\]:/, false)) {
-      state.f = footnoteLinkInside;
-      stream.next(); // Consume [
-      if (modeCfg.highlightFormatting) state.formatting = "link";
-      state.linkText = true;
-      return getType(state);
-    }
-    return switchInline(stream, state, inlineNormal);
-  }
-
-  function footnoteLinkInside(stream, state) {
-    if (stream.match(/^\]:/, true)) {
-      state.f = state.inline = footnoteUrl;
-      if (modeCfg.highlightFormatting) state.formatting = "link";
-      var returnType = getType(state);
-      state.linkText = false;
-      return returnType;
-    }
-
-    stream.match(/^[^\]]+/, true);
-
-    return linktext;
-  }
-
-  function footnoteUrl(stream, state) {
-    // Check if space, and return NULL if so (to avoid marking the space)
-    if(stream.eatSpace()){
-      return null;
-    }
-    // Match URL
-    stream.match(/^[^\s]+/, true);
-    // Check for link title
-    if (stream.peek() === undefined) { // End of line, set flag to check next line
-      state.linkTitle = true;
-    } else { // More content on line, check if link title
-      stream.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/, true);
-    }
-    state.f = state.inline = inlineNormal;
-    return linkhref;
-  }
-
-  var savedInlineRE = [];
-  function inlineRE(endChar) {
-    if (!savedInlineRE[endChar]) {
-      // Escape endChar for RegExp (taken from http://stackoverflow.com/a/494122/526741)
-      endChar = (endChar+'').replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1");
-      // Match any non-endChar, escaped character, as well as the closing
-      // endChar.
-      savedInlineRE[endChar] = new RegExp('^(?:[^\\\\]|\\\\.)*?(' + endChar + ')');
-    }
-    return savedInlineRE[endChar];
-  }
-
-  var mode = {
-    startState: function() {
-      return {
-        f: blockNormal,
-
-        prevLineHasContent: false,
-        thisLineHasContent: false,
-
-        block: blockNormal,
-        htmlState: null,
-        indentation: 0,
-
-        inline: inlineNormal,
-        text: handleText,
-
-        formatting: false,
-        linkText: false,
-        linkHref: false,
-        linkTitle: false,
-        em: false,
-        strong: false,
-        header: 0,
-        taskList: false,
-        list: false,
-        listDepth: 0,
-        quote: 0,
-        trailingSpace: 0,
-        trailingSpaceNewLine: false,
-        strikethrough: false
-      };
-    },
-
-    copyState: function(s) {
-      return {
-        f: s.f,
-
-        prevLineHasContent: s.prevLineHasContent,
-        thisLineHasContent: s.thisLineHasContent,
-
-        block: s.block,
-        htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState),
-        indentation: s.indentation,
-
-        localMode: s.localMode,
-        localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null,
-
-        inline: s.inline,
-        text: s.text,
-        formatting: false,
-        linkTitle: s.linkTitle,
-        em: s.em,
-        strong: s.strong,
-        strikethrough: s.strikethrough,
-        header: s.header,
-        taskList: s.taskList,
-        list: s.list,
-        listDepth: s.listDepth,
-        quote: s.quote,
-        trailingSpace: s.trailingSpace,
-        trailingSpaceNewLine: s.trailingSpaceNewLine,
-        md_inside: s.md_inside
-      };
-    },
-
-    token: function(stream, state) {
-
-      // Reset state.formatting
-      state.formatting = false;
-
-      if (stream.sol()) {
-        var forceBlankLine = !!state.header;
-
-        // Reset state.header
-        state.header = 0;
-
-        if (stream.match(/^\s*$/, true) || forceBlankLine) {
-          state.prevLineHasContent = false;
-          blankLine(state);
-          return forceBlankLine ? this.token(stream, state) : null;
-        } else {
-          state.prevLineHasContent = state.thisLineHasContent;
-          state.thisLineHasContent = true;
-        }
-
-        // Reset state.taskList
-        state.taskList = false;
-
-        // Reset state.code
-        state.code = false;
-
-        // Reset state.trailingSpace
-        state.trailingSpace = 0;
-        state.trailingSpaceNewLine = false;
-
-        state.f = state.block;
-        var indentation = stream.match(/^\s*/, true)[0].replace(/\t/g, '    ').length;
-        var difference = Math.floor((indentation - state.indentation) / 4) * 4;
-        if (difference > 4) difference = 4;
-        var adjustedIndentation = state.indentation + difference;
-        state.indentationDiff = adjustedIndentation - state.indentation;
-        state.indentation = adjustedIndentation;
-        if (indentation > 0) return null;
-      }
-      return state.f(stream, state);
-    },
-
-    innerMode: function(state) {
-      if (state.block == htmlBlock) return {state: state.htmlState, mode: htmlMode};
-      if (state.localState) return {state: state.localState, mode: state.localMode};
-      return {state: state, mode: mode};
-    },
-
-    blankLine: blankLine,
-
-    getType: getType,
-
-    fold: "markdown"
-  };
-  return mode;
-}, "xml");
-
-CodeMirror.defineMIME("text/x-markdown", "markdown");
-
-});
diff --git a/public/js/lib/codemirror/mode/markdown/test.js b/public/js/lib/codemirror/mode/markdown/test.js
deleted file mode 100644
index 96ca1ae..0000000
--- a/public/js/lib/codemirror/mode/markdown/test.js
+++ /dev/null
@@ -1,754 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function() {
-  var mode = CodeMirror.getMode({tabSize: 4}, "markdown");
-  function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
-  var modeHighlightFormatting = CodeMirror.getMode({tabSize: 4}, {name: "markdown", highlightFormatting: true});
-  function FT(name) { test.mode(name, modeHighlightFormatting, Array.prototype.slice.call(arguments, 1)); }
-
-  FT("formatting_emAsterisk",
-     "[em&formatting&formatting-em *][em foo][em&formatting&formatting-em *]");
-
-  FT("formatting_emUnderscore",
-     "[em&formatting&formatting-em _][em foo][em&formatting&formatting-em _]");
-
-  FT("formatting_strongAsterisk",
-     "[strong&formatting&formatting-strong **][strong foo][strong&formatting&formatting-strong **]");
-
-  FT("formatting_strongUnderscore",
-     "[strong&formatting&formatting-strong __][strong foo][strong&formatting&formatting-strong __]");
-
-  FT("formatting_codeBackticks",
-     "[comment&formatting&formatting-code `][comment foo][comment&formatting&formatting-code `]");
-
-  FT("formatting_doubleBackticks",
-     "[comment&formatting&formatting-code ``][comment foo ` bar][comment&formatting&formatting-code ``]");
-
-  FT("formatting_atxHeader",
-     "[header&header-1&formatting&formatting-header&formatting-header-1 #][header&header-1  foo # bar ][header&header-1&formatting&formatting-header&formatting-header-1 #]");
-
-  FT("formatting_setextHeader",
-     "foo",
-     "[header&header-1&formatting&formatting-header&formatting-header-1 =]");
-
-  FT("formatting_blockquote",
-     "[quote&quote-1&formatting&formatting-quote&formatting-quote-1 > ][quote&quote-1 foo]");
-
-  FT("formatting_list",
-     "[variable-2&formatting&formatting-list&formatting-list-ul - ][variable-2 foo]");
-  FT("formatting_list",
-     "[variable-2&formatting&formatting-list&formatting-list-ol 1. ][variable-2 foo]");
-
-  FT("formatting_link",
-     "[link&formatting&formatting-link [][link foo][link&formatting&formatting-link ]]][string&formatting&formatting-link-string (][string http://example.com/][string&formatting&formatting-link-string )]");
-
-  FT("formatting_linkReference",
-     "[link&formatting&formatting-link [][link foo][link&formatting&formatting-link ]]][string&formatting&formatting-link-string [][string bar][string&formatting&formatting-link-string ]]]",
-     "[link&formatting&formatting-link [][link bar][link&formatting&formatting-link ]]:] [string http://example.com/]");
-
-  FT("formatting_linkWeb",
-     "[link&formatting&formatting-link <][link http://example.com/][link&formatting&formatting-link >]");
-
-  FT("formatting_linkEmail",
-     "[link&formatting&formatting-link <][link user@example.com][link&formatting&formatting-link >]");
-
-  FT("formatting_escape",
-     "[formatting-escape \\*]");
-
-  MT("plainText",
-     "foo");
-
-  // Don't style single trailing space
-  MT("trailingSpace1",
-     "foo ");
-
-  // Two or more trailing spaces should be styled with line break character
-  MT("trailingSpace2",
-     "foo[trailing-space-a  ][trailing-space-new-line  ]");
-
-  MT("trailingSpace3",
-     "foo[trailing-space-a  ][trailing-space-b  ][trailing-space-new-line  ]");
-
-  MT("trailingSpace4",
-     "foo[trailing-space-a  ][trailing-space-b  ][trailing-space-a  ][trailing-space-new-line  ]");
-
-  // Code blocks using 4 spaces (regardless of CodeMirror.tabSize value)
-  MT("codeBlocksUsing4Spaces",
-     "    [comment foo]");
-
-  // Code blocks using 4 spaces with internal indentation
-  MT("codeBlocksUsing4SpacesIndentation",
-     "    [comment bar]",
-     "        [comment hello]",
-     "            [comment world]",
-     "    [comment foo]",
-     "bar");
-
-  // Code blocks using 4 spaces with internal indentation
-  MT("codeBlocksUsing4SpacesIndentation",
-     " foo",
-     "    [comment bar]",
-     "        [comment hello]",
-     "    [comment world]");
-
-  // Code blocks should end even after extra indented lines
-  MT("codeBlocksWithTrailingIndentedLine",
-     "    [comment foo]",
-     "        [comment bar]",
-     "    [comment baz]",
-     "    ",
-     "hello");
-
-  // Code blocks using 1 tab (regardless of CodeMirror.indentWithTabs value)
-  MT("codeBlocksUsing1Tab",
-     "\t[comment foo]");
-
-  // Inline code using backticks
-  MT("inlineCodeUsingBackticks",
-     "foo [comment `bar`]");
-
-  // Block code using single backtick (shouldn't work)
-  MT("blockCodeSingleBacktick",
-     "[comment `]",
-     "foo",
-     "[comment `]");
-
-  // Unclosed backticks
-  // Instead of simply marking as CODE, it would be nice to have an
-  // incomplete flag for CODE, that is styled slightly different.
-  MT("unclosedBackticks",
-     "foo [comment `bar]");
-
-  // Per documentation: "To include a literal backtick character within a
-  // code span, you can use multiple backticks as the opening and closing
-  // delimiters"
-  MT("doubleBackticks",
-     "[comment ``foo ` bar``]");
-
-  // Tests based on Dingus
-  // http://daringfireball.net/projects/markdown/dingus
-  //
-  // Multiple backticks within an inline code block
-  MT("consecutiveBackticks",
-     "[comment `foo```bar`]");
-
-  // Multiple backticks within an inline code block with a second code block
-  MT("consecutiveBackticks",
-     "[comment `foo```bar`] hello [comment `world`]");
-
-  // Unclosed with several different groups of backticks
-  MT("unclosedBackticks",
-     "[comment ``foo ``` bar` hello]");
-
-  // Closed with several different groups of backticks
-  MT("closedBackticks",
-     "[comment ``foo ``` bar` hello``] world");
-
-  // atx headers
-  // http://daringfireball.net/projects/markdown/syntax#header
-
-  MT("atxH1",
-     "[header&header-1 # foo]");
-
-  MT("atxH2",
-     "[header&header-2 ## foo]");
-
-  MT("atxH3",
-     "[header&header-3 ### foo]");
-
-  MT("atxH4",
-     "[header&header-4 #### foo]");
-
-  MT("atxH5",
-     "[header&header-5 ##### foo]");
-
-  MT("atxH6",
-     "[header&header-6 ###### foo]");
-
-  // H6 - 7x '#' should still be H6, per Dingus
-  // http://daringfireball.net/projects/markdown/dingus
-  MT("atxH6NotH7",
-     "[header&header-6 ####### foo]");
-
-  // Inline styles should be parsed inside headers
-  MT("atxH1inline",
-     "[header&header-1 # foo ][header&header-1&em *bar*]");
-
-  // Setext headers - H1, H2
-  // Per documentation, "Any number of underlining =’s or -’s will work."
-  // http://daringfireball.net/projects/markdown/syntax#header
-  // Ideally, the text would be marked as `header` as well, but this is
-  // not really feasible at the moment. So, instead, we're testing against
-  // what works today, to avoid any regressions.
-  //
-  // Check if single underlining = works
-  MT("setextH1",
-     "foo",
-     "[header&header-1 =]");
-
-  // Check if 3+ ='s work
-  MT("setextH1",
-     "foo",
-     "[header&header-1 ===]");
-
-  // Check if single underlining - works
-  MT("setextH2",
-     "foo",
-     "[header&header-2 -]");
-
-  // Check if 3+ -'s work
-  MT("setextH2",
-     "foo",
-     "[header&header-2 ---]");
-
-  // Single-line blockquote with trailing space
-  MT("blockquoteSpace",
-     "[quote&quote-1 > foo]");
-
-  // Single-line blockquote
-  MT("blockquoteNoSpace",
-     "[quote&quote-1 >foo]");
-
-  // No blank line before blockquote
-  MT("blockquoteNoBlankLine",
-     "foo",
-     "[quote&quote-1 > bar]");
-
-  // Nested blockquote
-  MT("blockquoteSpace",
-     "[quote&quote-1 > foo]",
-     "[quote&quote-1 >][quote&quote-2 > foo]",
-     "[quote&quote-1 >][quote&quote-2 >][quote&quote-3 > foo]");
-
-  // Single-line blockquote followed by normal paragraph
-  MT("blockquoteThenParagraph",
-     "[quote&quote-1 >foo]",
-     "",
-     "bar");
-
-  // Multi-line blockquote (lazy mode)
-  MT("multiBlockquoteLazy",
-     "[quote&quote-1 >foo]",
-     "[quote&quote-1 bar]");
-
-  // Multi-line blockquote followed by normal paragraph (lazy mode)
-  MT("multiBlockquoteLazyThenParagraph",
-     "[quote&quote-1 >foo]",
-     "[quote&quote-1 bar]",
-     "",
-     "hello");
-
-  // Multi-line blockquote (non-lazy mode)
-  MT("multiBlockquote",
-     "[quote&quote-1 >foo]",
-     "[quote&quote-1 >bar]");
-
-  // Multi-line blockquote followed by normal paragraph (non-lazy mode)
-  MT("multiBlockquoteThenParagraph",
-     "[quote&quote-1 >foo]",
-     "[quote&quote-1 >bar]",
-     "",
-     "hello");
-
-  // Check list types
-
-  MT("listAsterisk",
-     "foo",
-     "bar",
-     "",
-     "[variable-2 * foo]",
-     "[variable-2 * bar]");
-
-  MT("listPlus",
-     "foo",
-     "bar",
-     "",
-     "[variable-2 + foo]",
-     "[variable-2 + bar]");
-
-  MT("listDash",
-     "foo",
-     "bar",
-     "",
-     "[variable-2 - foo]",
-     "[variable-2 - bar]");
-
-  MT("listNumber",
-     "foo",
-     "bar",
-     "",
-     "[variable-2 1. foo]",
-     "[variable-2 2. bar]");
-
-  // Lists require a preceding blank line (per Dingus)
-  MT("listBogus",
-     "foo",
-     "1. bar",
-     "2. hello");
-
-  // List after header
-  MT("listAfterHeader",
-     "[header&header-1 # foo]",
-     "[variable-2 - bar]");
-
-  // Formatting in lists (*)
-  MT("listAsteriskFormatting",
-     "[variable-2 * ][variable-2&em *foo*][variable-2  bar]",
-     "[variable-2 * ][variable-2&strong **foo**][variable-2  bar]",
-     "[variable-2 * ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2  bar]",
-     "[variable-2 * ][variable-2&comment `foo`][variable-2  bar]");
-
-  // Formatting in lists (+)
-  MT("listPlusFormatting",
-     "[variable-2 + ][variable-2&em *foo*][variable-2  bar]",
-     "[variable-2 + ][variable-2&strong **foo**][variable-2  bar]",
-     "[variable-2 + ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2  bar]",
-     "[variable-2 + ][variable-2&comment `foo`][variable-2  bar]");
-
-  // Formatting in lists (-)
-  MT("listDashFormatting",
-     "[variable-2 - ][variable-2&em *foo*][variable-2  bar]",
-     "[variable-2 - ][variable-2&strong **foo**][variable-2  bar]",
-     "[variable-2 - ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2  bar]",
-     "[variable-2 - ][variable-2&comment `foo`][variable-2  bar]");
-
-  // Formatting in lists (1.)
-  MT("listNumberFormatting",
-     "[variable-2 1. ][variable-2&em *foo*][variable-2  bar]",
-     "[variable-2 2. ][variable-2&strong **foo**][variable-2  bar]",
-     "[variable-2 3. ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2  bar]",
-     "[variable-2 4. ][variable-2&comment `foo`][variable-2  bar]");
-
-  // Paragraph lists
-  MT("listParagraph",
-     "[variable-2 * foo]",
-     "",
-     "[variable-2 * bar]");
-
-  // Multi-paragraph lists
-  //
-  // 4 spaces
-  MT("listMultiParagraph",
-     "[variable-2 * foo]",
-     "",
-     "[variable-2 * bar]",
-     "",
-     "    [variable-2 hello]");
-
-  // 4 spaces, extra blank lines (should still be list, per Dingus)
-  MT("listMultiParagraphExtra",
-     "[variable-2 * foo]",
-     "",
-     "[variable-2 * bar]",
-     "",
-     "",
-     "    [variable-2 hello]");
-
-  // 4 spaces, plus 1 space (should still be list, per Dingus)
-  MT("listMultiParagraphExtraSpace",
-     "[variable-2 * foo]",
-     "",
-     "[variable-2 * bar]",
-     "",
-     "     [variable-2 hello]",
-     "",
-     "    [variable-2 world]");
-
-  // 1 tab
-  MT("listTab",
-     "[variable-2 * foo]",
-     "",
-     "[variable-2 * bar]",
-     "",
-     "\t[variable-2 hello]");
-
-  // No indent
-  MT("listNoIndent",
-     "[variable-2 * foo]",
-     "",
-     "[variable-2 * bar]",
-     "",
-     "hello");
-
-  // Blockquote
-  MT("blockquote",
-     "[variable-2 * foo]",
-     "",
-     "[variable-2 * bar]",
-     "",
-     "    [variable-2&quote&quote-1 > hello]");
-
-  // Code block
-  MT("blockquoteCode",
-     "[variable-2 * foo]",
-     "",
-     "[variable-2 * bar]",
-     "",
-     "        [comment > hello]",
-     "",
-     "    [variable-2 world]");
-
-  // Code block followed by text
-  MT("blockquoteCodeText",
-     "[variable-2 * foo]",
-     "",
-     "    [variable-2 bar]",
-     "",
-     "        [comment hello]",
-     "",
-     "    [variable-2 world]");
-
-  // Nested list
-
-  MT("listAsteriskNested",
-     "[variable-2 * foo]",
-     "",
-     "    [variable-3 * bar]");
-
-  MT("listPlusNested",
-     "[variable-2 + foo]",
-     "",
-     "    [variable-3 + bar]");
-
-  MT("listDashNested",
-     "[variable-2 - foo]",
-     "",
-     "    [variable-3 - bar]");
-
-  MT("listNumberNested",
-     "[variable-2 1. foo]",
-     "",
-     "    [variable-3 2. bar]");
-
-  MT("listMixed",
-     "[variable-2 * foo]",
-     "",
-     "    [variable-3 + bar]",
-     "",
-     "        [keyword - hello]",
-     "",
-     "            [variable-2 1. world]");
-
-  MT("listBlockquote",
-     "[variable-2 * foo]",
-     "",
-     "    [variable-3 + bar]",
-     "",
-     "        [quote&quote-1&variable-3 > hello]");
-
-  MT("listCode",
-     "[variable-2 * foo]",
-     "",
-     "    [variable-3 + bar]",
-     "",
-     "            [comment hello]");
-
-  // Code with internal indentation
-  MT("listCodeIndentation",
-     "[variable-2 * foo]",
-     "",
-     "        [comment bar]",
-     "            [comment hello]",
-     "                [comment world]",
-     "        [comment foo]",
-     "    [variable-2 bar]");
-
-  // List nesting edge cases
-  MT("listNested",
-    "[variable-2 * foo]",
-    "",
-    "    [variable-3 * bar]",
-    "",
-    "       [variable-2 hello]"
-  );
-  MT("listNested",
-    "[variable-2 * foo]",
-    "",
-    "    [variable-3 * bar]",
-    "",
-    "      [variable-3 * foo]"
-  );
-
-  // Code followed by text
-  MT("listCodeText",
-     "[variable-2 * foo]",
-     "",
-     "        [comment bar]",
-     "",
-     "hello");
-
-  // Following tests directly from official Markdown documentation
-  // http://daringfireball.net/projects/markdown/syntax#hr
-
-  MT("hrSpace",
-     "[hr * * *]");
-
-  MT("hr",
-     "[hr ***]");
-
-  MT("hrLong",
-     "[hr *****]");
-
-  MT("hrSpaceDash",
-     "[hr - - -]");
-
-  MT("hrDashLong",
-     "[hr ---------------------------------------]");
-
-  // Inline link with title
-  MT("linkTitle",
-     "[link [[foo]]][string (http://example.com/ \"bar\")] hello");
-
-  // Inline link without title
-  MT("linkNoTitle",
-     "[link [[foo]]][string (http://example.com/)] bar");
-
-  // Inline link with image
-  MT("linkImage",
-     "[link [[][tag ![[foo]]][string (http://example.com/)][link ]]][string (http://example.com/)] bar");
-
-  // Inline link with Em
-  MT("linkEm",
-     "[link [[][link&em *foo*][link ]]][string (http://example.com/)] bar");
-
-  // Inline link with Strong
-  MT("linkStrong",
-     "[link [[][link&strong **foo**][link ]]][string (http://example.com/)] bar");
-
-  // Inline link with EmStrong
-  MT("linkEmStrong",
-     "[link [[][link&strong **][link&em&strong *foo**][link&em *][link ]]][string (http://example.com/)] bar");
-
-  // Image with title
-  MT("imageTitle",
-     "[tag ![[foo]]][string (http://example.com/ \"bar\")] hello");
-
-  // Image without title
-  MT("imageNoTitle",
-     "[tag ![[foo]]][string (http://example.com/)] bar");
-
-  // Image with asterisks
-  MT("imageAsterisks",
-     "[tag ![[*foo*]]][string (http://example.com/)] bar");
-
-  // Not a link. Should be normal text due to square brackets being used
-  // regularly in text, especially in quoted material, and no space is allowed
-  // between square brackets and parentheses (per Dingus).
-  MT("notALink",
-     "[[foo]] (bar)");
-
-  // Reference-style links
-  MT("linkReference",
-     "[link [[foo]]][string [[bar]]] hello");
-
-  // Reference-style links with Em
-  MT("linkReferenceEm",
-     "[link [[][link&em *foo*][link ]]][string [[bar]]] hello");
-
-  // Reference-style links with Strong
-  MT("linkReferenceStrong",
-     "[link [[][link&strong **foo**][link ]]][string [[bar]]] hello");
-
-  // Reference-style links with EmStrong
-  MT("linkReferenceEmStrong",
-     "[link [[][link&strong **][link&em&strong *foo**][link&em *][link ]]][string [[bar]]] hello");
-
-  // Reference-style links with optional space separator (per docuentation)
-  // "You can optionally use a space to separate the sets of brackets"
-  MT("linkReferenceSpace",
-     "[link [[foo]]] [string [[bar]]] hello");
-
-  // Should only allow a single space ("...use *a* space...")
-  MT("linkReferenceDoubleSpace",
-     "[[foo]]  [[bar]] hello");
-
-  // Reference-style links with implicit link name
-  MT("linkImplicit",
-     "[link [[foo]]][string [[]]] hello");
-
-  // @todo It would be nice if, at some point, the document was actually
-  // checked to see if the referenced link exists
-
-  // Link label, for reference-style links (taken from documentation)
-
-  MT("labelNoTitle",
-     "[link [[foo]]:] [string http://example.com/]");
-
-  MT("labelIndented",
-     "   [link [[foo]]:] [string http://example.com/]");
-
-  MT("labelSpaceTitle",
-     "[link [[foo bar]]:] [string http://example.com/ \"hello\"]");
-
-  MT("labelDoubleTitle",
-     "[link [[foo bar]]:] [string http://example.com/ \"hello\"] \"world\"");
-
-  MT("labelTitleDoubleQuotes",
-     "[link [[foo]]:] [string http://example.com/  \"bar\"]");
-
-  MT("labelTitleSingleQuotes",
-     "[link [[foo]]:] [string http://example.com/  'bar']");
-
-  MT("labelTitleParenthese",
-     "[link [[foo]]:] [string http://example.com/  (bar)]");
-
-  MT("labelTitleInvalid",
-     "[link [[foo]]:] [string http://example.com/] bar");
-
-  MT("labelLinkAngleBrackets",
-     "[link [[foo]]:] [string <http://example.com/>  \"bar\"]");
-
-  MT("labelTitleNextDoubleQuotes",
-     "[link [[foo]]:] [string http://example.com/]",
-     "[string \"bar\"] hello");
-
-  MT("labelTitleNextSingleQuotes",
-     "[link [[foo]]:] [string http://example.com/]",
-     "[string 'bar'] hello");
-
-  MT("labelTitleNextParenthese",
-     "[link [[foo]]:] [string http://example.com/]",
-     "[string (bar)] hello");
-
-  MT("labelTitleNextMixed",
-     "[link [[foo]]:] [string http://example.com/]",
-     "(bar\" hello");
-
-  MT("linkWeb",
-     "[link <http://example.com/>] foo");
-
-  MT("linkWebDouble",
-     "[link <http://example.com/>] foo [link <http://example.com/>]");
-
-  MT("linkEmail",
-     "[link <user@example.com>] foo");
-
-  MT("linkEmailDouble",
-     "[link <user@example.com>] foo [link <user@example.com>]");
-
-  MT("emAsterisk",
-     "[em *foo*] bar");
-
-  MT("emUnderscore",
-     "[em _foo_] bar");
-
-  MT("emInWordAsterisk",
-     "foo[em *bar*]hello");
-
-  MT("emInWordUnderscore",
-     "foo[em _bar_]hello");
-
-  // Per documentation: "...surround an * or _ with spaces, it’ll be
-  // treated as a literal asterisk or underscore."
-
-  MT("emEscapedBySpaceIn",
-     "foo [em _bar _ hello_] world");
-
-  MT("emEscapedBySpaceOut",
-     "foo _ bar[em _hello_]world");
-
-  MT("emEscapedByNewline",
-     "foo",
-     "_ bar[em _hello_]world");
-
-  // Unclosed emphasis characters
-  // Instead of simply marking as EM / STRONG, it would be nice to have an
-  // incomplete flag for EM and STRONG, that is styled slightly different.
-  MT("emIncompleteAsterisk",
-     "foo [em *bar]");
-
-  MT("emIncompleteUnderscore",
-     "foo [em _bar]");
-
-  MT("strongAsterisk",
-     "[strong **foo**] bar");
-
-  MT("strongUnderscore",
-     "[strong __foo__] bar");
-
-  MT("emStrongAsterisk",
-     "[em *foo][em&strong **bar*][strong hello**] world");
-
-  MT("emStrongUnderscore",
-     "[em _foo][em&strong __bar_][strong hello__] world");
-
-  // "...same character must be used to open and close an emphasis span.""
-  MT("emStrongMixed",
-     "[em _foo][em&strong **bar*hello__ world]");
-
-  MT("emStrongMixed",
-     "[em *foo][em&strong __bar_hello** world]");
-
-  // These characters should be escaped:
-  // \   backslash
-  // `   backtick
-  // *   asterisk
-  // _   underscore
-  // {}  curly braces
-  // []  square brackets
-  // ()  parentheses
-  // #   hash mark
-  // +   plus sign
-  // -   minus sign (hyphen)
-  // .   dot
-  // !   exclamation mark
-
-  MT("escapeBacktick",
-     "foo \\`bar\\`");
-
-  MT("doubleEscapeBacktick",
-     "foo \\\\[comment `bar\\\\`]");
-
-  MT("escapeAsterisk",
-     "foo \\*bar\\*");
-
-  MT("doubleEscapeAsterisk",
-     "foo \\\\[em *bar\\\\*]");
-
-  MT("escapeUnderscore",
-     "foo \\_bar\\_");
-
-  MT("doubleEscapeUnderscore",
-     "foo \\\\[em _bar\\\\_]");
-
-  MT("escapeHash",
-     "\\# foo");
-
-  MT("doubleEscapeHash",
-     "\\\\# foo");
-
-  MT("escapeNewline",
-     "\\",
-     "[em *foo*]");
-
-
-  // Tests to make sure GFM-specific things aren't getting through
-
-  MT("taskList",
-     "[variable-2 * [ ]] bar]");
-
-  MT("fencedCodeBlocks",
-     "[comment ```]",
-     "foo",
-     "[comment ```]");
-
-  // Tests that require XML mode
-
-  MT("xmlMode",
-     "[tag&bracket <][tag div][tag&bracket >]",
-     "*foo*",
-     "[tag&bracket <][tag http://github.com][tag&bracket />]",
-     "[tag&bracket </][tag div][tag&bracket >]",
-     "[link <http://github.com/>]");
-
-  MT("xmlModeWithMarkdownInside",
-     "[tag&bracket <][tag div] [attribute markdown]=[string 1][tag&bracket >]",
-     "[em *foo*]",
-     "[link <http://github.com/>]",
-     "[tag </div>]",
-     "[link <http://github.com/>]",
-     "[tag&bracket <][tag div][tag&bracket >]",
-     "[tag&bracket </][tag div][tag&bracket >]");
-
-})();
diff --git a/public/js/lib/codemirror/mode/meta.js b/public/js/lib/codemirror/mode/meta.js
deleted file mode 100644
index fcaed98..0000000
--- a/public/js/lib/codemirror/mode/meta.js
+++ /dev/null
@@ -1,165 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-  "use strict";
-
-  CodeMirror.modeInfo = [
-    {name: "APL", mime: "text/apl", mode: "apl", ext: ["dyalog", "apl"]},
-    {name: "Asterisk", mime: "text/x-asterisk", mode: "asterisk"},
-    {name: "C", mime: "text/x-csrc", mode: "clike", ext: ["c", "h"]},
-    {name: "C++", mime: "text/x-c++src", mode: "clike", ext: ["cpp", "c++", "hpp", "h++"], alias: ["cpp"]},
-    {name: "Cobol", mime: "text/x-cobol", mode: "cobol", ext: ["cob", "cpy"]},
-    {name: "C#", mime: "text/x-csharp", mode: "clike", ext: ["cs"], alias: ["csharp"]},
-    {name: "Clojure", mime: "text/x-clojure", mode: "clojure", ext: ["clj"]},
-    {name: "CoffeeScript", mime: "text/x-coffeescript", mode: "coffeescript", ext: ["coffee"], alias: ["coffee", "coffee-script"]},
-    {name: "Common Lisp", mime: "text/x-common-lisp", mode: "commonlisp", ext: ["cl", "lisp", "el"], alias: ["lisp"]},
-    {name: "Cypher", mime: "application/x-cypher-query", mode: "cypher"},
-    {name: "Cython", mime: "text/x-cython", mode: "python", ext: ["pyx", "pxd", "pxi"]},
-    {name: "CSS", mime: "text/css", mode: "css", ext: ["css"]},
-    {name: "CQL", mime: "text/x-cassandra", mode: "sql", ext: ["cql"]},
-    {name: "D", mime: "text/x-d", mode: "d", ext: ["d"]},
-    {name: "Dart", mimes: ["application/dart", "text/x-dart"], mode: "dart", ext: ["dart"]},
-    {name: "diff", mime: "text/x-diff", mode: "diff", ext: ["diff", "patch"]},
-    {name: "Django", mime: "text/x-django", mode: "django"},
-    {name: "Dockerfile", mime: "text/x-dockerfile", mode: "dockerfile"},
-    {name: "DTD", mime: "application/xml-dtd", mode: "dtd", ext: ["dtd"]},
-    {name: "Dylan", mime: "text/x-dylan", mode: "dylan", ext: ["dylan", "dyl", "intr"]},
-    {name: "EBNF", mime: "text/x-ebnf", mode: "ebnf"},
-    {name: "ECL", mime: "text/x-ecl", mode: "ecl", ext: ["ecl"]},
-    {name: "Eiffel", mime: "text/x-eiffel", mode: "eiffel", ext: ["e"]},
-    {name: "Embedded Javascript", mime: "application/x-ejs", mode: "htmlembedded", ext: ["ejs"]},
-    {name: "Embedded Ruby", mime: "application/x-erb", mode: "htmlembedded", ext: ["erb"]},
-    {name: "Erlang", mime: "text/x-erlang", mode: "erlang", ext: ["erl"]},
-    {name: "Fortran", mime: "text/x-fortran", mode: "fortran", ext: ["f", "for", "f77", "f90"]},
-    {name: "F#", mime: "text/x-fsharp", mode: "mllike", ext: ["fs"], alias: ["fsharp"]},
-    {name: "Gas", mime: "text/x-gas", mode: "gas", ext: ["s"]},
-    {name: "Gherkin", mime: "text/x-feature", mode: "gherkin", ext: ["feature"]},
-    {name: "GitHub Flavored Markdown", mime: "text/x-gfm", mode: "gfm"},
-    {name: "Go", mime: "text/x-go", mode: "go", ext: ["go"]},
-    {name: "Groovy", mime: "text/x-groovy", mode: "groovy", ext: ["groovy"]},
-    {name: "HAML", mime: "text/x-haml", mode: "haml", ext: ["haml"]},
-    {name: "Haskell", mime: "text/x-haskell", mode: "haskell", ext: ["hs"]},
-    {name: "Haxe", mime: "text/x-haxe", mode: "haxe", ext: ["hx"]},
-    {name: "HXML", mime: "text/x-hxml", mode: "haxe", ext: ["hxml"]},
-    {name: "ASP.NET", mime: "application/x-aspx", mode: "htmlembedded", ext: ["aspx"], alias: ["asp", "aspx"]},
-    {name: "HTML", mime: "text/html", mode: "htmlmixed", ext: ["html", "htm"], alias: ["xhtml"]},
-    {name: "HTTP", mime: "message/http", mode: "http"},
-    {name: "IDL", mime: "text/x-idl", mode: "idl", ext: ["pro"]},
-    {name: "Jade", mime: "text/x-jade", mode: "jade", ext: ["jade"]},
-    {name: "Java", mime: "text/x-java", mode: "clike", ext: ["java"]},
-    {name: "Java Server Pages", mime: "application/x-jsp", mode: "htmlembedded", ext: ["jsp"], alias: ["jsp"]},
-    {name: "JavaScript", mimes: ["text/javascript", "text/ecmascript", "application/javascript", "application/x-javascript", "application/ecmascript"],
-     mode: "javascript", ext: ["js"], alias: ["ecmascript", "js", "node"]},
-    {name: "JSON", mimes: ["application/json", "application/x-json"], mode: "javascript", ext: ["json", "map"], alias: ["json5"]},
-    {name: "JSON-LD", mime: "application/ld+json", mode: "javascript", alias: ["jsonld"]},
-    {name: "Jinja2", mime: "null", mode: "jinja2"},
-    {name: "Julia", mime: "text/x-julia", mode: "julia", ext: ["jl"]},
-    {name: "Kotlin", mime: "text/x-kotlin", mode: "kotlin", ext: ["kt"]},
-    {name: "LESS", mime: "text/x-less", mode: "css", ext: ["less"]},
-    {name: "LiveScript", mime: "text/x-livescript", mode: "livescript", ext: ["ls"], alias: ["ls"]},
-    {name: "Lua", mime: "text/x-lua", mode: "lua", ext: ["lua"]},
-    {name: "Markdown", mime: "text/x-markdown", mode: "markdown", ext: ["markdown", "md", "mkd"]},
-    {name: "mIRC", mime: "text/mirc", mode: "mirc"},
-    {name: "MariaDB SQL", mime: "text/x-mariadb", mode: "sql"},
-    {name: "Modelica", mime: "text/x-modelica", mode: "modelica", ext: ["mo"]},
-    {name: "MS SQL", mime: "text/x-mssql", mode: "sql"},
-    {name: "MySQL", mime: "text/x-mysql", mode: "sql"},
-    {name: "Nginx", mime: "text/x-nginx-conf", mode: "nginx"},
-    {name: "NTriples", mime: "text/n-triples", mode: "ntriples", ext: ["nt"]},
-    {name: "Objective C", mime: "text/x-objectivec", mode: "clike", ext: ["m", "mm"]},
-    {name: "OCaml", mime: "text/x-ocaml", mode: "mllike", ext: ["ml", "mli", "mll", "mly"]},
-    {name: "Octave", mime: "text/x-octave", mode: "octave", ext: ["m"]},
-    {name: "Pascal", mime: "text/x-pascal", mode: "pascal", ext: ["p", "pas"]},
-    {name: "PEG.js", mime: "null", mode: "pegjs"},
-    {name: "Perl", mime: "text/x-perl", mode: "perl", ext: ["pl", "pm"]},
-    {name: "PHP", mime: "application/x-httpd-php", mode: "php", ext: ["php", "php3", "php4", "php5", "phtml"]},
-    {name: "Pig", mime: "text/x-pig", mode: "pig"},
-    {name: "Plain Text", mime: "text/plain", mode: "null", ext: ["txt", "text", "conf", "def", "list", "log"]},
-    {name: "PLSQL", mime: "text/x-plsql", mode: "sql"},
-    {name: "Properties files", mime: "text/x-properties", mode: "properties", ext: ["properties", "ini", "in"], alias: ["ini", "properties"]},
-    {name: "Python", mime: "text/x-python", mode: "python", ext: ["py", "pyw"]},
-    {name: "Puppet", mime: "text/x-puppet", mode: "puppet", ext: ["pp"]},
-    {name: "Q", mime: "text/x-q", mode: "q", ext: ["q"]},
-    {name: "R", mime: "text/x-rsrc", mode: "r", ext: ["r"], alias: ["rscript"]},
-    {name: "reStructuredText", mime: "text/x-rst", mode: "rst", ext: ["rst"], alias: ["rst"]},
-    {name: "RPM Changes", mime: "text/x-rpm-changes", mode: "rpm"},
-    {name: "RPM Spec", mime: "text/x-rpm-spec", mode: "rpm", ext: ["spec"]},
-    {name: "Ruby", mime: "text/x-ruby", mode: "ruby", ext: ["rb"], alias: ["jruby", "macruby", "rake", "rb", "rbx"]},
-    {name: "Rust", mime: "text/x-rustsrc", mode: "rust", ext: ["rs"]},
-    {name: "Sass", mime: "text/x-sass", mode: "sass", ext: ["sass"]},
-    {name: "Scala", mime: "text/x-scala", mode: "clike", ext: ["scala"]},
-    {name: "Scheme", mime: "text/x-scheme", mode: "scheme", ext: ["scm", "ss"]},
-    {name: "SCSS", mime: "text/x-scss", mode: "css", ext: ["scss"]},
-    {name: "Shell", mime: "text/x-sh", mode: "shell", ext: ["sh", "ksh", "bash"], alias: ["bash", "sh", "zsh"]},
-    {name: "Sieve", mime: "application/sieve", mode: "sieve"},
-    {name: "Slim", mimes: ["text/x-slim", "application/x-slim"], mode: "slim"},
-    {name: "Smalltalk", mime: "text/x-stsrc", mode: "smalltalk", ext: ["st"]},
-    {name: "Smarty", mime: "text/x-smarty", mode: "smarty", ext: ["tpl"]},
-    {name: "SmartyMixed", mime: "text/x-smarty", mode: "smartymixed"},
-    {name: "Solr", mime: "text/x-solr", mode: "solr"},
-    {name: "Soy", mime: "text/x-soy", mode: "soy", ext: ["soy"], alias: ["closure template"]},
-    {name: "SPARQL", mime: "application/sparql-query", mode: "sparql", ext: ["rq", "sparql"], alias: ["sparul"]},
-    {name: "Spreadsheet", mime: "text/x-spreadsheet", mode: "spreadsheet", alias: ["excel", "formula"]},
-    {name: "SQL", mime: "text/x-sql", mode: "sql", ext: ["sql"]},
-    {name: "MariaDB", mime: "text/x-mariadb", mode: "sql"},
-    {name: "sTeX", mime: "text/x-stex", mode: "stex"},
-    {name: "LaTeX", mime: "text/x-latex", mode: "stex", ext: ["text", "ltx"], alias: ["tex"]},
-    {name: "SystemVerilog", mime: "text/x-systemverilog", mode: "verilog", ext: ["v"]},
-    {name: "Tcl", mime: "text/x-tcl", mode: "tcl", ext: ["tcl"]},
-    {name: "Textile", mime: "text/x-textile", mode: "textile"},
-    {name: "TiddlyWiki ", mime: "text/x-tiddlywiki", mode: "tiddlywiki"},
-    {name: "Tiki wiki", mime: "text/tiki", mode: "tiki"},
-    {name: "TOML", mime: "text/x-toml", mode: "toml"},
-    {name: "Tornado", mime: "text/x-tornado", mode: "tornado"},
-    {name: "Turtle", mime: "text/turtle", mode: "turtle", ext: ["ttl"]},
-    {name: "TypeScript", mime: "application/typescript", mode: "javascript", ext: ["ts"], alias: ["ts"]},
-    {name: "VB.NET", mime: "text/x-vb", mode: "vb", ext: ["vb"]},
-    {name: "VBScript", mime: "text/vbscript", mode: "vbscript"},
-    {name: "Velocity", mime: "text/velocity", mode: "velocity", ext: ["vtl"]},
-    {name: "Verilog", mime: "text/x-verilog", mode: "verilog", ext: ["v"]},
-    {name: "XML", mimes: ["application/xml", "text/xml"], mode: "xml", ext: ["xml", "xsl", "xsd"], alias: ["rss", "wsdl", "xsd"]},
-    {name: "XQuery", mime: "application/xquery", mode: "xquery", ext: ["xy", "xquery"]},
-    {name: "YAML", mime: "text/x-yaml", mode: "yaml", ext: ["yaml"], alias: ["yml"]},
-    {name: "Z80", mime: "text/x-z80", mode: "z80", ext: ["z80"]}
-  ];
-  // Ensure all modes have a mime property for backwards compatibility
-  for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
-    var info = CodeMirror.modeInfo[i];
-    if (info.mimes) info.mime = info.mimes[0];
-  }
-
-  CodeMirror.findModeByMIME = function(mime) {
-    for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
-      var info = CodeMirror.modeInfo[i];
-      if (info.mime == mime) return info;
-      if (info.mimes) for (var j = 0; j < info.mimes.length; j++)
-        if (info.mimes[j] == mime) return info;
-    }
-  };
-
-  CodeMirror.findModeByExtension = function(ext) {
-    for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
-      var info = CodeMirror.modeInfo[i];
-      if (info.ext) for (var j = 0; j < info.ext.length; j++)
-        if (info.ext[j] == ext) return info;
-    }
-  };
-
-  CodeMirror.findModeByName = function(name) {
-    name = name.toLowerCase();
-    for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
-      var info = CodeMirror.modeInfo[i];
-      if (info.name.toLowerCase() == name) return info;
-      if (info.alias) for (var j = 0; j < info.alias.length; j++)
-        if (info.alias[j].toLowerCase() == name) return info;
-    }
-  };
-});
diff --git a/public/js/lib/codemirror/mode/xml/index.html b/public/js/lib/codemirror/mode/xml/index.html
deleted file mode 100644
index 7149f06..0000000
--- a/public/js/lib/codemirror/mode/xml/index.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<!doctype html>
-
-<title>CodeMirror: XML mode</title>
-<meta charset="utf-8"/>
-<link rel=stylesheet href="../../doc/docs.css">
-
-<link rel="stylesheet" href="../../lib/codemirror.css">
-<script src="../../lib/codemirror.js"></script>
-<script src="xml.js"></script>
-<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
-<div id=nav>
-  <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
-
-  <ul>
-    <li><a href="../../index.html">Home</a>
-    <li><a href="../../doc/manual.html">Manual</a>
-    <li><a href="https://github.com/codemirror/codemirror">Code</a>
-  </ul>
-  <ul>
-    <li><a href="../index.html">Language modes</a>
-    <li><a class=active href="#">XML</a>
-  </ul>
-</div>
-
-<article>
-<h2>XML mode</h2>
-<form><textarea id="code" name="code">
-&lt;html style="color: green"&gt;
-  &lt;!-- this is a comment --&gt;
-  &lt;head&gt;
-    &lt;title&gt;HTML Example&lt;/title&gt;
-  &lt;/head&gt;
-  &lt;body&gt;
-    The indentation tries to be &lt;em&gt;somewhat &amp;quot;do what
-    I mean&amp;quot;&lt;/em&gt;... but might not match your style.
-  &lt;/body&gt;
-&lt;/html&gt;
-</textarea></form>
-    <script>
-      var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
-        mode: "text/html",
-        lineNumbers: true
-      });
-    </script>
-    <p>The XML mode supports two configuration parameters:</p>
-    <dl>
-      <dt><code>htmlMode (boolean)</code></dt>
-      <dd>This switches the mode to parse HTML instead of XML. This
-      means attributes do not have to be quoted, and some elements
-      (such as <code>br</code>) do not require a closing tag.</dd>
-      <dt><code>alignCDATA (boolean)</code></dt>
-      <dd>Setting this to true will force the opening tag of CDATA
-      blocks to not be indented.</dd>
-    </dl>
-
-    <p><strong>MIME types defined:</strong> <code>application/xml</code>, <code>text/html</code>.</p>
-  </article>
diff --git a/public/js/lib/codemirror/mode/xml/test.js b/public/js/lib/codemirror/mode/xml/test.js
deleted file mode 100644
index f48156b..0000000
--- a/public/js/lib/codemirror/mode/xml/test.js
+++ /dev/null
@@ -1,51 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function() {
-  var mode = CodeMirror.getMode({indentUnit: 2}, "xml"), mname = "xml";
-  function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), mname); }
-
-  MT("matching",
-     "[tag&bracket <][tag top][tag&bracket >]",
-     "  text",
-     "  [tag&bracket <][tag inner][tag&bracket />]",
-     "[tag&bracket </][tag top][tag&bracket >]");
-
-  MT("nonmatching",
-     "[tag&bracket <][tag top][tag&bracket >]",
-     "  [tag&bracket <][tag inner][tag&bracket />]",
-     "  [tag&bracket </][tag&error tip][tag&bracket&error >]");
-
-  MT("doctype",
-     "[meta <!doctype foobar>]",
-     "[tag&bracket <][tag top][tag&bracket />]");
-
-  MT("cdata",
-     "[tag&bracket <][tag top][tag&bracket >]",
-     "  [atom <![CDATA[foo]",
-     "[atom barbazguh]]]]>]",
-     "[tag&bracket </][tag top][tag&bracket >]");
-
-  // HTML tests
-  mode = CodeMirror.getMode({indentUnit: 2}, "text/html");
-
-  MT("selfclose",
-     "[tag&bracket <][tag html][tag&bracket >]",
-     "  [tag&bracket <][tag link] [attribute rel]=[string stylesheet] [attribute href]=[string \"/foobar\"][tag&bracket >]",
-     "[tag&bracket </][tag html][tag&bracket >]");
-
-  MT("list",
-     "[tag&bracket <][tag ol][tag&bracket >]",
-     "  [tag&bracket <][tag li][tag&bracket >]one",
-     "  [tag&bracket <][tag li][tag&bracket >]two",
-     "[tag&bracket </][tag ol][tag&bracket >]");
-
-  MT("valueless",
-     "[tag&bracket <][tag input] [attribute type]=[string checkbox] [attribute checked][tag&bracket />]");
-
-  MT("pThenArticle",
-     "[tag&bracket <][tag p][tag&bracket >]",
-     "  foo",
-     "[tag&bracket <][tag article][tag&bracket >]bar");
-
-})();
diff --git a/public/js/lib/codemirror/mode/xml/xml.js b/public/js/lib/codemirror/mode/xml/xml.js
deleted file mode 100644
index 2f3b8f8..0000000
--- a/public/js/lib/codemirror/mode/xml/xml.js
+++ /dev/null
@@ -1,384 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("xml", function(config, parserConfig) {
-  var indentUnit = config.indentUnit;
-  var multilineTagIndentFactor = parserConfig.multilineTagIndentFactor || 1;
-  var multilineTagIndentPastTag = parserConfig.multilineTagIndentPastTag;
-  if (multilineTagIndentPastTag == null) multilineTagIndentPastTag = true;
-
-  var Kludges = parserConfig.htmlMode ? {
-    autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,
-                      'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,
-                      'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,
-                      'track': true, 'wbr': true, 'menuitem': true},
-    implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,
-                       'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,
-                       'th': true, 'tr': true},
-    contextGrabbers: {
-      'dd': {'dd': true, 'dt': true},
-      'dt': {'dd': true, 'dt': true},
-      'li': {'li': true},
-      'option': {'option': true, 'optgroup': true},
-      'optgroup': {'optgroup': true},
-      'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,
-            'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,
-            'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,
-            'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,
-            'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},
-      'rp': {'rp': true, 'rt': true},
-      'rt': {'rp': true, 'rt': true},
-      'tbody': {'tbody': true, 'tfoot': true},
-      'td': {'td': true, 'th': true},
-      'tfoot': {'tbody': true},
-      'th': {'td': true, 'th': true},
-      'thead': {'tbody': true, 'tfoot': true},
-      'tr': {'tr': true}
-    },
-    doNotIndent: {"pre": true},
-    allowUnquoted: true,
-    allowMissing: true,
-    caseFold: true
-  } : {
-    autoSelfClosers: {},
-    implicitlyClosed: {},
-    contextGrabbers: {},
-    doNotIndent: {},
-    allowUnquoted: false,
-    allowMissing: false,
-    caseFold: false
-  };
-  var alignCDATA = parserConfig.alignCDATA;
-
-  // Return variables for tokenizers
-  var type, setStyle;
-
-  function inText(stream, state) {
-    function chain(parser) {
-      state.tokenize = parser;
-      return parser(stream, state);
-    }
-
-    var ch = stream.next();
-    if (ch == "<") {
-      if (stream.eat("!")) {
-        if (stream.eat("[")) {
-          if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>"));
-          else return null;
-        } else if (stream.match("--")) {
-          return chain(inBlock("comment", "-->"));
-        } else if (stream.match("DOCTYPE", true, true)) {
-          stream.eatWhile(/[\w\._\-]/);
-          return chain(doctype(1));
-        } else {
-          return null;
-        }
-      } else if (stream.eat("?")) {
-        stream.eatWhile(/[\w\._\-]/);
-        state.tokenize = inBlock("meta", "?>");
-        return "meta";
-      } else {
-        type = stream.eat("/") ? "closeTag" : "openTag";
-        state.tokenize = inTag;
-        return "tag bracket";
-      }
-    } else if (ch == "&") {
-      var ok;
-      if (stream.eat("#")) {
-        if (stream.eat("x")) {
-          ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";");
-        } else {
-          ok = stream.eatWhile(/[\d]/) && stream.eat(";");
-        }
-      } else {
-        ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(";");
-      }
-      return ok ? "atom" : "error";
-    } else {
-      stream.eatWhile(/[^&<]/);
-      return null;
-    }
-  }
-
-  function inTag(stream, state) {
-    var ch = stream.next();
-    if (ch == ">" || (ch == "/" && stream.eat(">"))) {
-      state.tokenize = inText;
-      type = ch == ">" ? "endTag" : "selfcloseTag";
-      return "tag bracket";
-    } else if (ch == "=") {
-      type = "equals";
-      return null;
-    } else if (ch == "<") {
-      state.tokenize = inText;
-      state.state = baseState;
-      state.tagName = state.tagStart = null;
-      var next = state.tokenize(stream, state);
-      return next ? next + " tag error" : "tag error";
-    } else if (/[\'\"]/.test(ch)) {
-      state.tokenize = inAttribute(ch);
-      state.stringStartCol = stream.column();
-      return state.tokenize(stream, state);
-    } else {
-      stream.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);
-      return "word";
-    }
-  }
-
-  function inAttribute(quote) {
-    var closure = function(stream, state) {
-      while (!stream.eol()) {
-        if (stream.next() == quote) {
-          state.tokenize = inTag;
-          break;
-        }
-      }
-      return "string";
-    };
-    closure.isInAttribute = true;
-    return closure;
-  }
-
-  function inBlock(style, terminator) {
-    return function(stream, state) {
-      while (!stream.eol()) {
-        if (stream.match(terminator)) {
-          state.tokenize = inText;
-          break;
-        }
-        stream.next();
-      }
-      return style;
-    };
-  }
-  function doctype(depth) {
-    return function(stream, state) {
-      var ch;
-      while ((ch = stream.next()) != null) {
-        if (ch == "<") {
-          state.tokenize = doctype(depth + 1);
-          return state.tokenize(stream, state);
-        } else if (ch == ">") {
-          if (depth == 1) {
-            state.tokenize = inText;
-            break;
-          } else {
-            state.tokenize = doctype(depth - 1);
-            return state.tokenize(stream, state);
-          }
-        }
-      }
-      return "meta";
-    };
-  }
-
-  function Context(state, tagName, startOfLine) {
-    this.prev = state.context;
-    this.tagName = tagName;
-    this.indent = state.indented;
-    this.startOfLine = startOfLine;
-    if (Kludges.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))
-      this.noIndent = true;
-  }
-  function popContext(state) {
-    if (state.context) state.context = state.context.prev;
-  }
-  function maybePopContext(state, nextTagName) {
-    var parentTagName;
-    while (true) {
-      if (!state.context) {
-        return;
-      }
-      parentTagName = state.context.tagName;
-      if (!Kludges.contextGrabbers.hasOwnProperty(parentTagName) ||
-          !Kludges.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {
-        return;
-      }
-      popContext(state);
-    }
-  }
-
-  function baseState(type, stream, state) {
-    if (type == "openTag") {
-      state.tagStart = stream.column();
-      return tagNameState;
-    } else if (type == "closeTag") {
-      return closeTagNameState;
-    } else {
-      return baseState;
-    }
-  }
-  function tagNameState(type, stream, state) {
-    if (type == "word") {
-      state.tagName = stream.current();
-      setStyle = "tag";
-      return attrState;
-    } else {
-      setStyle = "error";
-      return tagNameState;
-    }
-  }
-  function closeTagNameState(type, stream, state) {
-    if (type == "word") {
-      var tagName = stream.current();
-      if (state.context && state.context.tagName != tagName &&
-          Kludges.implicitlyClosed.hasOwnProperty(state.context.tagName))
-        popContext(state);
-      if (state.context && state.context.tagName == tagName) {
-        setStyle = "tag";
-        return closeState;
-      } else {
-        setStyle = "tag error";
-        return closeStateErr;
-      }
-    } else {
-      setStyle = "error";
-      return closeStateErr;
-    }
-  }
-
-  function closeState(type, _stream, state) {
-    if (type != "endTag") {
-      setStyle = "error";
-      return closeState;
-    }
-    popContext(state);
-    return baseState;
-  }
-  function closeStateErr(type, stream, state) {
-    setStyle = "error";
-    return closeState(type, stream, state);
-  }
-
-  function attrState(type, _stream, state) {
-    if (type == "word") {
-      setStyle = "attribute";
-      return attrEqState;
-    } else if (type == "endTag" || type == "selfcloseTag") {
-      var tagName = state.tagName, tagStart = state.tagStart;
-      state.tagName = state.tagStart = null;
-      if (type == "selfcloseTag" ||
-          Kludges.autoSelfClosers.hasOwnProperty(tagName)) {
-        maybePopContext(state, tagName);
-      } else {
-        maybePopContext(state, tagName);
-        state.context = new Context(state, tagName, tagStart == state.indented);
-      }
-      return baseState;
-    }
-    setStyle = "error";
-    return attrState;
-  }
-  function attrEqState(type, stream, state) {
-    if (type == "equals") return attrValueState;
-    if (!Kludges.allowMissing) setStyle = "error";
-    return attrState(type, stream, state);
-  }
-  function attrValueState(type, stream, state) {
-    if (type == "string") return attrContinuedState;
-    if (type == "word" && Kludges.allowUnquoted) {setStyle = "string"; return attrState;}
-    setStyle = "error";
-    return attrState(type, stream, state);
-  }
-  function attrContinuedState(type, stream, state) {
-    if (type == "string") return attrContinuedState;
-    return attrState(type, stream, state);
-  }
-
-  return {
-    startState: function() {
-      return {tokenize: inText,
-              state: baseState,
-              indented: 0,
-              tagName: null, tagStart: null,
-              context: null};
-    },
-
-    token: function(stream, state) {
-      if (!state.tagName && stream.sol())
-        state.indented = stream.indentation();
-
-      if (stream.eatSpace()) return null;
-      type = null;
-      var style = state.tokenize(stream, state);
-      if ((style || type) && style != "comment") {
-        setStyle = null;
-        state.state = state.state(type || style, stream, state);
-        if (setStyle)
-          style = setStyle == "error" ? style + " error" : setStyle;
-      }
-      return style;
-    },
-
-    indent: function(state, textAfter, fullLine) {
-      var context = state.context;
-      // Indent multi-line strings (e.g. css).
-      if (state.tokenize.isInAttribute) {
-        if (state.tagStart == state.indented)
-          return state.stringStartCol + 1;
-        else
-          return state.indented + indentUnit;
-      }
-      if (context && context.noIndent) return CodeMirror.Pass;
-      if (state.tokenize != inTag && state.tokenize != inText)
-        return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0;
-      // Indent the starts of attribute names.
-      if (state.tagName) {
-        if (multilineTagIndentPastTag)
-          return state.tagStart + state.tagName.length + 2;
-        else
-          return state.tagStart + indentUnit * multilineTagIndentFactor;
-      }
-      if (alignCDATA && /<!\[CDATA\[/.test(textAfter)) return 0;
-      var tagAfter = textAfter && /^<(\/)?([\w_:\.-]*)/.exec(textAfter);
-      if (tagAfter && tagAfter[1]) { // Closing tag spotted
-        while (context) {
-          if (context.tagName == tagAfter[2]) {
-            context = context.prev;
-            break;
-          } else if (Kludges.implicitlyClosed.hasOwnProperty(context.tagName)) {
-            context = context.prev;
-          } else {
-            break;
-          }
-        }
-      } else if (tagAfter) { // Opening tag spotted
-        while (context) {
-          var grabbers = Kludges.contextGrabbers[context.tagName];
-          if (grabbers && grabbers.hasOwnProperty(tagAfter[2]))
-            context = context.prev;
-          else
-            break;
-        }
-      }
-      while (context && !context.startOfLine)
-        context = context.prev;
-      if (context) return context.indent + indentUnit;
-      else return 0;
-    },
-
-    electricInput: /<\/[\s\w:]+>$/,
-    blockCommentStart: "<!--",
-    blockCommentEnd: "-->",
-
-    configuration: parserConfig.htmlMode ? "html" : "xml",
-    helperType: parserConfig.htmlMode ? "html" : "xml"
-  };
-});
-
-CodeMirror.defineMIME("text/xml", "xml");
-CodeMirror.defineMIME("application/xml", "xml");
-if (!CodeMirror.mimeModes.hasOwnProperty("text/html"))
-  CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true});
-
-});
diff --git a/public/js/lib/codemirror/mode/yaml/index.html b/public/js/lib/codemirror/mode/yaml/index.html
deleted file mode 100644
index be9b632..0000000
--- a/public/js/lib/codemirror/mode/yaml/index.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<!doctype html>
-
-<title>CodeMirror: YAML mode</title>
-<meta charset="utf-8"/>
-<link rel=stylesheet href="../../doc/docs.css">
-
-<link rel="stylesheet" href="../../lib/codemirror.css">
-<script src="../../lib/codemirror.js"></script>
-<script src="yaml.js"></script>
-<style>.CodeMirror { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; }</style>
-<div id=nav>
-  <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
-
-  <ul>
-    <li><a href="../../index.html">Home</a>
-    <li><a href="../../doc/manual.html">Manual</a>
-    <li><a href="https://github.com/codemirror/codemirror">Code</a>
-  </ul>
-  <ul>
-    <li><a href="../index.html">Language modes</a>
-    <li><a class=active href="#">YAML</a>
-  </ul>
-</div>
-
-<article>
-<h2>YAML mode</h2>
-<form><textarea id="code" name="code">
---- # Favorite movies
-- Casablanca
-- North by Northwest
-- The Man Who Wasn't There
---- # Shopping list
-[milk, pumpkin pie, eggs, juice]
---- # Indented Blocks, common in YAML data files, use indentation and new lines to separate the key: value pairs
-  name: John Smith
-  age: 33
---- # Inline Blocks, common in YAML data streams, use commas to separate the key: value pairs between braces
-{name: John Smith, age: 33}
----
-receipt:     Oz-Ware Purchase Invoice
-date:        2007-08-06
-customer:
-    given:   Dorothy
-    family:  Gale
-
-items:
-    - part_no:   A4786
-      descrip:   Water Bucket (Filled)
-      price:     1.47
-      quantity:  4
-
-    - part_no:   E1628
-      descrip:   High Heeled "Ruby" Slippers
-      size:       8
-      price:     100.27
-      quantity:  1
-
-bill-to:  &id001
-    street: |
-            123 Tornado Alley
-            Suite 16
-    city:   East Centerville
-    state:  KS
-
-ship-to:  *id001
-
-specialDelivery:  >
-    Follow the Yellow Brick
-    Road to the Emerald City.
-    Pay no attention to the
-    man behind the curtain.
-...
-</textarea></form>
-    <script>
-      var editor = CodeMirror.fromTextArea(document.getElementById("code"), {});
-    </script>
-
-    <p><strong>MIME types defined:</strong> <code>text/x-yaml</code>.</p>
-
-  </article>
diff --git a/public/js/lib/codemirror/mode/yaml/yaml.js b/public/js/lib/codemirror/mode/yaml/yaml.js
deleted file mode 100644
index b7015e5..0000000
--- a/public/js/lib/codemirror/mode/yaml/yaml.js
+++ /dev/null
@@ -1,117 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-    mod(require("../../lib/codemirror"));
-  else if (typeof define == "function" && define.amd) // AMD
-    define(["../../lib/codemirror"], mod);
-  else // Plain browser env
-    mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("yaml", function() {
-
-  var cons = ['true', 'false', 'on', 'off', 'yes', 'no'];
-  var keywordRegex = new RegExp("\\b(("+cons.join(")|(")+"))$", 'i');
-
-  return {
-    token: function(stream, state) {
-      var ch = stream.peek();
-      var esc = state.escaped;
-      state.escaped = false;
-      /* comments */
-      if (ch == "#" && (stream.pos == 0 || /\s/.test(stream.string.charAt(stream.pos - 1)))) {
-        stream.skipToEnd();
-        return "comment";
-      }
-
-      if (stream.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))
-        return "string";
-
-      if (state.literal && stream.indentation() > state.keyCol) {
-        stream.skipToEnd(); return "string";
-      } else if (state.literal) { state.literal = false; }
-      if (stream.sol()) {
-        state.keyCol = 0;
-        state.pair = false;
-        state.pairStart = false;
-        /* document start */
-        if(stream.match(/---/)) { return "def"; }
-        /* document end */
-        if (stream.match(/\.\.\./)) { return "def"; }
-        /* array list item */
-        if (stream.match(/\s*-\s+/)) { return 'meta'; }
-      }
-      /* inline pairs/lists */
-      if (stream.match(/^(\{|\}|\[|\])/)) {
-        if (ch == '{')
-          state.inlinePairs++;
-        else if (ch == '}')
-          state.inlinePairs--;
-        else if (ch == '[')
-          state.inlineList++;
-        else
-          state.inlineList--;
-        return 'meta';
-      }
-
-      /* list seperator */
-      if (state.inlineList > 0 && !esc && ch == ',') {
-        stream.next();
-        return 'meta';
-      }
-      /* pairs seperator */
-      if (state.inlinePairs > 0 && !esc && ch == ',') {
-        state.keyCol = 0;
-        state.pair = false;
-        state.pairStart = false;
-        stream.next();
-        return 'meta';
-      }
-
-      /* start of value of a pair */
-      if (state.pairStart) {
-        /* block literals */
-        if (stream.match(/^\s*(\||\>)\s*/)) { state.literal = true; return 'meta'; };
-        /* references */
-        if (stream.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i)) { return 'variable-2'; }
-        /* numbers */
-        if (state.inlinePairs == 0 && stream.match(/^\s*-?[0-9\.\,]+\s?$/)) { return 'number'; }
-        if (state.inlinePairs > 0 && stream.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/)) { return 'number'; }
-        /* keywords */
-        if (stream.match(keywordRegex)) { return 'keyword'; }
-      }
-
-      /* pairs (associative arrays) -> key */
-      if (!state.pair && stream.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)) {
-        state.pair = true;
-        state.keyCol = stream.indentation();
-        return "atom";
-      }
-      if (state.pair && stream.match(/^:\s*/)) { state.pairStart = true; return 'meta'; }
-
-      /* nothing found, continue */
-      state.pairStart = false;
-      state.escaped = (ch == '\\');
-      stream.next();
-      return null;
-    },
-    startState: function() {
-      return {
-        pair: false,
-        pairStart: false,
-        keyCol: 0,
-        inlinePairs: 0,
-        inlineList: 0,
-        literal: false,
-        escaped: false
-      };
-    }
-  };
-});
-
-CodeMirror.defineMIME("text/x-yaml", "yaml");
-
-});
diff --git a/public/js/lib/codemirror/package.json b/public/js/lib/codemirror/package.json
deleted file mode 100644
index f934a08..0000000
--- a/public/js/lib/codemirror/package.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-    "name": "codemirror",
-    "version":"4.10.0",
-    "main": "lib/codemirror.js",
-    "description": "In-browser code editing made bearable",
-    "licenses": [{"type": "MIT",
-                  "url": "http://codemirror.net/LICENSE"}],
-    "directories": {"lib": "./lib"},
-    "scripts": {"test": "node ./test/run.js"},
-    "devDependencies": {"node-static": "0.6.0",
-                        "phantomjs": "1.9.2-5"},
-    "bugs": "http://github.com/codemirror/CodeMirror/issues",
-    "keywords": ["JavaScript", "CodeMirror", "Editor"],
-    "homepage": "http://codemirror.net",
-    "maintainers":[{"name": "Marijn Haverbeke",
-                    "email": "marijnh@gmail.com",
-                    "web": "http://marijnhaverbeke.nl"}],
-    "repository": {"type": "git",
-                   "url": "https://github.com/codemirror/CodeMirror.git"}
-}
diff --git a/public/js/lib/codemirror/test/comment_test.js b/public/js/lib/codemirror/test/comment_test.js
deleted file mode 100644
index 8bd3959..0000000
--- a/public/js/lib/codemirror/test/comment_test.js
+++ /dev/null
@@ -1,100 +0,0 @@
-namespace = "comment_";
-
-(function() {
-  function test(name, mode, run, before, after) {
-    return testCM(name, function(cm) {
-      run(cm);
-      eq(cm.getValue(), after);
-    }, {value: before, mode: mode});
-  }
-
-  var simpleProg = "function foo() {\n  return bar;\n}";
-  var inlineBlock = "foo(/* bar */ true);";
-  var inlineBlocks = "foo(/* bar */ true, /* baz */ false);";
-  var multiLineInlineBlock = ["above();", "foo(/* bar */ true);", "below();"];
-
-  test("block", "javascript", function(cm) {
-    cm.blockComment(Pos(0, 3), Pos(3, 0), {blockCommentLead: " *"});
-  }, simpleProg + "\n", "/* function foo() {\n *   return bar;\n * }\n */");
-
-  test("blockToggle", "javascript", function(cm) {
-    cm.blockComment(Pos(0, 3), Pos(2, 0), {blockCommentLead: " *"});
-    cm.uncomment(Pos(0, 3), Pos(2, 0), {blockCommentLead: " *"});
-  }, simpleProg, simpleProg);
-
-  test("blockToggle2", "javascript", function(cm) {
-    cm.setCursor({line: 0, ch: 7 /* inside the block comment */});
-    cm.execCommand("toggleComment");
-  }, inlineBlock, "foo(bar true);");
-
-  // This test should work but currently fails.
-  // test("blockToggle3", "javascript", function(cm) {
-  //   cm.setCursor({line: 0, ch: 7 /* inside the first block comment */});
-  //   cm.execCommand("toggleComment");
-  // }, inlineBlocks, "foo(bar true, /* baz */ false);");
-
-  test("line", "javascript", function(cm) {
-    cm.lineComment(Pos(1, 1), Pos(1, 1));
-  }, simpleProg, "function foo() {\n//   return bar;\n}");
-
-  test("lineToggle", "javascript", function(cm) {
-    cm.lineComment(Pos(0, 0), Pos(2, 1));
-    cm.uncomment(Pos(0, 0), Pos(2, 1));
-  }, simpleProg, simpleProg);
-
-  test("fallbackToBlock", "css", function(cm) {
-    cm.lineComment(Pos(0, 0), Pos(2, 1));
-  }, "html {\n  border: none;\n}", "/* html {\n  border: none;\n} */");
-
-  test("fallbackToLine", "ruby", function(cm) {
-    cm.blockComment(Pos(0, 0), Pos(1));
-  }, "def blah()\n  return hah\n", "# def blah()\n#   return hah\n");
-
-  test("ignoreExternalBlockComments", "javascript", function(cm) {
-    cm.execCommand("toggleComment");
-  }, inlineBlocks, "// " + inlineBlocks);
-
-  test("ignoreExternalBlockComments2", "javascript", function(cm) {
-    cm.setCursor({line: 0, ch: null /* eol */});
-    cm.execCommand("toggleComment");
-  }, inlineBlocks, "// " + inlineBlocks);
-
-  test("ignoreExternalBlockCommentsMultiLineAbove", "javascript", function(cm) {
-    cm.setSelection({line: 0, ch: 0}, {line: 1, ch: 1});
-    cm.execCommand("toggleComment");
-  }, multiLineInlineBlock.join("\n"), ["// " + multiLineInlineBlock[0],
-                                       "// " + multiLineInlineBlock[1],
-                                       multiLineInlineBlock[2]].join("\n"));
-
-  test("ignoreExternalBlockCommentsMultiLineBelow", "javascript", function(cm) {
-    cm.setSelection({line: 1, ch: 13 /* after end of block comment */}, {line: 2, ch: 1});
-    cm.execCommand("toggleComment");
-  }, multiLineInlineBlock.join("\n"), [multiLineInlineBlock[0],
-                                       "// " + multiLineInlineBlock[1],
-                                       "// " + multiLineInlineBlock[2]].join("\n"));
-
-  test("commentRange", "javascript", function(cm) {
-    cm.blockComment(Pos(1, 2), Pos(1, 13), {fullLines: false});
-  }, simpleProg, "function foo() {\n  /*return bar;*/\n}");
-
-  test("indented", "javascript", function(cm) {
-    cm.lineComment(Pos(1, 0), Pos(2), {indent: true});
-  }, simpleProg, "function foo() {\n  // return bar;\n  // }");
-
-  test("singleEmptyLine", "javascript", function(cm) {
-    cm.setCursor(1);
-    cm.execCommand("toggleComment");
-  }, "a;\n\nb;", "a;\n// \nb;");
-
-  test("dontMessWithStrings", "javascript", function(cm) {
-    cm.execCommand("toggleComment");
-  }, "console.log(\"/*string*/\");", "// console.log(\"/*string*/\");");
-
-  test("dontMessWithStrings2", "javascript", function(cm) {
-    cm.execCommand("toggleComment");
-  }, "console.log(\"// string\");", "// console.log(\"// string\");");
-
-  test("dontMessWithStrings3", "javascript", function(cm) {
-    cm.execCommand("toggleComment");
-  }, "// console.log(\"// string\");", "console.log(\"// string\");");
-})();
diff --git a/public/js/lib/codemirror/test/doc_test.js b/public/js/lib/codemirror/test/doc_test.js
deleted file mode 100644
index 5f242f6..0000000
--- a/public/js/lib/codemirror/test/doc_test.js
+++ /dev/null
@@ -1,371 +0,0 @@
-(function() {
-  // A minilanguage for instantiating linked CodeMirror instances and Docs
-  function instantiateSpec(spec, place, opts) {
-    var names = {}, pos = 0, l = spec.length, editors = [];
-    while (spec) {
-      var m = spec.match(/^(\w+)(\*?)(?:='([^\']*)'|<(~?)(\w+)(?:\/(\d+)-(\d+))?)\s*/);
-      var name = m[1], isDoc = m[2], cur;
-      if (m[3]) {
-        cur = isDoc ? CodeMirror.Doc(m[3]) : CodeMirror(place, clone(opts, {value: m[3]}));
-      } else {
-        var other = m[5];
-        if (!names.hasOwnProperty(other)) {
-          names[other] = editors.length;
-          editors.push(CodeMirror(place, opts));
-        }
-        var doc = editors[names[other]].linkedDoc({
-          sharedHist: !m[4],
-          from: m[6] ? Number(m[6]) : null,
-          to: m[7] ? Number(m[7]) : null
-        });
-        cur = isDoc ? doc : CodeMirror(place, clone(opts, {value: doc}));
-      }
-      names[name] = editors.length;
-      editors.push(cur);
-      spec = spec.slice(m[0].length);
-    }
-    return editors;
-  }
-
-  function clone(obj, props) {
-    if (!obj) return;
-    clone.prototype = obj;
-    var inst = new clone();
-    if (props) for (var n in props) if (props.hasOwnProperty(n))
-      inst[n] = props[n];
-    return inst;
-  }
-
-  function eqAll(val) {
-    var end = arguments.length, msg = null;
-    if (typeof arguments[end-1] == "string")
-      msg = arguments[--end];
-    if (i == end) throw new Error("No editors provided to eqAll");
-    for (var i = 1; i < end; ++i)
-      eq(arguments[i].getValue(), val, msg)
-  }
-
-  function testDoc(name, spec, run, opts, expectFail) {
-    if (!opts) opts = {};
-
-    return test("doc_" + name, function() {
-      var place = document.getElementById("testground");
-      var editors = instantiateSpec(spec, place, opts);
-      var successful = false;
-
-      try {
-        run.apply(null, editors);
-        successful = true;
-      } finally {
-        if (!successful || verbose) {
-          place.style.visibility = "visible";
-        } else {
-          for (var i = 0; i < editors.length; ++i)
-            if (editors[i] instanceof CodeMirror)
-              place.removeChild(editors[i].getWrapperElement());
-        }
-      }
-    }, expectFail);
-  }
-
-  var ie_lt8 = /MSIE [1-7]\b/.test(navigator.userAgent);
-
-  function testBasic(a, b) {
-    eqAll("x", a, b);
-    a.setValue("hey");
-    eqAll("hey", a, b);
-    b.setValue("wow");
-    eqAll("wow", a, b);
-    a.replaceRange("u\nv\nw", Pos(0, 3));
-    b.replaceRange("i", Pos(0, 4));
-    b.replaceRange("j", Pos(2, 1));
-    eqAll("wowui\nv\nwj", a, b);
-  }
-
-  testDoc("basic", "A='x' B<A", testBasic);
-  testDoc("basicSeparate", "A='x' B<~A", testBasic);
-
-  testDoc("sharedHist", "A='ab\ncd\nef' B<A", function(a, b) {
-    a.replaceRange("x", Pos(0));
-    b.replaceRange("y", Pos(1));
-    a.replaceRange("z", Pos(2));
-    eqAll("abx\ncdy\nefz", a, b);
-    a.undo();
-    a.undo();
-    eqAll("abx\ncd\nef", a, b);
-    a.redo();
-    eqAll("abx\ncdy\nef", a, b);
-    b.redo();
-    eqAll("abx\ncdy\nefz", a, b);
-    a.undo(); b.undo(); a.undo(); a.undo();
-    eqAll("ab\ncd\nef", a, b);
-  }, null, ie_lt8);
-
-  testDoc("undoIntact", "A='ab\ncd\nef' B<~A", function(a, b) {
-    a.replaceRange("x", Pos(0));
-    b.replaceRange("y", Pos(1));
-    a.replaceRange("z", Pos(2));
-    a.replaceRange("q", Pos(0));
-    eqAll("abxq\ncdy\nefz", a, b);
-    a.undo();
-    a.undo();
-    eqAll("abx\ncdy\nef", a, b);
-    b.undo();
-    eqAll("abx\ncd\nef", a, b);
-    a.redo();
-    eqAll("abx\ncd\nefz", a, b);
-    a.redo();
-    eqAll("abxq\ncd\nefz", a, b);
-    a.undo(); a.undo(); a.undo(); a.undo();
-    eqAll("ab\ncd\nef", a, b);
-    b.redo();
-    eqAll("ab\ncdy\nef", a, b);
-  });
-
-  testDoc("undoConflict", "A='ab\ncd\nef' B<~A", function(a, b) {
-    a.replaceRange("x", Pos(0));
-    a.replaceRange("z", Pos(2));
-    // This should clear the first undo event in a, but not the second
-    b.replaceRange("y", Pos(0));
-    a.undo(); a.undo();
-    eqAll("abxy\ncd\nef", a, b);
-    a.replaceRange("u", Pos(2));
-    a.replaceRange("v", Pos(0));
-    // This should clear both events in a
-    b.replaceRange("w", Pos(0));
-    a.undo(); a.undo();
-    eqAll("abxyvw\ncd\nefu", a, b);
-  });
-
-  testDoc("doubleRebase", "A='ab\ncd\nef\ng' B<~A C<B", function(a, b, c) {
-    c.replaceRange("u", Pos(3));
-    a.replaceRange("", Pos(0, 0), Pos(1, 0));
-    c.undo();
-    eqAll("cd\nef\ng", a, b, c);
-  });
-
-  testDoc("undoUpdate", "A='ab\ncd\nef' B<~A", function(a, b) {
-    a.replaceRange("x", Pos(2));
-    b.replaceRange("u\nv\nw\n", Pos(0, 0));
-    a.undo();
-    eqAll("u\nv\nw\nab\ncd\nef", a, b);
-    a.redo();
-    eqAll("u\nv\nw\nab\ncd\nefx", a, b);
-    a.undo();
-    eqAll("u\nv\nw\nab\ncd\nef", a, b);
-    b.undo();
-    a.redo();
-    eqAll("ab\ncd\nefx", a, b);
-    a.undo();
-    eqAll("ab\ncd\nef", a, b);
-  });
-
-  testDoc("undoKeepRanges", "A='abcdefg' B<A", function(a, b) {
-    var m = a.markText(Pos(0, 1), Pos(0, 3), {className: "foo"});
-    b.replaceRange("x", Pos(0, 0));
-    eqPos(m.find().from, Pos(0, 2));
-    b.replaceRange("yzzy", Pos(0, 1), Pos(0));
-    eq(m.find(), null);
-    b.undo();
-    eqPos(m.find().from, Pos(0, 2));
-    b.undo();
-    eqPos(m.find().from, Pos(0, 1));
-  });
-
-  testDoc("longChain", "A='uv' B<A C<B D<C", function(a, b, c, d) {
-    a.replaceSelection("X");
-    eqAll("Xuv", a, b, c, d);
-    d.replaceRange("Y", Pos(0));
-    eqAll("XuvY", a, b, c, d);
-  });
-
-  testDoc("broadCast", "B<A C<A D<A E<A", function(a, b, c, d, e) {
-    b.setValue("uu");
-    eqAll("uu", a, b, c, d, e);
-    a.replaceRange("v", Pos(0, 1));
-    eqAll("uvu", a, b, c, d, e);
-  });
-
-  // A and B share a history, C and D share a separate one
-  testDoc("islands", "A='x\ny\nz' B<A C<~A D<C", function(a, b, c, d) {
-    a.replaceRange("u", Pos(0));
-    d.replaceRange("v", Pos(2));
-    b.undo();
-    eqAll("x\ny\nzv", a, b, c, d);
-    c.undo();
-    eqAll("x\ny\nz", a, b, c, d);
-    a.redo();
-    eqAll("xu\ny\nz", a, b, c, d);
-    d.redo();
-    eqAll("xu\ny\nzv", a, b, c, d);
-  });
-
-  testDoc("unlink", "B<A C<A D<B", function(a, b, c, d) {
-    a.setValue("hi");
-    b.unlinkDoc(a);
-    d.setValue("aye");
-    eqAll("hi", a, c);
-    eqAll("aye", b, d);
-    a.setValue("oo");
-    eqAll("oo", a, c);
-    eqAll("aye", b, d);
-  });
-
-  testDoc("bareDoc", "A*='foo' B*<A C<B", function(a, b, c) {
-    is(a instanceof CodeMirror.Doc);
-    is(b instanceof CodeMirror.Doc);
-    is(c instanceof CodeMirror);
-    eqAll("foo", a, b, c);
-    a.replaceRange("hey", Pos(0, 0), Pos(0));
-    c.replaceRange("!", Pos(0));
-    eqAll("hey!", a, b, c);
-    b.unlinkDoc(a);
-    b.setValue("x");
-    eqAll("x", b, c);
-    eqAll("hey!", a);
-  });
-
-  testDoc("swapDoc", "A='a' B*='b' C<A", function(a, b, c) {
-    var d = a.swapDoc(b);
-    d.setValue("x");
-    eqAll("x", c, d);
-    eqAll("b", a, b);
-  });
-
-  testDoc("docKeepsScroll", "A='x' B*='y'", function(a, b) {
-    addDoc(a, 200, 200);
-    a.scrollIntoView(Pos(199, 200));
-    var c = a.swapDoc(b);
-    a.swapDoc(c);
-    var pos = a.getScrollInfo();
-    is(pos.left > 0, "not at left");
-    is(pos.top > 0, "not at top");
-  });
-
-  testDoc("copyDoc", "A='u'", function(a) {
-    var copy = a.getDoc().copy(true);
-    a.setValue("foo");
-    copy.setValue("bar");
-    var old = a.swapDoc(copy);
-    eq(a.getValue(), "bar");
-    a.undo();
-    eq(a.getValue(), "u");
-    a.swapDoc(old);
-    eq(a.getValue(), "foo");
-    eq(old.historySize().undo, 1);
-    eq(old.copy(false).historySize().undo, 0);
-  });
-
-  testDoc("docKeepsMode", "A='1+1'", function(a) {
-    var other = CodeMirror.Doc("hi", "text/x-markdown");
-    a.setOption("mode", "text/javascript");
-    var old = a.swapDoc(other);
-    eq(a.getOption("mode"), "text/x-markdown");
-    eq(a.getMode().name, "markdown");
-    a.swapDoc(old);
-    eq(a.getOption("mode"), "text/javascript");
-    eq(a.getMode().name, "javascript");
-  });
-
-  testDoc("subview", "A='1\n2\n3\n4\n5' B<~A/1-3", function(a, b) {
-    eq(b.getValue(), "2\n3");
-    eq(b.firstLine(), 1);
-    b.setCursor(Pos(4));
-    eqPos(b.getCursor(), Pos(2, 1));
-    a.replaceRange("-1\n0\n", Pos(0, 0));
-    eq(b.firstLine(), 3);
-    eqPos(b.getCursor(), Pos(4, 1));
-    a.undo();
-    eqPos(b.getCursor(), Pos(2, 1));
-    b.replaceRange("oyoy\n", Pos(2, 0));
-    eq(a.getValue(), "1\n2\noyoy\n3\n4\n5");
-    b.undo();
-    eq(a.getValue(), "1\n2\n3\n4\n5");
-  });
-
-  testDoc("subviewEditOnBoundary", "A='11\n22\n33\n44\n55' B<~A/1-4", function(a, b) {
-    a.replaceRange("x\nyy\nz", Pos(0, 1), Pos(2, 1));
-    eq(b.firstLine(), 2);
-    eq(b.lineCount(), 2);
-    eq(b.getValue(), "z3\n44");
-    a.replaceRange("q\nrr\ns", Pos(3, 1), Pos(4, 1));
-    eq(b.firstLine(), 2);
-    eq(b.getValue(), "z3\n4q");
-    eq(a.getValue(), "1x\nyy\nz3\n4q\nrr\ns5");
-    a.execCommand("selectAll");
-    a.replaceSelection("!");
-    eqAll("!", a, b);
-  });
-
-
-  testDoc("sharedMarker", "A='ab\ncd\nef\ngh' B<A C<~A/1-2", function(a, b, c) {
-    var mark = b.markText(Pos(0, 1), Pos(3, 1),
-                          {className: "cm-searching", shared: true});
-    var found = a.findMarksAt(Pos(0, 2));
-    eq(found.length, 1);
-    eq(found[0], mark);
-    eq(c.findMarksAt(Pos(1, 1)).length, 1);
-    eqPos(mark.find().from, Pos(0, 1));
-    eqPos(mark.find().to, Pos(3, 1));
-    b.replaceRange("x\ny\n", Pos(0, 0));
-    eqPos(mark.find().from, Pos(2, 1));
-    eqPos(mark.find().to, Pos(5, 1));
-    var cleared = 0;
-    CodeMirror.on(mark, "clear", function() {++cleared;});
-    b.operation(function(){mark.clear();});
-    eq(a.findMarksAt(Pos(3, 1)).length, 0);
-    eq(b.findMarksAt(Pos(3, 1)).length, 0);
-    eq(c.findMarksAt(Pos(3, 1)).length, 0);
-    eq(mark.find(), null);
-    eq(cleared, 1);
-  });
-
-  testDoc("sharedMarkerCopy", "A='abcde'", function(a) {
-    var shared = a.markText(Pos(0, 1), Pos(0, 3), {shared: true});
-    var b = a.linkedDoc();
-    var found = b.findMarksAt(Pos(0, 2));
-    eq(found.length, 1);
-    eq(found[0], shared);
-    shared.clear();
-    eq(b.findMarksAt(Pos(0, 2)), 0);
-  });
-
-  testDoc("sharedMarkerDetach", "A='abcde' B<A C<B", function(a, b, c) {
-    var shared = a.markText(Pos(0, 1), Pos(0, 3), {shared: true});
-    a.unlinkDoc(b);
-    var inB = b.findMarksAt(Pos(0, 2));
-    eq(inB.length, 1);
-    is(inB[0] != shared);
-    var inC = c.findMarksAt(Pos(0, 2));
-    eq(inC.length, 1);
-    is(inC[0] != shared);
-    inC[0].clear();
-    is(shared.find());
-  });
-
-  testDoc("sharedBookmark", "A='ab\ncd\nef\ngh' B<A C<~A/1-2", function(a, b, c) {
-    var mark = b.setBookmark(Pos(1, 1), {shared: true});
-    var found = a.findMarksAt(Pos(1, 1));
-    eq(found.length, 1);
-    eq(found[0], mark);
-    eq(c.findMarksAt(Pos(1, 1)).length, 1);
-    eqPos(mark.find(), Pos(1, 1));
-    b.replaceRange("x\ny\n", Pos(0, 0));
-    eqPos(mark.find(), Pos(3, 1));
-    var cleared = 0;
-    CodeMirror.on(mark, "clear", function() {++cleared;});
-    b.operation(function() {mark.clear();});
-    eq(a.findMarks(Pos(0, 0), Pos(5)).length, 0);
-    eq(b.findMarks(Pos(0, 0), Pos(5)).length, 0);
-    eq(c.findMarks(Pos(0, 0), Pos(5)).length, 0);
-    eq(mark.find(), null);
-    eq(cleared, 1);
-  });
-
-  testDoc("undoInSubview", "A='line 0\nline 1\nline 2\nline 3\nline 4' B<A/1-4", function(a, b) {
-    b.replaceRange("x", Pos(2, 0));
-    a.undo();
-    eq(a.getValue(), "line 0\nline 1\nline 2\nline 3\nline 4");
-    eq(b.getValue(), "line 1\nline 2\nline 3");
-  });
-})();
diff --git a/public/js/lib/codemirror/test/driver.js b/public/js/lib/codemirror/test/driver.js
deleted file mode 100644
index be013a7..0000000
--- a/public/js/lib/codemirror/test/driver.js
+++ /dev/null
@@ -1,138 +0,0 @@
-var tests = [], filters = [], allNames = [];
-
-function Failure(why) {this.message = why;}
-Failure.prototype.toString = function() { return this.message; };
-
-function indexOf(collection, elt) {
-  if (collection.indexOf) return collection.indexOf(elt);
-  for (var i = 0, e = collection.length; i < e; ++i)
-    if (collection[i] == elt) return i;
-  return -1;
-}
-
-function test(name, run, expectedFail) {
-  // Force unique names
-  var originalName = name;
-  var i = 2; // Second function would be NAME_2
-  while (indexOf(allNames, name) !== -1){
-    name = originalName + "_" + i;
-    i++;
-  }
-  allNames.push(name);
-  // Add test
-  tests.push({name: name, func: run, expectedFail: expectedFail});
-  return name;
-}
-var namespace = "";
-function testCM(name, run, opts, expectedFail) {
-  return test(namespace + name, function() {
-    var place = document.getElementById("testground"), cm = window.cm = CodeMirror(place, opts);
-    var successful = false;
-    try {
-      run(cm);
-      successful = true;
-    } finally {
-      if (!successful || verbose) {
-        place.style.visibility = "visible";
-      } else {
-        place.removeChild(cm.getWrapperElement());
-      }
-    }
-  }, expectedFail);
-}
-
-function runTests(callback) {
-  var totalTime = 0;
-  function step(i) {
-    for (;;) {
-      if (i === tests.length) {
-        running = false;
-        return callback("done");
-      }
-      var test = tests[i], skip = false;
-      if (filters.length) {
-        skip = true;
-        for (var j = 0; j < filters.length; j++)
-          if (test.name.match(filters[j])) skip = false;
-      }
-      if (skip) {
-        callback("skipped", test.name, message);
-        i++;
-      } else {
-        break;
-      }
-    }
-    var expFail = test.expectedFail, startTime = +new Date, threw = false;
-    try {
-      var message = test.func();
-    } catch(e) {
-      threw = true;
-      if (expFail) callback("expected", test.name);
-      else if (e instanceof Failure) callback("fail", test.name, e.message);
-      else {
-        var pos = /(?:\bat |@).*?([^\/:]+):(\d+)/.exec(e.stack);
-        if (pos) console["log"](e.stack);
-        callback("error", test.name, e.toString() + (pos ? " (" + pos[1] + ":" + pos[2] + ")" : ""));
-      }
-    }
-    if (!threw) {
-      if (expFail) callback("fail", test.name, message || "expected failure, but succeeded");
-      else callback("ok", test.name, message);
-    }
-    if (!quit) { // Run next test
-      var delay = 0;
-      totalTime += (+new Date) - startTime;
-      if (totalTime > 500){
-        totalTime = 0;
-        delay = 50;
-      }
-      setTimeout(function(){step(i + 1);}, delay);
-    } else { // Quit tests
-      running = false;
-      return null;
-    }
-  }
-  step(0);
-}
-
-function label(str, msg) {
-  if (msg) return str + " (" + msg + ")";
-  return str;
-}
-function eq(a, b, msg) {
-  if (a != b) throw new Failure(label(a + " != " + b, msg));
-}
-function near(a, b, margin, msg) {
-  if (Math.abs(a - b) > margin)
-    throw new Failure(label(a + " is not close to " + b + " (" + margin + ")", msg));
-}
-function eqPos(a, b, msg) {
-  function str(p) { return "{line:" + p.line + ",ch:" + p.ch + "}"; }
-  if (a == b) return;
-  if (a == null) throw new Failure(label("comparing null to " + str(b), msg));
-  if (b == null) throw new Failure(label("comparing " + str(a) + " to null", msg));
-  if (a.line != b.line || a.ch != b.ch) throw new Failure(label(str(a) + " != " + str(b), msg));
-}
-function is(a, msg) {
-  if (!a) throw new Failure(label("assertion failed", msg));
-}
-
-function countTests() {
-  if (!filters.length) return tests.length;
-  var sum = 0;
-  for (var i = 0; i < tests.length; ++i) {
-    var name = tests[i].name;
-    for (var j = 0; j < filters.length; j++) {
-      if (name.match(filters[j])) {
-        ++sum;
-        break;
-      }
-    }
-  }
-  return sum;
-}
-
-function parseTestFilter(s) {
-  if (/_\*$/.test(s)) return new RegExp("^" + s.slice(0, s.length - 2), "i");
-  else return new RegExp(s, "i");
-}
diff --git a/public/js/lib/codemirror/test/emacs_test.js b/public/js/lib/codemirror/test/emacs_test.js
deleted file mode 100644
index ccbd6ce..0000000
--- a/public/js/lib/codemirror/test/emacs_test.js
+++ /dev/null
@@ -1,141 +0,0 @@
-(function() {
-  "use strict";
-
-  var Pos = CodeMirror.Pos;
-  namespace = "emacs_";
-
-  var eventCache = {};
-  function fakeEvent(keyName) {
-    var event = eventCache[key];
-    if (event) return event;
-
-    var ctrl, shift, alt;
-    var key = keyName.replace(/\w+-/g, function(type) {
-      if (type == "Ctrl-") ctrl = true;
-      else if (type == "Alt-") alt = true;
-      else if (type == "Shift-") shift = true;
-      return "";
-    });
-    var code;
-    for (var c in CodeMirror.keyNames)
-      if (CodeMirror.keyNames[c] == key) { code = c; break; }
-    if (c == null) throw new Error("Unknown key: " + key);
-
-    return eventCache[keyName] = {
-      type: "keydown", keyCode: code, ctrlKey: ctrl, shiftKey: shift, altKey: alt,
-      preventDefault: function(){}, stopPropagation: function(){}
-    };
-  }
-
-  function sim(name, start /*, actions... */) {
-    var keys = Array.prototype.slice.call(arguments, 2);
-    testCM(name, function(cm) {
-      for (var i = 0; i < keys.length; ++i) {
-        var cur = keys[i];
-        if (cur instanceof Pos) cm.setCursor(cur);
-        else if (cur.call) cur(cm);
-        else cm.triggerOnKeyDown(fakeEvent(cur));
-      }
-    }, {keyMap: "emacs", value: start, mode: "javascript"});
-  }
-
-  function at(line, ch) { return function(cm) { eqPos(cm.getCursor(), Pos(line, ch)); }; }
-  function txt(str) { return function(cm) { eq(cm.getValue(), str); }; }
-
-  sim("motionHSimple", "abc", "Ctrl-F", "Ctrl-F", "Ctrl-B", at(0, 1));
-  sim("motionHMulti", "abcde",
-      "Ctrl-4", "Ctrl-F", at(0, 4), "Ctrl--", "Ctrl-2", "Ctrl-F", at(0, 2),
-      "Ctrl-5", "Ctrl-B", at(0, 0));
-
-  sim("motionHWord", "abc. def ghi",
-      "Alt-F", at(0, 3), "Alt-F", at(0, 8),
-      "Ctrl-B", "Alt-B", at(0, 5), "Alt-B", at(0, 0));
-  sim("motionHWordMulti", "abc. def ghi ",
-      "Ctrl-3", "Alt-F", at(0, 12), "Ctrl-2", "Alt-B", at(0, 5),
-      "Ctrl--", "Alt-B", at(0, 8));
-
-  sim("motionVSimple", "a\nb\nc\n", "Ctrl-N", "Ctrl-N", "Ctrl-P", at(1, 0));
-  sim("motionVMulti", "a\nb\nc\nd\ne\n",
-      "Ctrl-2", "Ctrl-N", at(2, 0), "Ctrl-F", "Ctrl--", "Ctrl-N", at(1, 1),
-      "Ctrl--", "Ctrl-3", "Ctrl-P", at(4, 1));
-
-  sim("killYank", "abc\ndef\nghi",
-      "Ctrl-F", "Ctrl-Space", "Ctrl-N", "Ctrl-N", "Ctrl-W", "Ctrl-E", "Ctrl-Y",
-      txt("ahibc\ndef\ng"));
-  sim("killRing", "abcdef",
-      "Ctrl-Space", "Ctrl-F", "Ctrl-W", "Ctrl-Space", "Ctrl-F", "Ctrl-W",
-      "Ctrl-Y", "Alt-Y",
-      txt("acdef"));
-  sim("copyYank", "abcd",
-      "Ctrl-Space", "Ctrl-E", "Alt-W", "Ctrl-Y",
-      txt("abcdabcd"));
-
-  sim("killLineSimple", "foo\nbar", "Ctrl-F", "Ctrl-K", txt("f\nbar"));
-  sim("killLineEmptyLine", "foo\n  \nbar", "Ctrl-N", "Ctrl-K", txt("foo\nbar"));
-  sim("killLineMulti", "foo\nbar\nbaz",
-      "Ctrl-F", "Ctrl-F", "Ctrl-K", "Ctrl-K", "Ctrl-K", "Ctrl-A", "Ctrl-Y",
-      txt("o\nbarfo\nbaz"));
-
-  sim("moveByParagraph", "abc\ndef\n\n\nhij\nklm\n\n",
-      "Ctrl-F", "Ctrl-Down", at(2, 0), "Ctrl-Down", at(6, 0),
-      "Ctrl-N", "Ctrl-Up", at(3, 0), "Ctrl-Up", at(0, 0),
-      Pos(1, 2), "Ctrl-Down", at(2, 0), Pos(4, 2), "Ctrl-Up", at(3, 0));
-  sim("moveByParagraphMulti", "abc\n\ndef\n\nhij\n\nklm",
-      "Ctrl-U", "2", "Ctrl-Down", at(3, 0),
-      "Shift-Alt-.", "Ctrl-3", "Ctrl-Up", at(1, 0));
-
-  sim("moveBySentence", "sentence one! sentence\ntwo\n\nparagraph two",
-      "Alt-E", at(0, 13), "Alt-E", at(1, 3), "Ctrl-F", "Alt-A", at(0, 13));
-
-  sim("moveByExpr", "function foo(a, b) {}",
-      "Ctrl-Alt-F", at(0, 8), "Ctrl-Alt-F", at(0, 12), "Ctrl-Alt-F", at(0, 18),
-      "Ctrl-Alt-B", at(0, 12), "Ctrl-Alt-B", at(0, 9));
-  sim("moveByExprMulti", "foo bar baz bug",
-      "Ctrl-2", "Ctrl-Alt-F", at(0, 7),
-      "Ctrl--", "Ctrl-Alt-F", at(0, 4),
-      "Ctrl--", "Ctrl-2", "Ctrl-Alt-B", at(0, 11));
-  sim("delExpr", "var x = [\n  a,\n  b\n  c\n];",
-      Pos(0, 8), "Ctrl-Alt-K", txt("var x = ;"), "Ctrl-/",
-      Pos(4, 1), "Ctrl-Alt-Backspace", txt("var x = ;"));
-  sim("delExprMulti", "foo bar baz",
-      "Ctrl-2", "Ctrl-Alt-K", txt(" baz"),
-      "Ctrl-/", "Ctrl-E", "Ctrl-2", "Ctrl-Alt-Backspace", txt("foo "));
-
-  sim("justOneSpace", "hi      bye  ",
-      Pos(0, 4), "Alt-Space", txt("hi bye  "),
-      Pos(0, 4), "Alt-Space", txt("hi b ye  "),
-      "Ctrl-A", "Alt-Space", "Ctrl-E", "Alt-Space", txt(" hi b ye "));
-
-  sim("openLine", "foo bar", "Alt-F", "Ctrl-O", txt("foo\n bar"))
-
-  sim("transposeChar", "abcd\ne",
-      "Ctrl-F", "Ctrl-T", "Ctrl-T", txt("bcad\ne"), at(0, 3),
-      "Ctrl-F", "Ctrl-T", "Ctrl-T", "Ctrl-T", txt("bcda\ne"), at(0, 4),
-      "Ctrl-F", "Ctrl-T", txt("bcde\na"), at(1, 0));
-
-  sim("manipWordCase", "foo BAR bAZ",
-      "Alt-C", "Alt-L", "Alt-U", txt("Foo bar BAZ"),
-      "Ctrl-A", "Alt-U", "Alt-L", "Alt-C", txt("FOO bar Baz"));
-  sim("manipWordCaseMulti", "foo Bar bAz",
-      "Ctrl-2", "Alt-U", txt("FOO BAR bAz"),
-      "Ctrl-A", "Ctrl-3", "Alt-C", txt("Foo Bar Baz"));
-
-  sim("upExpr", "foo {\n  bar[];\n  baz(blah);\n}",
-      Pos(2, 7), "Ctrl-Alt-U", at(2, 5), "Ctrl-Alt-U", at(0, 4));
-  sim("transposeExpr", "do foo[bar] dah",
-      Pos(0, 6), "Ctrl-Alt-T", txt("do [bar]foo dah"));
-
-  sim("clearMark", "abcde", Pos(0, 2), "Ctrl-Space", "Ctrl-F", "Ctrl-F",
-      "Ctrl-G", "Ctrl-W", txt("abcde"));
-
-  sim("delRegion", "abcde", "Ctrl-Space", "Ctrl-F", "Ctrl-F", "Delete", txt("cde"));
-  sim("backspaceRegion", "abcde", "Ctrl-Space", "Ctrl-F", "Ctrl-F", "Backspace", txt("cde"));
-
-  testCM("save", function(cm) {
-    var saved = false;
-    CodeMirror.commands.save = function(cm) { saved = cm.getValue(); };
-    cm.triggerOnKeyDown(fakeEvent("Ctrl-X"));
-    cm.triggerOnKeyDown(fakeEvent("Ctrl-S"));
-    is(saved, "hi");
-  }, {value: "hi", keyMap: "emacs"});
-})();
diff --git a/public/js/lib/codemirror/test/index.html b/public/js/lib/codemirror/test/index.html
deleted file mode 100644
index 89f4e37..0000000
--- a/public/js/lib/codemirror/test/index.html
+++ /dev/null
@@ -1,236 +0,0 @@
-<!doctype html>
-
-<title>CodeMirror: Test Suite</title>
-<meta charset="utf-8"/>
-<link rel=stylesheet href="../doc/docs.css">
-
-<link rel="stylesheet" href="../lib/codemirror.css">
-<link rel="stylesheet" href="mode_test.css">
-<script src="../doc/activebookmark.js"></script>
-<script src="../lib/codemirror.js"></script>
-<script src="../addon/mode/overlay.js"></script>
-<script src="../addon/mode/multiplex.js"></script>
-<script src="../addon/search/searchcursor.js"></script>
-<script src="../addon/dialog/dialog.js"></script>
-<script src="../addon/edit/matchbrackets.js"></script>
-<script src="../addon/comment/comment.js"></script>
-<script src="../mode/javascript/javascript.js"></script>
-<script src="../mode/clike/clike.js"></script>
-<script src="../mode/php/php.js"></script>
-<script src="../mode/xml/xml.js"></script>
-<script src="../keymap/vim.js"></script>
-<script src="../keymap/emacs.js"></script>
-<script src="../keymap/sublime.js"></script>
-
-<style type="text/css">
-  .ok {color: #090;}
-  .fail {color: #e00;}
-  .error {color: #c90;}
-  .done {font-weight: bold;}
-  #progress {
-  background: #45d;
-  color: white;
-  text-shadow: 0 0 1px #45d, 0 0 2px #45d, 0 0 3px #45d;
-  font-weight: bold;
-  white-space: pre;
-  }
-  #testground {
-  visibility: hidden;
-  }
-  #testground.offscreen {
-  visibility: visible;
-  position: absolute;
-  left: -10000px;
-  top: -10000px;
-  }
-  .CodeMirror { border: 1px solid black; }
-</style>
-
-<div id=nav>
-  <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../doc/logo.png"></a>
-
-  <ul>
-    <li><a href="../index.html">Home</a>
-    <li><a href="../doc/manual.html">Manual</a>
-    <li><a href="https://github.com/codemirror/codemirror">Code</a>
-  </ul>
-  <ul>
-    <li><a class=active href="#">Test suite</a>
-  </ul>
-</div>
-
-<article>
-  <h2>Test Suite</h2>
-
-    <p>A limited set of programmatic sanity tests for CodeMirror.</p>
-
-    <div style="border: 1px solid black; padding: 1px; max-width: 700px;">
-      <div style="width: 0px;" id=progress><div style="padding: 3px;">Ran <span id="progress_ran">0</span><span id="progress_total"> of 0</span> tests</div></div>
-    </div>
-    <p id=status>Please enable JavaScript...</p>
-    <div id=output></div>
-
-    <div id=testground></div>
-
-    <script src="driver.js"></script>
-    <script src="test.js"></script>
-    <script src="doc_test.js"></script>
-    <script src="multi_test.js"></script>
-    <script src="scroll_test.js"></script>
-    <script src="comment_test.js"></script>
-    <script src="search_test.js"></script>
-    <script src="mode_test.js"></script>
-    <script src="../mode/javascript/test.js"></script>
-    <script src="../mode/php/test.js"></script>
-    <script src="../mode/css/css.js"></script>
-    <script src="../mode/css/test.js"></script>
-    <script src="../mode/css/scss_test.js"></script>
-    <script src="../mode/css/less_test.js"></script>
-    <script src="../mode/xml/xml.js"></script>
-    <script src="../mode/xml/test.js"></script>
-    <script src="../mode/htmlmixed/htmlmixed.js"></script>
-    <script src="../mode/ruby/ruby.js"></script>
-    <script src="../mode/ruby/test.js"></script>
-    <script src="../mode/haml/haml.js"></script>
-    <script src="../mode/haml/test.js"></script>
-    <script src="../mode/markdown/markdown.js"></script>
-    <script src="../mode/markdown/test.js"></script>
-    <script src="../mode/slim/slim.js"></script>
-    <script src="../mode/slim/test.js"></script>
-    <script src="../mode/gfm/gfm.js"></script>
-    <script src="../mode/gfm/test.js"></script>
-    <script src="../mode/shell/shell.js"></script>
-    <script src="../mode/shell/test.js"></script>
-    <script src="../mode/stex/stex.js"></script>
-    <script src="../mode/stex/test.js"></script>
-    <script src="../mode/textile/textile.js"></script>
-    <script src="../mode/textile/test.js"></script>
-    <script src="../mode/verilog/verilog.js"></script>
-    <script src="../mode/verilog/test.js"></script>
-    <script src="../mode/xquery/xquery.js"></script>
-    <script src="../mode/xquery/test.js"></script>
-    <script src="../addon/mode/multiplex_test.js"></script>
-    <script src="vim_test.js"></script>
-    <script src="emacs_test.js"></script>
-    <script src="sublime_test.js"></script>
-    <script>
-      window.onload = runHarness;
-      CodeMirror.on(window, 'hashchange', runHarness);
-
-      function esc(str) {
-        return str.replace(/[<&]/, function(ch) { return ch == "<" ? "&lt;" : "&amp;"; });
-      }
-
-      var output = document.getElementById("output"),
-          progress = document.getElementById("progress"),
-          progressRan = document.getElementById("progress_ran").childNodes[0],
-          progressTotal = document.getElementById("progress_total").childNodes[0];
-      var count = 0,
-          failed = 0,
-          skipped = 0,
-          bad = "",
-          running = false, // Flag that states tests are running
-          quit = false, // Flag to quit tests ASAP
-          verbose = false; // Adds message for *every* test to output
-
-      function runHarness(){
-        if (running) {
-          quit = true;
-          setStatus("Restarting tests...", '', true);
-          setTimeout(function(){runHarness();}, 500);
-          return;
-        }
-        filters = [];
-        verbose = false;
-        if (window.location.hash.substr(1)){
-          var strings = window.location.hash.substr(1).split(",");
-          while (strings.length) {
-            var s = strings.shift();
-            if (s === "verbose")
-              verbose = true;
-            else
-              filters.push(parseTestFilter(decodeURIComponent(s)));;
-          }
-        }
-        quit = false;
-        running = true;
-        setStatus("Loading tests...");
-        count = 0;
-        failed = 0;
-        skipped = 0;
-        bad = "";
-        totalTests = countTests();
-        progressTotal.nodeValue = " of " + totalTests;
-        progressRan.nodeValue = count;
-        output.innerHTML = '';
-        document.getElementById("testground").innerHTML = "<form>" +
-          "<textarea id=\"code\" name=\"code\"></textarea>" +
-          "<input type=submit value=ok name=submit>" +
-          "</form>";
-        runTests(displayTest);
-      }
-
-      function setStatus(message, className, force){
-        if (quit && !force) return;
-        if (!message) throw("must provide message");
-        var status = document.getElementById("status").childNodes[0];
-        status.nodeValue = message;
-        status.parentNode.className = className;
-      }
-      function addOutput(name, className, code){
-        var newOutput = document.createElement("dl");
-        var newTitle = document.createElement("dt");
-        newTitle.className = className;
-        newTitle.appendChild(document.createTextNode(name));
-        newOutput.appendChild(newTitle);
-        var newMessage = document.createElement("dd");
-        newMessage.innerHTML = code;
-        newOutput.appendChild(newTitle);
-        newOutput.appendChild(newMessage);
-        output.appendChild(newOutput);
-      }
-      function displayTest(type, name, customMessage) {
-        var message = "???";
-        if (type != "done" && type != "skipped") ++count;
-        progress.style.width = (count * (progress.parentNode.clientWidth - 2) / totalTests) + "px";
-        progressRan.nodeValue = count;
-        if (type == "ok") {
-          message = "Test '" + name + "' succeeded";
-          if (!verbose) customMessage = false;
-        } else if (type == "skipped") {
-          message = "Test '" + name + "' skipped";
-          ++skipped;
-          if (!verbose) customMessage = false;
-        } else if (type == "expected") {
-          message = "Test '" + name + "' failed as expected";
-          if (!verbose) customMessage = false;
-        } else if (type == "error" || type == "fail") {
-          ++failed;
-          message = "Test '" + name + "' failed";
-        } else if (type == "done") {
-          if (failed) {
-            type += " fail";
-            message = failed + " failure" + (failed > 1 ? "s" : "");
-          } else if (count < totalTests) {
-            failed = totalTests - count;
-            type += " fail";
-            message = failed + " failure" + (failed > 1 ? "s" : "");
-          } else {
-            type += " ok";
-            message = "All passed";
-            if (skipped) {
-              message += " (" + skipped + " skipped)";
-            }
-          }
-          progressTotal.nodeValue = '';
-          customMessage = true; // Hack to avoid adding to output
-        }
-        if (verbose && !customMessage)  customMessage = message;
-        setStatus(message, type);
-        if (customMessage && customMessage.length > 0) {
-          addOutput(name, type, customMessage);
-        }
-      }
-    </script>
-
-</article>
diff --git a/public/js/lib/codemirror/test/lint/acorn.js b/public/js/lib/codemirror/test/lint/acorn.js
deleted file mode 100644
index 0f11931..0000000
--- a/public/js/lib/codemirror/test/lint/acorn.js
+++ /dev/null
@@ -1,1782 +0,0 @@
-// Acorn is a tiny, fast JavaScript parser written in JavaScript.
-//
-// Acorn was written by Marijn Haverbeke and released under an MIT
-// license. The Unicode regexps (for identifiers and whitespace) were
-// taken from [Esprima](http://esprima.org) by Ariya Hidayat.
-//
-// Git repositories for Acorn are available at
-//
-//     http://marijnhaverbeke.nl/git/acorn
-//     https://github.com/marijnh/acorn.git
-//
-// Please use the [github bug tracker][ghbt] to report issues.
-//
-// [ghbt]: https://github.com/marijnh/acorn/issues
-//
-// This file defines the main parser interface. The library also comes
-// with a [error-tolerant parser][dammit] and an
-// [abstract syntax tree walker][walk], defined in other files.
-//
-// [dammit]: acorn_loose.js
-// [walk]: util/walk.js
-
-(function(root, mod) {
-  if (typeof exports == "object" && typeof module == "object") return mod(exports); // CommonJS
-  if (typeof define == "function" && define.amd) return define(["exports"], mod); // AMD
-  mod(root.acorn || (root.acorn = {})); // Plain browser env
-})(this, function(exports) {
-  "use strict";
-
-  exports.version = "0.4.1";
-
-  // The main exported interface (under `self.acorn` when in the
-  // browser) is a `parse` function that takes a code string and
-  // returns an abstract syntax tree as specified by [Mozilla parser
-  // API][api], with the caveat that the SpiderMonkey-specific syntax
-  // (`let`, `yield`, inline XML, etc) is not recognized.
-  //
-  // [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
-
-  var options, input, inputLen, sourceFile;
-
-  exports.parse = function(inpt, opts) {
-    input = String(inpt); inputLen = input.length;
-    setOptions(opts);
-    initTokenState();
-    return parseTopLevel(options.program);
-  };
-
-  // A second optional argument can be given to further configure
-  // the parser process. These options are recognized:
-
-  var defaultOptions = exports.defaultOptions = {
-    // `ecmaVersion` indicates the ECMAScript version to parse. Must
-    // be either 3 or 5. This
-    // influences support for strict mode, the set of reserved words, and
-    // support for getters and setter.
-    ecmaVersion: 5,
-    // Turn on `strictSemicolons` to prevent the parser from doing
-    // automatic semicolon insertion.
-    strictSemicolons: false,
-    // When `allowTrailingCommas` is false, the parser will not allow
-    // trailing commas in array and object literals.
-    allowTrailingCommas: true,
-    // By default, reserved words are not enforced. Enable
-    // `forbidReserved` to enforce them. When this option has the
-    // value "everywhere", reserved words and keywords can also not be
-    // used as property names.
-    forbidReserved: false,
-    // When enabled, a return at the top level is not considered an
-    // error.
-    allowReturnOutsideFunction: false,
-    // When `locations` is on, `loc` properties holding objects with
-    // `start` and `end` properties in `{line, column}` form (with
-    // line being 1-based and column 0-based) will be attached to the
-    // nodes.
-    locations: false,
-    // A function can be passed as `onComment` option, which will
-    // cause Acorn to call that function with `(block, text, start,
-    // end)` parameters whenever a comment is skipped. `block` is a
-    // boolean indicating whether this is a block (`/* */`) comment,
-    // `text` is the content of the comment, and `start` and `end` are
-    // character offsets that denote the start and end of the comment.
-    // When the `locations` option is on, two more parameters are
-    // passed, the full `{line, column}` locations of the start and
-    // end of the comments. Note that you are not allowed to call the
-    // parser from the callback—that will corrupt its internal state.
-    onComment: null,
-    // Nodes have their start and end characters offsets recorded in
-    // `start` and `end` properties (directly on the node, rather than
-    // the `loc` object, which holds line/column data. To also add a
-    // [semi-standardized][range] `range` property holding a `[start,
-    // end]` array with the same numbers, set the `ranges` option to
-    // `true`.
-    //
-    // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
-    ranges: false,
-    // It is possible to parse multiple files into a single AST by
-    // passing the tree produced by parsing the first file as
-    // `program` option in subsequent parses. This will add the
-    // toplevel forms of the parsed file to the `Program` (top) node
-    // of an existing parse tree.
-    program: null,
-    // When `locations` is on, you can pass this to record the source
-    // file in every node's `loc` object.
-    sourceFile: null,
-    // This value, if given, is stored in every node, whether
-    // `locations` is on or off.
-    directSourceFile: null
-  };
-
-  function setOptions(opts) {
-    options = opts || {};
-    for (var opt in defaultOptions) if (!Object.prototype.hasOwnProperty.call(options, opt))
-      options[opt] = defaultOptions[opt];
-    sourceFile = options.sourceFile || null;
-  }
-
-  // The `getLineInfo` function is mostly useful when the
-  // `locations` option is off (for performance reasons) and you
-  // want to find the line/column position for a given character
-  // offset. `input` should be the code string that the offset refers
-  // into.
-
-  var getLineInfo = exports.getLineInfo = function(input, offset) {
-    for (var line = 1, cur = 0;;) {
-      lineBreak.lastIndex = cur;
-      var match = lineBreak.exec(input);
-      if (match && match.index < offset) {
-        ++line;
-        cur = match.index + match[0].length;
-      } else break;
-    }
-    return {line: line, column: offset - cur};
-  };
-
-  // Acorn is organized as a tokenizer and a recursive-descent parser.
-  // The `tokenize` export provides an interface to the tokenizer.
-  // Because the tokenizer is optimized for being efficiently used by
-  // the Acorn parser itself, this interface is somewhat crude and not
-  // very modular. Performing another parse or call to `tokenize` will
-  // reset the internal state, and invalidate existing tokenizers.
-
-  exports.tokenize = function(inpt, opts) {
-    input = String(inpt); inputLen = input.length;
-    setOptions(opts);
-    initTokenState();
-
-    var t = {};
-    function getToken(forceRegexp) {
-      lastEnd = tokEnd;
-      readToken(forceRegexp);
-      t.start = tokStart; t.end = tokEnd;
-      t.startLoc = tokStartLoc; t.endLoc = tokEndLoc;
-      t.type = tokType; t.value = tokVal;
-      return t;
-    }
-    getToken.jumpTo = function(pos, reAllowed) {
-      tokPos = pos;
-      if (options.locations) {
-        tokCurLine = 1;
-        tokLineStart = lineBreak.lastIndex = 0;
-        var match;
-        while ((match = lineBreak.exec(input)) && match.index < pos) {
-          ++tokCurLine;
-          tokLineStart = match.index + match[0].length;
-        }
-      }
-      tokRegexpAllowed = reAllowed;
-      skipSpace();
-    };
-    return getToken;
-  };
-
-  // State is kept in (closure-)global variables. We already saw the
-  // `options`, `input`, and `inputLen` variables above.
-
-  // The current position of the tokenizer in the input.
-
-  var tokPos;
-
-  // The start and end offsets of the current token.
-
-  var tokStart, tokEnd;
-
-  // When `options.locations` is true, these hold objects
-  // containing the tokens start and end line/column pairs.
-
-  var tokStartLoc, tokEndLoc;
-
-  // The type and value of the current token. Token types are objects,
-  // named by variables against which they can be compared, and
-  // holding properties that describe them (indicating, for example,
-  // the precedence of an infix operator, and the original name of a
-  // keyword token). The kind of value that's held in `tokVal` depends
-  // on the type of the token. For literals, it is the literal value,
-  // for operators, the operator name, and so on.
-
-  var tokType, tokVal;
-
-  // Interal state for the tokenizer. To distinguish between division
-  // operators and regular expressions, it remembers whether the last
-  // token was one that is allowed to be followed by an expression.
-  // (If it is, a slash is probably a regexp, if it isn't it's a
-  // division operator. See the `parseStatement` function for a
-  // caveat.)
-
-  var tokRegexpAllowed;
-
-  // When `options.locations` is true, these are used to keep
-  // track of the current line, and know when a new line has been
-  // entered.
-
-  var tokCurLine, tokLineStart;
-
-  // These store the position of the previous token, which is useful
-  // when finishing a node and assigning its `end` position.
-
-  var lastStart, lastEnd, lastEndLoc;
-
-  // This is the parser's state. `inFunction` is used to reject
-  // `return` statements outside of functions, `labels` to verify that
-  // `break` and `continue` have somewhere to jump to, and `strict`
-  // indicates whether strict mode is on.
-
-  var inFunction, labels, strict;
-
-  // This function is used to raise exceptions on parse errors. It
-  // takes an offset integer (into the current `input`) to indicate
-  // the location of the error, attaches the position to the end
-  // of the error message, and then raises a `SyntaxError` with that
-  // message.
-
-  function raise(pos, message) {
-    var loc = getLineInfo(input, pos);
-    message += " (" + loc.line + ":" + loc.column + ")";
-    var err = new SyntaxError(message);
-    err.pos = pos; err.loc = loc; err.raisedAt = tokPos;
-    throw err;
-  }
-
-  // Reused empty array added for node fields that are always empty.
-
-  var empty = [];
-
-  // ## Token types
-
-  // The assignment of fine-grained, information-carrying type objects
-  // allows the tokenizer to store the information it has about a
-  // token in a way that is very cheap for the parser to look up.
-
-  // All token type variables start with an underscore, to make them
-  // easy to recognize.
-
-  // These are the general types. The `type` property is only used to
-  // make them recognizeable when debugging.
-
-  var _num = {type: "num"}, _regexp = {type: "regexp"}, _string = {type: "string"};
-  var _name = {type: "name"}, _eof = {type: "eof"};
-
-  // Keyword tokens. The `keyword` property (also used in keyword-like
-  // operators) indicates that the token originated from an
-  // identifier-like word, which is used when parsing property names.
-  //
-  // The `beforeExpr` property is used to disambiguate between regular
-  // expressions and divisions. It is set on all token types that can
-  // be followed by an expression (thus, a slash after them would be a
-  // regular expression).
-  //
-  // `isLoop` marks a keyword as starting a loop, which is important
-  // to know when parsing a label, in order to allow or disallow
-  // continue jumps to that label.
-
-  var _break = {keyword: "break"}, _case = {keyword: "case", beforeExpr: true}, _catch = {keyword: "catch"};
-  var _continue = {keyword: "continue"}, _debugger = {keyword: "debugger"}, _default = {keyword: "default"};
-  var _do = {keyword: "do", isLoop: true}, _else = {keyword: "else", beforeExpr: true};
-  var _finally = {keyword: "finally"}, _for = {keyword: "for", isLoop: true}, _function = {keyword: "function"};
-  var _if = {keyword: "if"}, _return = {keyword: "return", beforeExpr: true}, _switch = {keyword: "switch"};
-  var _throw = {keyword: "throw", beforeExpr: true}, _try = {keyword: "try"}, _var = {keyword: "var"};
-  var _while = {keyword: "while", isLoop: true}, _with = {keyword: "with"}, _new = {keyword: "new", beforeExpr: true};
-  var _this = {keyword: "this"};
-
-  // The keywords that denote values.
-
-  var _null = {keyword: "null", atomValue: null}, _true = {keyword: "true", atomValue: true};
-  var _false = {keyword: "false", atomValue: false};
-
-  // Some keywords are treated as regular operators. `in` sometimes
-  // (when parsing `for`) needs to be tested against specifically, so
-  // we assign a variable name to it for quick comparing.
-
-  var _in = {keyword: "in", binop: 7, beforeExpr: true};
-
-  // Map keyword names to token types.
-
-  var keywordTypes = {"break": _break, "case": _case, "catch": _catch,
-                      "continue": _continue, "debugger": _debugger, "default": _default,
-                      "do": _do, "else": _else, "finally": _finally, "for": _for,
-                      "function": _function, "if": _if, "return": _return, "switch": _switch,
-                      "throw": _throw, "try": _try, "var": _var, "while": _while, "with": _with,
-                      "null": _null, "true": _true, "false": _false, "new": _new, "in": _in,
-                      "instanceof": {keyword: "instanceof", binop: 7, beforeExpr: true}, "this": _this,
-                      "typeof": {keyword: "typeof", prefix: true, beforeExpr: true},
-                      "void": {keyword: "void", prefix: true, beforeExpr: true},
-                      "delete": {keyword: "delete", prefix: true, beforeExpr: true}};
-
-  // Punctuation token types. Again, the `type` property is purely for debugging.
-
-  var _bracketL = {type: "[", beforeExpr: true}, _bracketR = {type: "]"}, _braceL = {type: "{", beforeExpr: true};
-  var _braceR = {type: "}"}, _parenL = {type: "(", beforeExpr: true}, _parenR = {type: ")"};
-  var _comma = {type: ",", beforeExpr: true}, _semi = {type: ";", beforeExpr: true};
-  var _colon = {type: ":", beforeExpr: true}, _dot = {type: "."}, _question = {type: "?", beforeExpr: true};
-
-  // Operators. These carry several kinds of properties to help the
-  // parser use them properly (the presence of these properties is
-  // what categorizes them as operators).
-  //
-  // `binop`, when present, specifies that this operator is a binary
-  // operator, and will refer to its precedence.
-  //
-  // `prefix` and `postfix` mark the operator as a prefix or postfix
-  // unary operator. `isUpdate` specifies that the node produced by
-  // the operator should be of type UpdateExpression rather than
-  // simply UnaryExpression (`++` and `--`).
-  //
-  // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
-  // binary operators with a very low precedence, that should result
-  // in AssignmentExpression nodes.
-
-  var _slash = {binop: 10, beforeExpr: true}, _eq = {isAssign: true, beforeExpr: true};
-  var _assign = {isAssign: true, beforeExpr: true};
-  var _incDec = {postfix: true, prefix: true, isUpdate: true}, _prefix = {prefix: true, beforeExpr: true};
-  var _logicalOR = {binop: 1, beforeExpr: true};
-  var _logicalAND = {binop: 2, beforeExpr: true};
-  var _bitwiseOR = {binop: 3, beforeExpr: true};
-  var _bitwiseXOR = {binop: 4, beforeExpr: true};
-  var _bitwiseAND = {binop: 5, beforeExpr: true};
-  var _equality = {binop: 6, beforeExpr: true};
-  var _relational = {binop: 7, beforeExpr: true};
-  var _bitShift = {binop: 8, beforeExpr: true};
-  var _plusMin = {binop: 9, prefix: true, beforeExpr: true};
-  var _multiplyModulo = {binop: 10, beforeExpr: true};
-
-  // Provide access to the token types for external users of the
-  // tokenizer.
-
-  exports.tokTypes = {bracketL: _bracketL, bracketR: _bracketR, braceL: _braceL, braceR: _braceR,
-                      parenL: _parenL, parenR: _parenR, comma: _comma, semi: _semi, colon: _colon,
-                      dot: _dot, question: _question, slash: _slash, eq: _eq, name: _name, eof: _eof,
-                      num: _num, regexp: _regexp, string: _string};
-  for (var kw in keywordTypes) exports.tokTypes["_" + kw] = keywordTypes[kw];
-
-  // This is a trick taken from Esprima. It turns out that, on
-  // non-Chrome browsers, to check whether a string is in a set, a
-  // predicate containing a big ugly `switch` statement is faster than
-  // a regular expression, and on Chrome the two are about on par.
-  // This function uses `eval` (non-lexical) to produce such a
-  // predicate from a space-separated string of words.
-  //
-  // It starts by sorting the words by length.
-
-  function makePredicate(words) {
-    words = words.split(" ");
-    var f = "", cats = [];
-    out: for (var i = 0; i < words.length; ++i) {
-      for (var j = 0; j < cats.length; ++j)
-        if (cats[j][0].length == words[i].length) {
-          cats[j].push(words[i]);
-          continue out;
-        }
-      cats.push([words[i]]);
-    }
-    function compareTo(arr) {
-      if (arr.length == 1) return f += "return str === " + JSON.stringify(arr[0]) + ";";
-      f += "switch(str){";
-      for (var i = 0; i < arr.length; ++i) f += "case " + JSON.stringify(arr[i]) + ":";
-      f += "return true}return false;";
-    }
-
-    // When there are more than three length categories, an outer
-    // switch first dispatches on the lengths, to save on comparisons.
-
-    if (cats.length > 3) {
-      cats.sort(function(a, b) {return b.length - a.length;});
-      f += "switch(str.length){";
-      for (var i = 0; i < cats.length; ++i) {
-        var cat = cats[i];
-        f += "case " + cat[0].length + ":";
-        compareTo(cat);
-      }
-      f += "}";
-
-    // Otherwise, simply generate a flat `switch` statement.
-
-    } else {
-      compareTo(words);
-    }
-    return new Function("str", f);
-  }
-
-  // The ECMAScript 3 reserved word list.
-
-  var isReservedWord3 = makePredicate("abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile");
-
-  // ECMAScript 5 reserved words.
-
-  var isReservedWord5 = makePredicate("class enum extends super const export import");
-
-  // The additional reserved words in strict mode.
-
-  var isStrictReservedWord = makePredicate("implements interface let package private protected public static yield");
-
-  // The forbidden variable names in strict mode.
-
-  var isStrictBadIdWord = makePredicate("eval arguments");
-
-  // And the keywords.
-
-  var isKeyword = makePredicate("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this");
-
-  // ## Character categories
-
-  // Big ugly regular expressions that match characters in the
-  // whitespace, identifier, and identifier-start categories. These
-  // are only applied when a character is found to actually have a
-  // code point above 128.
-
-  var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
-  var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
-  var nonASCIIidentifierChars = "\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u0620-\u0649\u0672-\u06d3\u06e7-\u06e8\u06fb-\u06fc\u0730-\u074a\u0800-\u0814\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0840-\u0857\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962-\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09d7\u09df-\u09e0\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5f-\u0b60\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2-\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d46-\u0d48\u0d57\u0d62-\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e34-\u0e3a\u0e40-\u0e45\u0e50-\u0e59\u0eb4-\u0eb9\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f41-\u0f47\u0f71-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1029\u1040-\u1049\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u170e-\u1710\u1720-\u1730\u1740-\u1750\u1772\u1773\u1780-\u17b2\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1920-\u192b\u1930-\u193b\u1951-\u196d\u19b0-\u19c0\u19c8-\u19c9\u19d0-\u19d9\u1a00-\u1a15\u1a20-\u1a53\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b46-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1bb0-\u1bb9\u1be6-\u1bf3\u1c00-\u1c22\u1c40-\u1c49\u1c5b-\u1c7d\u1cd0-\u1cd2\u1d00-\u1dbe\u1e01-\u1f15\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2d81-\u2d96\u2de0-\u2dff\u3021-\u3028\u3099\u309a\ua640-\ua66d\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua7f8-\ua800\ua806\ua80b\ua823-\ua827\ua880-\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8f3-\ua8f7\ua900-\ua909\ua926-\ua92d\ua930-\ua945\ua980-\ua983\ua9b3-\ua9c0\uaa00-\uaa27\uaa40-\uaa41\uaa4c-\uaa4d\uaa50-\uaa59\uaa7b\uaae0-\uaae9\uaaf2-\uaaf3\uabc0-\uabe1\uabec\uabed\uabf0-\uabf9\ufb20-\ufb28\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
-  var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
-  var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
-
-  // Whether a single character denotes a newline.
-
-  var newline = /[\n\r\u2028\u2029]/;
-
-  // Matches a whole line break (where CRLF is considered a single
-  // line break). Used to count lines.
-
-  var lineBreak = /\r\n|[\n\r\u2028\u2029]/g;
-
-  // Test whether a given character code starts an identifier.
-
-  var isIdentifierStart = exports.isIdentifierStart = function(code) {
-    if (code < 65) return code === 36;
-    if (code < 91) return true;
-    if (code < 97) return code === 95;
-    if (code < 123)return true;
-    return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
-  };
-
-  // Test whether a given character is part of an identifier.
-
-  var isIdentifierChar = exports.isIdentifierChar = function(code) {
-    if (code < 48) return code === 36;
-    if (code < 58) return true;
-    if (code < 65) return false;
-    if (code < 91) return true;
-    if (code < 97) return code === 95;
-    if (code < 123)return true;
-    return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
-  };
-
-  // ## Tokenizer
-
-  // These are used when `options.locations` is on, for the
-  // `tokStartLoc` and `tokEndLoc` properties.
-
-  function line_loc_t() {
-    this.line = tokCurLine;
-    this.column = tokPos - tokLineStart;
-  }
-
-  // Reset the token state. Used at the start of a parse.
-
-  function initTokenState() {
-    tokCurLine = 1;
-    tokPos = tokLineStart = 0;
-    tokRegexpAllowed = true;
-    skipSpace();
-  }
-
-  // Called at the end of every token. Sets `tokEnd`, `tokVal`, and
-  // `tokRegexpAllowed`, and skips the space after the token, so that
-  // the next one's `tokStart` will point at the right position.
-
-  function finishToken(type, val) {
-    tokEnd = tokPos;
-    if (options.locations) tokEndLoc = new line_loc_t;
-    tokType = type;
-    skipSpace();
-    tokVal = val;
-    tokRegexpAllowed = type.beforeExpr;
-  }
-
-  function skipBlockComment() {
-    var startLoc = options.onComment && options.locations && new line_loc_t;
-    var start = tokPos, end = input.indexOf("*/", tokPos += 2);
-    if (end === -1) raise(tokPos - 2, "Unterminated comment");
-    tokPos = end + 2;
-    if (options.locations) {
-      lineBreak.lastIndex = start;
-      var match;
-      while ((match = lineBreak.exec(input)) && match.index < tokPos) {
-        ++tokCurLine;
-        tokLineStart = match.index + match[0].length;
-      }
-    }
-    if (options.onComment)
-      options.onComment(true, input.slice(start + 2, end), start, tokPos,
-                        startLoc, options.locations && new line_loc_t);
-  }
-
-  function skipLineComment() {
-    var start = tokPos;
-    var startLoc = options.onComment && options.locations && new line_loc_t;
-    var ch = input.charCodeAt(tokPos+=2);
-    while (tokPos < inputLen && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) {
-      ++tokPos;
-      ch = input.charCodeAt(tokPos);
-    }
-    if (options.onComment)
-      options.onComment(false, input.slice(start + 2, tokPos), start, tokPos,
-                        startLoc, options.locations && new line_loc_t);
-  }
-
-  // Called at the start of the parse and after every token. Skips
-  // whitespace and comments, and.
-
-  function skipSpace() {
-    while (tokPos < inputLen) {
-      var ch = input.charCodeAt(tokPos);
-      if (ch === 32) { // ' '
-        ++tokPos;
-      } else if (ch === 13) {
-        ++tokPos;
-        var next = input.charCodeAt(tokPos);
-        if (next === 10) {
-          ++tokPos;
-        }
-        if (options.locations) {
-          ++tokCurLine;
-          tokLineStart = tokPos;
-        }
-      } else if (ch === 10 || ch === 8232 || ch === 8233) {
-        ++tokPos;
-        if (options.locations) {
-          ++tokCurLine;
-          tokLineStart = tokPos;
-        }
-      } else if (ch > 8 && ch < 14) {
-        ++tokPos;
-      } else if (ch === 47) { // '/'
-        var next = input.charCodeAt(tokPos + 1);
-        if (next === 42) { // '*'
-          skipBlockComment();
-        } else if (next === 47) { // '/'
-          skipLineComment();
-        } else break;
-      } else if (ch === 160) { // '\xa0'
-        ++tokPos;
-      } else if (ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
-        ++tokPos;
-      } else {
-        break;
-      }
-    }
-  }
-
-  // ### Token reading
-
-  // This is the function that is called to fetch the next token. It
-  // is somewhat obscure, because it works in character codes rather
-  // than characters, and because operator parsing has been inlined
-  // into it.
-  //
-  // All in the name of speed.
-  //
-  // The `forceRegexp` parameter is used in the one case where the
-  // `tokRegexpAllowed` trick does not work. See `parseStatement`.
-
-  function readToken_dot() {
-    var next = input.charCodeAt(tokPos + 1);
-    if (next >= 48 && next <= 57) return readNumber(true);
-    ++tokPos;
-    return finishToken(_dot);
-  }
-
-  function readToken_slash() { // '/'
-    var next = input.charCodeAt(tokPos + 1);
-    if (tokRegexpAllowed) {++tokPos; return readRegexp();}
-    if (next === 61) return finishOp(_assign, 2);
-    return finishOp(_slash, 1);
-  }
-
-  function readToken_mult_modulo() { // '%*'
-    var next = input.charCodeAt(tokPos + 1);
-    if (next === 61) return finishOp(_assign, 2);
-    return finishOp(_multiplyModulo, 1);
-  }
-
-  function readToken_pipe_amp(code) { // '|&'
-    var next = input.charCodeAt(tokPos + 1);
-    if (next === code) return finishOp(code === 124 ? _logicalOR : _logicalAND, 2);
-    if (next === 61) return finishOp(_assign, 2);
-    return finishOp(code === 124 ? _bitwiseOR : _bitwiseAND, 1);
-  }
-
-  function readToken_caret() { // '^'
-    var next = input.charCodeAt(tokPos + 1);
-    if (next === 61) return finishOp(_assign, 2);
-    return finishOp(_bitwiseXOR, 1);
-  }
-
-  function readToken_plus_min(code) { // '+-'
-    var next = input.charCodeAt(tokPos + 1);
-    if (next === code) {
-      if (next == 45 && input.charCodeAt(tokPos + 2) == 62 &&
-          newline.test(input.slice(lastEnd, tokPos))) {
-        // A `-->` line comment
-        tokPos += 3;
-        skipLineComment();
-        skipSpace();
-        return readToken();
-      }
-      return finishOp(_incDec, 2);
-    }
-    if (next === 61) return finishOp(_assign, 2);
-    return finishOp(_plusMin, 1);
-  }
-
-  function readToken_lt_gt(code) { // '<>'
-    var next = input.charCodeAt(tokPos + 1);
-    var size = 1;
-    if (next === code) {
-      size = code === 62 && input.charCodeAt(tokPos + 2) === 62 ? 3 : 2;
-      if (input.charCodeAt(tokPos + size) === 61) return finishOp(_assign, size + 1);
-      return finishOp(_bitShift, size);
-    }
-    if (next == 33 && code == 60 && input.charCodeAt(tokPos + 2) == 45 &&
-        input.charCodeAt(tokPos + 3) == 45) {
-      // `<!--`, an XML-style comment that should be interpreted as a line comment
-      tokPos += 4;
-      skipLineComment();
-      skipSpace();
-      return readToken();
-    }
-    if (next === 61)
-      size = input.charCodeAt(tokPos + 2) === 61 ? 3 : 2;
-    return finishOp(_relational, size);
-  }
-
-  function readToken_eq_excl(code) { // '=!'
-    var next = input.charCodeAt(tokPos + 1);
-    if (next === 61) return finishOp(_equality, input.charCodeAt(tokPos + 2) === 61 ? 3 : 2);
-    return finishOp(code === 61 ? _eq : _prefix, 1);
-  }
-
-  function getTokenFromCode(code) {
-    switch(code) {
-      // The interpretation of a dot depends on whether it is followed
-      // by a digit.
-    case 46: // '.'
-      return readToken_dot();
-
-      // Punctuation tokens.
-    case 40: ++tokPos; return finishToken(_parenL);
-    case 41: ++tokPos; return finishToken(_parenR);
-    case 59: ++tokPos; return finishToken(_semi);
-    case 44: ++tokPos; return finishToken(_comma);
-    case 91: ++tokPos; return finishToken(_bracketL);
-    case 93: ++tokPos; return finishToken(_bracketR);
-    case 123: ++tokPos; return finishToken(_braceL);
-    case 125: ++tokPos; return finishToken(_braceR);
-    case 58: ++tokPos; return finishToken(_colon);
-    case 63: ++tokPos; return finishToken(_question);
-
-      // '0x' is a hexadecimal number.
-    case 48: // '0'
-      var next = input.charCodeAt(tokPos + 1);
-      if (next === 120 || next === 88) return readHexNumber();
-      // Anything else beginning with a digit is an integer, octal
-      // number, or float.
-    case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: // 1-9
-      return readNumber(false);
-
-      // Quotes produce strings.
-    case 34: case 39: // '"', "'"
-      return readString(code);
-
-    // Operators are parsed inline in tiny state machines. '=' (61) is
-    // often referred to. `finishOp` simply skips the amount of
-    // characters it is given as second argument, and returns a token
-    // of the type given by its first argument.
-
-    case 47: // '/'
-      return readToken_slash(code);
-
-    case 37: case 42: // '%*'
-      return readToken_mult_modulo();
-
-    case 124: case 38: // '|&'
-      return readToken_pipe_amp(code);
-
-    case 94: // '^'
-      return readToken_caret();
-
-    case 43: case 45: // '+-'
-      return readToken_plus_min(code);
-
-    case 60: case 62: // '<>'
-      return readToken_lt_gt(code);
-
-    case 61: case 33: // '=!'
-      return readToken_eq_excl(code);
-
-    case 126: // '~'
-      return finishOp(_prefix, 1);
-    }
-
-    return false;
-  }
-
-  function readToken(forceRegexp) {
-    if (!forceRegexp) tokStart = tokPos;
-    else tokPos = tokStart + 1;
-    if (options.locations) tokStartLoc = new line_loc_t;
-    if (forceRegexp) return readRegexp();
-    if (tokPos >= inputLen) return finishToken(_eof);
-
-    var code = input.charCodeAt(tokPos);
-    // Identifier or keyword. '\uXXXX' sequences are allowed in
-    // identifiers, so '\' also dispatches to that.
-    if (isIdentifierStart(code) || code === 92 /* '\' */) return readWord();
-
-    var tok = getTokenFromCode(code);
-
-    if (tok === false) {
-      // If we are here, we either found a non-ASCII identifier
-      // character, or something that's entirely disallowed.
-      var ch = String.fromCharCode(code);
-      if (ch === "\\" || nonASCIIidentifierStart.test(ch)) return readWord();
-      raise(tokPos, "Unexpected character '" + ch + "'");
-    }
-    return tok;
-  }
-
-  function finishOp(type, size) {
-    var str = input.slice(tokPos, tokPos + size);
-    tokPos += size;
-    finishToken(type, str);
-  }
-
-  // Parse a regular expression. Some context-awareness is necessary,
-  // since a '/' inside a '[]' set does not end the expression.
-
-  function readRegexp() {
-    var content = "", escaped, inClass, start = tokPos;
-    for (;;) {
-      if (tokPos >= inputLen) raise(start, "Unterminated regular expression");
-      var ch = input.charAt(tokPos);
-      if (newline.test(ch)) raise(start, "Unterminated regular expression");
-      if (!escaped) {
-        if (ch === "[") inClass = true;
-        else if (ch === "]" && inClass) inClass = false;
-        else if (ch === "/" && !inClass) break;
-        escaped = ch === "\\";
-      } else escaped = false;
-      ++tokPos;
-    }
-    var content = input.slice(start, tokPos);
-    ++tokPos;
-    // Need to use `readWord1` because '\uXXXX' sequences are allowed
-    // here (don't ask).
-    var mods = readWord1();
-    if (mods && !/^[gmsiy]*$/.test(mods)) raise(start, "Invalid regexp flag");
-    try {
-      var value = new RegExp(content, mods);
-    } catch (e) {
-      if (e instanceof SyntaxError) raise(start, e.message);
-      raise(e);
-    }
-    return finishToken(_regexp, value);
-  }
-
-  // Read an integer in the given radix. Return null if zero digits
-  // were read, the integer value otherwise. When `len` is given, this
-  // will return `null` unless the integer has exactly `len` digits.
-
-  function readInt(radix, len) {
-    var start = tokPos, total = 0;
-    for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) {
-      var code = input.charCodeAt(tokPos), val;
-      if (code >= 97) val = code - 97 + 10; // a
-      else if (code >= 65) val = code - 65 + 10; // A
-      else if (code >= 48 && code <= 57) val = code - 48; // 0-9
-      else val = Infinity;
-      if (val >= radix) break;
-      ++tokPos;
-      total = total * radix + val;
-    }
-    if (tokPos === start || len != null && tokPos - start !== len) return null;
-
-    return total;
-  }
-
-  function readHexNumber() {
-    tokPos += 2; // 0x
-    var val = readInt(16);
-    if (val == null) raise(tokStart + 2, "Expected hexadecimal number");
-    if (isIdentifierStart(input.charCodeAt(tokPos))) raise(tokPos, "Identifier directly after number");
-    return finishToken(_num, val);
-  }
-
-  // Read an integer, octal integer, or floating-point number.
-
-  function readNumber(startsWithDot) {
-    var start = tokPos, isFloat = false, octal = input.charCodeAt(tokPos) === 48;
-    if (!startsWithDot && readInt(10) === null) raise(start, "Invalid number");
-    if (input.charCodeAt(tokPos) === 46) {
-      ++tokPos;
-      readInt(10);
-      isFloat = true;
-    }
-    var next = input.charCodeAt(tokPos);
-    if (next === 69 || next === 101) { // 'eE'
-      next = input.charCodeAt(++tokPos);
-      if (next === 43 || next === 45) ++tokPos; // '+-'
-      if (readInt(10) === null) raise(start, "Invalid number");
-      isFloat = true;
-    }
-    if (isIdentifierStart(input.charCodeAt(tokPos))) raise(tokPos, "Identifier directly after number");
-
-    var str = input.slice(start, tokPos), val;
-    if (isFloat) val = parseFloat(str);
-    else if (!octal || str.length === 1) val = parseInt(str, 10);
-    else if (/[89]/.test(str) || strict) raise(start, "Invalid number");
-    else val = parseInt(str, 8);
-    return finishToken(_num, val);
-  }
-
-  // Read a string value, interpreting backslash-escapes.
-
-  function readString(quote) {
-    tokPos++;
-    var out = "";
-    for (;;) {
-      if (tokPos >= inputLen) raise(tokStart, "Unterminated string constant");
-      var ch = input.charCodeAt(tokPos);
-      if (ch === quote) {
-        ++tokPos;
-        return finishToken(_string, out);
-      }
-      if (ch === 92) { // '\'
-        ch = input.charCodeAt(++tokPos);
-        var octal = /^[0-7]+/.exec(input.slice(tokPos, tokPos + 3));
-        if (octal) octal = octal[0];
-        while (octal && parseInt(octal, 8) > 255) octal = octal.slice(0, -1);
-        if (octal === "0") octal = null;
-        ++tokPos;
-        if (octal) {
-          if (strict) raise(tokPos - 2, "Octal literal in strict mode");
-          out += String.fromCharCode(parseInt(octal, 8));
-          tokPos += octal.length - 1;
-        } else {
-          switch (ch) {
-          case 110: out += "\n"; break; // 'n' -> '\n'
-          case 114: out += "\r"; break; // 'r' -> '\r'
-          case 120: out += String.fromCharCode(readHexChar(2)); break; // 'x'
-          case 117: out += String.fromCharCode(readHexChar(4)); break; // 'u'
-          case 85: out += String.fromCharCode(readHexChar(8)); break; // 'U'
-          case 116: out += "\t"; break; // 't' -> '\t'
-          case 98: out += "\b"; break; // 'b' -> '\b'
-          case 118: out += "\u000b"; break; // 'v' -> '\u000b'
-          case 102: out += "\f"; break; // 'f' -> '\f'
-          case 48: out += "\0"; break; // 0 -> '\0'
-          case 13: if (input.charCodeAt(tokPos) === 10) ++tokPos; // '\r\n'
-          case 10: // ' \n'
-            if (options.locations) { tokLineStart = tokPos; ++tokCurLine; }
-            break;
-          default: out += String.fromCharCode(ch); break;
-          }
-        }
-      } else {
-        if (ch === 13 || ch === 10 || ch === 8232 || ch === 8233) raise(tokStart, "Unterminated string constant");
-        out += String.fromCharCode(ch); // '\'
-        ++tokPos;
-      }
-    }
-  }
-
-  // Used to read character escape sequences ('\x', '\u', '\U').
-
-  function readHexChar(len) {
-    var n = readInt(16, len);
-    if (n === null) raise(tokStart, "Bad character escape sequence");
-    return n;
-  }
-
-  // Used to signal to callers of `readWord1` whether the word
-  // contained any escape sequences. This is needed because words with
-  // escape sequences must not be interpreted as keywords.
-
-  var containsEsc;
-
-  // Read an identifier, and return it as a string. Sets `containsEsc`
-  // to whether the word contained a '\u' escape.
-  //
-  // Only builds up the word character-by-character when it actually
-  // containeds an escape, as a micro-optimization.
-
-  function readWord1() {
-    containsEsc = false;
-    var word, first = true, start = tokPos;
-    for (;;) {
-      var ch = input.charCodeAt(tokPos);
-      if (isIdentifierChar(ch)) {
-        if (containsEsc) word += input.charAt(tokPos);
-        ++tokPos;
-      } else if (ch === 92) { // "\"
-        if (!containsEsc) word = input.slice(start, tokPos);
-        containsEsc = true;
-        if (input.charCodeAt(++tokPos) != 117) // "u"
-          raise(tokPos, "Expecting Unicode escape sequence \\uXXXX");
-        ++tokPos;
-        var esc = readHexChar(4);
-        var escStr = String.fromCharCode(esc);
-        if (!escStr) raise(tokPos - 1, "Invalid Unicode escape");
-        if (!(first ? isIdentifierStart(esc) : isIdentifierChar(esc)))
-          raise(tokPos - 4, "Invalid Unicode escape");
-        word += escStr;
-      } else {
-        break;
-      }
-      first = false;
-    }
-    return containsEsc ? word : input.slice(start, tokPos);
-  }
-
-  // Read an identifier or keyword token. Will check for reserved
-  // words when necessary.
-
-  function readWord() {
-    var word = readWord1();
-    var type = _name;
-    if (!containsEsc && isKeyword(word))
-      type = keywordTypes[word];
-    return finishToken(type, word);
-  }
-
-  // ## Parser
-
-  // A recursive descent parser operates by defining functions for all
-  // syntactic elements, and recursively calling those, each function
-  // advancing the input stream and returning an AST node. Precedence
-  // of constructs (for example, the fact that `!x[1]` means `!(x[1])`
-  // instead of `(!x)[1]` is handled by the fact that the parser
-  // function that parses unary prefix operators is called first, and
-  // in turn calls the function that parses `[]` subscripts — that
-  // way, it'll receive the node for `x[1]` already parsed, and wraps
-  // *that* in the unary operator node.
-  //
-  // Acorn uses an [operator precedence parser][opp] to handle binary
-  // operator precedence, because it is much more compact than using
-  // the technique outlined above, which uses different, nesting
-  // functions to specify precedence, for all of the ten binary
-  // precedence levels that JavaScript defines.
-  //
-  // [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser
-
-  // ### Parser utilities
-
-  // Continue to the next token.
-
-  function next() {
-    lastStart = tokStart;
-    lastEnd = tokEnd;
-    lastEndLoc = tokEndLoc;
-    readToken();
-  }
-
-  // Enter strict mode. Re-reads the next token to please pedantic
-  // tests ("use strict"; 010; -- should fail).
-
-  function setStrict(strct) {
-    strict = strct;
-    tokPos = tokStart;
-    if (options.locations) {
-      while (tokPos < tokLineStart) {
-        tokLineStart = input.lastIndexOf("\n", tokLineStart - 2) + 1;
-        --tokCurLine;
-      }
-    }
-    skipSpace();
-    readToken();
-  }
-
-  // Start an AST node, attaching a start offset.
-
-  function node_t() {
-    this.type = null;
-    this.start = tokStart;
-    this.end = null;
-  }
-
-  function node_loc_t() {
-    this.start = tokStartLoc;
-    this.end = null;
-    if (sourceFile !== null) this.source = sourceFile;
-  }
-
-  function startNode() {
-    var node = new node_t();
-    if (options.locations)
-      node.loc = new node_loc_t();
-    if (options.directSourceFile)
-      node.sourceFile = options.directSourceFile;
-    if (options.ranges)
-      node.range = [tokStart, 0];
-    return node;
-  }
-
-  // Start a node whose start offset information should be based on
-  // the start of another node. For example, a binary operator node is
-  // only started after its left-hand side has already been parsed.
-
-  function startNodeFrom(other) {
-    var node = new node_t();
-    node.start = other.start;
-    if (options.locations) {
-      node.loc = new node_loc_t();
-      node.loc.start = other.loc.start;
-    }
-    if (options.ranges)
-      node.range = [other.range[0], 0];
-
-    return node;
-  }
-
-  // Finish an AST node, adding `type` and `end` properties.
-
-  function finishNode(node, type) {
-    node.type = type;
-    node.end = lastEnd;
-    if (options.locations)
-      node.loc.end = lastEndLoc;
-    if (options.ranges)
-      node.range[1] = lastEnd;
-    return node;
-  }
-
-  // Test whether a statement node is the string literal `"use strict"`.
-
-  function isUseStrict(stmt) {
-    return options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" &&
-      stmt.expression.type === "Literal" && stmt.expression.value === "use strict";
-  }
-
-  // Predicate that tests whether the next token is of the given
-  // type, and if yes, consumes it as a side effect.
-
-  function eat(type) {
-    if (tokType === type) {
-      next();
-      return true;
-    }
-  }
-
-  // Test whether a semicolon can be inserted at the current position.
-
-  function canInsertSemicolon() {
-    return !options.strictSemicolons &&
-      (tokType === _eof || tokType === _braceR || newline.test(input.slice(lastEnd, tokStart)));
-  }
-
-  // Consume a semicolon, or, failing that, see if we are allowed to
-  // pretend that there is a semicolon at this position.
-
-  function semicolon() {
-    if (!eat(_semi) && !canInsertSemicolon()) unexpected();
-  }
-
-  // Expect a token of a given type. If found, consume it, otherwise,
-  // raise an unexpected token error.
-
-  function expect(type) {
-    if (tokType === type) next();
-    else unexpected();
-  }
-
-  // Raise an unexpected token error.
-
-  function unexpected() {
-    raise(tokStart, "Unexpected token");
-  }
-
-  // Verify that a node is an lval — something that can be assigned
-  // to.
-
-  function checkLVal(expr) {
-    if (expr.type !== "Identifier" && expr.type !== "MemberExpression")
-      raise(expr.start, "Assigning to rvalue");
-    if (strict && expr.type === "Identifier" && isStrictBadIdWord(expr.name))
-      raise(expr.start, "Assigning to " + expr.name + " in strict mode");
-  }
-
-  // ### Statement parsing
-
-  // Parse a program. Initializes the parser, reads any number of
-  // statements, and wraps them in a Program node.  Optionally takes a
-  // `program` argument.  If present, the statements will be appended
-  // to its body instead of creating a new node.
-
-  function parseTopLevel(program) {
-    lastStart = lastEnd = tokPos;
-    if (options.locations) lastEndLoc = new line_loc_t;
-    inFunction = strict = null;
-    labels = [];
-    readToken();
-
-    var node = program || startNode(), first = true;
-    if (!program) node.body = [];
-    while (tokType !== _eof) {
-      var stmt = parseStatement();
-      node.body.push(stmt);
-      if (first && isUseStrict(stmt)) setStrict(true);
-      first = false;
-    }
-    return finishNode(node, "Program");
-  }
-
-  var loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"};
-
-  // Parse a single statement.
-  //
-  // If expecting a statement and finding a slash operator, parse a
-  // regular expression literal. This is to handle cases like
-  // `if (foo) /blah/.exec(foo);`, where looking at the previous token
-  // does not help.
-
-  function parseStatement() {
-    if (tokType === _slash || tokType === _assign && tokVal == "/=")
-      readToken(true);
-
-    var starttype = tokType, node = startNode();
-
-    // Most types of statements are recognized by the keyword they
-    // start with. Many are trivial to parse, some require a bit of
-    // complexity.
-
-    switch (starttype) {
-    case _break: case _continue:
-      next();
-      var isBreak = starttype === _break;
-      if (eat(_semi) || canInsertSemicolon()) node.label = null;
-      else if (tokType !== _name) unexpected();
-      else {
-        node.label = parseIdent();
-        semicolon();
-      }
-
-      // Verify that there is an actual destination to break or
-      // continue to.
-      for (var i = 0; i < labels.length; ++i) {
-        var lab = labels[i];
-        if (node.label == null || lab.name === node.label.name) {
-          if (lab.kind != null && (isBreak || lab.kind === "loop")) break;
-          if (node.label && isBreak) break;
-        }
-      }
-      if (i === labels.length) raise(node.start, "Unsyntactic " + starttype.keyword);
-      return finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
-
-    case _debugger:
-      next();
-      semicolon();
-      return finishNode(node, "DebuggerStatement");
-
-    case _do:
-      next();
-      labels.push(loopLabel);
-      node.body = parseStatement();
-      labels.pop();
-      expect(_while);
-      node.test = parseParenExpression();
-      semicolon();
-      return finishNode(node, "DoWhileStatement");
-
-      // Disambiguating between a `for` and a `for`/`in` loop is
-      // non-trivial. Basically, we have to parse the init `var`
-      // statement or expression, disallowing the `in` operator (see
-      // the second parameter to `parseExpression`), and then check
-      // whether the next token is `in`. When there is no init part
-      // (semicolon immediately after the opening parenthesis), it is
-      // a regular `for` loop.
-
-    case _for:
-      next();
-      labels.push(loopLabel);
-      expect(_parenL);
-      if (tokType === _semi) return parseFor(node, null);
-      if (tokType === _var) {
-        var init = startNode();
-        next();
-        parseVar(init, true);
-        finishNode(init, "VariableDeclaration");
-        if (init.declarations.length === 1 && eat(_in))
-          return parseForIn(node, init);
-        return parseFor(node, init);
-      }
-      var init = parseExpression(false, true);
-      if (eat(_in)) {checkLVal(init); return parseForIn(node, init);}
-      return parseFor(node, init);
-
-    case _function:
-      next();
-      return parseFunction(node, true);
-
-    case _if:
-      next();
-      node.test = parseParenExpression();
-      node.consequent = parseStatement();
-      node.alternate = eat(_else) ? parseStatement() : null;
-      return finishNode(node, "IfStatement");
-
-    case _return:
-      if (!inFunction && !options.allowReturnOutsideFunction)
-        raise(tokStart, "'return' outside of function");
-      next();
-
-      // In `return` (and `break`/`continue`), the keywords with
-      // optional arguments, we eagerly look for a semicolon or the
-      // possibility to insert one.
-
-      if (eat(_semi) || canInsertSemicolon()) node.argument = null;
-      else { node.argument = parseExpression(); semicolon(); }
-      return finishNode(node, "ReturnStatement");
-
-    case _switch:
-      next();
-      node.discriminant = parseParenExpression();
-      node.cases = [];
-      expect(_braceL);
-      labels.push(switchLabel);
-
-      // Statements under must be grouped (by label) in SwitchCase
-      // nodes. `cur` is used to keep the node that we are currently
-      // adding statements to.
-
-      for (var cur, sawDefault; tokType != _braceR;) {
-        if (tokType === _case || tokType === _default) {
-          var isCase = tokType === _case;
-          if (cur) finishNode(cur, "SwitchCase");
-          node.cases.push(cur = startNode());
-          cur.consequent = [];
-          next();
-          if (isCase) cur.test = parseExpression();
-          else {
-            if (sawDefault) raise(lastStart, "Multiple default clauses"); sawDefault = true;
-            cur.test = null;
-          }
-          expect(_colon);
-        } else {
-          if (!cur) unexpected();
-          cur.consequent.push(parseStatement());
-        }
-      }
-      if (cur) finishNode(cur, "SwitchCase");
-      next(); // Closing brace
-      labels.pop();
-      return finishNode(node, "SwitchStatement");
-
-    case _throw:
-      next();
-      if (newline.test(input.slice(lastEnd, tokStart)))
-        raise(lastEnd, "Illegal newline after throw");
-      node.argument = parseExpression();
-      semicolon();
-      return finishNode(node, "ThrowStatement");
-
-    case _try:
-      next();
-      node.block = parseBlock();
-      node.handler = null;
-      if (tokType === _catch) {
-        var clause = startNode();
-        next();
-        expect(_parenL);
-        clause.param = parseIdent();
-        if (strict && isStrictBadIdWord(clause.param.name))
-          raise(clause.param.start, "Binding " + clause.param.name + " in strict mode");
-        expect(_parenR);
-        clause.guard = null;
-        clause.body = parseBlock();
-        node.handler = finishNode(clause, "CatchClause");
-      }
-      node.guardedHandlers = empty;
-      node.finalizer = eat(_finally) ? parseBlock() : null;
-      if (!node.handler && !node.finalizer)
-        raise(node.start, "Missing catch or finally clause");
-      return finishNode(node, "TryStatement");
-
-    case _var:
-      next();
-      parseVar(node);
-      semicolon();
-      return finishNode(node, "VariableDeclaration");
-
-    case _while:
-      next();
-      node.test = parseParenExpression();
-      labels.push(loopLabel);
-      node.body = parseStatement();
-      labels.pop();
-      return finishNode(node, "WhileStatement");
-
-    case _with:
-      if (strict) raise(tokStart, "'with' in strict mode");
-      next();
-      node.object = parseParenExpression();
-      node.body = parseStatement();
-      return finishNode(node, "WithStatement");
-
-    case _braceL:
-      return parseBlock();
-
-    case _semi:
-      next();
-      return finishNode(node, "EmptyStatement");
-
-      // If the statement does not start with a statement keyword or a
-      // brace, it's an ExpressionStatement or LabeledStatement. We
-      // simply start parsing an expression, and afterwards, if the
-      // next token is a colon and the expression was a simple
-      // Identifier node, we switch to interpreting it as a label.
-
-    default:
-      var maybeName = tokVal, expr = parseExpression();
-      if (starttype === _name && expr.type === "Identifier" && eat(_colon)) {
-        for (var i = 0; i < labels.length; ++i)
-          if (labels[i].name === maybeName) raise(expr.start, "Label '" + maybeName + "' is already declared");
-        var kind = tokType.isLoop ? "loop" : tokType === _switch ? "switch" : null;
-        labels.push({name: maybeName, kind: kind});
-        node.body = parseStatement();
-        labels.pop();
-        node.label = expr;
-        return finishNode(node, "LabeledStatement");
-      } else {
-        node.expression = expr;
-        semicolon();
-        return finishNode(node, "ExpressionStatement");
-      }
-    }
-  }
-
-  // Used for constructs like `switch` and `if` that insist on
-  // parentheses around their expression.
-
-  function parseParenExpression() {
-    expect(_parenL);
-    var val = parseExpression();
-    expect(_parenR);
-    return val;
-  }
-
-  // Parse a semicolon-enclosed block of statements, handling `"use
-  // strict"` declarations when `allowStrict` is true (used for
-  // function bodies).
-
-  function parseBlock(allowStrict) {
-    var node = startNode(), first = true, strict = false, oldStrict;
-    node.body = [];
-    expect(_braceL);
-    while (!eat(_braceR)) {
-      var stmt = parseStatement();
-      node.body.push(stmt);
-      if (first && allowStrict && isUseStrict(stmt)) {
-        oldStrict = strict;
-        setStrict(strict = true);
-      }
-      first = false;
-    }
-    if (strict && !oldStrict) setStrict(false);
-    return finishNode(node, "BlockStatement");
-  }
-
-  // Parse a regular `for` loop. The disambiguation code in
-  // `parseStatement` will already have parsed the init statement or
-  // expression.
-
-  function parseFor(node, init) {
-    node.init = init;
-    expect(_semi);
-    node.test = tokType === _semi ? null : parseExpression();
-    expect(_semi);
-    node.update = tokType === _parenR ? null : parseExpression();
-    expect(_parenR);
-    node.body = parseStatement();
-    labels.pop();
-    return finishNode(node, "ForStatement");
-  }
-
-  // Parse a `for`/`in` loop.
-
-  function parseForIn(node, init) {
-    node.left = init;
-    node.right = parseExpression();
-    expect(_parenR);
-    node.body = parseStatement();
-    labels.pop();
-    return finishNode(node, "ForInStatement");
-  }
-
-  // Parse a list of variable declarations.
-
-  function parseVar(node, noIn) {
-    node.declarations = [];
-    node.kind = "var";
-    for (;;) {
-      var decl = startNode();
-      decl.id = parseIdent();
-      if (strict && isStrictBadIdWord(decl.id.name))
-        raise(decl.id.start, "Binding " + decl.id.name + " in strict mode");
-      decl.init = eat(_eq) ? parseExpression(true, noIn) : null;
-      node.declarations.push(finishNode(decl, "VariableDeclarator"));
-      if (!eat(_comma)) break;
-    }
-    return node;
-  }
-
-  // ### Expression parsing
-
-  // These nest, from the most general expression type at the top to
-  // 'atomic', nondivisible expression types at the bottom. Most of
-  // the functions will simply let the function(s) below them parse,
-  // and, *if* the syntactic construct they handle is present, wrap
-  // the AST node that the inner parser gave them in another node.
-
-  // Parse a full expression. The arguments are used to forbid comma
-  // sequences (in argument lists, array literals, or object literals)
-  // or the `in` operator (in for loops initalization expressions).
-
-  function parseExpression(noComma, noIn) {
-    var expr = parseMaybeAssign(noIn);
-    if (!noComma && tokType === _comma) {
-      var node = startNodeFrom(expr);
-      node.expressions = [expr];
-      while (eat(_comma)) node.expressions.push(parseMaybeAssign(noIn));
-      return finishNode(node, "SequenceExpression");
-    }
-    return expr;
-  }
-
-  // Parse an assignment expression. This includes applications of
-  // operators like `+=`.
-
-  function parseMaybeAssign(noIn) {
-    var left = parseMaybeConditional(noIn);
-    if (tokType.isAssign) {
-      var node = startNodeFrom(left);
-      node.operator = tokVal;
-      node.left = left;
-      next();
-      node.right = parseMaybeAssign(noIn);
-      checkLVal(left);
-      return finishNode(node, "AssignmentExpression");
-    }
-    return left;
-  }
-
-  // Parse a ternary conditional (`?:`) operator.
-
-  function parseMaybeConditional(noIn) {
-    var expr = parseExprOps(noIn);
-    if (eat(_question)) {
-      var node = startNodeFrom(expr);
-      node.test = expr;
-      node.consequent = parseExpression(true);
-      expect(_colon);
-      node.alternate = parseExpression(true, noIn);
-      return finishNode(node, "ConditionalExpression");
-    }
-    return expr;
-  }
-
-  // Start the precedence parser.
-
-  function parseExprOps(noIn) {
-    return parseExprOp(parseMaybeUnary(), -1, noIn);
-  }
-
-  // Parse binary operators with the operator precedence parsing
-  // algorithm. `left` is the left-hand side of the operator.
-  // `minPrec` provides context that allows the function to stop and
-  // defer further parser to one of its callers when it encounters an
-  // operator that has a lower precedence than the set it is parsing.
-
-  function parseExprOp(left, minPrec, noIn) {
-    var prec = tokType.binop;
-    if (prec != null && (!noIn || tokType !== _in)) {
-      if (prec > minPrec) {
-        var node = startNodeFrom(left);
-        node.left = left;
-        node.operator = tokVal;
-        var op = tokType;
-        next();
-        node.right = parseExprOp(parseMaybeUnary(), prec, noIn);
-        var exprNode = finishNode(node, (op === _logicalOR || op === _logicalAND) ? "LogicalExpression" : "BinaryExpression");
-        return parseExprOp(exprNode, minPrec, noIn);
-      }
-    }
-    return left;
-  }
-
-  // Parse unary operators, both prefix and postfix.
-
-  function parseMaybeUnary() {
-    if (tokType.prefix) {
-      var node = startNode(), update = tokType.isUpdate;
-      node.operator = tokVal;
-      node.prefix = true;
-      tokRegexpAllowed = true;
-      next();
-      node.argument = parseMaybeUnary();
-      if (update) checkLVal(node.argument);
-      else if (strict && node.operator === "delete" &&
-               node.argument.type === "Identifier")
-        raise(node.start, "Deleting local variable in strict mode");
-      return finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
-    }
-    var expr = parseExprSubscripts();
-    while (tokType.postfix && !canInsertSemicolon()) {
-      var node = startNodeFrom(expr);
-      node.operator = tokVal;
-      node.prefix = false;
-      node.argument = expr;
-      checkLVal(expr);
-      next();
-      expr = finishNode(node, "UpdateExpression");
-    }
-    return expr;
-  }
-
-  // Parse call, dot, and `[]`-subscript expressions.
-
-  function parseExprSubscripts() {
-    return parseSubscripts(parseExprAtom());
-  }
-
-  function parseSubscripts(base, noCalls) {
-    if (eat(_dot)) {
-      var node = startNodeFrom(base);
-      node.object = base;
-      node.property = parseIdent(true);
-      node.computed = false;
-      return parseSubscripts(finishNode(node, "MemberExpression"), noCalls);
-    } else if (eat(_bracketL)) {
-      var node = startNodeFrom(base);
-      node.object = base;
-      node.property = parseExpression();
-      node.computed = true;
-      expect(_bracketR);
-      return parseSubscripts(finishNode(node, "MemberExpression"), noCalls);
-    } else if (!noCalls && eat(_parenL)) {
-      var node = startNodeFrom(base);
-      node.callee = base;
-      node.arguments = parseExprList(_parenR, false);
-      return parseSubscripts(finishNode(node, "CallExpression"), noCalls);
-    } else return base;
-  }
-
-  // Parse an atomic expression — either a single token that is an
-  // expression, an expression started by a keyword like `function` or
-  // `new`, or an expression wrapped in punctuation like `()`, `[]`,
-  // or `{}`.
-
-  function parseExprAtom() {
-    switch (tokType) {
-    case _this:
-      var node = startNode();
-      next();
-      return finishNode(node, "ThisExpression");
-    case _name:
-      return parseIdent();
-    case _num: case _string: case _regexp:
-      var node = startNode();
-      node.value = tokVal;
-      node.raw = input.slice(tokStart, tokEnd);
-      next();
-      return finishNode(node, "Literal");
-
-    case _null: case _true: case _false:
-      var node = startNode();
-      node.value = tokType.atomValue;
-      node.raw = tokType.keyword;
-      next();
-      return finishNode(node, "Literal");
-
-    case _parenL:
-      var tokStartLoc1 = tokStartLoc, tokStart1 = tokStart;
-      next();
-      var val = parseExpression();
-      val.start = tokStart1;
-      val.end = tokEnd;
-      if (options.locations) {
-        val.loc.start = tokStartLoc1;
-        val.loc.end = tokEndLoc;
-      }
-      if (options.ranges)
-        val.range = [tokStart1, tokEnd];
-      expect(_parenR);
-      return val;
-
-    case _bracketL:
-      var node = startNode();
-      next();
-      node.elements = parseExprList(_bracketR, true, true);
-      return finishNode(node, "ArrayExpression");
-
-    case _braceL:
-      return parseObj();
-
-    case _function:
-      var node = startNode();
-      next();
-      return parseFunction(node, false);
-
-    case _new:
-      return parseNew();
-
-    default:
-      unexpected();
-    }
-  }
-
-  // New's precedence is slightly tricky. It must allow its argument
-  // to be a `[]` or dot subscript expression, but not a call — at
-  // least, not without wrapping it in parentheses. Thus, it uses the
-
-  function parseNew() {
-    var node = startNode();
-    next();
-    node.callee = parseSubscripts(parseExprAtom(), true);
-    if (eat(_parenL)) node.arguments = parseExprList(_parenR, false);
-    else node.arguments = empty;
-    return finishNode(node, "NewExpression");
-  }
-
-  // Parse an object literal.
-
-  function parseObj() {
-    var node = startNode(), first = true, sawGetSet = false;
-    node.properties = [];
-    next();
-    while (!eat(_braceR)) {
-      if (!first) {
-        expect(_comma);
-        if (options.allowTrailingCommas && eat(_braceR)) break;
-      } else first = false;
-
-      var prop = {key: parsePropertyName()}, isGetSet = false, kind;
-      if (eat(_colon)) {
-        prop.value = parseExpression(true);
-        kind = prop.kind = "init";
-      } else if (options.ecmaVersion >= 5 && prop.key.type === "Identifier" &&
-                 (prop.key.name === "get" || prop.key.name === "set")) {
-        isGetSet = sawGetSet = true;
-        kind = prop.kind = prop.key.name;
-        prop.key = parsePropertyName();
-        if (tokType !== _parenL) unexpected();
-        prop.value = parseFunction(startNode(), false);
-      } else unexpected();
-
-      // getters and setters are not allowed to clash — either with
-      // each other or with an init property — and in strict mode,
-      // init properties are also not allowed to be repeated.
-
-      if (prop.key.type === "Identifier" && (strict || sawGetSet)) {
-        for (var i = 0; i < node.properties.length; ++i) {
-          var other = node.properties[i];
-          if (other.key.name === prop.key.name) {
-            var conflict = kind == other.kind || isGetSet && other.kind === "init" ||
-              kind === "init" && (other.kind === "get" || other.kind === "set");
-            if (conflict && !strict && kind === "init" && other.kind === "init") conflict = false;
-            if (conflict) raise(prop.key.start, "Redefinition of property");
-          }
-        }
-      }
-      node.properties.push(prop);
-    }
-    return finishNode(node, "ObjectExpression");
-  }
-
-  function parsePropertyName() {
-    if (tokType === _num || tokType === _string) return parseExprAtom();
-    return parseIdent(true);
-  }
-
-  // Parse a function declaration or literal (depending on the
-  // `isStatement` parameter).
-
-  function parseFunction(node, isStatement) {
-    if (tokType === _name) node.id = parseIdent();
-    else if (isStatement) unexpected();
-    else node.id = null;
-    node.params = [];
-    var first = true;
-    expect(_parenL);
-    while (!eat(_parenR)) {
-      if (!first) expect(_comma); else first = false;
-      node.params.push(parseIdent());
-    }
-
-    // Start a new scope with regard to labels and the `inFunction`
-    // flag (restore them to their old value afterwards).
-    var oldInFunc = inFunction, oldLabels = labels;
-    inFunction = true; labels = [];
-    node.body = parseBlock(true);
-    inFunction = oldInFunc; labels = oldLabels;
-
-    // If this is a strict mode function, verify that argument names
-    // are not repeated, and it does not try to bind the words `eval`
-    // or `arguments`.
-    if (strict || node.body.body.length && isUseStrict(node.body.body[0])) {
-      for (var i = node.id ? -1 : 0; i < node.params.length; ++i) {
-        var id = i < 0 ? node.id : node.params[i];
-        if (isStrictReservedWord(id.name) || isStrictBadIdWord(id.name))
-          raise(id.start, "Defining '" + id.name + "' in strict mode");
-        if (i >= 0) for (var j = 0; j < i; ++j) if (id.name === node.params[j].name)
-          raise(id.start, "Argument name clash in strict mode");
-      }
-    }
-
-    return finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression");
-  }
-
-  // Parses a comma-separated list of expressions, and returns them as
-  // an array. `close` is the token type that ends the list, and
-  // `allowEmpty` can be turned on to allow subsequent commas with
-  // nothing in between them to be parsed as `null` (which is needed
-  // for array literals).
-
-  function parseExprList(close, allowTrailingComma, allowEmpty) {
-    var elts = [], first = true;
-    while (!eat(close)) {
-      if (!first) {
-        expect(_comma);
-        if (allowTrailingComma && options.allowTrailingCommas && eat(close)) break;
-      } else first = false;
-
-      if (allowEmpty && tokType === _comma) elts.push(null);
-      else elts.push(parseExpression(true));
-    }
-    return elts;
-  }
-
-  // Parse the next token as an identifier. If `liberal` is true (used
-  // when parsing properties), it will also convert keywords into
-  // identifiers.
-
-  function parseIdent(liberal) {
-    var node = startNode();
-    if (liberal && options.forbidReserved == "everywhere") liberal = false;
-    if (tokType === _name) {
-      if (!liberal &&
-          (options.forbidReserved &&
-           (options.ecmaVersion === 3 ? isReservedWord3 : isReservedWord5)(tokVal) ||
-           strict && isStrictReservedWord(tokVal)) &&
-          input.slice(tokStart, tokEnd).indexOf("\\") == -1)
-        raise(tokStart, "The keyword '" + tokVal + "' is reserved");
-      node.name = tokVal;
-    } else if (liberal && tokType.keyword) {
-      node.name = tokType.keyword;
-    } else {
-      unexpected();
-    }
-    tokRegexpAllowed = false;
-    next();
-    return finishNode(node, "Identifier");
-  }
-
-});
diff --git a/public/js/lib/codemirror/test/lint/lint.js b/public/js/lib/codemirror/test/lint/lint.js
deleted file mode 100644
index b024829..0000000
--- a/public/js/lib/codemirror/test/lint/lint.js
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- Simple linter, based on the Acorn [1] parser module
-
- All of the existing linters either cramp my style or have huge
- dependencies (Closure). So here's a very simple, non-invasive one
- that only spots
-
-  - missing semicolons and trailing commas
-  - variables or properties that are reserved words
-  - assigning to a variable you didn't declare
-  - access to non-whitelisted globals
-    (use a '// declare global: foo, bar' comment to declare extra
-    globals in a file)
-
- [1]: https://github.com/marijnh/acorn/
-*/
-
-var topAllowedGlobals = Object.create(null);
-("Error RegExp Number String Array Function Object Math Date undefined " +
- "parseInt parseFloat Infinity NaN isNaN " +
- "window document navigator prompt alert confirm console " +
- "screen FileReader Worker postMessage importScripts " +
- "setInterval clearInterval setTimeout clearTimeout " +
- "CodeMirror " +
- "test exports require module define requirejs")
-  .split(" ").forEach(function(n) { topAllowedGlobals[n] = true; });
-
-var fs = require("fs"), acorn = require("./acorn.js"), walk = require("./walk.js");
-
-var scopePasser = walk.make({
-  ScopeBody: function(node, prev, c) { c(node, node.scope); }
-});
-
-var cBlob = /^\/\/ CodeMirror, copyright \(c\) by Marijn Haverbeke and others\n\/\/ Distributed under an MIT license: http:\/\/codemirror.net\/LICENSE\n\n/;
-
-function checkFile(fileName) {
-  var file = fs.readFileSync(fileName, "utf8"), notAllowed;
-  if (notAllowed = file.match(/[\x00-\x08\x0b\x0c\x0e-\x19\uFEFF\t]|[ \t]\n/)) {
-    var msg;
-    if (notAllowed[0] == "\t") msg = "Found tab character";
-    else if (notAllowed[0].indexOf("\n") > -1) msg = "Trailing whitespace";
-    else msg = "Undesirable character " + notAllowed[0].charCodeAt(0);
-    var info = acorn.getLineInfo(file, notAllowed.index);
-    fail(msg + " at line " + info.line + ", column " + info.column, {source: fileName});
-  }
-
-  if (!cBlob.test(file))
-    fail("Missing license blob", {source: fileName});
-  
-  var globalsSeen = Object.create(null);
-
-  try {
-    var parsed = acorn.parse(file, {
-      locations: true,
-      ecmaVersion: 3,
-      strictSemicolons: true,
-      allowTrailingCommas: false,
-      forbidReserved: "everywhere",
-      sourceFile: fileName
-    });
-  } catch (e) {
-    fail(e.message, {source: fileName});
-    return;
-  }
-
-  var scopes = [];
-
-  walk.simple(parsed, {
-    ScopeBody: function(node, scope) {
-      node.scope = scope;
-      scopes.push(scope);
-    }
-  }, walk.scopeVisitor, {vars: Object.create(null)});
-
-  var ignoredGlobals = Object.create(null);
-
-  function inScope(name, scope) {
-    for (var cur = scope; cur; cur = cur.prev)
-      if (name in cur.vars) return true;
-  }
-  function checkLHS(node, scope) {
-    if (node.type == "Identifier" && !(node.name in ignoredGlobals) &&
-        !inScope(node.name, scope)) {
-      ignoredGlobals[node.name] = true;
-      fail("Assignment to global variable", node.loc);
-    }
-  }
-
-  walk.simple(parsed, {
-    UpdateExpression: function(node, scope) {checkLHS(node.argument, scope);},
-    AssignmentExpression: function(node, scope) {checkLHS(node.left, scope);},
-    Identifier: function(node, scope) {
-      if (node.name == "arguments") return;
-      // Mark used identifiers
-      for (var cur = scope; cur; cur = cur.prev)
-        if (node.name in cur.vars) {
-          cur.vars[node.name].used = true;
-          return;
-        }
-      globalsSeen[node.name] = node.loc;
-    },
-    FunctionExpression: function(node) {
-      if (node.id) fail("Named function expression", node.loc);
-    },
-    ForStatement: function(node) {
-      checkReusedIndex(node);
-    },
-    MemberExpression: function(node) {
-      if (node.object.type == "Identifier" && node.object.name == "console" && !node.computed)
-        fail("Found console." + node.property.name, node.loc);
-    },
-    DebuggerStatement: function(node) {
-      fail("Found debugger statement", node.loc);
-    }
-  }, scopePasser);
-
-  function checkReusedIndex(node) {
-    if (!node.init || node.init.type != "VariableDeclaration") return;
-    var name = node.init.declarations[0].id.name;
-    walk.recursive(node.body, null, {
-      Function: function() {},
-      VariableDeclaration: function(node, st, c) {
-        for (var i = 0; i < node.declarations.length; i++)
-          if (node.declarations[i].id.name == name)
-            fail("redefined loop variable", node.declarations[i].id.loc);
-        walk.base.VariableDeclaration(node, st, c);
-      }
-    });
-  }
-
-  var allowedGlobals = Object.create(topAllowedGlobals), m;
-  if (m = file.match(/\/\/ declare global:\s+(.*)/))
-    m[1].split(/,\s*/g).forEach(function(n) { allowedGlobals[n] = true; });
-  for (var glob in globalsSeen)
-    if (!(glob in allowedGlobals))
-      fail("Access to global variable " + glob + ". Add a '// declare global: " + glob +
-           "' comment or add this variable in test/lint/lint.js.", globalsSeen[glob]);
-
-  for (var i = 0; i < scopes.length; ++i) {
-    var scope = scopes[i];
-    for (var name in scope.vars) {
-      var info = scope.vars[name];
-      if (!info.used && info.type != "catch clause" && info.type != "function name" && name.charAt(0) != "_")
-        fail("Unused " + info.type + " " + name, info.node.loc);
-    }
-  }
-}
-
-var failed = false;
-function fail(msg, pos) {
-  if (pos.start) msg += " (" + pos.start.line + ":" + pos.start.column + ")";
-  console.log(pos.source + ": " + msg);
-  failed = true;
-}
-
-function checkDir(dir) {
-  fs.readdirSync(dir).forEach(function(file) {
-    var fname = dir + "/" + file;
-    if (/\.js$/.test(file)) checkFile(fname);
-    else if (fs.lstatSync(fname).isDirectory()) checkDir(fname);
-  });
-}
-
-exports.checkDir = checkDir;
-exports.checkFile = checkFile;
-exports.success = function() { return !failed; };
diff --git a/public/js/lib/codemirror/test/lint/walk.js b/public/js/lib/codemirror/test/lint/walk.js
deleted file mode 100644
index 4c0d9a7..0000000
--- a/public/js/lib/codemirror/test/lint/walk.js
+++ /dev/null
@@ -1,313 +0,0 @@
-// AST walker module for Mozilla Parser API compatible trees
-
-(function(mod) {
-  if (typeof exports == "object" && typeof module == "object") return mod(exports); // CommonJS
-  if (typeof define == "function" && define.amd) return define(["exports"], mod); // AMD
-  mod((this.acorn || (this.acorn = {})).walk = {}); // Plain browser env
-})(function(exports) {
-  "use strict";
-
-  // A simple walk is one where you simply specify callbacks to be
-  // called on specific nodes. The last two arguments are optional. A
-  // simple use would be
-  //
-  //     walk.simple(myTree, {
-  //         Expression: function(node) { ... }
-  //     });
-  //
-  // to do something with all expressions. All Parser API node types
-  // can be used to identify node types, as well as Expression,
-  // Statement, and ScopeBody, which denote categories of nodes.
-  //
-  // The base argument can be used to pass a custom (recursive)
-  // walker, and state can be used to give this walked an initial
-  // state.
-  exports.simple = function(node, visitors, base, state) {
-    if (!base) base = exports.base;
-    function c(node, st, override) {
-      var type = override || node.type, found = visitors[type];
-      base[type](node, st, c);
-      if (found) found(node, st);
-    }
-    c(node, state);
-  };
-
-  // A recursive walk is one where your functions override the default
-  // walkers. They can modify and replace the state parameter that's
-  // threaded through the walk, and can opt how and whether to walk
-  // their child nodes (by calling their third argument on these
-  // nodes).
-  exports.recursive = function(node, state, funcs, base) {
-    var visitor = funcs ? exports.make(funcs, base) : base;
-    function c(node, st, override) {
-      visitor[override || node.type](node, st, c);
-    }
-    c(node, state);
-  };
-
-  function makeTest(test) {
-    if (typeof test == "string")
-      return function(type) { return type == test; };
-    else if (!test)
-      return function() { return true; };
-    else
-      return test;
-  }
-
-  function Found(node, state) { this.node = node; this.state = state; }
-
-  // Find a node with a given start, end, and type (all are optional,
-  // null can be used as wildcard). Returns a {node, state} object, or
-  // undefined when it doesn't find a matching node.
-  exports.findNodeAt = function(node, start, end, test, base, state) {
-    test = makeTest(test);
-    try {
-      if (!base) base = exports.base;
-      var c = function(node, st, override) {
-        var type = override || node.type;
-        if ((start == null || node.start <= start) &&
-            (end == null || node.end >= end))
-          base[type](node, st, c);
-        if (test(type, node) &&
-            (start == null || node.start == start) &&
-            (end == null || node.end == end))
-          throw new Found(node, st);
-      };
-      c(node, state);
-    } catch (e) {
-      if (e instanceof Found) return e;
-      throw e;
-    }
-  };
-
-  // Find the innermost node of a given type that contains the given
-  // position. Interface similar to findNodeAt.
-  exports.findNodeAround = function(node, pos, test, base, state) {
-    test = makeTest(test);
-    try {
-      if (!base) base = exports.base;
-      var c = function(node, st, override) {
-        var type = override || node.type;
-        if (node.start > pos || node.end < pos) return;
-        base[type](node, st, c);
-        if (test(type, node)) throw new Found(node, st);
-      };
-      c(node, state);
-    } catch (e) {
-      if (e instanceof Found) return e;
-      throw e;
-    }
-  };
-
-  // Find the outermost matching node after a given position.
-  exports.findNodeAfter = function(node, pos, test, base, state) {
-    test = makeTest(test);
-    try {
-      if (!base) base = exports.base;
-      var c = function(node, st, override) {
-        if (node.end < pos) return;
-        var type = override || node.type;
-        if (node.start >= pos && test(type, node)) throw new Found(node, st);
-        base[type](node, st, c);
-      };
-      c(node, state);
-    } catch (e) {
-      if (e instanceof Found) return e;
-      throw e;
-    }
-  };
-
-  // Find the outermost matching node before a given position.
-  exports.findNodeBefore = function(node, pos, test, base, state) {
-    test = makeTest(test);
-    if (!base) base = exports.base;
-    var max;
-    var c = function(node, st, override) {
-      if (node.start > pos) return;
-      var type = override || node.type;
-      if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))
-        max = new Found(node, st);
-      base[type](node, st, c);
-    };
-    c(node, state);
-    return max;
-  };
-
-  // Used to create a custom walker. Will fill in all missing node
-  // type properties with the defaults.
-  exports.make = function(funcs, base) {
-    if (!base) base = exports.base;
-    var visitor = {};
-    for (var type in base) visitor[type] = base[type];
-    for (var type in funcs) visitor[type] = funcs[type];
-    return visitor;
-  };
-
-  function skipThrough(node, st, c) { c(node, st); }
-  function ignore(_node, _st, _c) {}
-
-  // Node walkers.
-
-  var base = exports.base = {};
-  base.Program = base.BlockStatement = function(node, st, c) {
-    for (var i = 0; i < node.body.length; ++i)
-      c(node.body[i], st, "Statement");
-  };
-  base.Statement = skipThrough;
-  base.EmptyStatement = ignore;
-  base.ExpressionStatement = function(node, st, c) {
-    c(node.expression, st, "Expression");
-  };
-  base.IfStatement = function(node, st, c) {
-    c(node.test, st, "Expression");
-    c(node.consequent, st, "Statement");
-    if (node.alternate) c(node.alternate, st, "Statement");
-  };
-  base.LabeledStatement = function(node, st, c) {
-    c(node.body, st, "Statement");
-  };
-  base.BreakStatement = base.ContinueStatement = ignore;
-  base.WithStatement = function(node, st, c) {
-    c(node.object, st, "Expression");
-    c(node.body, st, "Statement");
-  };
-  base.SwitchStatement = function(node, st, c) {
-    c(node.discriminant, st, "Expression");
-    for (var i = 0; i < node.cases.length; ++i) {
-      var cs = node.cases[i];
-      if (cs.test) c(cs.test, st, "Expression");
-      for (var j = 0; j < cs.consequent.length; ++j)
-        c(cs.consequent[j], st, "Statement");
-    }
-  };
-  base.ReturnStatement = function(node, st, c) {
-    if (node.argument) c(node.argument, st, "Expression");
-  };
-  base.ThrowStatement = function(node, st, c) {
-    c(node.argument, st, "Expression");
-  };
-  base.TryStatement = function(node, st, c) {
-    c(node.block, st, "Statement");
-    if (node.handler) c(node.handler.body, st, "ScopeBody");
-    if (node.finalizer) c(node.finalizer, st, "Statement");
-  };
-  base.WhileStatement = function(node, st, c) {
-    c(node.test, st, "Expression");
-    c(node.body, st, "Statement");
-  };
-  base.DoWhileStatement = base.WhileStatement;
-  base.ForStatement = function(node, st, c) {
-    if (node.init) c(node.init, st, "ForInit");
-    if (node.test) c(node.test, st, "Expression");
-    if (node.update) c(node.update, st, "Expression");
-    c(node.body, st, "Statement");
-  };
-  base.ForInStatement = function(node, st, c) {
-    c(node.left, st, "ForInit");
-    c(node.right, st, "Expression");
-    c(node.body, st, "Statement");
-  };
-  base.ForInit = function(node, st, c) {
-    if (node.type == "VariableDeclaration") c(node, st);
-    else c(node, st, "Expression");
-  };
-  base.DebuggerStatement = ignore;
-
-  base.FunctionDeclaration = function(node, st, c) {
-    c(node, st, "Function");
-  };
-  base.VariableDeclaration = function(node, st, c) {
-    for (var i = 0; i < node.declarations.length; ++i) {
-      var decl = node.declarations[i];
-      if (decl.init) c(decl.init, st, "Expression");
-    }
-  };
-
-  base.Function = function(node, st, c) {
-    c(node.body, st, "ScopeBody");
-  };
-  base.ScopeBody = function(node, st, c) {
-    c(node, st, "Statement");
-  };
-
-  base.Expression = skipThrough;
-  base.ThisExpression = ignore;
-  base.ArrayExpression = function(node, st, c) {
-    for (var i = 0; i < node.elements.length; ++i) {
-      var elt = node.elements[i];
-      if (elt) c(elt, st, "Expression");
-    }
-  };
-  base.ObjectExpression = function(node, st, c) {
-    for (var i = 0; i < node.properties.length; ++i)
-      c(node.properties[i].value, st, "Expression");
-  };
-  base.FunctionExpression = base.FunctionDeclaration;
-  base.SequenceExpression = function(node, st, c) {
-    for (var i = 0; i < node.expressions.length; ++i)
-      c(node.expressions[i], st, "Expression");
-  };
-  base.UnaryExpression = base.UpdateExpression = function(node, st, c) {
-    c(node.argument, st, "Expression");
-  };
-  base.BinaryExpression = base.AssignmentExpression = base.LogicalExpression = function(node, st, c) {
-    c(node.left, st, "Expression");
-    c(node.right, st, "Expression");
-  };
-  base.ConditionalExpression = function(node, st, c) {
-    c(node.test, st, "Expression");
-    c(node.consequent, st, "Expression");
-    c(node.alternate, st, "Expression");
-  };
-  base.NewExpression = base.CallExpression = function(node, st, c) {
-    c(node.callee, st, "Expression");
-    if (node.arguments) for (var i = 0; i < node.arguments.length; ++i)
-      c(node.arguments[i], st, "Expression");
-  };
-  base.MemberExpression = function(node, st, c) {
-    c(node.object, st, "Expression");
-    if (node.computed) c(node.property, st, "Expression");
-  };
-  base.Identifier = base.Literal = ignore;
-
-  // A custom walker that keeps track of the scope chain and the
-  // variables defined in it.
-  function makeScope(prev, isCatch) {
-    return {vars: Object.create(null), prev: prev, isCatch: isCatch};
-  }
-  function normalScope(scope) {
-    while (scope.isCatch) scope = scope.prev;
-    return scope;
-  }
-  exports.scopeVisitor = exports.make({
-    Function: function(node, scope, c) {
-      var inner = makeScope(scope);
-      for (var i = 0; i < node.params.length; ++i)
-        inner.vars[node.params[i].name] = {type: "argument", node: node.params[i]};
-      if (node.id) {
-        var decl = node.type == "FunctionDeclaration";
-        (decl ? normalScope(scope) : inner).vars[node.id.name] =
-          {type: decl ? "function" : "function name", node: node.id};
-      }
-      c(node.body, inner, "ScopeBody");
-    },
-    TryStatement: function(node, scope, c) {
-      c(node.block, scope, "Statement");
-      if (node.handler) {
-        var inner = makeScope(scope, true);
-        inner.vars[node.handler.param.name] = {type: "catch clause", node: node.handler.param};
-        c(node.handler.body, inner, "ScopeBody");
-      }
-      if (node.finalizer) c(node.finalizer, scope, "Statement");
-    },
-    VariableDeclaration: function(node, scope, c) {
-      var target = normalScope(scope);
-      for (var i = 0; i < node.declarations.length; ++i) {
-        var decl = node.declarations[i];
-        target.vars[decl.id.name] = {type: "var", node: decl.id};
-        if (decl.init) c(decl.init, scope, "Expression");
-      }
-    }
-  });
-
-});
diff --git a/public/js/lib/codemirror/test/mode_test.css b/public/js/lib/codemirror/test/mode_test.css
deleted file mode 100644
index f83271b..0000000
--- a/public/js/lib/codemirror/test/mode_test.css
+++ /dev/null
@@ -1,23 +0,0 @@
-.mt-output .mt-token {
-  border: 1px solid #ddd;
-  white-space: pre;
-  font-family: "Consolas", monospace;
-  text-align: center;
-}
-
-.mt-output .mt-style {
-  font-size: x-small;
-}
-
-.mt-output .mt-state {
-  font-size: x-small;
-  vertical-align: top;
-}
-
-.mt-output .mt-state-row {
-  display: none;
-}
-
-.mt-state-unhide .mt-output .mt-state-row {
-  display: table-row;
-}
diff --git a/public/js/lib/codemirror/test/mode_test.js b/public/js/lib/codemirror/test/mode_test.js
deleted file mode 100644
index 2e16eba..0000000
--- a/public/js/lib/codemirror/test/mode_test.js
+++ /dev/null
@@ -1,192 +0,0 @@
-/**
- * Helper to test CodeMirror highlighting modes. It pretty prints output of the
- * highlighter and can check against expected styles.
- *
- * Mode tests are registered by calling test.mode(testName, mode,
- * tokens), where mode is a mode object as returned by
- * CodeMirror.getMode, and tokens is an array of lines that make up
- * the test.
- *
- * These lines are strings, in which styled stretches of code are
- * enclosed in brackets `[]`, and prefixed by their style. For
- * example, `[keyword if]`. Brackets in the code itself must be
- * duplicated to prevent them from being interpreted as token
- * boundaries. For example `a[[i]]` for `a[i]`. If a token has
- * multiple styles, the styles must be separated by ampersands, for
- * example `[tag&error </hmtl>]`.
- *
- * See the test.js files in the css, markdown, gfm, and stex mode
- * directories for examples.
- */
-(function() {
-  function findSingle(str, pos, ch) {
-    for (;;) {
-      var found = str.indexOf(ch, pos);
-      if (found == -1) return null;
-      if (str.charAt(found + 1) != ch) return found;
-      pos = found + 2;
-    }
-  }
-
-  var styleName = /[\w&-_]+/g;
-  function parseTokens(strs) {
-    var tokens = [], plain = "";
-    for (var i = 0; i < strs.length; ++i) {
-      if (i) plain += "\n";
-      var str = strs[i], pos = 0;
-      while (pos < str.length) {
-        var style = null, text;
-        if (str.charAt(pos) == "[" && str.charAt(pos+1) != "[") {
-          styleName.lastIndex = pos + 1;
-          var m = styleName.exec(str);
-          style = m[0].replace(/&/g, " ");
-          var textStart = pos + style.length + 2;
-          var end = findSingle(str, textStart, "]");
-          if (end == null) throw new Error("Unterminated token at " + pos + " in '" + str + "'" + style);
-          text = str.slice(textStart, end);
-          pos = end + 1;
-        } else {
-          var end = findSingle(str, pos, "[");
-          if (end == null) end = str.length;
-          text = str.slice(pos, end);
-          pos = end;
-        }
-        text = text.replace(/\[\[|\]\]/g, function(s) {return s.charAt(0);});
-        tokens.push({style: style, text: text});
-        plain += text;
-      }
-    }
-    return {tokens: tokens, plain: plain};
-  }
-
-  test.mode = function(name, mode, tokens, modeName) {
-    var data = parseTokens(tokens);
-    return test((modeName || mode.name) + "_" + name, function() {
-      return compare(data.plain, data.tokens, mode);
-    });
-  };
-
-  function esc(str) {
-    return str.replace('&', '&amp;').replace('<', '&lt;').replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
-;
-  }
-
-  function compare(text, expected, mode) {
-
-    var expectedOutput = [];
-    for (var i = 0; i < expected.length; ++i) {
-      var sty = expected[i].style;
-      if (sty && sty.indexOf(" ")) sty = sty.split(' ').sort().join(' ');
-      expectedOutput.push({style: sty, text: expected[i].text});
-    }
-
-    var observedOutput = highlight(text, mode);
-
-    var s = "";
-    var diff = highlightOutputsDifferent(expectedOutput, observedOutput);
-    if (diff != null) {
-      s += '<div class="mt-test mt-fail">';
-      s +=   '<pre>' + esc(text) + '</pre>';
-      s +=   '<div class="cm-s-default">';
-      s += 'expected:';
-      s +=   prettyPrintOutputTable(expectedOutput, diff);
-      s += 'observed: [<a onclick="this.parentElement.className+=\' mt-state-unhide\'">display states</a>]';
-      s +=   prettyPrintOutputTable(observedOutput, diff);
-      s +=   '</div>';
-      s += '</div>';
-    }
-    if (observedOutput.indentFailures) {
-      for (var i = 0; i < observedOutput.indentFailures.length; i++)
-        s += "<div class='mt-test mt-fail'>" + esc(observedOutput.indentFailures[i]) + "</div>";
-    }
-    if (s) throw new Failure(s);
-  }
-
-  function stringify(obj) {
-    function replacer(key, obj) {
-      if (typeof obj == "function") {
-        var m = obj.toString().match(/function\s*[^\s(]*/);
-        return m ? m[0] : "function";
-      }
-      return obj;
-    }
-    if (window.JSON && JSON.stringify)
-      return JSON.stringify(obj, replacer, 2);
-    return "[unsupported]";  // Fail safely if no native JSON.
-  }
-
-  function highlight(string, mode) {
-    var state = mode.startState();
-
-    var lines = string.replace(/\r\n/g,'\n').split('\n');
-    var st = [], pos = 0;
-    for (var i = 0; i < lines.length; ++i) {
-      var line = lines[i], newLine = true;
-      if (mode.indent) {
-        var ws = line.match(/^\s*/)[0];
-        var indent = mode.indent(state, line.slice(ws.length));
-        if (indent != CodeMirror.Pass && indent != ws.length)
-          (st.indentFailures || (st.indentFailures = [])).push(
-            "Indentation of line " + (i + 1) + " is " + indent + " (expected " + ws.length + ")");
-      }
-      var stream = new CodeMirror.StringStream(line);
-      if (line == "" && mode.blankLine) mode.blankLine(state);
-      /* Start copied code from CodeMirror.highlight */
-      while (!stream.eol()) {
-        for (var j = 0; j < 10 && stream.start >= stream.pos; j++)
-          var compare = mode.token(stream, state);
-        if (j == 10)
-          throw new Failure("Failed to advance the stream." + stream.string + " " + stream.pos);
-        var substr = stream.current();
-        if (compare && compare.indexOf(" ") > -1) compare = compare.split(' ').sort().join(' ');
-        stream.start = stream.pos;
-        if (pos && st[pos-1].style == compare && !newLine) {
-          st[pos-1].text += substr;
-        } else if (substr) {
-          st[pos++] = {style: compare, text: substr, state: stringify(state)};
-        }
-        // Give up when line is ridiculously long
-        if (stream.pos > 5000) {
-          st[pos++] = {style: null, text: this.text.slice(stream.pos)};
-          break;
-        }
-        newLine = false;
-      }
-    }
-
-    return st;
-  }
-
-  function highlightOutputsDifferent(o1, o2) {
-    var minLen = Math.min(o1.length, o2.length);
-    for (var i = 0; i < minLen; ++i)
-      if (o1[i].style != o2[i].style || o1[i].text != o2[i].text) return i;
-    if (o1.length > minLen || o2.length > minLen) return minLen;
-  }
-
-  function prettyPrintOutputTable(output, diffAt) {
-    var s = '<table class="mt-output">';
-    s += '<tr>';
-    for (var i = 0; i < output.length; ++i) {
-      var style = output[i].style, val = output[i].text;
-      s +=
-      '<td class="mt-token"' + (i == diffAt * 2 ? " style='background: pink'" : "") + '>' +
-        '<span class="cm-' + esc(String(style)) + '">' +
-        esc(val.replace(/ /g,'\xb7')) +  // · MIDDLE DOT
-        '</span>' +
-        '</td>';
-    }
-    s += '</tr><tr>';
-    for (var i = 0; i < output.length; ++i) {
-      s += '<td class="mt-style"><span>' + (output[i].style || null) + '</span></td>';
-    }
-    if(output[0].state) {
-      s += '</tr><tr class="mt-state-row" title="State AFTER each token">';
-      for (var i = 0; i < output.length; ++i) {
-        s += '<td class="mt-state"><pre>' + esc(output[i].state) + '</pre></td>';
-      }
-    }
-    s += '</tr></table>';
-    return s;
-  }
-})();
diff --git a/public/js/lib/codemirror/test/multi_test.js b/public/js/lib/codemirror/test/multi_test.js
deleted file mode 100644
index a8e760d..0000000
--- a/public/js/lib/codemirror/test/multi_test.js
+++ /dev/null
@@ -1,285 +0,0 @@
-(function() {
-  namespace = "multi_";
-
-  function hasSelections(cm) {
-    var sels = cm.listSelections();
-    var given = (arguments.length - 1) / 4;
-    if (sels.length != given)
-      throw new Failure("expected " + given + " selections, found " + sels.length);
-    for (var i = 0, p = 1; i < given; i++, p += 4) {
-      var anchor = Pos(arguments[p], arguments[p + 1]);
-      var head = Pos(arguments[p + 2], arguments[p + 3]);
-      eqPos(sels[i].anchor, anchor, "anchor of selection " + i);
-      eqPos(sels[i].head, head, "head of selection " + i);
-    }
-  }
-  function hasCursors(cm) {
-    var sels = cm.listSelections();
-    var given = (arguments.length - 1) / 2;
-    if (sels.length != given)
-      throw new Failure("expected " + given + " selections, found " + sels.length);
-    for (var i = 0, p = 1; i < given; i++, p += 2) {
-      eqPos(sels[i].anchor, sels[i].head, "something selected for " + i);
-      var head = Pos(arguments[p], arguments[p + 1]);
-      eqPos(sels[i].head, head, "selection " + i);
-    }
-  }
-
-  testCM("getSelection", function(cm) {
-    select(cm, {anchor: Pos(0, 0), head: Pos(1, 2)}, {anchor: Pos(2, 2), head: Pos(2, 0)});
-    eq(cm.getSelection(), "1234\n56\n90");
-    eq(cm.getSelection(false).join("|"), "1234|56|90");
-    eq(cm.getSelections().join("|"), "1234\n56|90");
-  }, {value: "1234\n5678\n90"});
-
-  testCM("setSelection", function(cm) {
-    select(cm, Pos(3, 0), Pos(0, 0), {anchor: Pos(2, 5), head: Pos(1, 0)});
-    hasSelections(cm, 0, 0, 0, 0,
-                  2, 5, 1, 0,
-                  3, 0, 3, 0);
-    cm.setSelection(Pos(1, 2), Pos(1, 1));
-    hasSelections(cm, 1, 2, 1, 1);
-    select(cm, {anchor: Pos(1, 1), head: Pos(2, 4)},
-           {anchor: Pos(0, 0), head: Pos(1, 3)},
-           Pos(3, 0), Pos(2, 2));
-    hasSelections(cm, 0, 0, 2, 4,
-                  3, 0, 3, 0);
-    cm.setSelections([{anchor: Pos(0, 1), head: Pos(0, 2)},
-                      {anchor: Pos(1, 1), head: Pos(1, 2)},
-                      {anchor: Pos(2, 1), head: Pos(2, 2)}], 1);
-    eqPos(cm.getCursor("head"), Pos(1, 2));
-    eqPos(cm.getCursor("anchor"), Pos(1, 1));
-    eqPos(cm.getCursor("from"), Pos(1, 1));
-    eqPos(cm.getCursor("to"), Pos(1, 2));
-    cm.setCursor(Pos(1, 1));
-    hasCursors(cm, 1, 1);
-  }, {value: "abcde\nabcde\nabcde\n"});
-
-  testCM("somethingSelected", function(cm) {
-    select(cm, Pos(0, 1), {anchor: Pos(0, 3), head: Pos(0, 5)});
-    eq(cm.somethingSelected(), true);
-    select(cm, Pos(0, 1), Pos(0, 3), Pos(0, 5));
-    eq(cm.somethingSelected(), false);
-  }, {value: "123456789"});
-
-  testCM("extendSelection", function(cm) {
-    select(cm, Pos(0, 1), Pos(1, 1), Pos(2, 1));
-    cm.setExtending(true);
-    cm.extendSelections([Pos(0, 2), Pos(1, 0), Pos(2, 3)]);
-    hasSelections(cm, 0, 1, 0, 2,
-                  1, 1, 1, 0,
-                  2, 1, 2, 3);
-    cm.extendSelection(Pos(2, 4), Pos(2, 0));
-    hasSelections(cm, 2, 4, 2, 0);
-  }, {value: "1234\n1234\n1234"});
-
-  testCM("addSelection", function(cm) {
-    select(cm, Pos(0, 1), Pos(1, 1));
-    cm.addSelection(Pos(0, 0), Pos(0, 4));
-    hasSelections(cm, 0, 0, 0, 4,
-                  1, 1, 1, 1);
-    cm.addSelection(Pos(2, 2));
-    hasSelections(cm, 0, 0, 0, 4,
-                  1, 1, 1, 1,
-                  2, 2, 2, 2);
-  }, {value: "1234\n1234\n1234"});
-
-  testCM("replaceSelection", function(cm) {
-    var selections = [{anchor: Pos(0, 0), head: Pos(0, 1)},
-                      {anchor: Pos(0, 2), head: Pos(0, 3)},
-                      {anchor: Pos(0, 4), head: Pos(0, 5)},
-                      {anchor: Pos(2, 1), head: Pos(2, 4)},
-                      {anchor: Pos(2, 5), head: Pos(2, 6)}];
-    var val = "123456\n123456\n123456";
-    cm.setValue(val);
-    cm.setSelections(selections);
-    cm.replaceSelection("ab", "around");
-    eq(cm.getValue(), "ab2ab4ab6\n123456\n1ab5ab");
-    hasSelections(cm, 0, 0, 0, 2,
-                  0, 3, 0, 5,
-                  0, 6, 0, 8,
-                  2, 1, 2, 3,
-                  2, 4, 2, 6);
-    cm.setValue(val);
-    cm.setSelections(selections);
-    cm.replaceSelection("", "around");
-    eq(cm.getValue(), "246\n123456\n15");
-    hasSelections(cm, 0, 0, 0, 0,
-                  0, 1, 0, 1,
-                  0, 2, 0, 2,
-                  2, 1, 2, 1,
-                  2, 2, 2, 2);
-    cm.setValue(val);
-    cm.setSelections(selections);
-    cm.replaceSelection("X\nY\nZ", "around");
-    hasSelections(cm, 0, 0, 2, 1,
-                  2, 2, 4, 1,
-                  4, 2, 6, 1,
-                  8, 1, 10, 1,
-                  10, 2, 12, 1);
-    cm.replaceSelection("a", "around");
-    hasSelections(cm, 0, 0, 0, 1,
-                  0, 2, 0, 3,
-                  0, 4, 0, 5,
-                  2, 1, 2, 2,
-                  2, 3, 2, 4);
-    cm.replaceSelection("xy", "start");
-    hasSelections(cm, 0, 0, 0, 0,
-                  0, 3, 0, 3,
-                  0, 6, 0, 6,
-                  2, 1, 2, 1,
-                  2, 4, 2, 4);
-    cm.replaceSelection("z\nf");
-    hasSelections(cm, 1, 1, 1, 1,
-                  2, 1, 2, 1,
-                  3, 1, 3, 1,
-                  6, 1, 6, 1,
-                  7, 1, 7, 1);
-    eq(cm.getValue(), "z\nfxy2z\nfxy4z\nfxy6\n123456\n1z\nfxy5z\nfxy");
-  });
-
-  function select(cm) {
-    var sels = [];
-    for (var i = 1; i < arguments.length; i++) {
-      var arg = arguments[i];
-      if (arg.head) sels.push(arg);
-      else sels.push({head: arg, anchor: arg});
-    }
-    cm.setSelections(sels, sels.length - 1);
-  }
-
-  testCM("indentSelection", function(cm) {
-    select(cm, Pos(0, 1), Pos(1, 1));
-    cm.indentSelection(4);
-    eq(cm.getValue(), "    foo\n    bar\nbaz");
-
-    select(cm, Pos(0, 2), Pos(0, 3), Pos(0, 4));
-    cm.indentSelection(-2);
-    eq(cm.getValue(), "  foo\n    bar\nbaz");
-
-    select(cm, {anchor: Pos(0, 0), head: Pos(1, 2)},
-           {anchor: Pos(1, 3), head: Pos(2, 0)});
-    cm.indentSelection(-2);
-    eq(cm.getValue(), "foo\n  bar\nbaz");
-  }, {value: "foo\nbar\nbaz"});
-
-  testCM("killLine", function(cm) {
-    select(cm, Pos(0, 1), Pos(0, 2), Pos(1, 1));
-    cm.execCommand("killLine");
-    eq(cm.getValue(), "f\nb\nbaz");
-    cm.execCommand("killLine");
-    eq(cm.getValue(), "fbbaz");
-    cm.setValue("foo\nbar\nbaz");
-    select(cm, Pos(0, 1), {anchor: Pos(0, 2), head: Pos(2, 1)});
-    cm.execCommand("killLine");
-    eq(cm.getValue(), "faz");
-  }, {value: "foo\nbar\nbaz"});
-
-  testCM("deleteLine", function(cm) {
-    select(cm, Pos(0, 0),
-           {head: Pos(0, 1), anchor: Pos(2, 0)},
-           Pos(4, 0));
-    cm.execCommand("deleteLine");
-    eq(cm.getValue(), "4\n6\n7");
-    select(cm, Pos(2, 1));
-    cm.execCommand("deleteLine");
-    eq(cm.getValue(), "4\n6\n");
-  }, {value: "1\n2\n3\n4\n5\n6\n7"});
-
-  testCM("deleteH", function(cm) {
-    select(cm, Pos(0, 4), {anchor: Pos(1, 4), head: Pos(1, 5)});
-    cm.execCommand("delWordAfter");
-    eq(cm.getValue(), "foo bar baz\nabc ef ghi\n");
-    cm.execCommand("delWordAfter");
-    eq(cm.getValue(), "foo  baz\nabc  ghi\n");
-    cm.execCommand("delCharBefore");
-    cm.execCommand("delCharBefore");
-    eq(cm.getValue(), "fo baz\nab ghi\n");
-    select(cm, Pos(0, 3), Pos(0, 4), Pos(0, 5));
-    cm.execCommand("delWordAfter");
-    eq(cm.getValue(), "fo \nab ghi\n");
-  }, {value: "foo bar baz\nabc def ghi\n"});
-
-  testCM("goLineStart", function(cm) {
-    select(cm, Pos(0, 2), Pos(0, 3), Pos(1, 1));
-    cm.execCommand("goLineStart");
-    hasCursors(cm, 0, 0, 1, 0);
-    select(cm, Pos(1, 1), Pos(0, 1));
-    cm.setExtending(true);
-    cm.execCommand("goLineStart");
-    hasSelections(cm, 0, 1, 0, 0,
-                  1, 1, 1, 0);
-  }, {value: "foo\nbar\nbaz"});
-
-  testCM("moveV", function(cm) {
-    select(cm, Pos(0, 2), Pos(1, 2));
-    cm.execCommand("goLineDown");
-    hasCursors(cm, 1, 2, 2, 2);
-    cm.execCommand("goLineUp");
-    hasCursors(cm, 0, 2, 1, 2);
-    cm.execCommand("goLineUp");
-    hasCursors(cm, 0, 0, 0, 2);
-    cm.execCommand("goLineUp");
-    hasCursors(cm, 0, 0);
-    select(cm, Pos(0, 2), Pos(1, 2));
-    cm.setExtending(true);
-    cm.execCommand("goLineDown");
-    hasSelections(cm, 0, 2, 2, 2);
-  }, {value: "12345\n12345\n12345"});
-
-  testCM("moveH", function(cm) {
-    select(cm, Pos(0, 1), Pos(0, 3), Pos(0, 5), Pos(2, 3));
-    cm.execCommand("goCharRight");
-    hasCursors(cm, 0, 2, 0, 4, 1, 0, 2, 4);
-    cm.execCommand("goCharLeft");
-    hasCursors(cm, 0, 1, 0, 3, 0, 5, 2, 3);
-    for (var i = 0; i < 15; i++)
-      cm.execCommand("goCharRight");
-    hasCursors(cm, 2, 4, 2, 5);
-  }, {value: "12345\n12345\n12345"});
-
-  testCM("newlineAndIndent", function(cm) {
-    select(cm, Pos(0, 5), Pos(1, 5));
-    cm.execCommand("newlineAndIndent");
-    hasCursors(cm, 1, 2, 3, 2);
-    eq(cm.getValue(), "x = [\n  1];\ny = [\n  2];");
-    cm.undo();
-    eq(cm.getValue(), "x = [1];\ny = [2];");
-    hasCursors(cm, 0, 5, 1, 5);
-    select(cm, Pos(0, 5), Pos(0, 6));
-    cm.execCommand("newlineAndIndent");
-    hasCursors(cm, 1, 2, 2, 0);
-    eq(cm.getValue(), "x = [\n  1\n];\ny = [2];");
-  }, {value: "x = [1];\ny = [2];", mode: "javascript"});
-
-  testCM("goDocStartEnd", function(cm) {
-    select(cm, Pos(0, 1), Pos(1, 1));
-    cm.execCommand("goDocStart");
-    hasCursors(cm, 0, 0);
-    select(cm, Pos(0, 1), Pos(1, 1));
-    cm.execCommand("goDocEnd");
-    hasCursors(cm, 1, 3);
-    select(cm, Pos(0, 1), Pos(1, 1));
-    cm.setExtending(true);
-    cm.execCommand("goDocEnd");
-    hasSelections(cm, 1, 1, 1, 3);
-  }, {value: "abc\ndef"});
-
-  testCM("selectionHistory", function(cm) {
-    for (var i = 0; i < 3; ++i)
-      cm.addSelection(Pos(0, i * 2), Pos(0, i * 2 + 1));
-    cm.execCommand("undoSelection");
-    eq(cm.getSelection(), "1\n2");
-    cm.execCommand("undoSelection");
-    eq(cm.getSelection(), "1");
-    cm.execCommand("undoSelection");
-    eq(cm.getSelection(), "");
-    eqPos(cm.getCursor(), Pos(0, 0));
-    cm.execCommand("redoSelection");
-    eq(cm.getSelection(), "1");
-    cm.execCommand("redoSelection");
-    eq(cm.getSelection(), "1\n2");
-    cm.execCommand("redoSelection");
-    eq(cm.getSelection(), "1\n2\n3");
-  }, {value: "1 2 3"});
-})();
diff --git a/public/js/lib/codemirror/test/phantom_driver.js b/public/js/lib/codemirror/test/phantom_driver.js
deleted file mode 100644
index dbad08d..0000000
--- a/public/js/lib/codemirror/test/phantom_driver.js
+++ /dev/null
@@ -1,31 +0,0 @@
-var page = require('webpage').create();
-
-page.open("http://localhost:3000/test/index.html", function (status) {
-  if (status != "success") {
-    console.log("page couldn't be loaded successfully");
-    phantom.exit(1);
-  }
-  waitFor(function () {
-    return page.evaluate(function () {
-      var output = document.getElementById('status');
-      if (!output) { return false; }
-      return (/^(\d+ failures?|all passed)/i).test(output.innerText);
-    });
-  }, function () {
-    var failed = page.evaluate(function () { return window.failed; });
-    var output = page.evaluate(function () {
-      return document.getElementById('output').innerText + "\n" +
-        document.getElementById('status').innerText;
-    });
-    console.log(output);
-    phantom.exit(failed > 0 ? 1 : 0);
-  });
-});
-
-function waitFor (test, cb) {
-  if (test()) {
-    cb();
-  } else {
-    setTimeout(function () { waitFor(test, cb); }, 250);
-  }
-}
diff --git a/public/js/lib/codemirror/test/run.js b/public/js/lib/codemirror/test/run.js
deleted file mode 100755
index 140539c..0000000
--- a/public/js/lib/codemirror/test/run.js
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env node
-
-var lint = require("./lint/lint");
-
-lint.checkDir("mode");
-lint.checkDir("lib");
-lint.checkDir("addon");
-lint.checkDir("keymap");
-
-var ok = lint.success();
-
-var files = new (require('node-static').Server)();
-
-var server = require('http').createServer(function (req, res) {
-  req.addListener('end', function () {
-    files.serve(req, res, function (err/*, result */) {
-      if (err) {
-        console.error(err);
-        process.exit(1);
-      }
-    });
-  }).resume();
-}).addListener('error', function (err) {
-  throw err;
-}).listen(3000, function () {
-  var childProcess = require('child_process');
-  var phantomjs = require("phantomjs");
-  var childArgs = [
-    require("path").join(__dirname, 'phantom_driver.js')
-  ];
-  childProcess.execFile(phantomjs.path, childArgs, function (err, stdout, stderr) {
-    server.close();
-    console.log(stdout);
-    if (err) console.error(err);
-    if (stderr) console.error(stderr);
-    process.exit(err || stderr || !ok ? 1 : 0);
-  });
-});
diff --git a/public/js/lib/codemirror/test/scroll_test.js b/public/js/lib/codemirror/test/scroll_test.js
deleted file mode 100644
index 2047002..0000000
--- a/public/js/lib/codemirror/test/scroll_test.js
+++ /dev/null
@@ -1,105 +0,0 @@
-(function() {
-  "use strict";
-
-  namespace = "scroll_";
-
-  testCM("bars_hidden", function(cm) {
-    for (var i = 0;; i++) {
-      var wrapBox = cm.getWrapperElement().getBoundingClientRect();
-      var scrollBox = cm.getScrollerElement().getBoundingClientRect();
-      is(wrapBox.bottom < scrollBox.bottom - 10);
-      is(wrapBox.right < scrollBox.right - 10);
-      if (i == 1) break;
-      cm.getWrapperElement().style.height = "auto";
-      cm.refresh();
-    }
-  });
-  
-  function barH(cm) { return byClassName(cm.getWrapperElement(), "CodeMirror-hscrollbar")[0]; }
-  function barV(cm) { return byClassName(cm.getWrapperElement(), "CodeMirror-vscrollbar")[0]; }
-
-  function displayBottom(cm, scrollbar) {
-    if (scrollbar)
-      return barH(cm).getBoundingClientRect().top;
-    else
-      return cm.getWrapperElement().getBoundingClientRect().bottom - 1;
-  }
-
-  function displayRight(cm, scrollbar) {
-    if (scrollbar)
-      return barV(cm).getBoundingClientRect().left;
-    else
-      return cm.getWrapperElement().getBoundingClientRect().right - 1;
-  }
-
-  function testMovedownFixed(cm, hScroll) {
-    cm.setSize("100px", "100px");
-    if (hScroll) cm.setValue(new Array(100).join("x"));
-    var bottom = displayBottom(cm, hScroll);
-    for (var i = 0; i < 30; i++) {
-      cm.replaceSelection("x\n");
-      var cursorBottom = cm.cursorCoords(null, "window").bottom;
-      is(cursorBottom <= bottom);
-    }
-    is(cursorBottom >= bottom - 5);
-  }
-
-  testCM("movedown_fixed", function(cm) {testMovedownFixed(cm, false);});
-  testCM("movedown_hscroll_fixed", function(cm) {testMovedownFixed(cm, true);});
-
-  function testMovedownResize(cm, hScroll) {
-    cm.getWrapperElement().style.height = "auto";
-    if (hScroll) cm.setValue(new Array(100).join("x"));
-    cm.refresh();
-    for (var i = 0; i < 30; i++) {
-      cm.replaceSelection("x\n");
-      var bottom = displayBottom(cm, hScroll);
-      var cursorBottom = cm.cursorCoords(null, "window").bottom;
-      is(cursorBottom <= bottom);
-      is(cursorBottom >= bottom - 5);
-    }
-  }
-
-  testCM("movedown_resize", function(cm) {testMovedownResize(cm, false);});
-  testCM("movedown_hscroll_resize", function(cm) {testMovedownResize(cm, true);});
-
-  function testMoveright(cm, wrap, scroll) {
-    cm.setSize("100px", "100px");
-    if (wrap) cm.setOption("lineWrapping", true);
-    if (scroll) {
-      cm.setValue("\n" + new Array(100).join("x\n"));
-      cm.setCursor(Pos(0, 0));
-    }
-    var right = displayRight(cm, scroll);
-    for (var i = 0; i < 10; i++) {
-      cm.replaceSelection("xxxxxxxxxx");
-      var cursorRight = cm.cursorCoords(null, "window").right;
-      is(cursorRight < right);
-    }
-    if (!wrap) is(cursorRight > right - 20);
-  }
-
-  testCM("moveright", function(cm) {testMoveright(cm, false, false);});
-  testCM("moveright_wrap", function(cm) {testMoveright(cm, true, false);});
-  testCM("moveright_scroll", function(cm) {testMoveright(cm, false, true);});
-  testCM("moveright_scroll_wrap", function(cm) {testMoveright(cm, true, true);});
-
-  testCM("suddenly_wide", function(cm) {
-    addDoc(cm, 100, 100);
-    cm.replaceSelection(new Array(600).join("l ") + "\n");
-    cm.execCommand("goLineUp");
-    cm.execCommand("goLineEnd");
-    is(barH(cm).scrollLeft > cm.getScrollerElement().scrollLeft - 1);
-  });
-
-  testCM("wrap_changes_height", function(cm) {
-    var line = new Array(20).join("a ") + "\n";
-    cm.setValue(new Array(20).join(line));
-    var box = cm.getWrapperElement().getBoundingClientRect();
-    cm.setSize(cm.cursorCoords(Pos(0), "window").right - box.left + 2,
-               cm.cursorCoords(Pos(19, 0), "window").bottom - box.top + 2);
-    cm.setCursor(Pos(19, 0));
-    cm.replaceSelection("\n");
-    is(cm.cursorCoords(null, "window").bottom < displayBottom(cm, false));
-  }, {lineWrapping: true});
-})();
diff --git a/public/js/lib/codemirror/test/search_test.js b/public/js/lib/codemirror/test/search_test.js
deleted file mode 100644
index 04a1e68..0000000
--- a/public/js/lib/codemirror/test/search_test.js
+++ /dev/null
@@ -1,62 +0,0 @@
-(function() {
-  "use strict";
-
-  function test(name) {
-    var text = Array.prototype.slice.call(arguments, 1, arguments.length - 1).join("\n");
-    var body = arguments[arguments.length - 1];
-    return window.test("search_" + name, function() {
-      body(new CodeMirror.Doc(text));
-    });
-  }
-
-  function run(doc, query, insensitive) {
-    var cursor = doc.getSearchCursor(query, null, insensitive);
-    for (var i = 3; i < arguments.length; i += 4) {
-      var found = cursor.findNext();
-      is(found, "not enough results (forward)");
-      eqPos(Pos(arguments[i], arguments[i + 1]), cursor.from(), "from, forward, " + (i - 3) / 4);
-      eqPos(Pos(arguments[i + 2], arguments[i + 3]), cursor.to(), "to, forward, " + (i - 3) / 4);
-    }
-    is(!cursor.findNext(), "too many matches (forward)");
-    for (var i = arguments.length - 4; i >= 3; i -= 4) {
-      var found = cursor.findPrevious();
-      is(found, "not enough results (backwards)");
-      eqPos(Pos(arguments[i], arguments[i + 1]), cursor.from(), "from, backwards, " + (i - 3) / 4);
-      eqPos(Pos(arguments[i + 2], arguments[i + 3]), cursor.to(), "to, backwards, " + (i - 3) / 4);
-    }
-    is(!cursor.findPrevious(), "too many matches (backwards)");
-  }
-
-  test("simple", "abcdefg", "abcdefg", function(doc) {
-    run(doc, "cde", false, 0, 2, 0, 5, 1, 2, 1, 5);
-  });
-
-  test("multiline", "hallo", "goodbye", function(doc) {
-    run(doc, "llo\ngoo", false, 0, 2, 1, 3);
-    run(doc, "blah\nhall", false);
-    run(doc, "bye\neye", false);
-  });
-
-  test("regexp", "abcde", "abcde", function(doc) {
-    run(doc, /bcd/, false, 0, 1, 0, 4, 1, 1, 1, 4);
-    run(doc, /BCD/, false);
-    run(doc, /BCD/i, false, 0, 1, 0, 4, 1, 1, 1, 4);
-  });
-
-  test("insensitive", "hallo", "HALLO", "oink", "hAllO", function(doc) {
-    run(doc, "All", false, 3, 1, 3, 4);
-    run(doc, "All", true, 0, 1, 0, 4, 1, 1, 1, 4, 3, 1, 3, 4);
-  });
-
-  test("multilineInsensitive", "zie ginds komT", "De Stoomboot", "uit Spanje weer aan", function(doc) {
-    run(doc, "komt\nde stoomboot\nuit", false);
-    run(doc, "komt\nde stoomboot\nuit", true, 0, 10, 2, 3);
-    run(doc, "kOMt\ndE stOOmboot\nuiT", true, 0, 10, 2, 3);
-  });
-
-  test("expandingCaseFold", "<b>İİ İİ</b>", "<b>uu uu</b>", function(doc) {
-    if (phantom) return; // A Phantom bug makes this hang
-    run(doc, "</b>", true, 0, 8, 0, 12, 1, 8, 1, 12);
-    run(doc, "İİ", true, 0, 3, 0, 5, 0, 6, 0, 8);
-  });
-})();
diff --git a/public/js/lib/codemirror/test/sublime_test.js b/public/js/lib/codemirror/test/sublime_test.js
deleted file mode 100644
index c93e041..0000000
--- a/public/js/lib/codemirror/test/sublime_test.js
+++ /dev/null
@@ -1,303 +0,0 @@
-(function() {
-  "use strict";
-  
-  var Pos = CodeMirror.Pos;
-  namespace = "sublime_";
-
-  function stTest(name) {
-    var actions = Array.prototype.slice.call(arguments, 1);
-    testCM(name, function(cm) {
-      for (var i = 0; i < actions.length; i++) {
-        var action = actions[i];
-        if (typeof action == "string" && i == 0)
-          cm.setValue(action);
-        else if (typeof action == "string")
-          cm.execCommand(action);
-        else if (action instanceof Pos)
-          cm.setCursor(action);
-        else
-          action(cm);
-      }
-    });
-  }
-
-  function at(line, ch, msg) {
-    return function(cm) {
-      eq(cm.listSelections().length, 1);
-      eqPos(cm.getCursor("head"), Pos(line, ch), msg);
-      eqPos(cm.getCursor("anchor"), Pos(line, ch), msg);
-    };
-  }
-
-  function val(content, msg) {
-    return function(cm) { eq(cm.getValue(), content, msg); };
-  }
-
-  function argsToRanges(args) {
-    if (args.length % 4) throw new Error("Wrong number of arguments for ranges.");
-    var ranges = [];
-    for (var i = 0; i < args.length; i += 4)
-      ranges.push({anchor: Pos(args[i], args[i + 1]),
-                   head: Pos(args[i + 2], args[i + 3])});
-    return ranges;
-  }
-
-  function setSel() {
-    var ranges = argsToRanges(arguments);
-    return function(cm) { cm.setSelections(ranges, 0); };
-  }
-
-  function hasSel() {
-    var ranges = argsToRanges(arguments);
-    return function(cm) {
-      var sels = cm.listSelections();
-      if (sels.length != ranges.length)
-        throw new Failure("Expected " + ranges.length + " selections, but found " + sels.length);
-      for (var i = 0; i < sels.length; i++) {
-        eqPos(sels[i].anchor, ranges[i].anchor, "anchor " + i);
-        eqPos(sels[i].head, ranges[i].head, "head " + i);
-      }
-    };
-  }
-
-  stTest("bySubword", "the foo_bar DooDahBah \n a",
-         "goSubwordLeft", at(0, 0),
-         "goSubwordRight", at(0, 3),
-         "goSubwordRight", at(0, 7),
-         "goSubwordRight", at(0, 11),
-         "goSubwordRight", at(0, 15),
-         "goSubwordRight", at(0, 18),
-         "goSubwordRight", at(0, 21),
-         "goSubwordRight", at(0, 22),
-         "goSubwordRight", at(1, 0),
-         "goSubwordRight", at(1, 2),
-         "goSubwordRight", at(1, 2),
-         "goSubwordLeft", at(1, 1),
-         "goSubwordLeft", at(1, 0),
-         "goSubwordLeft", at(0, 22),
-         "goSubwordLeft", at(0, 18),
-         "goSubwordLeft", at(0, 15),
-         "goSubwordLeft", at(0, 12),
-         "goSubwordLeft", at(0, 8),
-         "goSubwordLeft", at(0, 4),
-         "goSubwordLeft", at(0, 0));
-
-  stTest("splitSelectionByLine", "abc\ndef\nghi",
-         setSel(0, 1, 2, 2),
-         "splitSelectionByLine",
-         hasSel(0, 1, 0, 3,
-                1, 0, 1, 3,
-                2, 0, 2, 2));
-
-  stTest("splitSelectionByLineMulti", "abc\ndef\nghi\njkl",
-         setSel(0, 1, 1, 1,
-                1, 2, 3, 2,
-                3, 3, 3, 3),
-         "splitSelectionByLine",
-         hasSel(0, 1, 0, 3,
-                1, 0, 1, 1,
-                1, 2, 1, 3,
-                2, 0, 2, 3,
-                3, 0, 3, 2,
-                3, 3, 3, 3));
-
-  stTest("selectLine", "abc\ndef\nghi",
-         setSel(0, 1, 0, 1,
-                2, 0, 2, 1),
-         "selectLine",
-         hasSel(0, 0, 1, 0,
-                2, 0, 2, 3),
-         setSel(0, 1, 1, 0),
-         "selectLine",
-         hasSel(0, 0, 2, 0));
-
-  stTest("insertLineAfter", "abcde\nfghijkl\nmn",
-         setSel(0, 1, 0, 1,
-                0, 3, 0, 3,
-                1, 2, 1, 2,
-                1, 3, 1, 5), "insertLineAfter",
-         hasSel(1, 0, 1, 0,
-                3, 0, 3, 0), val("abcde\n\nfghijkl\n\nmn"));
-
-  stTest("insertLineBefore", "abcde\nfghijkl\nmn",
-         setSel(0, 1, 0, 1,
-                0, 3, 0, 3,
-                1, 2, 1, 2,
-                1, 3, 1, 5), "insertLineBefore",
-         hasSel(0, 0, 0, 0,
-                2, 0, 2, 0), val("\nabcde\n\nfghijkl\nmn"));
-
-  stTest("selectNextOccurrence", "a foo bar\nfoobar foo",
-         setSel(0, 2, 0, 5),
-         "selectNextOccurrence", hasSel(0, 2, 0, 5,
-                                        1, 0, 1, 3),
-         "selectNextOccurrence", hasSel(0, 2, 0, 5,
-                                        1, 0, 1, 3,
-                                        1, 7, 1, 10),
-         "selectNextOccurrence", hasSel(0, 2, 0, 5,
-                                        1, 0, 1, 3,
-                                        1, 7, 1, 10),
-         Pos(0, 3), "selectNextOccurrence", hasSel(0, 2, 0, 5),
-        "selectNextOccurrence", hasSel(0, 2, 0, 5,
-                                       1, 7, 1, 10),
-         setSel(0, 6, 0, 9),
-         "selectNextOccurrence", hasSel(0, 6, 0, 9,
-                                        1, 3, 1, 6));
-
-  stTest("selectScope", "foo(a) {\n  bar[1, 2];\n}",
-         "selectScope", hasSel(0, 0, 2, 1),
-         Pos(0, 4), "selectScope", hasSel(0, 4, 0, 5),
-         Pos(0, 5), "selectScope", hasSel(0, 4, 0, 5),
-         Pos(0, 6), "selectScope", hasSel(0, 0, 2, 1),
-         Pos(0, 8), "selectScope", hasSel(0, 8, 2, 0),
-         Pos(1, 2), "selectScope", hasSel(0, 8, 2, 0),
-         Pos(1, 6), "selectScope", hasSel(1, 6, 1, 10),
-         Pos(1, 9), "selectScope", hasSel(1, 6, 1, 10));
-
-  stTest("goToBracket", "foo(a) {\n  bar[1, 2];\n}",
-         Pos(0, 0), "goToBracket", at(0, 0),
-         Pos(0, 4), "goToBracket", at(0, 5), "goToBracket", at(0, 4),
-         Pos(0, 8), "goToBracket", at(2, 0), "goToBracket", at(0, 8),
-         Pos(1, 2), "goToBracket", at(2, 0),
-         Pos(1, 7), "goToBracket", at(1, 10), "goToBracket", at(1, 6));
-
-  stTest("swapLine", "1\n2\n3---\n4\n5",
-         "swapLineDown", val("2\n1\n3---\n4\n5"),
-         "swapLineUp", val("1\n2\n3---\n4\n5"),
-         "swapLineUp", val("1\n2\n3---\n4\n5"),
-         Pos(4, 1), "swapLineDown", val("1\n2\n3---\n4\n5"),
-         setSel(0, 1, 0, 1,
-                1, 0, 2, 0,
-                2, 2, 2, 2),
-         "swapLineDown", val("4\n1\n2\n3---\n5"),
-         hasSel(1, 1, 1, 1,
-                2, 0, 3, 0,
-                3, 2, 3, 2),
-         "swapLineUp", val("1\n2\n3---\n4\n5"),
-         hasSel(0, 1, 0, 1,
-                1, 0, 2, 0,
-                2, 2, 2, 2));
-
-  stTest("swapLineEmptyBottomSel", "1\n2\n3",
-         setSel(0, 1, 1, 0),
-         "swapLineDown", val("2\n1\n3"), hasSel(1, 1, 2, 0),
-         "swapLineUp", val("1\n2\n3"), hasSel(0, 1, 1, 0),
-         "swapLineUp", val("1\n2\n3"), hasSel(0, 0, 0, 0));
-
-  stTest("swapLineUpFromEnd", "a\nb\nc",
-         Pos(2, 1), "swapLineUp",
-         hasSel(1, 1, 1, 1), val("a\nc\nb"));
-
-  stTest("joinLines", "abc\ndef\nghi\njkl",
-         "joinLines", val("abc def\nghi\njkl"), at(0, 4),
-         "undo",
-         setSel(0, 2, 1, 1), "joinLines",
-         val("abc def ghi\njkl"), hasSel(0, 2, 0, 8),
-         "undo",
-         setSel(0, 1, 0, 1,
-                1, 1, 1, 1,
-                3, 1, 3, 1), "joinLines",
-         val("abc def ghi\njkl"), hasSel(0, 4, 0, 4,
-                                         0, 8, 0, 8,
-                                         1, 3, 1, 3));
-
-  stTest("duplicateLine", "abc\ndef\nghi",
-         Pos(1, 0), "duplicateLine", val("abc\ndef\ndef\nghi"), at(2, 0),
-         "undo",
-         setSel(0, 1, 0, 1,
-                1, 1, 1, 1,
-                2, 1, 2, 1), "duplicateLine",
-         val("abc\nabc\ndef\ndef\nghi\nghi"), hasSel(1, 1, 1, 1,
-                                                     3, 1, 3, 1,
-                                                     5, 1, 5, 1));
-  stTest("duplicateLineSelection", "abcdef",
-         setSel(0, 1, 0, 1,
-                0, 2, 0, 4,
-                0, 5, 0, 5),
-         "duplicateLine",
-         val("abcdef\nabcdcdef\nabcdcdef"), hasSel(2, 1, 2, 1,
-                                                   2, 4, 2, 6,
-                                                   2, 7, 2, 7));
-
-  stTest("selectLinesUpward", "123\n345\n789\n012",
-         setSel(0, 1, 0, 1,
-                1, 1, 1, 3,
-                2, 0, 2, 0,
-                3, 0, 3, 0),
-         "selectLinesUpward",
-         hasSel(0, 1, 0, 1,
-                0, 3, 0, 3,
-                1, 0, 1, 0,
-                1, 1, 1, 3,
-                2, 0, 2, 0,
-                3, 0, 3, 0));
-
-  stTest("selectLinesDownward", "123\n345\n789\n012",
-         setSel(0, 1, 0, 1,
-                1, 1, 1, 3,
-                2, 0, 2, 0,
-                3, 0, 3, 0),
-         "selectLinesDownward",
-         hasSel(0, 1, 0, 1,
-                1, 1, 1, 3,
-                2, 0, 2, 0,
-                2, 3, 2, 3,
-                3, 0, 3, 0));
-
-  stTest("sortLines", "c\nb\na\nC\nB\nA",
-         "sortLines", val("A\nB\nC\na\nb\nc"),
-         "undo",
-         setSel(0, 0, 2, 0,
-                3, 0, 5, 0),
-         "sortLines", val("a\nb\nc\nA\nB\nC"),
-         hasSel(0, 0, 2, 1,
-                3, 0, 5, 1),
-         "undo",
-         setSel(1, 0, 4, 0), "sortLinesInsensitive", val("c\na\nB\nb\nC\nA"));
-
-  stTest("bookmarks", "abc\ndef\nghi\njkl",
-         Pos(0, 1), "toggleBookmark",
-         setSel(1, 1, 1, 2), "toggleBookmark",
-         setSel(2, 1, 2, 2), "toggleBookmark",
-         "nextBookmark", hasSel(0, 1, 0, 1),
-         "nextBookmark", hasSel(1, 1, 1, 2),
-         "nextBookmark", hasSel(2, 1, 2, 2),
-         "prevBookmark", hasSel(1, 1, 1, 2),
-         "prevBookmark", hasSel(0, 1, 0, 1),
-         "prevBookmark", hasSel(2, 1, 2, 2),
-         "prevBookmark", hasSel(1, 1, 1, 2),
-         "toggleBookmark",
-         "prevBookmark", hasSel(2, 1, 2, 2),
-         "prevBookmark", hasSel(0, 1, 0, 1),
-         "selectBookmarks", hasSel(0, 1, 0, 1,
-                                   2, 1, 2, 2),
-         "clearBookmarks",
-         Pos(0, 0), "selectBookmarks", at(0, 0));
-
-  stTest("upAndDowncaseAtCursor", "abc\ndef  x\nghI",
-         setSel(0, 1, 0, 3,
-                1, 1, 1, 1,
-                1, 4, 1, 4), "upcaseAtCursor",
-         val("aBC\nDEF  x\nghI"), hasSel(0, 1, 0, 3,
-                                         1, 3, 1, 3,
-                                         1, 4, 1, 4),
-         "downcaseAtCursor",
-         val("abc\ndef  x\nghI"), hasSel(0, 1, 0, 3,
-                                         1, 3, 1, 3,
-                                         1, 4, 1, 4));
-
-  stTest("mark", "abc\ndef\nghi",
-         Pos(1, 1), "setSublimeMark",
-         Pos(2, 1), "selectToSublimeMark", hasSel(2, 1, 1, 1),
-         Pos(0, 1), "swapWithSublimeMark", at(1, 1), "swapWithSublimeMark", at(0, 1),
-         "deleteToSublimeMark", val("aef\nghi"),
-         "sublimeYank", val("abc\ndef\nghi"), at(1, 1));
-
-  stTest("findUnder", "foo foobar  a",
-         "findUnder", hasSel(0, 4, 0, 7),
-         "findUnder", hasSel(0, 0, 0, 3),
-         "findUnderPrevious", hasSel(0, 4, 0, 7),
-         "findUnderPrevious", hasSel(0, 0, 0, 3),
-         Pos(0, 4), "findUnder", hasSel(0, 4, 0, 10),
-         Pos(0, 11), "findUnder", hasSel(0, 11, 0, 11));
-})();
diff --git a/public/js/lib/codemirror/test/test.js b/public/js/lib/codemirror/test/test.js
deleted file mode 100644
index 08d0381..0000000
--- a/public/js/lib/codemirror/test/test.js
+++ /dev/null
@@ -1,2101 +0,0 @@
-var Pos = CodeMirror.Pos;
-
-CodeMirror.defaults.rtlMoveVisually = true;
-
-function forEach(arr, f) {
-  for (var i = 0, e = arr.length; i < e; ++i) f(arr[i], i);
-}
-
-function addDoc(cm, width, height) {
-  var content = [], line = "";
-  for (var i = 0; i < width; ++i) line += "x";
-  for (var i = 0; i < height; ++i) content.push(line);
-  cm.setValue(content.join("\n"));
-}
-
-function byClassName(elt, cls) {
-  if (elt.getElementsByClassName) return elt.getElementsByClassName(cls);
-  var found = [], re = new RegExp("\\b" + cls + "\\b");
-  function search(elt) {
-    if (elt.nodeType == 3) return;
-    if (re.test(elt.className)) found.push(elt);
-    for (var i = 0, e = elt.childNodes.length; i < e; ++i)
-      search(elt.childNodes[i]);
-  }
-  search(elt);
-  return found;
-}
-
-var ie_lt8 = /MSIE [1-7]\b/.test(navigator.userAgent);
-var ie_lt9 = /MSIE [1-8]\b/.test(navigator.userAgent);
-var mac = /Mac/.test(navigator.platform);
-var phantom = /PhantomJS/.test(navigator.userAgent);
-var opera = /Opera\/\./.test(navigator.userAgent);
-var opera_version = opera && navigator.userAgent.match(/Version\/(\d+\.\d+)/);
-if (opera_version) opera_version = Number(opera_version);
-var opera_lt10 = opera && (!opera_version || opera_version < 10);
-
-namespace = "core_";
-
-test("core_fromTextArea", function() {
-  var te = document.getElementById("code");
-  te.value = "CONTENT";
-  var cm = CodeMirror.fromTextArea(te);
-  is(!te.offsetHeight);
-  eq(cm.getValue(), "CONTENT");
-  cm.setValue("foo\nbar");
-  eq(cm.getValue(), "foo\nbar");
-  cm.save();
-  is(/^foo\r?\nbar$/.test(te.value));
-  cm.setValue("xxx");
-  cm.toTextArea();
-  is(te.offsetHeight);
-  eq(te.value, "xxx");
-});
-
-testCM("getRange", function(cm) {
-  eq(cm.getLine(0), "1234");
-  eq(cm.getLine(1), "5678");
-  eq(cm.getLine(2), null);
-  eq(cm.getLine(-1), null);
-  eq(cm.getRange(Pos(0, 0), Pos(0, 3)), "123");
-  eq(cm.getRange(Pos(0, -1), Pos(0, 200)), "1234");
-  eq(cm.getRange(Pos(0, 2), Pos(1, 2)), "34\n56");
-  eq(cm.getRange(Pos(1, 2), Pos(100, 0)), "78");
-}, {value: "1234\n5678"});
-
-testCM("replaceRange", function(cm) {
-  eq(cm.getValue(), "");
-  cm.replaceRange("foo\n", Pos(0, 0));
-  eq(cm.getValue(), "foo\n");
-  cm.replaceRange("a\nb", Pos(0, 1));
-  eq(cm.getValue(), "fa\nboo\n");
-  eq(cm.lineCount(), 3);
-  cm.replaceRange("xyzzy", Pos(0, 0), Pos(1, 1));
-  eq(cm.getValue(), "xyzzyoo\n");
-  cm.replaceRange("abc", Pos(0, 0), Pos(10, 0));
-  eq(cm.getValue(), "abc");
-  eq(cm.lineCount(), 1);
-});
-
-testCM("selection", function(cm) {
-  cm.setSelection(Pos(0, 4), Pos(2, 2));
-  is(cm.somethingSelected());
-  eq(cm.getSelection(), "11\n222222\n33");
-  eqPos(cm.getCursor(false), Pos(2, 2));
-  eqPos(cm.getCursor(true), Pos(0, 4));
-  cm.setSelection(Pos(1, 0));
-  is(!cm.somethingSelected());
-  eq(cm.getSelection(), "");
-  eqPos(cm.getCursor(true), Pos(1, 0));
-  cm.replaceSelection("abc", "around");
-  eq(cm.getSelection(), "abc");
-  eq(cm.getValue(), "111111\nabc222222\n333333");
-  cm.replaceSelection("def", "end");
-  eq(cm.getSelection(), "");
-  eqPos(cm.getCursor(true), Pos(1, 3));
-  cm.setCursor(Pos(2, 1));
-  eqPos(cm.getCursor(true), Pos(2, 1));
-  cm.setCursor(1, 2);
-  eqPos(cm.getCursor(true), Pos(1, 2));
-}, {value: "111111\n222222\n333333"});
-
-testCM("extendSelection", function(cm) {
-  cm.setExtending(true);
-  addDoc(cm, 10, 10);
-  cm.setSelection(Pos(3, 5));
-  eqPos(cm.getCursor("head"), Pos(3, 5));
-  eqPos(cm.getCursor("anchor"), Pos(3, 5));
-  cm.setSelection(Pos(2, 5), Pos(5, 5));
-  eqPos(cm.getCursor("head"), Pos(5, 5));
-  eqPos(cm.getCursor("anchor"), Pos(2, 5));
-  eqPos(cm.getCursor("start"), Pos(2, 5));
-  eqPos(cm.getCursor("end"), Pos(5, 5));
-  cm.setSelection(Pos(5, 5), Pos(2, 5));
-  eqPos(cm.getCursor("head"), Pos(2, 5));
-  eqPos(cm.getCursor("anchor"), Pos(5, 5));
-  eqPos(cm.getCursor("start"), Pos(2, 5));
-  eqPos(cm.getCursor("end"), Pos(5, 5));
-  cm.extendSelection(Pos(3, 2));
-  eqPos(cm.getCursor("head"), Pos(3, 2));
-  eqPos(cm.getCursor("anchor"), Pos(5, 5));
-  cm.extendSelection(Pos(6, 2));
-  eqPos(cm.getCursor("head"), Pos(6, 2));
-  eqPos(cm.getCursor("anchor"), Pos(5, 5));
-  cm.extendSelection(Pos(6, 3), Pos(6, 4));
-  eqPos(cm.getCursor("head"), Pos(6, 4));
-  eqPos(cm.getCursor("anchor"), Pos(5, 5));
-  cm.extendSelection(Pos(0, 3), Pos(0, 4));
-  eqPos(cm.getCursor("head"), Pos(0, 3));
-  eqPos(cm.getCursor("anchor"), Pos(5, 5));
-  cm.extendSelection(Pos(4, 5), Pos(6, 5));
-  eqPos(cm.getCursor("head"), Pos(6, 5));
-  eqPos(cm.getCursor("anchor"), Pos(4, 5));
-  cm.setExtending(false);
-  cm.extendSelection(Pos(0, 3), Pos(0, 4));
-  eqPos(cm.getCursor("head"), Pos(0, 3));
-  eqPos(cm.getCursor("anchor"), Pos(0, 4));
-});
-
-testCM("lines", function(cm) {
-  eq(cm.getLine(0), "111111");
-  eq(cm.getLine(1), "222222");
-  eq(cm.getLine(-1), null);
-  cm.replaceRange("", Pos(1, 0), Pos(2, 0))
-  cm.replaceRange("abc", Pos(1, 0), Pos(1));
-  eq(cm.getValue(), "111111\nabc");
-}, {value: "111111\n222222\n333333"});
-
-testCM("indent", function(cm) {
-  cm.indentLine(1);
-  eq(cm.getLine(1), "   blah();");
-  cm.setOption("indentUnit", 8);
-  cm.indentLine(1);
-  eq(cm.getLine(1), "\tblah();");
-  cm.setOption("indentUnit", 10);
-  cm.setOption("tabSize", 4);
-  cm.indentLine(1);
-  eq(cm.getLine(1), "\t\t  blah();");
-}, {value: "if (x) {\nblah();\n}", indentUnit: 3, indentWithTabs: true, tabSize: 8});
-
-testCM("indentByNumber", function(cm) {
-  cm.indentLine(0, 2);
-  eq(cm.getLine(0), "  foo");
-  cm.indentLine(0, -200);
-  eq(cm.getLine(0), "foo");
-  cm.setSelection(Pos(0, 0), Pos(1, 2));
-  cm.indentSelection(3);
-  eq(cm.getValue(), "   foo\n   bar\nbaz");
-}, {value: "foo\nbar\nbaz"});
-
-test("core_defaults", function() {
-  var defsCopy = {}, defs = CodeMirror.defaults;
-  for (var opt in defs) defsCopy[opt] = defs[opt];
-  defs.indentUnit = 5;
-  defs.value = "uu";
-  defs.indentWithTabs = true;
-  defs.tabindex = 55;
-  var place = document.getElementById("testground"), cm = CodeMirror(place);
-  try {
-    eq(cm.getOption("indentUnit"), 5);
-    cm.setOption("indentUnit", 10);
-    eq(defs.indentUnit, 5);
-    eq(cm.getValue(), "uu");
-    eq(cm.getOption("indentWithTabs"), true);
-    eq(cm.getInputField().tabIndex, 55);
-  }
-  finally {
-    for (var opt in defsCopy) defs[opt] = defsCopy[opt];
-    place.removeChild(cm.getWrapperElement());
-  }
-});
-
-testCM("lineInfo", function(cm) {
-  eq(cm.lineInfo(-1), null);
-  var mark = document.createElement("span");
-  var lh = cm.setGutterMarker(1, "FOO", mark);
-  var info = cm.lineInfo(1);
-  eq(info.text, "222222");
-  eq(info.gutterMarkers.FOO, mark);
-  eq(info.line, 1);
-  eq(cm.lineInfo(2).gutterMarkers, null);
-  cm.setGutterMarker(lh, "FOO", null);
-  eq(cm.lineInfo(1).gutterMarkers, null);
-  cm.setGutterMarker(1, "FOO", mark);
-  cm.setGutterMarker(0, "FOO", mark);
-  cm.clearGutter("FOO");
-  eq(cm.lineInfo(0).gutterMarkers, null);
-  eq(cm.lineInfo(1).gutterMarkers, null);
-}, {value: "111111\n222222\n333333"});
-
-testCM("coords", function(cm) {
-  cm.setSize(null, 100);
-  addDoc(cm, 32, 200);
-  var top = cm.charCoords(Pos(0, 0));
-  var bot = cm.charCoords(Pos(200, 30));
-  is(top.left < bot.left);
-  is(top.top < bot.top);
-  is(top.top < top.bottom);
-  cm.scrollTo(null, 100);
-  var top2 = cm.charCoords(Pos(0, 0));
-  is(top.top > top2.top);
-  eq(top.left, top2.left);
-});
-
-testCM("coordsChar", function(cm) {
-  addDoc(cm, 35, 70);
-  for (var i = 0; i < 2; ++i) {
-    var sys = i ? "local" : "page";
-    for (var ch = 0; ch <= 35; ch += 5) {
-      for (var line = 0; line < 70; line += 5) {
-        cm.setCursor(line, ch);
-        var coords = cm.charCoords(Pos(line, ch), sys);
-        var pos = cm.coordsChar({left: coords.left + 1, top: coords.top + 1}, sys);
-        eqPos(pos, Pos(line, ch));
-      }
-    }
-  }
-}, {lineNumbers: true});
-
-testCM("posFromIndex", function(cm) {
-  cm.setValue(
-    "This function should\n" +
-    "convert a zero based index\n" +
-    "to line and ch."
-  );
-
-  var examples = [
-    { index: -1, line: 0, ch: 0  }, // <- Tests clipping
-    { index: 0,  line: 0, ch: 0  },
-    { index: 10, line: 0, ch: 10 },
-    { index: 39, line: 1, ch: 18 },
-    { index: 55, line: 2, ch: 7  },
-    { index: 63, line: 2, ch: 15 },
-    { index: 64, line: 2, ch: 15 }  // <- Tests clipping
-  ];
-
-  for (var i = 0; i < examples.length; i++) {
-    var example = examples[i];
-    var pos = cm.posFromIndex(example.index);
-    eq(pos.line, example.line);
-    eq(pos.ch, example.ch);
-    if (example.index >= 0 && example.index < 64)
-      eq(cm.indexFromPos(pos), example.index);
-  }
-});
-
-testCM("undo", function(cm) {
-  cm.replaceRange("def", Pos(0, 0), Pos(0));
-  eq(cm.historySize().undo, 1);
-  cm.undo();
-  eq(cm.getValue(), "abc");
-  eq(cm.historySize().undo, 0);
-  eq(cm.historySize().redo, 1);
-  cm.redo();
-  eq(cm.getValue(), "def");
-  eq(cm.historySize().undo, 1);
-  eq(cm.historySize().redo, 0);
-  cm.setValue("1\n\n\n2");
-  cm.clearHistory();
-  eq(cm.historySize().undo, 0);
-  for (var i = 0; i < 20; ++i) {
-    cm.replaceRange("a", Pos(0, 0));
-    cm.replaceRange("b", Pos(3, 0));
-  }
-  eq(cm.historySize().undo, 40);
-  for (var i = 0; i < 40; ++i)
-    cm.undo();
-  eq(cm.historySize().redo, 40);
-  eq(cm.getValue(), "1\n\n\n2");
-}, {value: "abc"});
-
-testCM("undoDepth", function(cm) {
-  cm.replaceRange("d", Pos(0));
-  cm.replaceRange("e", Pos(0));
-  cm.replaceRange("f", Pos(0));
-  cm.undo(); cm.undo(); cm.undo();
-  eq(cm.getValue(), "abcd");
-}, {value: "abc", undoDepth: 4});
-
-testCM("undoDoesntClearValue", function(cm) {
-  cm.undo();
-  eq(cm.getValue(), "x");
-}, {value: "x"});
-
-testCM("undoMultiLine", function(cm) {
-  cm.operation(function() {
-    cm.replaceRange("x", Pos(0, 0));
-    cm.replaceRange("y", Pos(1, 0));
-  });
-  cm.undo();
-  eq(cm.getValue(), "abc\ndef\nghi");
-  cm.operation(function() {
-    cm.replaceRange("y", Pos(1, 0));
-    cm.replaceRange("x", Pos(0, 0));
-  });
-  cm.undo();
-  eq(cm.getValue(), "abc\ndef\nghi");
-  cm.operation(function() {
-    cm.replaceRange("y", Pos(2, 0));
-    cm.replaceRange("x", Pos(1, 0));
-    cm.replaceRange("z", Pos(2, 0));
-  });
-  cm.undo();
-  eq(cm.getValue(), "abc\ndef\nghi", 3);
-}, {value: "abc\ndef\nghi"});
-
-testCM("undoComposite", function(cm) {
-  cm.replaceRange("y", Pos(1));
-  cm.operation(function() {
-    cm.replaceRange("x", Pos(0));
-    cm.replaceRange("z", Pos(2));
-  });
-  eq(cm.getValue(), "ax\nby\ncz\n");
-  cm.undo();
-  eq(cm.getValue(), "a\nby\nc\n");
-  cm.undo();
-  eq(cm.getValue(), "a\nb\nc\n");
-  cm.redo(); cm.redo();
-  eq(cm.getValue(), "ax\nby\ncz\n");
-}, {value: "a\nb\nc\n"});
-
-testCM("undoSelection", function(cm) {
-  cm.setSelection(Pos(0, 2), Pos(0, 4));
-  cm.replaceSelection("");
-  cm.setCursor(Pos(1, 0));
-  cm.undo();
-  eqPos(cm.getCursor(true), Pos(0, 2));
-  eqPos(cm.getCursor(false), Pos(0, 4));
-  cm.setCursor(Pos(1, 0));
-  cm.redo();
-  eqPos(cm.getCursor(true), Pos(0, 2));
-  eqPos(cm.getCursor(false), Pos(0, 2));
-}, {value: "abcdefgh\n"});
-
-testCM("undoSelectionAsBefore", function(cm) {
-  cm.replaceSelection("abc", "around");
-  cm.undo();
-  cm.redo();
-  eq(cm.getSelection(), "abc");
-});
-
-testCM("selectionChangeConfusesHistory", function(cm) {
-  cm.replaceSelection("abc", null, "dontmerge");
-  cm.operation(function() {
-    cm.setCursor(Pos(0, 0));
-    cm.replaceSelection("abc", null, "dontmerge");
-  });
-  eq(cm.historySize().undo, 2);
-});
-
-testCM("markTextSingleLine", function(cm) {
-  forEach([{a: 0, b: 1, c: "", f: 2, t: 5},
-           {a: 0, b: 4, c: "", f: 0, t: 2},
-           {a: 1, b: 2, c: "x", f: 3, t: 6},
-           {a: 4, b: 5, c: "", f: 3, t: 5},
-           {a: 4, b: 5, c: "xx", f: 3, t: 7},
-           {a: 2, b: 5, c: "", f: 2, t: 3},
-           {a: 2, b: 5, c: "abcd", f: 6, t: 7},
-           {a: 2, b: 6, c: "x", f: null, t: null},
-           {a: 3, b: 6, c: "", f: null, t: null},
-           {a: 0, b: 9, c: "hallo", f: null, t: null},
-           {a: 4, b: 6, c: "x", f: 3, t: 4},
-           {a: 4, b: 8, c: "", f: 3, t: 4},
-           {a: 6, b: 6, c: "a", f: 3, t: 6},
-           {a: 8, b: 9, c: "", f: 3, t: 6}], function(test) {
-    cm.setValue("1234567890");
-    var r = cm.markText(Pos(0, 3), Pos(0, 6), {className: "foo"});
-    cm.replaceRange(test.c, Pos(0, test.a), Pos(0, test.b));
-    var f = r.find();
-    eq(f && f.from.ch, test.f); eq(f && f.to.ch, test.t);
-  });
-});
-
-testCM("markTextMultiLine", function(cm) {
-  function p(v) { return v && Pos(v[0], v[1]); }
-  forEach([{a: [0, 0], b: [0, 5], c: "", f: [0, 0], t: [2, 5]},
-           {a: [0, 0], b: [0, 5], c: "foo\n", f: [1, 0], t: [3, 5]},
-           {a: [0, 1], b: [0, 10], c: "", f: [0, 1], t: [2, 5]},
-           {a: [0, 5], b: [0, 6], c: "x", f: [0, 6], t: [2, 5]},
-           {a: [0, 0], b: [1, 0], c: "", f: [0, 0], t: [1, 5]},
-           {a: [0, 6], b: [2, 4], c: "", f: [0, 5], t: [0, 7]},
-           {a: [0, 6], b: [2, 4], c: "aa", f: [0, 5], t: [0, 9]},
-           {a: [1, 2], b: [1, 8], c: "", f: [0, 5], t: [2, 5]},
-           {a: [0, 5], b: [2, 5], c: "xx", f: null, t: null},
-           {a: [0, 0], b: [2, 10], c: "x", f: null, t: null},
-           {a: [1, 5], b: [2, 5], c: "", f: [0, 5], t: [1, 5]},
-           {a: [2, 0], b: [2, 3], c: "", f: [0, 5], t: [2, 2]},
-           {a: [2, 5], b: [3, 0], c: "a\nb", f: [0, 5], t: [2, 5]},
-           {a: [2, 3], b: [3, 0], c: "x", f: [0, 5], t: [2, 3]},
-           {a: [1, 1], b: [1, 9], c: "1\n2\n3", f: [0, 5], t: [4, 5]}], function(test) {
-    cm.setValue("aaaaaaaaaa\nbbbbbbbbbb\ncccccccccc\ndddddddd\n");
-    var r = cm.markText(Pos(0, 5), Pos(2, 5),
-                        {className: "CodeMirror-matchingbracket"});
-    cm.replaceRange(test.c, p(test.a), p(test.b));
-    var f = r.find();
-    eqPos(f && f.from, p(test.f)); eqPos(f && f.to, p(test.t));
-  });
-});
-
-testCM("markTextUndo", function(cm) {
-  var marker1, marker2, bookmark;
-  marker1 = cm.markText(Pos(0, 1), Pos(0, 3),
-                        {className: "CodeMirror-matchingbracket"});
-  marker2 = cm.markText(Pos(0, 0), Pos(2, 1),
-                        {className: "CodeMirror-matchingbracket"});
-  bookmark = cm.setBookmark(Pos(1, 5));
-  cm.operation(function(){
-    cm.replaceRange("foo", Pos(0, 2));
-    cm.replaceRange("bar\nbaz\nbug\n", Pos(2, 0), Pos(3, 0));
-  });
-  var v1 = cm.getValue();
-  cm.setValue("");
-  eq(marker1.find(), null); eq(marker2.find(), null); eq(bookmark.find(), null);
-  cm.undo();
-  eqPos(bookmark.find(), Pos(1, 5), "still there");
-  cm.undo();
-  var m1Pos = marker1.find(), m2Pos = marker2.find();
-  eqPos(m1Pos.from, Pos(0, 1)); eqPos(m1Pos.to, Pos(0, 3));
-  eqPos(m2Pos.from, Pos(0, 0)); eqPos(m2Pos.to, Pos(2, 1));
-  eqPos(bookmark.find(), Pos(1, 5));
-  cm.redo(); cm.redo();
-  eq(bookmark.find(), null);
-  cm.undo();
-  eqPos(bookmark.find(), Pos(1, 5));
-  eq(cm.getValue(), v1);
-}, {value: "1234\n56789\n00\n"});
-
-testCM("markTextStayGone", function(cm) {
-  var m1 = cm.markText(Pos(0, 0), Pos(0, 1));
-  cm.replaceRange("hi", Pos(0, 2));
-  m1.clear();
-  cm.undo();
-  eq(m1.find(), null);
-}, {value: "hello"});
-
-testCM("markTextAllowEmpty", function(cm) {
-  var m1 = cm.markText(Pos(0, 1), Pos(0, 2), {clearWhenEmpty: false});
-  is(m1.find());
-  cm.replaceRange("x", Pos(0, 0));
-  is(m1.find());
-  cm.replaceRange("y", Pos(0, 2));
-  is(m1.find());
-  cm.replaceRange("z", Pos(0, 3), Pos(0, 4));
-  is(!m1.find());
-  var m2 = cm.markText(Pos(0, 1), Pos(0, 2), {clearWhenEmpty: false,
-                                              inclusiveLeft: true,
-                                              inclusiveRight: true});
-  cm.replaceRange("q", Pos(0, 1), Pos(0, 2));
-  is(m2.find());
-  cm.replaceRange("", Pos(0, 0), Pos(0, 3));
-  is(!m2.find());
-  var m3 = cm.markText(Pos(0, 1), Pos(0, 1), {clearWhenEmpty: false});
-  cm.replaceRange("a", Pos(0, 3));
-  is(m3.find());
-  cm.replaceRange("b", Pos(0, 1));
-  is(!m3.find());
-}, {value: "abcde"});
-
-testCM("markTextStacked", function(cm) {
-  var m1 = cm.markText(Pos(0, 0), Pos(0, 0), {clearWhenEmpty: false});
-  var m2 = cm.markText(Pos(0, 0), Pos(0, 0), {clearWhenEmpty: false});
-  cm.replaceRange("B", Pos(0, 1));
-  is(m1.find() && m2.find());
-}, {value: "A"});
-
-testCM("undoPreservesNewMarks", function(cm) {
-  cm.markText(Pos(0, 3), Pos(0, 4));
-  cm.markText(Pos(1, 1), Pos(1, 3));
-  cm.replaceRange("", Pos(0, 3), Pos(3, 1));
-  var mBefore = cm.markText(Pos(0, 0), Pos(0, 1));
-  var mAfter = cm.markText(Pos(0, 5), Pos(0, 6));
-  var mAround = cm.markText(Pos(0, 2), Pos(0, 4));
-  cm.undo();
-  eqPos(mBefore.find().from, Pos(0, 0));
-  eqPos(mBefore.find().to, Pos(0, 1));
-  eqPos(mAfter.find().from, Pos(3, 3));
-  eqPos(mAfter.find().to, Pos(3, 4));
-  eqPos(mAround.find().from, Pos(0, 2));
-  eqPos(mAround.find().to, Pos(3, 2));
-  var found = cm.findMarksAt(Pos(2, 2));
-  eq(found.length, 1);
-  eq(found[0], mAround);
-}, {value: "aaaa\nbbbb\ncccc\ndddd"});
-
-testCM("markClearBetween", function(cm) {
-  cm.setValue("aaa\nbbb\nccc\nddd\n");
-  cm.markText(Pos(0, 0), Pos(2));
-  cm.replaceRange("aaa\nbbb\nccc", Pos(0, 0), Pos(2));
-  eq(cm.findMarksAt(Pos(1, 1)).length, 0);
-});
-
-testCM("deleteSpanCollapsedInclusiveLeft", function(cm) {
-  var from = Pos(1, 0), to = Pos(1, 1);
-  var m = cm.markText(from, to, {collapsed: true, inclusiveLeft: true});
-  // Delete collapsed span.
-  cm.replaceRange("", from, to);
-}, {value: "abc\nX\ndef"});
-
-testCM("markTextCSS", function(cm) {
-  function present() {
-    var spans = cm.display.lineDiv.getElementsByTagName("span");
-    for (var i = 0; i < spans.length; i++)
-      if (spans[i].style.color == "cyan" && span[i].textContent == "cdefg") return true;
-  }
-  var m = cm.markText(Pos(0, 2), Pos(0, 6), {css: "color: cyan"});
-  m.clear();
-  is(!present());
-}, {value: "abcdefgh"});
-
-testCM("bookmark", function(cm) {
-  function p(v) { return v && Pos(v[0], v[1]); }
-  forEach([{a: [1, 0], b: [1, 1], c: "", d: [1, 4]},
-           {a: [1, 1], b: [1, 1], c: "xx", d: [1, 7]},
-           {a: [1, 4], b: [1, 5], c: "ab", d: [1, 6]},
-           {a: [1, 4], b: [1, 6], c: "", d: null},
-           {a: [1, 5], b: [1, 6], c: "abc", d: [1, 5]},
-           {a: [1, 6], b: [1, 8], c: "", d: [1, 5]},
-           {a: [1, 4], b: [1, 4], c: "\n\n", d: [3, 1]},
-           {bm: [1, 9], a: [1, 1], b: [1, 1], c: "\n", d: [2, 8]}], function(test) {
-    cm.setValue("1234567890\n1234567890\n1234567890");
-    var b = cm.setBookmark(p(test.bm) || Pos(1, 5));
-    cm.replaceRange(test.c, p(test.a), p(test.b));
-    eqPos(b.find(), p(test.d));
-  });
-});
-
-testCM("bookmarkInsertLeft", function(cm) {
-  var br = cm.setBookmark(Pos(0, 2), {insertLeft: false});
-  var bl = cm.setBookmark(Pos(0, 2), {insertLeft: true});
-  cm.setCursor(Pos(0, 2));
-  cm.replaceSelection("hi");
-  eqPos(br.find(), Pos(0, 2));
-  eqPos(bl.find(), Pos(0, 4));
-  cm.replaceRange("", Pos(0, 4), Pos(0, 5));
-  cm.replaceRange("", Pos(0, 2), Pos(0, 4));
-  cm.replaceRange("", Pos(0, 1), Pos(0, 2));
-  // Verify that deleting next to bookmarks doesn't kill them
-  eqPos(br.find(), Pos(0, 1));
-  eqPos(bl.find(), Pos(0, 1));
-}, {value: "abcdef"});
-
-testCM("bookmarkCursor", function(cm) {
-  var pos01 = cm.cursorCoords(Pos(0, 1)), pos11 = cm.cursorCoords(Pos(1, 1)),
-      pos20 = cm.cursorCoords(Pos(2, 0)), pos30 = cm.cursorCoords(Pos(3, 0)),
-      pos41 = cm.cursorCoords(Pos(4, 1));
-  cm.setBookmark(Pos(0, 1), {widget: document.createTextNode("←"), insertLeft: true});
-  cm.setBookmark(Pos(2, 0), {widget: document.createTextNode("←"), insertLeft: true});
-  cm.setBookmark(Pos(1, 1), {widget: document.createTextNode("→")});
-  cm.setBookmark(Pos(3, 0), {widget: document.createTextNode("→")});
-  var new01 = cm.cursorCoords(Pos(0, 1)), new11 = cm.cursorCoords(Pos(1, 1)),
-      new20 = cm.cursorCoords(Pos(2, 0)), new30 = cm.cursorCoords(Pos(3, 0));
-  near(new01.left, pos01.left, 1);
-  near(new01.top, pos01.top, 1);
-  is(new11.left > pos11.left, "at right, middle of line");
-  near(new11.top == pos11.top, 1);
-  near(new20.left, pos20.left, 1);
-  near(new20.top, pos20.top, 1);
-  is(new30.left > pos30.left, "at right, empty line");
-  near(new30.top, pos30, 1);
-  cm.setBookmark(Pos(4, 0), {widget: document.createTextNode("→")});
-  is(cm.cursorCoords(Pos(4, 1)).left > pos41.left, "single-char bug");
-}, {value: "foo\nbar\n\n\nx\ny"});
-
-testCM("multiBookmarkCursor", function(cm) {
-  if (phantom) return;
-  var ms = [], m;
-  function add(insertLeft) {
-    for (var i = 0; i < 3; ++i) {
-      var node = document.createElement("span");
-      node.innerHTML = "X";
-      ms.push(cm.setBookmark(Pos(0, 1), {widget: node, insertLeft: insertLeft}));
-    }
-  }
-  var base1 = cm.cursorCoords(Pos(0, 1)).left, base4 = cm.cursorCoords(Pos(0, 4)).left;
-  add(true);
-  near(base1, cm.cursorCoords(Pos(0, 1)).left, 1);
-  while (m = ms.pop()) m.clear();
-  add(false);
-  near(base4, cm.cursorCoords(Pos(0, 1)).left, 1);
-}, {value: "abcdefg"});
-
-testCM("getAllMarks", function(cm) {
-  addDoc(cm, 10, 10);
-  var m1 = cm.setBookmark(Pos(0, 2));
-  var m2 = cm.markText(Pos(0, 2), Pos(3, 2));
-  var m3 = cm.markText(Pos(1, 2), Pos(1, 8));
-  var m4 = cm.markText(Pos(8, 0), Pos(9, 0));
-  eq(cm.getAllMarks().length, 4);
-  m1.clear();
-  m3.clear();
-  eq(cm.getAllMarks().length, 2);
-});
-
-testCM("bug577", function(cm) {
-  cm.setValue("a\nb");
-  cm.clearHistory();
-  cm.setValue("fooooo");
-  cm.undo();
-});
-
-testCM("scrollSnap", function(cm) {
-  cm.setSize(100, 100);
-  addDoc(cm, 200, 200);
-  cm.setCursor(Pos(100, 180));
-  var info = cm.getScrollInfo();
-  is(info.left > 0 && info.top > 0);
-  cm.setCursor(Pos(0, 0));
-  info = cm.getScrollInfo();
-  is(info.left == 0 && info.top == 0, "scrolled clean to top");
-  cm.setCursor(Pos(100, 180));
-  cm.setCursor(Pos(199, 0));
-  info = cm.getScrollInfo();
-  is(info.left == 0 && info.top + 2 > info.height - cm.getScrollerElement().clientHeight, "scrolled clean to bottom");
-});
-
-testCM("scrollIntoView", function(cm) {
-  if (phantom) return;
-  var outer = cm.getWrapperElement().getBoundingClientRect();
-  function test(line, ch, msg) {
-    var pos = Pos(line, ch);
-    cm.scrollIntoView(pos);
-    var box = cm.charCoords(pos, "window");
-    is(box.left >= outer.left, msg + " (left)");
-    is(box.right <= outer.right, msg + " (right)");
-    is(box.top >= outer.top, msg + " (top)");
-    is(box.bottom <= outer.bottom, msg + " (bottom)");
-  }
-  addDoc(cm, 200, 200);
-  test(199, 199, "bottom right");
-  test(0, 0, "top left");
-  test(100, 100, "center");
-  test(199, 0, "bottom left");
-  test(0, 199, "top right");
-  test(100, 100, "center again");
-});
-
-testCM("scrollBackAndForth", function(cm) {
-  addDoc(cm, 1, 200);
-  cm.operation(function() {
-    cm.scrollIntoView(Pos(199, 0));
-    cm.scrollIntoView(Pos(4, 0));
-  });
-  is(cm.getScrollInfo().top > 0);
-});
-
-testCM("selectAllNoScroll", function(cm) {
-  addDoc(cm, 1, 200);
-  cm.execCommand("selectAll");
-  eq(cm.getScrollInfo().top, 0);
-  cm.setCursor(199);
-  cm.execCommand("selectAll");
-  is(cm.getScrollInfo().top > 0);
-});
-
-testCM("selectionPos", function(cm) {
-  if (phantom) return;
-  cm.setSize(100, 100);
-  addDoc(cm, 200, 100);
-  cm.setSelection(Pos(1, 100), Pos(98, 100));
-  var lineWidth = cm.charCoords(Pos(0, 200), "local").left;
-  var lineHeight = (cm.charCoords(Pos(99)).top - cm.charCoords(Pos(0)).top) / 100;
-  cm.scrollTo(0, 0);
-  var selElt = byClassName(cm.getWrapperElement(), "CodeMirror-selected");
-  var outer = cm.getWrapperElement().getBoundingClientRect();
-  var sawMiddle, sawTop, sawBottom;
-  for (var i = 0, e = selElt.length; i < e; ++i) {
-    var box = selElt[i].getBoundingClientRect();
-    var atLeft = box.left - outer.left < 30;
-    var width = box.right - box.left;
-    var atRight = box.right - outer.left > .8 * lineWidth;
-    if (atLeft && atRight) {
-      sawMiddle = true;
-      is(box.bottom - box.top > 90 * lineHeight, "middle high");
-      is(width > .9 * lineWidth, "middle wide");
-    } else {
-      is(width > .4 * lineWidth, "top/bot wide enough");
-      is(width < .6 * lineWidth, "top/bot slim enough");
-      if (atLeft) {
-        sawBottom = true;
-        is(box.top - outer.top > 96 * lineHeight, "bot below");
-      } else if (atRight) {
-        sawTop = true;
-        is(box.top - outer.top < 2.1 * lineHeight, "top above");
-      }
-    }
-  }
-  is(sawTop && sawBottom && sawMiddle, "all parts");
-}, null);
-
-testCM("restoreHistory", function(cm) {
-  cm.setValue("abc\ndef");
-  cm.replaceRange("hello", Pos(1, 0), Pos(1));
-  cm.replaceRange("goop", Pos(0, 0), Pos(0));
-  cm.undo();
-  var storedVal = cm.getValue(), storedHist = cm.getHistory();
-  if (window.JSON) storedHist = JSON.parse(JSON.stringify(storedHist));
-  eq(storedVal, "abc\nhello");
-  cm.setValue("");
-  cm.clearHistory();
-  eq(cm.historySize().undo, 0);
-  cm.setValue(storedVal);
-  cm.setHistory(storedHist);
-  cm.redo();
-  eq(cm.getValue(), "goop\nhello");
-  cm.undo(); cm.undo();
-  eq(cm.getValue(), "abc\ndef");
-});
-
-testCM("doubleScrollbar", function(cm) {
-  var dummy = document.body.appendChild(document.createElement("p"));
-  dummy.style.cssText = "height: 50px; overflow: scroll; width: 50px";
-  var scrollbarWidth = dummy.offsetWidth + 1 - dummy.clientWidth;
-  document.body.removeChild(dummy);
-  if (scrollbarWidth < 2) return;
-  cm.setSize(null, 100);
-  addDoc(cm, 1, 300);
-  var wrap = cm.getWrapperElement();
-  is(wrap.offsetWidth - byClassName(wrap, "CodeMirror-lines")[0].offsetWidth <= scrollbarWidth * 1.5);
-});
-
-testCM("weirdLinebreaks", function(cm) {
-  cm.setValue("foo\nbar\rbaz\r\nquux\n\rplop");
-  is(cm.getValue(), "foo\nbar\nbaz\nquux\n\nplop");
-  is(cm.lineCount(), 6);
-  cm.setValue("\n\n");
-  is(cm.lineCount(), 3);
-});
-
-testCM("setSize", function(cm) {
-  cm.setSize(100, 100);
-  var wrap = cm.getWrapperElement();
-  is(wrap.offsetWidth, 100);
-  is(wrap.offsetHeight, 100);
-  cm.setSize("100%", "3em");
-  is(wrap.style.width, "100%");
-  is(wrap.style.height, "3em");
-  cm.setSize(null, 40);
-  is(wrap.style.width, "100%");
-  is(wrap.style.height, "40px");
-});
-
-function foldLines(cm, start, end, autoClear) {
-  return cm.markText(Pos(start, 0), Pos(end - 1), {
-    inclusiveLeft: true,
-    inclusiveRight: true,
-    collapsed: true,
-    clearOnEnter: autoClear
-  });
-}
-
-testCM("collapsedLines", function(cm) {
-  addDoc(cm, 4, 10);
-  var range = foldLines(cm, 4, 5), cleared = 0;
-  CodeMirror.on(range, "clear", function() {cleared++;});
-  cm.setCursor(Pos(3, 0));
-  CodeMirror.commands.goLineDown(cm);
-  eqPos(cm.getCursor(), Pos(5, 0));
-  cm.replaceRange("abcdefg", Pos(3, 0), Pos(3));
-  cm.setCursor(Pos(3, 6));
-  CodeMirror.commands.goLineDown(cm);
-  eqPos(cm.getCursor(), Pos(5, 4));
-  cm.replaceRange("ab", Pos(3, 0), Pos(3));
-  cm.setCursor(Pos(3, 2));
-  CodeMirror.commands.goLineDown(cm);
-  eqPos(cm.getCursor(), Pos(5, 2));
-  cm.operation(function() {range.clear(); range.clear();});
-  eq(cleared, 1);
-});
-
-testCM("collapsedRangeCoordsChar", function(cm) {
-  var pos_1_3 = cm.charCoords(Pos(1, 3));
-  pos_1_3.left += 2; pos_1_3.top += 2;
-  var opts = {collapsed: true, inclusiveLeft: true, inclusiveRight: true};
-  var m1 = cm.markText(Pos(0, 0), Pos(2, 0), opts);
-  eqPos(cm.coordsChar(pos_1_3), Pos(3, 3));
-  m1.clear();
-  var m1 = cm.markText(Pos(0, 0), Pos(1, 1), {collapsed: true, inclusiveLeft: true});
-  var m2 = cm.markText(Pos(1, 1), Pos(2, 0), {collapsed: true, inclusiveRight: true});
-  eqPos(cm.coordsChar(pos_1_3), Pos(3, 3));
-  m1.clear(); m2.clear();
-  var m1 = cm.markText(Pos(0, 0), Pos(1, 6), opts);
-  eqPos(cm.coordsChar(pos_1_3), Pos(3, 3));
-}, {value: "123456\nabcdef\nghijkl\nmnopqr\n"});
-
-testCM("collapsedRangeBetweenLinesSelected", function(cm) {
-  var widget = document.createElement("span");
-  widget.textContent = "\u2194";
-  cm.markText(Pos(0, 3), Pos(1, 0), {replacedWith: widget});
-  cm.setSelection(Pos(0, 3), Pos(1, 0));
-  var selElts = byClassName(cm.getWrapperElement(), "CodeMirror-selected");
-  for (var i = 0, w = 0; i < selElts.length; i++)
-    w += selElts[i].offsetWidth;
-  is(w > 0);
-}, {value: "one\ntwo"});
-
-testCM("randomCollapsedRanges", function(cm) {
-  addDoc(cm, 20, 500);
-  cm.operation(function() {
-    for (var i = 0; i < 200; i++) {
-      var start = Pos(Math.floor(Math.random() * 500), Math.floor(Math.random() * 20));
-      if (i % 4)
-        try { cm.markText(start, Pos(start.line + 2, 1), {collapsed: true}); }
-        catch(e) { if (!/overlapping/.test(String(e))) throw e; }
-      else
-        cm.markText(start, Pos(start.line, start.ch + 4), {"className": "foo"});
-    }
-  });
-});
-
-testCM("hiddenLinesAutoUnfold", function(cm) {
-  var range = foldLines(cm, 1, 3, true), cleared = 0;
-  CodeMirror.on(range, "clear", function() {cleared++;});
-  cm.setCursor(Pos(3, 0));
-  eq(cleared, 0);
-  cm.execCommand("goCharLeft");
-  eq(cleared, 1);
-  range = foldLines(cm, 1, 3, true);
-  CodeMirror.on(range, "clear", function() {cleared++;});
-  eqPos(cm.getCursor(), Pos(3, 0));
-  cm.setCursor(Pos(0, 3));
-  cm.execCommand("goCharRight");
-  eq(cleared, 2);
-}, {value: "abc\ndef\nghi\njkl"});
-
-testCM("hiddenLinesSelectAll", function(cm) {  // Issue #484
-  addDoc(cm, 4, 20);
-  foldLines(cm, 0, 10);
-  foldLines(cm, 11, 20);
-  CodeMirror.commands.selectAll(cm);
-  eqPos(cm.getCursor(true), Pos(10, 0));
-  eqPos(cm.getCursor(false), Pos(10, 4));
-});
-
-
-testCM("everythingFolded", function(cm) {
-  addDoc(cm, 2, 2);
-  function enterPress() {
-    cm.triggerOnKeyDown({type: "keydown", keyCode: 13, preventDefault: function(){}, stopPropagation: function(){}});
-  }
-  var fold = foldLines(cm, 0, 2);
-  enterPress();
-  eq(cm.getValue(), "xx\nxx");
-  fold.clear();
-  fold = foldLines(cm, 0, 2, true);
-  eq(fold.find(), null);
-  enterPress();
-  eq(cm.getValue(), "\nxx\nxx");
-});
-
-testCM("structuredFold", function(cm) {
-  if (phantom) return;
-  addDoc(cm, 4, 8);
-  var range = cm.markText(Pos(1, 2), Pos(6, 2), {
-    replacedWith: document.createTextNode("Q")
-  });
-  cm.setCursor(0, 3);
-  CodeMirror.commands.goLineDown(cm);
-  eqPos(cm.getCursor(), Pos(6, 2));
-  CodeMirror.commands.goCharLeft(cm);
-  eqPos(cm.getCursor(), Pos(1, 2));
-  CodeMirror.commands.delCharAfter(cm);
-  eq(cm.getValue(), "xxxx\nxxxx\nxxxx");
-  addDoc(cm, 4, 8);
-  range = cm.markText(Pos(1, 2), Pos(6, 2), {
-    replacedWith: document.createTextNode("M"),
-    clearOnEnter: true
-  });
-  var cleared = 0;
-  CodeMirror.on(range, "clear", function(){++cleared;});
-  cm.setCursor(0, 3);
-  CodeMirror.commands.goLineDown(cm);
-  eqPos(cm.getCursor(), Pos(6, 2));
-  CodeMirror.commands.goCharLeft(cm);
-  eqPos(cm.getCursor(), Pos(6, 1));
-  eq(cleared, 1);
-  range.clear();
-  eq(cleared, 1);
-  range = cm.markText(Pos(1, 2), Pos(6, 2), {
-    replacedWith: document.createTextNode("Q"),
-    clearOnEnter: true
-  });
-  range.clear();
-  cm.setCursor(1, 2);
-  CodeMirror.commands.goCharRight(cm);
-  eqPos(cm.getCursor(), Pos(1, 3));
-  range = cm.markText(Pos(2, 0), Pos(4, 4), {
-    replacedWith: document.createTextNode("M")
-  });
-  cm.setCursor(1, 0);
-  CodeMirror.commands.goLineDown(cm);
-  eqPos(cm.getCursor(), Pos(2, 0));
-}, null);
-
-testCM("nestedFold", function(cm) {
-  addDoc(cm, 10, 3);
-  function fold(ll, cl, lr, cr) {
-    return cm.markText(Pos(ll, cl), Pos(lr, cr), {collapsed: true});
-  }
-  var inner1 = fold(0, 6, 1, 3), inner2 = fold(0, 2, 1, 8), outer = fold(0, 1, 2, 3), inner0 = fold(0, 5, 0, 6);
-  cm.setCursor(0, 1);
-  CodeMirror.commands.goCharRight(cm);
-  eqPos(cm.getCursor(), Pos(2, 3));
-  inner0.clear();
-  CodeMirror.commands.goCharLeft(cm);
-  eqPos(cm.getCursor(), Pos(0, 1));
-  outer.clear();
-  CodeMirror.commands.goCharRight(cm);
-  eqPos(cm.getCursor(), Pos(0, 2));
-  CodeMirror.commands.goCharRight(cm);
-  eqPos(cm.getCursor(), Pos(1, 8));
-  inner2.clear();
-  CodeMirror.commands.goCharLeft(cm);
-  eqPos(cm.getCursor(), Pos(1, 7));
-  cm.setCursor(0, 5);
-  CodeMirror.commands.goCharRight(cm);
-  eqPos(cm.getCursor(), Pos(0, 6));
-  CodeMirror.commands.goCharRight(cm);
-  eqPos(cm.getCursor(), Pos(1, 3));
-});
-
-testCM("badNestedFold", function(cm) {
-  addDoc(cm, 4, 4);
-  cm.markText(Pos(0, 2), Pos(3, 2), {collapsed: true});
-  var caught;
-  try {cm.markText(Pos(0, 1), Pos(0, 3), {collapsed: true});}
-  catch(e) {caught = e;}
-  is(caught instanceof Error, "no error");
-  is(/overlap/i.test(caught.message), "wrong error");
-});
-
-testCM("nestedFoldOnSide", function(cm) {
-  var m1 = cm.markText(Pos(0, 1), Pos(2, 1), {collapsed: true, inclusiveRight: true});
-  var m2 = cm.markText(Pos(0, 1), Pos(0, 2), {collapsed: true});
-  cm.markText(Pos(0, 1), Pos(0, 2), {collapsed: true}).clear();
-  try { cm.markText(Pos(0, 1), Pos(0, 2), {collapsed: true, inclusiveLeft: true}); }
-  catch(e) { var caught = e; }
-  is(caught && /overlap/i.test(caught.message));
-  var m3 = cm.markText(Pos(2, 0), Pos(2, 1), {collapsed: true});
-  var m4 = cm.markText(Pos(2, 0), Pos(2, 1), {collapse: true, inclusiveRight: true});
-  m1.clear(); m4.clear();
-  m1 = cm.markText(Pos(0, 1), Pos(2, 1), {collapsed: true});
-  cm.markText(Pos(2, 0), Pos(2, 1), {collapsed: true}).clear();
-  try { cm.markText(Pos(2, 0), Pos(2, 1), {collapsed: true, inclusiveRight: true}); }
-  catch(e) { var caught = e; }
-  is(caught && /overlap/i.test(caught.message));
-}, {value: "ab\ncd\ef"});
-
-testCM("editInFold", function(cm) {
-  addDoc(cm, 4, 6);
-  var m = cm.markText(Pos(1, 2), Pos(3, 2), {collapsed: true});
-  cm.replaceRange("", Pos(0, 0), Pos(1, 3));
-  cm.replaceRange("", Pos(2, 1), Pos(3, 3));
-  cm.replaceRange("a\nb\nc\nd", Pos(0, 1), Pos(1, 0));
-  cm.cursorCoords(Pos(0, 0));
-});
-
-testCM("wrappingInlineWidget", function(cm) {
-  cm.setSize("11em");
-  var w = document.createElement("span");
-  w.style.color = "red";
-  w.innerHTML = "one two three four";
-  cm.markText(Pos(0, 6), Pos(0, 9), {replacedWith: w});
-  var cur0 = cm.cursorCoords(Pos(0, 0)), cur1 = cm.cursorCoords(Pos(0, 10));
-  is(cur0.top < cur1.top);
-  is(cur0.bottom < cur1.bottom);
-  var curL = cm.cursorCoords(Pos(0, 6)), curR = cm.cursorCoords(Pos(0, 9));
-  eq(curL.top, cur0.top);
-  eq(curL.bottom, cur0.bottom);
-  eq(curR.top, cur1.top);
-  eq(curR.bottom, cur1.bottom);
-  cm.replaceRange("", Pos(0, 9), Pos(0));
-  curR = cm.cursorCoords(Pos(0, 9));
-  if (phantom) return;
-  eq(curR.top, cur1.top);
-  eq(curR.bottom, cur1.bottom);
-}, {value: "1 2 3 xxx 4", lineWrapping: true});
-
-testCM("changedInlineWidget", function(cm) {
-  cm.setSize("10em");
-  var w = document.createElement("span");
-  w.innerHTML = "x";
-  var m = cm.markText(Pos(0, 4), Pos(0, 5), {replacedWith: w});
-  w.innerHTML = "and now the widget is really really long all of a sudden and a scrollbar is needed";
-  m.changed();
-  var hScroll = byClassName(cm.getWrapperElement(), "CodeMirror-hscrollbar")[0];
-  is(hScroll.scrollWidth > hScroll.clientWidth);
-}, {value: "hello there"});
-
-testCM("changedBookmark", function(cm) {
-  cm.setSize("10em");
-  var w = document.createElement("span");
-  w.innerHTML = "x";
-  var m = cm.setBookmark(Pos(0, 4), {widget: w});
-  w.innerHTML = "and now the widget is really really long all of a sudden and a scrollbar is needed";
-  m.changed();
-  var hScroll = byClassName(cm.getWrapperElement(), "CodeMirror-hscrollbar")[0];
-  is(hScroll.scrollWidth > hScroll.clientWidth);
-}, {value: "abcdefg"});
-
-testCM("inlineWidget", function(cm) {
-  var w = cm.setBookmark(Pos(0, 2), {widget: document.createTextNode("uu")});
-  cm.setCursor(0, 2);
-  CodeMirror.commands.goLineDown(cm);
-  eqPos(cm.getCursor(), Pos(1, 4));
-  cm.setCursor(0, 2);
-  cm.replaceSelection("hi");
-  eqPos(w.find(), Pos(0, 2));
-  cm.setCursor(0, 1);
-  cm.replaceSelection("ay");
-  eqPos(w.find(), Pos(0, 4));
-  eq(cm.getLine(0), "uayuhiuu");
-}, {value: "uuuu\nuuuuuu"});
-
-testCM("wrappingAndResizing", function(cm) {
-  cm.setSize(null, "auto");
-  cm.setOption("lineWrapping", true);
-  var wrap = cm.getWrapperElement(), h0 = wrap.offsetHeight;
-  var doc = "xxx xxx xxx xxx xxx";
-  cm.setValue(doc);
-  for (var step = 10, w = cm.charCoords(Pos(0, 18), "div").right;; w += step) {
-    cm.setSize(w);
-    if (wrap.offsetHeight <= h0 * (opera_lt10 ? 1.2 : 1.5)) {
-      if (step == 10) { w -= 10; step = 1; }
-      else break;
-    }
-  }
-  // Ensure that putting the cursor at the end of the maximally long
-  // line doesn't cause wrapping to happen.
-  cm.setCursor(Pos(0, doc.length));
-  eq(wrap.offsetHeight, h0);
-  cm.replaceSelection("x");
-  is(wrap.offsetHeight > h0, "wrapping happens");
-  // Now add a max-height and, in a document consisting of
-  // almost-wrapped lines, go over it so that a scrollbar appears.
-  cm.setValue(doc + "\n" + doc + "\n");
-  cm.getScrollerElement().style.maxHeight = "100px";
-  cm.replaceRange("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n!\n", Pos(2, 0));
-  forEach([Pos(0, doc.length), Pos(0, doc.length - 1),
-           Pos(0, 0), Pos(1, doc.length), Pos(1, doc.length - 1)],
-          function(pos) {
-    var coords = cm.charCoords(pos);
-    eqPos(pos, cm.coordsChar({left: coords.left + 2, top: coords.top + 5}));
-  });
-}, null, ie_lt8);
-
-testCM("measureEndOfLine", function(cm) {
-  cm.setSize(null, "auto");
-  var inner = byClassName(cm.getWrapperElement(), "CodeMirror-lines")[0].firstChild;
-  var lh = inner.offsetHeight;
-  for (var step = 10, w = cm.charCoords(Pos(0, 7), "div").right;; w += step) {
-    cm.setSize(w);
-    if (inner.offsetHeight < 2.5 * lh) {
-      if (step == 10) { w -= 10; step = 1; }
-      else break;
-    }
-  }
-  cm.setValue(cm.getValue() + "\n\n");
-  var endPos = cm.charCoords(Pos(0, 18), "local");
-  is(endPos.top > lh * .8, "not at top");
-  is(endPos.left > w - 20, "not at right");
-  endPos = cm.charCoords(Pos(0, 18));
-  eqPos(cm.coordsChar({left: endPos.left, top: endPos.top + 5}), Pos(0, 18));
-}, {mode: "text/html", value: "<!-- foo barrr -->", lineWrapping: true}, ie_lt8 || opera_lt10);
-
-testCM("scrollVerticallyAndHorizontally", function(cm) {
-  cm.setSize(100, 100);
-  addDoc(cm, 40, 40);
-  cm.setCursor(39);
-  var wrap = cm.getWrapperElement(), bar = byClassName(wrap, "CodeMirror-vscrollbar")[0];
-  is(bar.offsetHeight < wrap.offsetHeight, "vertical scrollbar limited by horizontal one");
-  var cursorBox = byClassName(wrap, "CodeMirror-cursor")[0].getBoundingClientRect();
-  var editorBox = wrap.getBoundingClientRect();
-  is(cursorBox.bottom < editorBox.top + cm.getScrollerElement().clientHeight,
-     "bottom line visible");
-}, {lineNumbers: true});
-
-testCM("moveVstuck", function(cm) {
-  var lines = byClassName(cm.getWrapperElement(), "CodeMirror-lines")[0].firstChild, h0 = lines.offsetHeight;
-  var val = "fooooooooooooooooooooooooo baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar\n";
-  cm.setValue(val);
-  for (var w = cm.charCoords(Pos(0, 26), "div").right * 2.8;; w += 5) {
-    cm.setSize(w);
-    if (lines.offsetHeight <= 3.5 * h0) break;
-  }
-  cm.setCursor(Pos(0, val.length - 1));
-  cm.moveV(-1, "line");
-  eqPos(cm.getCursor(), Pos(0, 26));
-}, {lineWrapping: true}, ie_lt8 || opera_lt10);
-
-testCM("collapseOnMove", function(cm) {
-  cm.setSelection(Pos(0, 1), Pos(2, 4));
-  cm.execCommand("goLineUp");
-  is(!cm.somethingSelected());
-  eqPos(cm.getCursor(), Pos(0, 1));
-  cm.setSelection(Pos(0, 1), Pos(2, 4));
-  cm.execCommand("goPageDown");
-  is(!cm.somethingSelected());
-  eqPos(cm.getCursor(), Pos(2, 4));
-  cm.execCommand("goLineUp");
-  cm.execCommand("goLineUp");
-  eqPos(cm.getCursor(), Pos(0, 4));
-  cm.setSelection(Pos(0, 1), Pos(2, 4));
-  cm.execCommand("goCharLeft");
-  is(!cm.somethingSelected());
-  eqPos(cm.getCursor(), Pos(0, 1));
-}, {value: "aaaaa\nb\nccccc"});
-
-testCM("clickTab", function(cm) {
-  var p0 = cm.charCoords(Pos(0, 0));
-  eqPos(cm.coordsChar({left: p0.left + 5, top: p0.top + 5}), Pos(0, 0));
-  eqPos(cm.coordsChar({left: p0.right - 5, top: p0.top + 5}), Pos(0, 1));
-}, {value: "\t\n\n", lineWrapping: true, tabSize: 8});
-
-testCM("verticalScroll", function(cm) {
-  cm.setSize(100, 200);
-  cm.setValue("foo\nbar\nbaz\n");
-  var sc = cm.getScrollerElement(), baseWidth = sc.scrollWidth;
-  cm.replaceRange("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaah", Pos(0, 0), Pos(0));
-  is(sc.scrollWidth > baseWidth, "scrollbar present");
-  cm.replaceRange("foo", Pos(0, 0), Pos(0));
-  if (!phantom) eq(sc.scrollWidth, baseWidth, "scrollbar gone");
-  cm.replaceRange("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaah", Pos(0, 0), Pos(0));
-  cm.replaceRange("bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbh", Pos(1, 0), Pos(1));
-  is(sc.scrollWidth > baseWidth, "present again");
-  var curWidth = sc.scrollWidth;
-  cm.replaceRange("foo", Pos(0, 0), Pos(0));
-  is(sc.scrollWidth < curWidth, "scrollbar smaller");
-  is(sc.scrollWidth > baseWidth, "but still present");
-});
-
-testCM("extraKeys", function(cm) {
-  var outcome;
-  function fakeKey(expected, code, props) {
-    if (typeof code == "string") code = code.charCodeAt(0);
-    var e = {type: "keydown", keyCode: code, preventDefault: function(){}, stopPropagation: function(){}};
-    if (props) for (var n in props) e[n] = props[n];
-    outcome = null;
-    cm.triggerOnKeyDown(e);
-    eq(outcome, expected);
-  }
-  CodeMirror.commands.testCommand = function() {outcome = "tc";};
-  CodeMirror.commands.goTestCommand = function() {outcome = "gtc";};
-  cm.setOption("extraKeys", {"Shift-X": function() {outcome = "sx";},
-                             "X": function() {outcome = "x";},
-                             "Ctrl-Alt-U": function() {outcome = "cau";},
-                             "End": "testCommand",
-                             "Home": "goTestCommand",
-                             "Tab": false});
-  fakeKey(null, "U");
-  fakeKey("cau", "U", {ctrlKey: true, altKey: true});
-  fakeKey(null, "U", {shiftKey: true, ctrlKey: true, altKey: true});
-  fakeKey("x", "X");
-  fakeKey("sx", "X", {shiftKey: true});
-  fakeKey("tc", 35);
-  fakeKey(null, 35, {shiftKey: true});
-  fakeKey("gtc", 36);
-  fakeKey("gtc", 36, {shiftKey: true});
-  fakeKey(null, 9);
-}, null, window.opera && mac);
-
-testCM("wordMovementCommands", function(cm) {
-  cm.execCommand("goWordLeft");
-  eqPos(cm.getCursor(), Pos(0, 0));
-  cm.execCommand("goWordRight"); cm.execCommand("goWordRight");
-  eqPos(cm.getCursor(), Pos(0, 7));
-  cm.execCommand("goWordLeft");
-  eqPos(cm.getCursor(), Pos(0, 5));
-  cm.execCommand("goWordRight"); cm.execCommand("goWordRight");
-  eqPos(cm.getCursor(), Pos(0, 12));
-  cm.execCommand("goWordLeft");
-  eqPos(cm.getCursor(), Pos(0, 9));
-  cm.execCommand("goWordRight"); cm.execCommand("goWordRight"); cm.execCommand("goWordRight");
-  eqPos(cm.getCursor(), Pos(0, 24));
-  cm.execCommand("goWordRight"); cm.execCommand("goWordRight");
-  eqPos(cm.getCursor(), Pos(1, 9));
-  cm.execCommand("goWordRight");
-  eqPos(cm.getCursor(), Pos(1, 13));
-  cm.execCommand("goWordRight"); cm.execCommand("goWordRight");
-  eqPos(cm.getCursor(), Pos(2, 0));
-}, {value: "this is (the) firstline.\na foo12\u00e9\u00f8\u00d7bar\n"});
-
-testCM("groupMovementCommands", function(cm) {
-  cm.execCommand("goGroupLeft");
-  eqPos(cm.getCursor(), Pos(0, 0));
-  cm.execCommand("goGroupRight");
-  eqPos(cm.getCursor(), Pos(0, 4));
-  cm.execCommand("goGroupRight");
-  eqPos(cm.getCursor(), Pos(0, 7));
-  cm.execCommand("goGroupRight");
-  eqPos(cm.getCursor(), Pos(0, 10));
-  cm.execCommand("goGroupLeft");
-  eqPos(cm.getCursor(), Pos(0, 7));
-  cm.execCommand("goGroupRight"); cm.execCommand("goGroupRight"); cm.execCommand("goGroupRight");
-  eqPos(cm.getCursor(), Pos(0, 15));
-  cm.setCursor(Pos(0, 17));
-  cm.execCommand("goGroupLeft");
-  eqPos(cm.getCursor(), Pos(0, 16));
-  cm.execCommand("goGroupLeft");
-  eqPos(cm.getCursor(), Pos(0, 14));
-  cm.execCommand("goGroupRight"); cm.execCommand("goGroupRight");
-  eqPos(cm.getCursor(), Pos(0, 20));
-  cm.execCommand("goGroupRight");
-  eqPos(cm.getCursor(), Pos(1, 0));
-  cm.execCommand("goGroupRight");
-  eqPos(cm.getCursor(), Pos(1, 2));
-  cm.execCommand("goGroupRight");
-  eqPos(cm.getCursor(), Pos(1, 5));
-  cm.execCommand("goGroupLeft"); cm.execCommand("goGroupLeft");
-  eqPos(cm.getCursor(), Pos(1, 0));
-  cm.execCommand("goGroupLeft");
-  eqPos(cm.getCursor(), Pos(0, 20));
-  cm.execCommand("goGroupLeft");
-  eqPos(cm.getCursor(), Pos(0, 16));
-}, {value: "booo ba---quux. ffff\n  abc d"});
-
-testCM("groupsAndWhitespace", function(cm) {
-  var positions = [Pos(0, 0), Pos(0, 2), Pos(0, 5), Pos(0, 9), Pos(0, 11),
-                   Pos(1, 0), Pos(1, 2), Pos(1, 5)];
-  for (var i = 1; i < positions.length; i++) {
-    cm.execCommand("goGroupRight");
-    eqPos(cm.getCursor(), positions[i]);
-  }
-  for (var i = positions.length - 2; i >= 0; i--) {
-    cm.execCommand("goGroupLeft");
-    eqPos(cm.getCursor(), i == 2 ? Pos(0, 6) : positions[i]);
-  }
-}, {value: "  foo +++  \n  bar"});
-
-testCM("charMovementCommands", function(cm) {
-  cm.execCommand("goCharLeft"); cm.execCommand("goColumnLeft");
-  eqPos(cm.getCursor(), Pos(0, 0));
-  cm.execCommand("goCharRight"); cm.execCommand("goCharRight");
-  eqPos(cm.getCursor(), Pos(0, 2));
-  cm.setCursor(Pos(1, 0));
-  cm.execCommand("goColumnLeft");
-  eqPos(cm.getCursor(), Pos(1, 0));
-  cm.execCommand("goCharLeft");
-  eqPos(cm.getCursor(), Pos(0, 5));
-  cm.execCommand("goColumnRight");
-  eqPos(cm.getCursor(), Pos(0, 5));
-  cm.execCommand("goCharRight");
-  eqPos(cm.getCursor(), Pos(1, 0));
-  cm.execCommand("goLineEnd");
-  eqPos(cm.getCursor(), Pos(1, 5));
-  cm.execCommand("goLineStartSmart");
-  eqPos(cm.getCursor(), Pos(1, 1));
-  cm.execCommand("goLineStartSmart");
-  eqPos(cm.getCursor(), Pos(1, 0));
-  cm.setCursor(Pos(2, 0));
-  cm.execCommand("goCharRight"); cm.execCommand("goColumnRight");
-  eqPos(cm.getCursor(), Pos(2, 0));
-}, {value: "line1\n ine2\n"});
-
-testCM("verticalMovementCommands", function(cm) {
-  cm.execCommand("goLineUp");
-  eqPos(cm.getCursor(), Pos(0, 0));
-  cm.execCommand("goLineDown");
-  if (!phantom) // This fails in PhantomJS, though not in a real Webkit
-    eqPos(cm.getCursor(), Pos(1, 0));
-  cm.setCursor(Pos(1, 12));
-  cm.execCommand("goLineDown");
-  eqPos(cm.getCursor(), Pos(2, 5));
-  cm.execCommand("goLineDown");
-  eqPos(cm.getCursor(), Pos(3, 0));
-  cm.execCommand("goLineUp");
-  eqPos(cm.getCursor(), Pos(2, 5));
-  cm.execCommand("goLineUp");
-  eqPos(cm.getCursor(), Pos(1, 12));
-  cm.execCommand("goPageDown");
-  eqPos(cm.getCursor(), Pos(5, 0));
-  cm.execCommand("goPageDown"); cm.execCommand("goLineDown");
-  eqPos(cm.getCursor(), Pos(5, 0));
-  cm.execCommand("goPageUp");
-  eqPos(cm.getCursor(), Pos(0, 0));
-}, {value: "line1\nlong long line2\nline3\n\nline5\n"});
-
-testCM("verticalMovementCommandsWrapping", function(cm) {
-  cm.setSize(120);
-  cm.setCursor(Pos(0, 5));
-  cm.execCommand("goLineDown");
-  eq(cm.getCursor().line, 0);
-  is(cm.getCursor().ch > 5, "moved beyond wrap");
-  for (var i = 0; ; ++i) {
-    is(i < 20, "no endless loop");
-    cm.execCommand("goLineDown");
-    var cur = cm.getCursor();
-    if (cur.line == 1) eq(cur.ch, 5);
-    if (cur.line == 2) { eq(cur.ch, 1); break; }
-  }
-}, {value: "a very long line that wraps around somehow so that we can test cursor movement\nshortone\nk",
-    lineWrapping: true});
-
-testCM("rtlMovement", function(cm) {
-  forEach(["خحج", "خحabcخحج", "abخحخحجcd", "abخde", "abخح2342خ1حج", "خ1ح2خح3حxج",
-           "خحcd", "1خحcd", "abcdeح1ج", "خمرحبها مها!", "foobarر", "خ ة ق",
-           "<img src=\"/בדיקה3.jpg\">"], function(line) {
-    var inv = line.charAt(0) == "خ";
-    cm.setValue(line + "\n"); cm.execCommand(inv ? "goLineEnd" : "goLineStart");
-    var cursors = byClassName(cm.getWrapperElement(), "CodeMirror-cursors")[0];
-    var cursor = cursors.firstChild;
-    var prevX = cursor.offsetLeft, prevY = cursor.offsetTop;
-    for (var i = 0; i <= line.length; ++i) {
-      cm.execCommand("goCharRight");
-      cursor = cursors.firstChild;
-      if (i == line.length) is(cursor.offsetTop > prevY, "next line");
-      else is(cursor.offsetLeft > prevX, "moved right");
-      prevX = cursor.offsetLeft; prevY = cursor.offsetTop;
-    }
-    cm.setCursor(0, 0); cm.execCommand(inv ? "goLineStart" : "goLineEnd");
-    prevX = cursors.firstChild.offsetLeft;
-    for (var i = 0; i < line.length; ++i) {
-      cm.execCommand("goCharLeft");
-      cursor = cursors.firstChild;
-      is(cursor.offsetLeft < prevX, "moved left");
-      prevX = cursor.offsetLeft;
-    }
-  });
-}, null, ie_lt9);
-
-// Verify that updating a line clears its bidi ordering
-testCM("bidiUpdate", function(cm) {
-  cm.setCursor(Pos(0, 2));
-  cm.replaceSelection("خحج", "start");
-  cm.execCommand("goCharRight");
-  eqPos(cm.getCursor(), Pos(0, 4));
-}, {value: "abcd\n"});
-
-testCM("movebyTextUnit", function(cm) {
-  cm.setValue("בְּרֵאשִ\nééé́\n");
-  cm.execCommand("goLineEnd");
-  for (var i = 0; i < 4; ++i) cm.execCommand("goCharRight");
-  eqPos(cm.getCursor(), Pos(0, 0));
-  cm.execCommand("goCharRight");
-  eqPos(cm.getCursor(), Pos(1, 0));
-  cm.execCommand("goCharRight");
-  cm.execCommand("goCharRight");
-  eqPos(cm.getCursor(), Pos(1, 4));
-  cm.execCommand("goCharRight");
-  eqPos(cm.getCursor(), Pos(1, 7));
-});
-
-testCM("lineChangeEvents", function(cm) {
-  addDoc(cm, 3, 5);
-  var log = [], want = ["ch 0", "ch 1", "del 2", "ch 0", "ch 0", "del 1", "del 3", "del 4"];
-  for (var i = 0; i < 5; ++i) {
-    CodeMirror.on(cm.getLineHandle(i), "delete", function(i) {
-      return function() {log.push("del " + i);};
-    }(i));
-    CodeMirror.on(cm.getLineHandle(i), "change", function(i) {
-      return function() {log.push("ch " + i);};
-    }(i));
-  }
-  cm.replaceRange("x", Pos(0, 1));
-  cm.replaceRange("xy", Pos(1, 1), Pos(2));
-  cm.replaceRange("foo\nbar", Pos(0, 1));
-  cm.replaceRange("", Pos(0, 0), Pos(cm.lineCount()));
-  eq(log.length, want.length, "same length");
-  for (var i = 0; i < log.length; ++i)
-    eq(log[i], want[i]);
-});
-
-testCM("scrollEntirelyToRight", function(cm) {
-  if (phantom) return;
-  addDoc(cm, 500, 2);
-  cm.setCursor(Pos(0, 500));
-  var wrap = cm.getWrapperElement(), cur = byClassName(wrap, "CodeMirror-cursor")[0];
-  is(wrap.getBoundingClientRect().right > cur.getBoundingClientRect().left);
-});
-
-testCM("lineWidgets", function(cm) {
-  addDoc(cm, 500, 3);
-  var last = cm.charCoords(Pos(2, 0));
-  var node = document.createElement("div");
-  node.innerHTML = "hi";
-  var widget = cm.addLineWidget(1, node);
-  is(last.top < cm.charCoords(Pos(2, 0)).top, "took up space");
-  cm.setCursor(Pos(1, 1));
-  cm.execCommand("goLineDown");
-  eqPos(cm.getCursor(), Pos(2, 1));
-  cm.execCommand("goLineUp");
-  eqPos(cm.getCursor(), Pos(1, 1));
-});
-
-testCM("lineWidgetFocus", function(cm) {
-  var place = document.getElementById("testground");
-  place.className = "offscreen";
-  try {
-    addDoc(cm, 500, 10);
-    var node = document.createElement("input");
-    var widget = cm.addLineWidget(1, node);
-    node.focus();
-    eq(document.activeElement, node);
-    cm.replaceRange("new stuff", Pos(1, 0));
-    eq(document.activeElement, node);
-  } finally {
-    place.className = "";
-  }
-});
-
-testCM("lineWidgetCautiousRedraw", function(cm) {
-  var node = document.createElement("div");
-  node.innerHTML = "hahah";
-  var w = cm.addLineWidget(0, node);
-  var redrawn = false;
-  w.on("redraw", function() { redrawn = true; });
-  cm.replaceSelection("0");
-  is(!redrawn);
-}, {value: "123\n456"});
-
-
-var knownScrollbarWidth;
-function scrollbarWidth(measure) {
-  if (knownScrollbarWidth != null) return knownScrollbarWidth;
-  var div = document.createElement('div');
-  div.style.cssText = "width: 50px; height: 50px; overflow-x: scroll";
-  document.body.appendChild(div);
-  knownScrollbarWidth = div.offsetHeight - div.clientHeight;
-  document.body.removeChild(div);
-  return knownScrollbarWidth || 0;
-}
-
-testCM("lineWidgetChanged", function(cm) {
-  addDoc(cm, 2, 300);
-  var halfScrollbarWidth = scrollbarWidth(cm.display.measure)/2;
-  cm.setOption('lineNumbers', true);
-  cm.setSize(600, cm.defaultTextHeight() * 50);
-  cm.scrollTo(null, cm.heightAtLine(125, "local"));
-
-  var expectedWidgetHeight = 60;
-  var expectedLinesInWidget = 3;
-  function w() {
-    var node = document.createElement("div");
-    // we use these children with just under half width of the line to check measurements are made with correct width
-    // when placed in the measure div.
-    // If the widget is measured at a width much narrower than it is displayed at, the underHalf children will span two lines and break the test.
-    // If the widget is measured at a width much wider than it is displayed at, the overHalf children will combine and break the test.
-    // Note that this test only checks widgets where coverGutter is true, because these require extra styling to get the width right.
-    // It may also be worthwhile to check this for non-coverGutter widgets.
-    // Visually:
-    // Good:
-    // | ------------- display width ------------- |
-    // | ------- widget-width when measured ------ |
-    // | | -- under-half -- | | -- under-half -- | | 
-    // | | --- over-half --- |                     |
-    // | | --- over-half --- |                     |
-    // Height: measured as 3 lines, same as it will be when actually displayed
-
-    // Bad (too narrow):
-    // | ------------- display width ------------- |
-    // | ------ widget-width when measured ----- |  < -- uh oh
-    // | | -- under-half -- |                    |
-    // | | -- under-half -- |                    |  < -- when measured, shoved to next line
-    // | | --- over-half --- |                   |
-    // | | --- over-half --- |                   |
-    // Height: measured as 4 lines, more than expected . Will be displayed as 3 lines!
-
-    // Bad (too wide):
-    // | ------------- display width ------------- |
-    // | -------- widget-width when measured ------- | < -- uh oh
-    // | | -- under-half -- | | -- under-half -- |   | 
-    // | | --- over-half --- | | --- over-half --- | | < -- when measured, combined on one line
-    // Height: measured as 2 lines, less than expected. Will be displayed as 3 lines!
-
-    var barelyUnderHalfWidthHtml = '<div style="display: inline-block; height: 1px; width: '+(285 - halfScrollbarWidth)+'px;"></div>';
-    var barelyOverHalfWidthHtml = '<div style="display: inline-block; height: 1px; width: '+(305 - halfScrollbarWidth)+'px;"></div>';
-    node.innerHTML = new Array(3).join(barelyUnderHalfWidthHtml) + new Array(3).join(barelyOverHalfWidthHtml);
-    node.style.cssText = "background: yellow;font-size:0;line-height: " + (expectedWidgetHeight/expectedLinesInWidget) + "px;";
-    return node;
-  }
-  var info0 = cm.getScrollInfo();
-  var w0 = cm.addLineWidget(0, w(), { coverGutter: true });
-  var w150 = cm.addLineWidget(150, w(), { coverGutter: true });
-  var w300 = cm.addLineWidget(300, w(), { coverGutter: true });
-  var info1 = cm.getScrollInfo();
-  eq(info0.height + (3 * expectedWidgetHeight), info1.height);
-  eq(info0.top + expectedWidgetHeight, info1.top);
-  expectedWidgetHeight = 12;
-  w0.node.style.lineHeight = w150.node.style.lineHeight = w300.node.style.lineHeight = (expectedWidgetHeight/expectedLinesInWidget) + "px";
-  w0.changed(); w150.changed(); w300.changed();
-  var info2 = cm.getScrollInfo();
-  eq(info0.height + (3 * expectedWidgetHeight), info2.height);
-  eq(info0.top + expectedWidgetHeight, info2.top);
-});
-
-testCM("getLineNumber", function(cm) {
-  addDoc(cm, 2, 20);
-  var h1 = cm.getLineHandle(1);
-  eq(cm.getLineNumber(h1), 1);
-  cm.replaceRange("hi\nbye\n", Pos(0, 0));
-  eq(cm.getLineNumber(h1), 3);
-  cm.setValue("");
-  eq(cm.getLineNumber(h1), null);
-});
-
-testCM("jumpTheGap", function(cm) {
-  if (phantom) return;
-  var longLine = "abcdef ghiklmnop qrstuvw xyz ";
-  longLine += longLine; longLine += longLine; longLine += longLine;
-  cm.replaceRange(longLine, Pos(2, 0), Pos(2));
-  cm.setSize("200px", null);
-  cm.getWrapperElement().style.lineHeight = 2;
-  cm.refresh();
-  cm.setCursor(Pos(0, 1));
-  cm.execCommand("goLineDown");
-  eqPos(cm.getCursor(), Pos(1, 1));
-  cm.execCommand("goLineDown");
-  eqPos(cm.getCursor(), Pos(2, 1));
-  cm.execCommand("goLineDown");
-  eq(cm.getCursor().line, 2);
-  is(cm.getCursor().ch > 1);
-  cm.execCommand("goLineUp");
-  eqPos(cm.getCursor(), Pos(2, 1));
-  cm.execCommand("goLineUp");
-  eqPos(cm.getCursor(), Pos(1, 1));
-  var node = document.createElement("div");
-  node.innerHTML = "hi"; node.style.height = "30px";
-  cm.addLineWidget(0, node);
-  cm.addLineWidget(1, node.cloneNode(true), {above: true});
-  cm.setCursor(Pos(0, 2));
-  cm.execCommand("goLineDown");
-  eqPos(cm.getCursor(), Pos(1, 2));
-  cm.execCommand("goLineUp");
-  eqPos(cm.getCursor(), Pos(0, 2));
-}, {lineWrapping: true, value: "abc\ndef\nghi\njkl\n"});
-
-testCM("addLineClass", function(cm) {
-  function cls(line, text, bg, wrap, gutter) {
-    var i = cm.lineInfo(line);
-    eq(i.textClass, text);
-    eq(i.bgClass, bg);
-    eq(i.wrapClass, wrap);
-    if (typeof i.handle.gutterClass !== 'undefined') {
-        eq(i.handle.gutterClass, gutter);
-    }
-  }
-  cm.addLineClass(0, "text", "foo");
-  cm.addLineClass(0, "text", "bar");
-  cm.addLineClass(1, "background", "baz");
-  cm.addLineClass(1, "wrap", "foo");
-  cm.addLineClass(1, "gutter", "gutter-class");
-  cls(0, "foo bar", null, null, null);
-  cls(1, null, "baz", "foo", "gutter-class");
-  var lines = cm.display.lineDiv;
-  eq(byClassName(lines, "foo").length, 2);
-  eq(byClassName(lines, "bar").length, 1);
-  eq(byClassName(lines, "baz").length, 1);
-  eq(byClassName(lines, "gutter-class").length, 1);
-  cm.removeLineClass(0, "text", "foo");
-  cls(0, "bar", null, null, null);
-  cm.removeLineClass(0, "text", "foo");
-  cls(0, "bar", null, null, null);
-  cm.removeLineClass(0, "text", "bar");
-  cls(0, null, null, null);
-
-  cm.addLineClass(1, "wrap", "quux");
-  cls(1, null, "baz", "foo quux", "gutter-class");
-  cm.removeLineClass(1, "wrap");
-  cls(1, null, "baz", null, "gutter-class");
-  cm.removeLineClass(1, "gutter", "gutter-class");
-  eq(byClassName(lines, "gutter-class").length, 0);
-  cls(1, null, "baz", null, null);
-
-  cm.addLineClass(1, "gutter", "gutter-class");
-  cls(1, null, "baz", null, "gutter-class");
-  cm.removeLineClass(1, "gutter", "gutter-class");
-  cls(1, null, "baz", null, null);
-
-}, {value: "hohoho\n", lineNumbers: true});
-
-testCM("atomicMarker", function(cm) {
-  addDoc(cm, 10, 10);
-  function atom(ll, cl, lr, cr, li, ri) {
-    return cm.markText(Pos(ll, cl), Pos(lr, cr),
-                       {atomic: true, inclusiveLeft: li, inclusiveRight: ri});
-  }
-  var m = atom(0, 1, 0, 5);
-  cm.setCursor(Pos(0, 1));
-  cm.execCommand("goCharRight");
-  eqPos(cm.getCursor(), Pos(0, 5));
-  cm.execCommand("goCharLeft");
-  eqPos(cm.getCursor(), Pos(0, 1));
-  m.clear();
-  m = atom(0, 0, 0, 5, true);
-  eqPos(cm.getCursor(), Pos(0, 5), "pushed out");
-  cm.execCommand("goCharLeft");
-  eqPos(cm.getCursor(), Pos(0, 5));
-  m.clear();
-  m = atom(8, 4, 9, 10, false, true);
-  cm.setCursor(Pos(9, 8));
-  eqPos(cm.getCursor(), Pos(8, 4), "set");
-  cm.execCommand("goCharRight");
-  eqPos(cm.getCursor(), Pos(8, 4), "char right");
-  cm.execCommand("goLineDown");
-  eqPos(cm.getCursor(), Pos(8, 4), "line down");
-  cm.execCommand("goCharLeft");
-  eqPos(cm.getCursor(), Pos(8, 3));
-  m.clear();
-  m = atom(1, 1, 3, 8);
-  cm.setCursor(Pos(0, 0));
-  cm.setCursor(Pos(2, 0));
-  eqPos(cm.getCursor(), Pos(3, 8));
-  cm.execCommand("goCharLeft");
-  eqPos(cm.getCursor(), Pos(1, 1));
-  cm.execCommand("goCharRight");
-  eqPos(cm.getCursor(), Pos(3, 8));
-  cm.execCommand("goLineUp");
-  eqPos(cm.getCursor(), Pos(1, 1));
-  cm.execCommand("goLineDown");
-  eqPos(cm.getCursor(), Pos(3, 8));
-  cm.execCommand("delCharBefore");
-  eq(cm.getValue().length, 80, "del chunk");
-  m = atom(3, 0, 5, 5);
-  cm.setCursor(Pos(3, 0));
-  cm.execCommand("delWordAfter");
-  eq(cm.getValue().length, 53, "del chunk");
-});
-
-testCM("selectionBias", function(cm) {
-  cm.markText(Pos(0, 1), Pos(0, 3), {atomic: true});
-  cm.setCursor(Pos(0, 2));
-  eqPos(cm.getCursor(), Pos(0, 3));
-  cm.setCursor(Pos(0, 2));
-  eqPos(cm.getCursor(), Pos(0, 1));
-  cm.setCursor(Pos(0, 2), null, {bias: -1});
-  eqPos(cm.getCursor(), Pos(0, 1));
-  cm.setCursor(Pos(0, 4));
-  cm.setCursor(Pos(0, 2), null, {bias: 1});
-  eqPos(cm.getCursor(), Pos(0, 3));
-}, {value: "12345"});
-
-testCM("selectionHomeEnd", function(cm) {
-  cm.markText(Pos(1, 0), Pos(1, 1), {atomic: true, inclusiveLeft: true});
-  cm.markText(Pos(1, 3), Pos(1, 4), {atomic: true, inclusiveRight: true});
-  cm.setCursor(Pos(1, 2));
-  cm.execCommand("goLineStart");
-  eqPos(cm.getCursor(), Pos(1, 1));
-  cm.execCommand("goLineEnd");
-  eqPos(cm.getCursor(), Pos(1, 3));
-}, {value: "ab\ncdef\ngh"});
-
-testCM("readOnlyMarker", function(cm) {
-  function mark(ll, cl, lr, cr, at) {
-    return cm.markText(Pos(ll, cl), Pos(lr, cr),
-                       {readOnly: true, atomic: at});
-  }
-  var m = mark(0, 1, 0, 4);
-  cm.setCursor(Pos(0, 2));
-  cm.replaceSelection("hi", "end");
-  eqPos(cm.getCursor(), Pos(0, 2));
-  eq(cm.getLine(0), "abcde");
-  cm.execCommand("selectAll");
-  cm.replaceSelection("oops", "around");
-  eq(cm.getValue(), "oopsbcd");
-  cm.undo();
-  eqPos(m.find().from, Pos(0, 1));
-  eqPos(m.find().to, Pos(0, 4));
-  m.clear();
-  cm.setCursor(Pos(0, 2));
-  cm.replaceSelection("hi", "around");
-  eq(cm.getLine(0), "abhicde");
-  eqPos(cm.getCursor(), Pos(0, 4));
-  m = mark(0, 2, 2, 2, true);
-  cm.setSelection(Pos(1, 1), Pos(2, 4));
-  cm.replaceSelection("t", "end");
-  eqPos(cm.getCursor(), Pos(2, 3));
-  eq(cm.getLine(2), "klto");
-  cm.execCommand("goCharLeft");
-  cm.execCommand("goCharLeft");
-  eqPos(cm.getCursor(), Pos(0, 2));
-  cm.setSelection(Pos(0, 1), Pos(0, 3));
-  cm.replaceSelection("xx", "around");
-  eqPos(cm.getCursor(), Pos(0, 3));
-  eq(cm.getLine(0), "axxhicde");
-}, {value: "abcde\nfghij\nklmno\n"});
-
-testCM("dirtyBit", function(cm) {
-  eq(cm.isClean(), true);
-  cm.replaceSelection("boo", null, "test");
-  eq(cm.isClean(), false);
-  cm.undo();
-  eq(cm.isClean(), true);
-  cm.replaceSelection("boo", null, "test");
-  cm.replaceSelection("baz", null, "test");
-  cm.undo();
-  eq(cm.isClean(), false);
-  cm.markClean();
-  eq(cm.isClean(), true);
-  cm.undo();
-  eq(cm.isClean(), false);
-  cm.redo();
-  eq(cm.isClean(), true);
-});
-
-testCM("changeGeneration", function(cm) {
-  cm.replaceSelection("x");
-  var softGen = cm.changeGeneration();
-  cm.replaceSelection("x");
-  cm.undo();
-  eq(cm.getValue(), "");
-  is(!cm.isClean(softGen));
-  cm.replaceSelection("x");
-  var hardGen = cm.changeGeneration(true);
-  cm.replaceSelection("x");
-  cm.undo();
-  eq(cm.getValue(), "x");
-  is(cm.isClean(hardGen));
-});
-
-testCM("addKeyMap", function(cm) {
-  function sendKey(code) {
-    cm.triggerOnKeyDown({type: "keydown", keyCode: code,
-                         preventDefault: function(){}, stopPropagation: function(){}});
-  }
-
-  sendKey(39);
-  eqPos(cm.getCursor(), Pos(0, 1));
-  var test = 0;
-  var map1 = {Right: function() { ++test; }}, map2 = {Right: function() { test += 10; }}
-  cm.addKeyMap(map1);
-  sendKey(39);
-  eqPos(cm.getCursor(), Pos(0, 1));
-  eq(test, 1);
-  cm.addKeyMap(map2, true);
-  sendKey(39);
-  eq(test, 2);
-  cm.removeKeyMap(map1);
-  sendKey(39);
-  eq(test, 12);
-  cm.removeKeyMap(map2);
-  sendKey(39);
-  eq(test, 12);
-  eqPos(cm.getCursor(), Pos(0, 2));
-  cm.addKeyMap({Right: function() { test = 55; }, name: "mymap"});
-  sendKey(39);
-  eq(test, 55);
-  cm.removeKeyMap("mymap");
-  sendKey(39);
-  eqPos(cm.getCursor(), Pos(0, 3));
-}, {value: "abc"});
-
-testCM("findPosH", function(cm) {
-  forEach([{from: Pos(0, 0), to: Pos(0, 1), by: 1},
-           {from: Pos(0, 0), to: Pos(0, 0), by: -1, hitSide: true},
-           {from: Pos(0, 0), to: Pos(0, 4), by: 1, unit: "word"},
-           {from: Pos(0, 0), to: Pos(0, 8), by: 2, unit: "word"},
-           {from: Pos(0, 0), to: Pos(2, 0), by: 20, unit: "word", hitSide: true},
-           {from: Pos(0, 7), to: Pos(0, 5), by: -1, unit: "word"},
-           {from: Pos(0, 4), to: Pos(0, 8), by: 1, unit: "word"},
-           {from: Pos(1, 0), to: Pos(1, 18), by: 3, unit: "word"},
-           {from: Pos(1, 22), to: Pos(1, 5), by: -3, unit: "word"},
-           {from: Pos(1, 15), to: Pos(1, 10), by: -5},
-           {from: Pos(1, 15), to: Pos(1, 10), by: -5, unit: "column"},
-           {from: Pos(1, 15), to: Pos(1, 0), by: -50, unit: "column", hitSide: true},
-           {from: Pos(1, 15), to: Pos(1, 24), by: 50, unit: "column", hitSide: true},
-           {from: Pos(1, 15), to: Pos(2, 0), by: 50, hitSide: true}], function(t) {
-    var r = cm.findPosH(t.from, t.by, t.unit || "char");
-    eqPos(r, t.to);
-    eq(!!r.hitSide, !!t.hitSide);
-  });
-}, {value: "line one\nline two.something.other\n"});
-
-testCM("beforeChange", function(cm) {
-  cm.on("beforeChange", function(cm, change) {
-    var text = [];
-    for (var i = 0; i < change.text.length; ++i)
-      text.push(change.text[i].replace(/\s/g, "_"));
-    change.update(null, null, text);
-  });
-  cm.setValue("hello, i am a\nnew document\n");
-  eq(cm.getValue(), "hello,_i_am_a\nnew_document\n");
-  CodeMirror.on(cm.getDoc(), "beforeChange", function(doc, change) {
-    if (change.from.line == 0) change.cancel();
-  });
-  cm.setValue("oops"); // Canceled
-  eq(cm.getValue(), "hello,_i_am_a\nnew_document\n");
-  cm.replaceRange("hey hey hey", Pos(1, 0), Pos(2, 0));
-  eq(cm.getValue(), "hello,_i_am_a\nhey_hey_hey");
-}, {value: "abcdefghijk"});
-
-testCM("beforeChangeUndo", function(cm) {
-  cm.replaceRange("hi", Pos(0, 0), Pos(0));
-  cm.replaceRange("bye", Pos(0, 0), Pos(0));
-  eq(cm.historySize().undo, 2);
-  cm.on("beforeChange", function(cm, change) {
-    is(!change.update);
-    change.cancel();
-  });
-  cm.undo();
-  eq(cm.historySize().undo, 0);
-  eq(cm.getValue(), "bye\ntwo");
-}, {value: "one\ntwo"});
-
-testCM("beforeSelectionChange", function(cm) {
-  function notAtEnd(cm, pos) {
-    var len = cm.getLine(pos.line).length;
-    if (!len || pos.ch == len) return Pos(pos.line, pos.ch - 1);
-    return pos;
-  }
-  cm.on("beforeSelectionChange", function(cm, obj) {
-    obj.update([{anchor: notAtEnd(cm, obj.ranges[0].anchor),
-                 head: notAtEnd(cm, obj.ranges[0].head)}]);
-  });
-
-  addDoc(cm, 10, 10);
-  cm.execCommand("goLineEnd");
-  eqPos(cm.getCursor(), Pos(0, 9));
-  cm.execCommand("selectAll");
-  eqPos(cm.getCursor("start"), Pos(0, 0));
-  eqPos(cm.getCursor("end"), Pos(9, 9));
-});
-
-testCM("change_removedText", function(cm) {
-  cm.setValue("abc\ndef");
-
-  var removedText = [];
-  cm.on("change", function(cm, change) {
-    removedText.push(change.removed);
-  });
-
-  cm.operation(function() {
-    cm.replaceRange("xyz", Pos(0, 0), Pos(1,1));
-    cm.replaceRange("123", Pos(0,0));
-  });
-
-  eq(removedText.length, 2);
-  eq(removedText[0].join("\n"), "abc\nd");
-  eq(removedText[1].join("\n"), "");
-
-  var removedText = [];
-  cm.undo();
-  eq(removedText.length, 2);
-  eq(removedText[0].join("\n"), "123");
-  eq(removedText[1].join("\n"), "xyz");
-
-  var removedText = [];
-  cm.redo();
-  eq(removedText.length, 2);
-  eq(removedText[0].join("\n"), "abc\nd");
-  eq(removedText[1].join("\n"), "");
-});
-
-testCM("lineStyleFromMode", function(cm) {
-  CodeMirror.defineMode("test_mode", function() {
-    return {token: function(stream) {
-      if (stream.match(/^\[[^\]]*\]/)) return "  line-brackets  ";
-      if (stream.match(/^\([^\)]*\)/)) return "  line-background-parens  ";
-      if (stream.match(/^<[^>]*>/)) return "  span  line-line  line-background-bg  ";
-      stream.match(/^\s+|^\S+/);
-    }};
-  });
-  cm.setOption("mode", "test_mode");
-  var bracketElts = byClassName(cm.getWrapperElement(), "brackets");
-  eq(bracketElts.length, 1, "brackets count");
-  eq(bracketElts[0].nodeName, "PRE");
-  is(!/brackets.*brackets/.test(bracketElts[0].className));
-  var parenElts = byClassName(cm.getWrapperElement(), "parens");
-  eq(parenElts.length, 1, "parens count");
-  eq(parenElts[0].nodeName, "DIV");
-  is(!/parens.*parens/.test(parenElts[0].className));
-  eq(parenElts[0].parentElement.nodeName, "DIV");
-
-  eq(byClassName(cm.getWrapperElement(), "bg").length, 1);
-  eq(byClassName(cm.getWrapperElement(), "line").length, 1);
-  var spanElts = byClassName(cm.getWrapperElement(), "cm-span");
-  eq(spanElts.length, 2);
-  is(/^\s*cm-span\s*$/.test(spanElts[0].className));
-}, {value: "line1: [br] [br]\nline2: (par) (par)\nline3: <tag> <tag>"});
-
-testCM("lineStyleFromBlankLine", function(cm) {
-  CodeMirror.defineMode("lineStyleFromBlankLine_mode", function() {
-    return {token: function(stream) { stream.skipToEnd(); return "comment"; },
-            blankLine: function() { return "line-blank"; }};
-  });
-  cm.setOption("mode", "lineStyleFromBlankLine_mode");
-  var blankElts = byClassName(cm.getWrapperElement(), "blank");
-  eq(blankElts.length, 1);
-  eq(blankElts[0].nodeName, "PRE");
-  cm.replaceRange("x", Pos(1, 0));
-  blankElts = byClassName(cm.getWrapperElement(), "blank");
-  eq(blankElts.length, 0);
-}, {value: "foo\n\nbar"});
-
-CodeMirror.registerHelper("xxx", "a", "A");
-CodeMirror.registerHelper("xxx", "b", "B");
-CodeMirror.defineMode("yyy", function() {
-  return {
-    token: function(stream) { stream.skipToEnd(); },
-    xxx: ["a", "b", "q"]
-  };
-});
-CodeMirror.registerGlobalHelper("xxx", "c", function(m) { return m.enableC; }, "C");
-
-testCM("helpers", function(cm) {
-  cm.setOption("mode", "yyy");
-  eq(cm.getHelpers(Pos(0, 0), "xxx").join("/"), "A/B");
-  cm.setOption("mode", {name: "yyy", modeProps: {xxx: "b", enableC: true}});
-  eq(cm.getHelpers(Pos(0, 0), "xxx").join("/"), "B/C");
-  cm.setOption("mode", "javascript");
-  eq(cm.getHelpers(Pos(0, 0), "xxx").join("/"), "");
-});
-
-testCM("selectionHistory", function(cm) {
-  for (var i = 0; i < 3; i++) {
-    cm.setExtending(true);
-    cm.execCommand("goCharRight");
-    cm.setExtending(false);
-    cm.execCommand("goCharRight");
-    cm.execCommand("goCharRight");
-  }
-  cm.execCommand("undoSelection");
-  eq(cm.getSelection(), "c");
-  cm.execCommand("undoSelection");
-  eq(cm.getSelection(), "");
-  eqPos(cm.getCursor(), Pos(0, 4));
-  cm.execCommand("undoSelection");
-  eq(cm.getSelection(), "b");
-  cm.execCommand("redoSelection");
-  eq(cm.getSelection(), "");
-  eqPos(cm.getCursor(), Pos(0, 4));
-  cm.execCommand("redoSelection");
-  eq(cm.getSelection(), "c");
-  cm.execCommand("redoSelection");
-  eq(cm.getSelection(), "");
-  eqPos(cm.getCursor(), Pos(0, 6));
-}, {value: "a b c d"});
-
-testCM("selectionChangeReducesRedo", function(cm) {
-  cm.replaceSelection("X");
-  cm.execCommand("goCharRight");
-  cm.undoSelection();
-  cm.execCommand("selectAll");
-  cm.undoSelection();
-  eq(cm.getValue(), "Xabc");
-  eqPos(cm.getCursor(), Pos(0, 1));
-  cm.undoSelection();
-  eq(cm.getValue(), "abc");
-}, {value: "abc"});
-
-testCM("selectionHistoryNonOverlapping", function(cm) {
-  cm.setSelection(Pos(0, 0), Pos(0, 1));
-  cm.setSelection(Pos(0, 2), Pos(0, 3));
-  cm.execCommand("undoSelection");
-  eqPos(cm.getCursor("anchor"), Pos(0, 0));
-  eqPos(cm.getCursor("head"), Pos(0, 1));
-}, {value: "1234"});
-
-testCM("cursorMotionSplitsHistory", function(cm) {
-  cm.replaceSelection("a");
-  cm.execCommand("goCharRight");
-  cm.replaceSelection("b");
-  cm.replaceSelection("c");
-  cm.undo();
-  eq(cm.getValue(), "a1234");
-  eqPos(cm.getCursor(), Pos(0, 2));
-  cm.undo();
-  eq(cm.getValue(), "1234");
-  eqPos(cm.getCursor(), Pos(0, 0));
-}, {value: "1234"});
-
-testCM("selChangeInOperationDoesNotSplit", function(cm) {
-  for (var i = 0; i < 4; i++) {
-    cm.operation(function() {
-      cm.replaceSelection("x");
-      cm.setCursor(Pos(0, cm.getCursor().ch - 1));
-    });
-  }
-  eqPos(cm.getCursor(), Pos(0, 0));
-  eq(cm.getValue(), "xxxxa");
-  cm.undo();
-  eq(cm.getValue(), "a");
-}, {value: "a"});
-
-testCM("alwaysMergeSelEventWithChangeOrigin", function(cm) {
-  cm.replaceSelection("U", null, "foo");
-  cm.setSelection(Pos(0, 0), Pos(0, 1), {origin: "foo"});
-  cm.undoSelection();
-  eq(cm.getValue(), "a");
-  cm.replaceSelection("V", null, "foo");
-  cm.setSelection(Pos(0, 0), Pos(0, 1), {origin: "bar"});
-  cm.undoSelection();
-  eq(cm.getValue(), "Va");
-}, {value: "a"});
-
-testCM("getTokenAt", function(cm) {
-  var tokPlus = cm.getTokenAt(Pos(0, 2));
-  eq(tokPlus.type, "operator");
-  eq(tokPlus.string, "+");
-  var toks = cm.getLineTokens(0);
-  eq(toks.length, 3);
-  forEach([["number", "1"], ["operator", "+"], ["number", "2"]], function(expect, i) {
-    eq(toks[i].type, expect[0]);
-    eq(toks[i].string, expect[1]);
-  });
-}, {value: "1+2", mode: "javascript"});
-
-testCM("getTokenTypeAt", function(cm) {
-  eq(cm.getTokenTypeAt(Pos(0, 0)), "number");
-  eq(cm.getTokenTypeAt(Pos(0, 6)), "string");
-  cm.addOverlay({
-    token: function(stream) {
-      if (stream.match("foo")) return "foo";
-      else stream.next();
-    }
-  });
-  eq(byClassName(cm.getWrapperElement(), "cm-foo").length, 1);
-  eq(cm.getTokenTypeAt(Pos(0, 6)), "string");
-}, {value: "1 + 'foo'", mode: "javascript"});
-
-testCM("resizeLineWidget", function(cm) {
-  addDoc(cm, 200, 3);
-  var widget = document.createElement("pre");
-  widget.innerHTML = "imwidget";
-  widget.style.background = "yellow";
-  cm.addLineWidget(1, widget, {noHScroll: true});
-  cm.setSize(40);
-  is(widget.parentNode.offsetWidth < 42);
-});
-
-testCM("combinedOperations", function(cm) {
-  var place = document.getElementById("testground");
-  var other = CodeMirror(place, {value: "123"});
-  try {
-    cm.operation(function() {
-      cm.addLineClass(0, "wrap", "foo");
-      other.addLineClass(0, "wrap", "foo");
-    });
-    eq(byClassName(cm.getWrapperElement(), "foo").length, 1);
-    eq(byClassName(other.getWrapperElement(), "foo").length, 1);
-    cm.operation(function() {
-      cm.removeLineClass(0, "wrap", "foo");
-      other.removeLineClass(0, "wrap", "foo");
-    });
-    eq(byClassName(cm.getWrapperElement(), "foo").length, 0);
-    eq(byClassName(other.getWrapperElement(), "foo").length, 0);
-  } finally {
-    place.removeChild(other.getWrapperElement());
-  }
-}, {value: "abc"});
-
-testCM("eventOrder", function(cm) {
-  var seen = [];
-  cm.on("change", function() {
-    if (!seen.length) cm.replaceSelection(".");
-    seen.push("change");
-  });
-  cm.on("cursorActivity", function() {
-    cm.replaceSelection("!");
-    seen.push("activity");
-  });
-  cm.replaceSelection("/");
-  eq(seen.join(","), "change,change,activity,change");
-});
-
-test("core_rmClass", function() {
-  var node = document.createElement("div");
-  node.className = "foo-bar baz-quux yadda";
-  CodeMirror.rmClass(node, "quux");
-  eq(node.className, "foo-bar baz-quux yadda");
-  CodeMirror.rmClass(node, "baz-quux");
-  eq(node.className, "foo-bar yadda");
-  CodeMirror.rmClass(node, "yadda");
-  eq(node.className, "foo-bar");
-  CodeMirror.rmClass(node, "foo-bar");
-  eq(node.className, "");
-  node.className = " foo ";
-  CodeMirror.rmClass(node, "foo");
-  eq(node.className, "");
-});
-
-test("core_addClass", function() {
-  var node = document.createElement("div");
-  CodeMirror.addClass(node, "a");
-  eq(node.className, "a");
-  CodeMirror.addClass(node, "a");
-  eq(node.className, "a");
-  CodeMirror.addClass(node, "b");
-  eq(node.className, "a b");
-  CodeMirror.addClass(node, "a");
-  CodeMirror.addClass(node, "b");
-  eq(node.className, "a b");
-});
diff --git a/public/js/lib/codemirror/test/vim_test.js b/public/js/lib/codemirror/test/vim_test.js
deleted file mode 100644
index 6262dab..0000000
--- a/public/js/lib/codemirror/test/vim_test.js
+++ /dev/null
@@ -1,3768 +0,0 @@
-CodeMirror.Vim.suppressErrorLogging = true;
-
-var code = '' +
-' wOrd1 (#%\n' +
-' word3] \n' +
-'aopop pop 0 1 2 3 4\n' +
-' (a) [b] {c} \n' +
-'int getchar(void) {\n' +
-'  static char buf[BUFSIZ];\n' +
-'  static char *bufp = buf;\n' +
-'  if (n == 0) {  /* buffer is empty */\n' +
-'    n = read(0, buf, sizeof buf);\n' +
-'    bufp = buf;\n' +
-'  }\n' +
-'\n' +
-'  return (--n >= 0) ? (unsigned char) *bufp++ : EOF;\n' +
-' \n' +
-'}\n';
-
-var lines = (function() {
-  lineText = code.split('\n');
-  var ret = [];
-  for (var i = 0; i < lineText.length; i++) {
-    ret[i] = {
-      line: i,
-      length: lineText[i].length,
-      lineText: lineText[i],
-      textStart: /^\s*/.exec(lineText[i])[0].length
-    };
-  }
-  return ret;
-})();
-var endOfDocument = makeCursor(lines.length - 1,
-    lines[lines.length - 1].length);
-var wordLine = lines[0];
-var bigWordLine = lines[1];
-var charLine = lines[2];
-var bracesLine = lines[3];
-var seekBraceLine = lines[4];
-
-var word1 = {
-  start: { line: wordLine.line, ch: 1 },
-  end: { line: wordLine.line, ch: 5 }
-};
-var word2 = {
-  start: { line: wordLine.line, ch: word1.end.ch + 2 },
-  end: { line: wordLine.line, ch: word1.end.ch + 4 }
-};
-var word3 = {
-  start: { line: bigWordLine.line, ch: 1 },
-  end: { line: bigWordLine.line, ch: 5 }
-};
-var bigWord1 = word1;
-var bigWord2 = word2;
-var bigWord3 = {
-  start: { line: bigWordLine.line, ch: 1 },
-  end: { line: bigWordLine.line, ch: 7 }
-};
-var bigWord4 = {
-  start: { line: bigWordLine.line, ch: bigWord1.end.ch + 3 },
-  end: { line: bigWordLine.line, ch: bigWord1.end.ch + 7 }
-};
-
-var oChars = [ { line: charLine.line, ch: 1 },
-    { line: charLine.line, ch: 3 },
-    { line: charLine.line, ch: 7 } ];
-var pChars = [ { line: charLine.line, ch: 2 },
-    { line: charLine.line, ch: 4 },
-    { line: charLine.line, ch: 6 },
-    { line: charLine.line, ch: 8 } ];
-var numChars = [ { line: charLine.line, ch: 10 },
-    { line: charLine.line, ch: 12 },
-    { line: charLine.line, ch: 14 },
-    { line: charLine.line, ch: 16 },
-    { line: charLine.line, ch: 18 }];
-var parens1 = {
-  start: { line: bracesLine.line, ch: 1 },
-  end: { line: bracesLine.line, ch: 3 }
-};
-var squares1 = {
-  start: { line: bracesLine.line, ch: 5 },
-  end: { line: bracesLine.line, ch: 7 }
-};
-var curlys1 = {
-  start: { line: bracesLine.line, ch: 9 },
-  end: { line: bracesLine.line, ch: 11 }
-};
-var seekOutside = {
-  start: { line: seekBraceLine.line, ch: 1 },
-  end: { line: seekBraceLine.line, ch: 16 }
-};
-var seekInside = {
-  start: { line: seekBraceLine.line, ch: 14 },
-  end: { line: seekBraceLine.line, ch: 11 }
-};
-
-function copyCursor(cur) {
-  return { ch: cur.ch, line: cur.line };
-}
-
-function forEach(arr, func) {
-  for (var i = 0; i < arr.length; i++) {
-    func(arr[i], i, arr);
-  }
-}
-
-function testVim(name, run, opts, expectedFail) {
-  var vimOpts = {
-    lineNumbers: true,
-    vimMode: true,
-    showCursorWhenSelecting: true,
-    value: code
-  };
-  for (var prop in opts) {
-    if (opts.hasOwnProperty(prop)) {
-      vimOpts[prop] = opts[prop];
-    }
-  }
-  return test('vim_' + name, function() {
-    var place = document.getElementById("testground");
-    var cm = CodeMirror(place, vimOpts);
-    var vim = CodeMirror.Vim.maybeInitVimState_(cm);
-
-    function doKeysFn(cm) {
-      return function(args) {
-        if (args instanceof Array) {
-          arguments = args;
-        }
-        for (var i = 0; i < arguments.length; i++) {
-          CodeMirror.Vim.handleKey(cm, arguments[i]);
-        }
-      }
-    }
-    function doInsertModeKeysFn(cm) {
-      return function(args) {
-        if (args instanceof Array) { arguments = args; }
-        function executeHandler(handler) {
-          if (typeof handler == 'string') {
-            CodeMirror.commands[handler](cm);
-          } else {
-            handler(cm);
-          }
-          return true;
-        }
-        for (var i = 0; i < arguments.length; i++) {
-          var key = arguments[i];
-          // Find key in keymap and handle.
-          var handled = CodeMirror.lookupKey(key, 'vim-insert', executeHandler);
-          // Record for insert mode.
-          if (handled == "handled" && cm.state.vim.insertMode && arguments[i] != 'Esc') {
-            var lastChange = CodeMirror.Vim.getVimGlobalState_().macroModeState.lastInsertModeChanges;
-            if (lastChange) {
-              lastChange.changes.push(new CodeMirror.Vim.InsertModeKey(key));
-            }
-          }
-        }
-      }
-    }
-    function doExFn(cm) {
-      return function(command) {
-        cm.openDialog = helpers.fakeOpenDialog(command);
-        helpers.doKeys(':');
-      }
-    }
-    function assertCursorAtFn(cm) {
-      return function(line, ch) {
-        var pos;
-        if (ch == null && typeof line.line == 'number') {
-          pos = line;
-        } else {
-          pos = makeCursor(line, ch);
-        }
-        eqPos(pos, cm.getCursor());
-      }
-    }
-    function fakeOpenDialog(result) {
-      return function(text, callback) {
-        return callback(result);
-      }
-    }
-    function fakeOpenNotification(matcher) {
-      return function(text) {
-        matcher(text);
-      }
-    }
-    var helpers = {
-      doKeys: doKeysFn(cm),
-      // Warning: Only emulates keymap events, not character insertions. Use
-      // replaceRange to simulate character insertions.
-      // Keys are in CodeMirror format, NOT vim format.
-      doInsertModeKeys: doInsertModeKeysFn(cm),
-      doEx: doExFn(cm),
-      assertCursorAt: assertCursorAtFn(cm),
-      fakeOpenDialog: fakeOpenDialog,
-      fakeOpenNotification: fakeOpenNotification,
-      getRegisterController: function() {
-        return CodeMirror.Vim.getRegisterController();
-      }
-    }
-    CodeMirror.Vim.resetVimGlobalState_();
-    var successful = false;
-    var savedOpenNotification = cm.openNotification;
-    try {
-      run(cm, vim, helpers);
-      successful = true;
-    } finally {
-      cm.openNotification = savedOpenNotification;
-      if (!successful || verbose) {
-        place.style.visibility = "visible";
-      } else {
-        place.removeChild(cm.getWrapperElement());
-      }
-    }
-  }, expectedFail);
-};
-testVim('qq@q', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('q', 'q', 'l', 'l', 'q');
-  helpers.assertCursorAt(0,2);
-  helpers.doKeys('@', 'q');
-  helpers.assertCursorAt(0,4);
-}, { value: '            '});
-testVim('@@', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('q', 'q', 'l', 'l', 'q');
-  helpers.assertCursorAt(0,2);
-  helpers.doKeys('@', 'q');
-  helpers.assertCursorAt(0,4);
-  helpers.doKeys('@', '@');
-  helpers.assertCursorAt(0,6);
-}, { value: '            '});
-var jumplistScene = ''+
-  'word\n'+
-  '(word)\n'+
-  '{word\n'+
-  'word.\n'+
-  '\n'+
-  'word search\n'+
-  '}word\n'+
-  'word\n'+
-  'word\n';
-function testJumplist(name, keys, endPos, startPos, dialog) {
-  endPos = makeCursor(endPos[0], endPos[1]);
-  startPos = makeCursor(startPos[0], startPos[1]);
-  testVim(name, function(cm, vim, helpers) {
-    CodeMirror.Vim.resetVimGlobalState_();
-    if(dialog)cm.openDialog = helpers.fakeOpenDialog('word');
-    cm.setCursor(startPos);
-    helpers.doKeys.apply(null, keys);
-    helpers.assertCursorAt(endPos);
-  }, {value: jumplistScene});
-};
-testJumplist('jumplist_H', ['H', '<C-o>'], [5,2], [5,2]);
-testJumplist('jumplist_M', ['M', '<C-o>'], [2,2], [2,2]);
-testJumplist('jumplist_L', ['L', '<C-o>'], [2,2], [2,2]);
-testJumplist('jumplist_[[', ['[', '[', '<C-o>'], [5,2], [5,2]);
-testJumplist('jumplist_]]', [']', ']', '<C-o>'], [2,2], [2,2]);
-testJumplist('jumplist_G', ['G', '<C-o>'], [5,2], [5,2]);
-testJumplist('jumplist_gg', ['g', 'g', '<C-o>'], [5,2], [5,2]);
-testJumplist('jumplist_%', ['%', '<C-o>'], [1,5], [1,5]);
-testJumplist('jumplist_{', ['{', '<C-o>'], [1,5], [1,5]);
-testJumplist('jumplist_}', ['}', '<C-o>'], [1,5], [1,5]);
-testJumplist('jumplist_\'', ['m', 'a', 'h', '\'', 'a', 'h', '<C-i>'], [1,0], [1,5]);
-testJumplist('jumplist_`', ['m', 'a', 'h', '`', 'a', 'h', '<C-i>'], [1,5], [1,5]);
-testJumplist('jumplist_*_cachedCursor', ['*', '<C-o>'], [1,3], [1,3]);
-testJumplist('jumplist_#_cachedCursor', ['#', '<C-o>'], [1,3], [1,3]);
-testJumplist('jumplist_n', ['#', 'n', '<C-o>'], [1,1], [2,3]);
-testJumplist('jumplist_N', ['#', 'N', '<C-o>'], [1,1], [2,3]);
-testJumplist('jumplist_repeat_<c-o>', ['*', '*', '*', '3', '<C-o>'], [2,3], [2,3]);
-testJumplist('jumplist_repeat_<c-i>', ['*', '*', '*', '3', '<C-o>', '2', '<C-i>'], [5,0], [2,3]);
-testJumplist('jumplist_repeated_motion', ['3', '*', '<C-o>'], [2,3], [2,3]);
-testJumplist('jumplist_/', ['/', '<C-o>'], [2,3], [2,3], 'dialog');
-testJumplist('jumplist_?', ['?', '<C-o>'], [2,3], [2,3], 'dialog');
-testJumplist('jumplist_skip_delted_mark<c-o>',
-             ['*', 'n', 'n', 'k', 'd', 'k', '<C-o>', '<C-o>', '<C-o>'],
-             [0,2], [0,2]);
-testJumplist('jumplist_skip_delted_mark<c-i>',
-             ['*', 'n', 'n', 'k', 'd', 'k', '<C-o>', '<C-i>', '<C-i>'],
-             [1,0], [0,2]);
-
-/**
- * @param name Name of the test
- * @param keys An array of keys or a string with a single key to simulate.
- * @param endPos The expected end position of the cursor.
- * @param startPos The position the cursor should start at, defaults to 0, 0.
- */
-function testMotion(name, keys, endPos, startPos) {
-  testVim(name, function(cm, vim, helpers) {
-    if (!startPos) {
-      startPos = { line: 0, ch: 0 };
-    }
-    cm.setCursor(startPos);
-    helpers.doKeys(keys);
-    helpers.assertCursorAt(endPos);
-  });
-};
-
-function makeCursor(line, ch) {
-  return { line: line, ch: ch };
-};
-
-function offsetCursor(cur, offsetLine, offsetCh) {
-  return { line: cur.line + offsetLine, ch: cur.ch + offsetCh };
-};
-
-// Motion tests
-testMotion('|', '|', makeCursor(0, 0), makeCursor(0,4));
-testMotion('|_repeat', ['3', '|'], makeCursor(0, 2), makeCursor(0,4));
-testMotion('h', 'h', makeCursor(0, 0), word1.start);
-testMotion('h_repeat', ['3', 'h'], offsetCursor(word1.end, 0, -3), word1.end);
-testMotion('l', 'l', makeCursor(0, 1));
-testMotion('l_repeat', ['2', 'l'], makeCursor(0, 2));
-testMotion('j', 'j', offsetCursor(word1.end, 1, 0), word1.end);
-testMotion('j_repeat', ['2', 'j'], offsetCursor(word1.end, 2, 0), word1.end);
-testMotion('j_repeat_clip', ['1000', 'j'], endOfDocument);
-testMotion('k', 'k', offsetCursor(word3.end, -1, 0), word3.end);
-testMotion('k_repeat', ['2', 'k'], makeCursor(0, 4), makeCursor(2, 4));
-testMotion('k_repeat_clip', ['1000', 'k'], makeCursor(0, 4), makeCursor(2, 4));
-testMotion('w', 'w', word1.start);
-testMotion('w_multiple_newlines_no_space', 'w', makeCursor(12, 2), makeCursor(11, 2));
-testMotion('w_multiple_newlines_with_space', 'w', makeCursor(14, 0), makeCursor(12, 51));
-testMotion('w_repeat', ['2', 'w'], word2.start);
-testMotion('w_wrap', ['w'], word3.start, word2.start);
-testMotion('w_endOfDocument', 'w', endOfDocument, endOfDocument);
-testMotion('w_start_to_end', ['1000', 'w'], endOfDocument, makeCursor(0, 0));
-testMotion('W', 'W', bigWord1.start);
-testMotion('W_repeat', ['2', 'W'], bigWord3.start, bigWord1.start);
-testMotion('e', 'e', word1.end);
-testMotion('e_repeat', ['2', 'e'], word2.end);
-testMotion('e_wrap', 'e', word3.end, word2.end);
-testMotion('e_endOfDocument', 'e', endOfDocument, endOfDocument);
-testMotion('e_start_to_end', ['1000', 'e'], endOfDocument, makeCursor(0, 0));
-testMotion('b', 'b', word3.start, word3.end);
-testMotion('b_repeat', ['2', 'b'], word2.start, word3.end);
-testMotion('b_wrap', 'b', word2.start, word3.start);
-testMotion('b_startOfDocument', 'b', makeCursor(0, 0), makeCursor(0, 0));
-testMotion('b_end_to_start', ['1000', 'b'], makeCursor(0, 0), endOfDocument);
-testMotion('ge', ['g', 'e'], word2.end, word3.end);
-testMotion('ge_repeat', ['2', 'g', 'e'], word1.end, word3.start);
-testMotion('ge_wrap', ['g', 'e'], word2.end, word3.start);
-testMotion('ge_startOfDocument', ['g', 'e'], makeCursor(0, 0),
-    makeCursor(0, 0));
-testMotion('ge_end_to_start', ['1000', 'g', 'e'], makeCursor(0, 0), endOfDocument);
-testMotion('gg', ['g', 'g'], makeCursor(lines[0].line, lines[0].textStart),
-    makeCursor(3, 1));
-testMotion('gg_repeat', ['3', 'g', 'g'],
-    makeCursor(lines[2].line, lines[2].textStart));
-testMotion('G', 'G',
-    makeCursor(lines[lines.length - 1].line, lines[lines.length - 1].textStart),
-    makeCursor(3, 1));
-testMotion('G_repeat', ['3', 'G'], makeCursor(lines[2].line,
-    lines[2].textStart));
-// TODO: Make the test code long enough to test Ctrl-F and Ctrl-B.
-testMotion('0', '0', makeCursor(0, 0), makeCursor(0, 8));
-testMotion('^', '^', makeCursor(0, lines[0].textStart), makeCursor(0, 8));
-testMotion('+', '+', makeCursor(1, lines[1].textStart), makeCursor(0, 8));
-testMotion('-', '-', makeCursor(0, lines[0].textStart), makeCursor(1, 4));
-testMotion('_', ['6','_'], makeCursor(5, lines[5].textStart), makeCursor(0, 8));
-testMotion('$', '$', makeCursor(0, lines[0].length - 1), makeCursor(0, 1));
-testMotion('$_repeat', ['2', '$'], makeCursor(1, lines[1].length - 1),
-    makeCursor(0, 3));
-testMotion('f', ['f', 'p'], pChars[0], makeCursor(charLine.line, 0));
-testMotion('f_repeat', ['2', 'f', 'p'], pChars[2], pChars[0]);
-testMotion('f_num', ['f', '2'], numChars[2], makeCursor(charLine.line, 0));
-testMotion('t', ['t','p'], offsetCursor(pChars[0], 0, -1),
-    makeCursor(charLine.line, 0));
-testMotion('t_repeat', ['2', 't', 'p'], offsetCursor(pChars[2], 0, -1),
-    pChars[0]);
-testMotion('F', ['F', 'p'], pChars[0], pChars[1]);
-testMotion('F_repeat', ['2', 'F', 'p'], pChars[0], pChars[2]);
-testMotion('T', ['T', 'p'], offsetCursor(pChars[0], 0, 1), pChars[1]);
-testMotion('T_repeat', ['2', 'T', 'p'], offsetCursor(pChars[0], 0, 1), pChars[2]);
-testMotion('%_parens', ['%'], parens1.end, parens1.start);
-testMotion('%_squares', ['%'], squares1.end, squares1.start);
-testMotion('%_braces', ['%'], curlys1.end, curlys1.start);
-testMotion('%_seek_outside', ['%'], seekOutside.end, seekOutside.start);
-testMotion('%_seek_inside', ['%'], seekInside.end, seekInside.start);
-testVim('%_seek_skip', function(cm, vim, helpers) {
-  cm.setCursor(0,0);
-  helpers.doKeys(['%']);
-  helpers.assertCursorAt(0,9);
-}, {value:'01234"("()'});
-testVim('%_skip_string', function(cm, vim, helpers) {
-  cm.setCursor(0,0);
-  helpers.doKeys(['%']);
-  helpers.assertCursorAt(0,4);
-  cm.setCursor(0,2);
-  helpers.doKeys(['%']);
-  helpers.assertCursorAt(0,0);
-}, {value:'(")")'});
-(')')
-testVim('%_skip_comment', function(cm, vim, helpers) {
-  cm.setCursor(0,0);
-  helpers.doKeys(['%']);
-  helpers.assertCursorAt(0,6);
-  cm.setCursor(0,3);
-  helpers.doKeys(['%']);
-  helpers.assertCursorAt(0,0);
-}, {value:'(/*)*/)'});
-// Make sure that moving down after going to the end of a line always leaves you
-// at the end of a line, but preserves the offset in other cases
-testVim('Changing lines after Eol operation', function(cm, vim, helpers) {
-  cm.setCursor(0,0);
-  helpers.doKeys(['$']);
-  helpers.doKeys(['j']);
-  // After moving to Eol and then down, we should be at Eol of line 2
-  helpers.assertCursorAt({ line: 1, ch: lines[1].length - 1 });
-  helpers.doKeys(['j']);
-  // After moving down, we should be at Eol of line 3
-  helpers.assertCursorAt({ line: 2, ch: lines[2].length - 1 });
-  helpers.doKeys(['h']);
-  helpers.doKeys(['j']);
-  // After moving back one space and then down, since line 4 is shorter than line 2, we should
-  // be at Eol of line 2 - 1
-  helpers.assertCursorAt({ line: 3, ch: lines[3].length - 1 });
-  helpers.doKeys(['j']);
-  helpers.doKeys(['j']);
-  // After moving down again, since line 3 has enough characters, we should be back to the
-  // same place we were at on line 1
-  helpers.assertCursorAt({ line: 5, ch: lines[2].length - 2 });
-});
-//making sure gj and gk recover from clipping
-testVim('gj_gk_clipping', function(cm,vim,helpers){
-  cm.setCursor(0, 1);
-  helpers.doKeys('g','j','g','j');
-  helpers.assertCursorAt(2, 1);
-  helpers.doKeys('g','k','g','k');
-  helpers.assertCursorAt(0, 1);
-},{value: 'line 1\n\nline 2'});
-//testing a mix of j/k and gj/gk
-testVim('j_k_and_gj_gk', function(cm,vim,helpers){
-  cm.setSize(120);
-  cm.setCursor(0, 0);
-  //go to the last character on the first line
-  helpers.doKeys('$');
-  //move up/down on the column within the wrapped line
-  //side-effect: cursor is not locked to eol anymore
-  helpers.doKeys('g','k');
-  var cur=cm.getCursor();
-  eq(cur.line,0);
-  is((cur.ch<176),'gk didn\'t move cursor back (1)');
-  helpers.doKeys('g','j');
-  helpers.assertCursorAt(0, 176);
-  //should move to character 177 on line 2 (j/k preserve character index within line)
-  helpers.doKeys('j');
-  //due to different line wrapping, the cursor can be on a different screen-x now
-  //gj and gk preserve screen-x on movement, much like moveV
-  helpers.doKeys('3','g','k');
-  cur=cm.getCursor();
-  eq(cur.line,1);
-  is((cur.ch<176),'gk didn\'t move cursor back (2)');
-  helpers.doKeys('g','j','2','g','j');
-  //should return to the same character-index
-  helpers.doKeys('k');
-  helpers.assertCursorAt(0, 176);
-},{ lineWrapping:true, value: 'This line is intentially long to test movement of gj and gk over wrapped lines. I will start on the end of this line, then make a step up and back to set the origin for j and k.\nThis line is supposed to be even longer than the previous. I will jump here and make another wiggle with gj and gk, before I jump back to the line above. Both wiggles should not change my cursor\'s target character but both j/k and gj/gk change each other\'s reference position.'});
-testVim('gj_gk', function(cm, vim, helpers) {
-  if (phantom) return;
-  cm.setSize(120);
-  // Test top of document edge case.
-  cm.setCursor(0, 4);
-  helpers.doKeys('g', 'j');
-  helpers.doKeys('10', 'g', 'k');
-  helpers.assertCursorAt(0, 4);
-
-  // Test moving down preserves column position.
-  helpers.doKeys('g', 'j');
-  var pos1 = cm.getCursor();
-  var expectedPos2 = { line: 0, ch: (pos1.ch - 4) * 2 + 4};
-  helpers.doKeys('g', 'j');
-  helpers.assertCursorAt(expectedPos2);
-
-  // Move to the last character
-  cm.setCursor(0, 0);
-  // Move left to reset HSPos
-  helpers.doKeys('h');
-  // Test bottom of document edge case.
-  helpers.doKeys('100', 'g', 'j');
-  var endingPos = cm.getCursor();
-  is(endingPos != 0, 'gj should not be on wrapped line 0');
-  var topLeftCharCoords = cm.charCoords(makeCursor(0, 0));
-  var endingCharCoords = cm.charCoords(endingPos);
-  is(topLeftCharCoords.left == endingCharCoords.left, 'gj should end up on column 0');
-},{ lineNumbers: false, lineWrapping:true, value: 'Thislineisintentiallylongtotestmovementofgjandgkoverwrappedlines.' });
-testVim('}', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('}');
-  helpers.assertCursorAt(1, 0);
-  cm.setCursor(0, 0);
-  helpers.doKeys('2', '}');
-  helpers.assertCursorAt(4, 0);
-  cm.setCursor(0, 0);
-  helpers.doKeys('6', '}');
-  helpers.assertCursorAt(5, 0);
-}, { value: 'a\n\nb\nc\n\nd' });
-testVim('{', function(cm, vim, helpers) {
-  cm.setCursor(5, 0);
-  helpers.doKeys('{');
-  helpers.assertCursorAt(4, 0);
-  cm.setCursor(5, 0);
-  helpers.doKeys('2', '{');
-  helpers.assertCursorAt(1, 0);
-  cm.setCursor(5, 0);
-  helpers.doKeys('6', '{');
-  helpers.assertCursorAt(0, 0);
-}, { value: 'a\n\nb\nc\n\nd' });
-testVim('paragraph motions', function(cm, vim, helpers) {
-  cm.setCursor(10, 0);
-  helpers.doKeys('{');
-  helpers.assertCursorAt(4, 0);
-  helpers.doKeys('{');
-  helpers.assertCursorAt(0, 0);
-  helpers.doKeys('2', '}');
-  helpers.assertCursorAt(7, 0);
-  helpers.doKeys('2', '}');
-  helpers.assertCursorAt(16, 0);
-
-  cm.setCursor(9, 0);
-  helpers.doKeys('}');
-  helpers.assertCursorAt(14, 0);
-
-  cm.setCursor(6, 0);
-  helpers.doKeys('}');
-  helpers.assertCursorAt(7, 0);
-
-  // ip inside empty space
-  cm.setCursor(10, 0);
-  helpers.doKeys('v', 'i', 'p');
-  eqPos(Pos(7, 0), cm.getCursor('anchor'));
-  eqPos(Pos(12, 0), cm.getCursor('head'));
-  helpers.doKeys('i', 'p');
-  eqPos(Pos(7, 0), cm.getCursor('anchor'));
-  eqPos(Pos(13, 1), cm.getCursor('head'));
-  helpers.doKeys('2', 'i', 'p');
-  eqPos(Pos(7, 0), cm.getCursor('anchor'));
-  eqPos(Pos(16, 1), cm.getCursor('head'));
-
-  // should switch to visualLine mode
-  cm.setCursor(14, 0);
-  helpers.doKeys('<Esc>', 'v', 'i', 'p');
-  helpers.assertCursorAt(14, 0);
-
-  cm.setCursor(14, 0);
-  helpers.doKeys('<Esc>', 'V', 'i', 'p');
-  eqPos(Pos(16, 1), cm.getCursor('head'));
-
-  // ap inside empty space
-  cm.setCursor(10, 0);
-  helpers.doKeys('<Esc>', 'v', 'a', 'p');
-  eqPos(Pos(7, 0), cm.getCursor('anchor'));
-  eqPos(Pos(13, 1), cm.getCursor('head'));
-  helpers.doKeys('a', 'p');
-  eqPos(Pos(7, 0), cm.getCursor('anchor'));
-  eqPos(Pos(16, 1), cm.getCursor('head'));
-
-  cm.setCursor(13, 0);
-  helpers.doKeys('v', 'a', 'p');
-  eqPos(Pos(13, 0), cm.getCursor('anchor'));
-  eqPos(Pos(14, 0), cm.getCursor('head'));
-
-  cm.setCursor(16, 0);
-  helpers.doKeys('v', 'a', 'p');
-  eqPos(Pos(14, 0), cm.getCursor('anchor'));
-  eqPos(Pos(16, 1), cm.getCursor('head'));
-
-  cm.setCursor(0, 0);
-  helpers.doKeys('v', 'a', 'p');
-  eqPos(Pos(0, 0), cm.getCursor('anchor'));
-  eqPos(Pos(4, 0), cm.getCursor('head'));
-
-  cm.setCursor(0, 0);
-  helpers.doKeys('d', 'i', 'p');
-  var register = helpers.getRegisterController().getRegister();
-  eq('a\na\n', register.toString());
-  is(register.linewise);
-  helpers.doKeys('3', 'j', 'p');
-  helpers.doKeys('y', 'i', 'p');
-  is(register.linewise);
-  eq('b\na\na\nc\n', register.toString());
-}, { value: 'a\na\n\n\n\nb\nc\n\n\n\n\n\n\nd\n\ne\nf' });
-
-// Operator tests
-testVim('dl', function(cm, vim, helpers) {
-  var curStart = makeCursor(0, 0);
-  cm.setCursor(curStart);
-  helpers.doKeys('d', 'l');
-  eq('word1 ', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq(' ', register.toString());
-  is(!register.linewise);
-  eqPos(curStart, cm.getCursor());
-}, { value: ' word1 ' });
-testVim('dl_eol', function(cm, vim, helpers) {
-  cm.setCursor(0, 6);
-  helpers.doKeys('d', 'l');
-  eq(' word1', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq(' ', register.toString());
-  is(!register.linewise);
-  helpers.assertCursorAt(0, 6);
-}, { value: ' word1 ' });
-testVim('dl_repeat', function(cm, vim, helpers) {
-  var curStart = makeCursor(0, 0);
-  cm.setCursor(curStart);
-  helpers.doKeys('2', 'd', 'l');
-  eq('ord1 ', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq(' w', register.toString());
-  is(!register.linewise);
-  eqPos(curStart, cm.getCursor());
-}, { value: ' word1 ' });
-testVim('dh', function(cm, vim, helpers) {
-  var curStart = makeCursor(0, 3);
-  cm.setCursor(curStart);
-  helpers.doKeys('d', 'h');
-  eq(' wrd1 ', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq('o', register.toString());
-  is(!register.linewise);
-  eqPos(offsetCursor(curStart, 0 , -1), cm.getCursor());
-}, { value: ' word1 ' });
-testVim('dj', function(cm, vim, helpers) {
-  var curStart = makeCursor(0, 3);
-  cm.setCursor(curStart);
-  helpers.doKeys('d', 'j');
-  eq(' word3', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq(' word1\nword2\n', register.toString());
-  is(register.linewise);
-  helpers.assertCursorAt(0, 1);
-}, { value: ' word1\nword2\n word3' });
-testVim('dj_end_of_document', function(cm, vim, helpers) {
-  var curStart = makeCursor(0, 3);
-  cm.setCursor(curStart);
-  helpers.doKeys('d', 'j');
-  eq(' word1 ', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq('', register.toString());
-  is(!register.linewise);
-  helpers.assertCursorAt(0, 3);
-}, { value: ' word1 ' });
-testVim('dk', function(cm, vim, helpers) {
-  var curStart = makeCursor(1, 3);
-  cm.setCursor(curStart);
-  helpers.doKeys('d', 'k');
-  eq(' word3', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq(' word1\nword2\n', register.toString());
-  is(register.linewise);
-  helpers.assertCursorAt(0, 1);
-}, { value: ' word1\nword2\n word3' });
-testVim('dk_start_of_document', function(cm, vim, helpers) {
-  var curStart = makeCursor(0, 3);
-  cm.setCursor(curStart);
-  helpers.doKeys('d', 'k');
-  eq(' word1 ', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq('', register.toString());
-  is(!register.linewise);
-  helpers.assertCursorAt(0, 3);
-}, { value: ' word1 ' });
-testVim('dw_space', function(cm, vim, helpers) {
-  var curStart = makeCursor(0, 0);
-  cm.setCursor(curStart);
-  helpers.doKeys('d', 'w');
-  eq('word1 ', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq(' ', register.toString());
-  is(!register.linewise);
-  eqPos(curStart, cm.getCursor());
-}, { value: ' word1 ' });
-testVim('dw_word', function(cm, vim, helpers) {
-  var curStart = makeCursor(0, 1);
-  cm.setCursor(curStart);
-  helpers.doKeys('d', 'w');
-  eq(' word2', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq('word1 ', register.toString());
-  is(!register.linewise);
-  eqPos(curStart, cm.getCursor());
-}, { value: ' word1 word2' });
-testVim('dw_only_word', function(cm, vim, helpers) {
-  // Test that if there is only 1 word left, dw deletes till the end of the
-  // line.
-  cm.setCursor(0, 1);
-  helpers.doKeys('d', 'w');
-  eq(' ', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq('word1 ', register.toString());
-  is(!register.linewise);
-  helpers.assertCursorAt(0, 1);
-}, { value: ' word1 ' });
-testVim('dw_eol', function(cm, vim, helpers) {
-  // Assert that dw does not delete the newline if last word to delete is at end
-  // of line.
-  cm.setCursor(0, 1);
-  helpers.doKeys('d', 'w');
-  eq(' \nword2', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq('word1', register.toString());
-  is(!register.linewise);
-  helpers.assertCursorAt(0, 1);
-}, { value: ' word1\nword2' });
-testVim('dw_eol_with_multiple_newlines', function(cm, vim, helpers) {
-  // Assert that dw does not delete the newline if last word to delete is at end
-  // of line and it is followed by multiple newlines.
-  cm.setCursor(0, 1);
-  helpers.doKeys('d', 'w');
-  eq(' \n\nword2', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq('word1', register.toString());
-  is(!register.linewise);
-  helpers.assertCursorAt(0, 1);
-}, { value: ' word1\n\nword2' });
-testVim('dw_empty_line_followed_by_whitespace', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('d', 'w');
-  eq('  \nword', cm.getValue());
-}, { value: '\n  \nword' });
-testVim('dw_empty_line_followed_by_word', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('d', 'w');
-  eq('word', cm.getValue());
-}, { value: '\nword' });
-testVim('dw_empty_line_followed_by_empty_line', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('d', 'w');
-  eq('\n', cm.getValue());
-}, { value: '\n\n' });
-testVim('dw_whitespace_followed_by_whitespace', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('d', 'w');
-  eq('\n   \n', cm.getValue());
-}, { value: '  \n   \n' });
-testVim('dw_whitespace_followed_by_empty_line', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('d', 'w');
-  eq('\n\n', cm.getValue());
-}, { value: '  \n\n' });
-testVim('dw_word_whitespace_word', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('d', 'w');
-  eq('\n   \nword2', cm.getValue());
-}, { value: 'word1\n   \nword2'})
-testVim('dw_end_of_document', function(cm, vim, helpers) {
-  cm.setCursor(1, 2);
-  helpers.doKeys('d', 'w');
-  eq('\nab', cm.getValue());
-}, { value: '\nabc' });
-testVim('dw_repeat', function(cm, vim, helpers) {
-  // Assert that dw does delete newline if it should go to the next line, and
-  // that repeat works properly.
-  cm.setCursor(0, 1);
-  helpers.doKeys('d', '2', 'w');
-  eq(' ', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq('word1\nword2', register.toString());
-  is(!register.linewise);
-  helpers.assertCursorAt(0, 1);
-}, { value: ' word1\nword2' });
-testVim('de_word_start_and_empty_lines', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('d', 'e');
-  eq('\n\n', cm.getValue());
-}, { value: 'word\n\n' });
-testVim('de_word_end_and_empty_lines', function(cm, vim, helpers) {
-  cm.setCursor(0, 3);
-  helpers.doKeys('d', 'e');
-  eq('wor', cm.getValue());
-}, { value: 'word\n\n\n' });
-testVim('de_whitespace_and_empty_lines', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('d', 'e');
-  eq('', cm.getValue());
-}, { value: '   \n\n\n' });
-testVim('de_end_of_document', function(cm, vim, helpers) {
-  cm.setCursor(1, 2);
-  helpers.doKeys('d', 'e');
-  eq('\nab', cm.getValue());
-}, { value: '\nabc' });
-testVim('db_empty_lines', function(cm, vim, helpers) {
-  cm.setCursor(2, 0);
-  helpers.doKeys('d', 'b');
-  eq('\n\n', cm.getValue());
-}, { value: '\n\n\n' });
-testVim('db_word_start_and_empty_lines', function(cm, vim, helpers) {
-  cm.setCursor(2, 0);
-  helpers.doKeys('d', 'b');
-  eq('\nword', cm.getValue());
-}, { value: '\n\nword' });
-testVim('db_word_end_and_empty_lines', function(cm, vim, helpers) {
-  cm.setCursor(2, 3);
-  helpers.doKeys('d', 'b');
-  eq('\n\nd', cm.getValue());
-}, { value: '\n\nword' });
-testVim('db_whitespace_and_empty_lines', function(cm, vim, helpers) {
-  cm.setCursor(2, 0);
-  helpers.doKeys('d', 'b');
-  eq('', cm.getValue());
-}, { value: '\n   \n' });
-testVim('db_start_of_document', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('d', 'b');
-  eq('abc\n', cm.getValue());
-}, { value: 'abc\n' });
-testVim('dge_empty_lines', function(cm, vim, helpers) {
-  cm.setCursor(1, 0);
-  helpers.doKeys('d', 'g', 'e');
-  // Note: In real VIM the result should be '', but it's not quite consistent,
-  // since 2 newlines are deleted. But in the similar case of word\n\n, only
-  // 1 newline is deleted. We'll diverge from VIM's behavior since it's much
-  // easier this way.
-  eq('\n', cm.getValue());
-}, { value: '\n\n' });
-testVim('dge_word_and_empty_lines', function(cm, vim, helpers) {
-  cm.setCursor(1, 0);
-  helpers.doKeys('d', 'g', 'e');
-  eq('wor\n', cm.getValue());
-}, { value: 'word\n\n'});
-testVim('dge_whitespace_and_empty_lines', function(cm, vim, helpers) {
-  cm.setCursor(2, 0);
-  helpers.doKeys('d', 'g', 'e');
-  eq('', cm.getValue());
-}, { value: '\n  \n' });
-testVim('dge_start_of_document', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('d', 'g', 'e');
-  eq('bc\n', cm.getValue());
-}, { value: 'abc\n' });
-testVim('d_inclusive', function(cm, vim, helpers) {
-  // Assert that when inclusive is set, the character the cursor is on gets
-  // deleted too.
-  var curStart = makeCursor(0, 1);
-  cm.setCursor(curStart);
-  helpers.doKeys('d', 'e');
-  eq('  ', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq('word1', register.toString());
-  is(!register.linewise);
-  eqPos(curStart, cm.getCursor());
-}, { value: ' word1 ' });
-testVim('d_reverse', function(cm, vim, helpers) {
-  // Test that deleting in reverse works.
-  cm.setCursor(1, 0);
-  helpers.doKeys('d', 'b');
-  eq(' word2 ', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq('word1\n', register.toString());
-  is(!register.linewise);
-  helpers.assertCursorAt(0, 1);
-}, { value: ' word1\nword2 ' });
-testVim('dd', function(cm, vim, helpers) {
-  cm.setCursor(0, 3);
-  var expectedBuffer = cm.getRange({ line: 0, ch: 0 },
-    { line: 1, ch: 0 });
-  var expectedLineCount = cm.lineCount() - 1;
-  helpers.doKeys('d', 'd');
-  eq(expectedLineCount, cm.lineCount());
-  var register = helpers.getRegisterController().getRegister();
-  eq(expectedBuffer, register.toString());
-  is(register.linewise);
-  helpers.assertCursorAt(0, lines[1].textStart);
-});
-testVim('dd_prefix_repeat', function(cm, vim, helpers) {
-  cm.setCursor(0, 3);
-  var expectedBuffer = cm.getRange({ line: 0, ch: 0 },
-    { line: 2, ch: 0 });
-  var expectedLineCount = cm.lineCount() - 2;
-  helpers.doKeys('2', 'd', 'd');
-  eq(expectedLineCount, cm.lineCount());
-  var register = helpers.getRegisterController().getRegister();
-  eq(expectedBuffer, register.toString());
-  is(register.linewise);
-  helpers.assertCursorAt(0, lines[2].textStart);
-});
-testVim('dd_motion_repeat', function(cm, vim, helpers) {
-  cm.setCursor(0, 3);
-  var expectedBuffer = cm.getRange({ line: 0, ch: 0 },
-    { line: 2, ch: 0 });
-  var expectedLineCount = cm.lineCount() - 2;
-  helpers.doKeys('d', '2', 'd');
-  eq(expectedLineCount, cm.lineCount());
-  var register = helpers.getRegisterController().getRegister();
-  eq(expectedBuffer, register.toString());
-  is(register.linewise);
-  helpers.assertCursorAt(0, lines[2].textStart);
-});
-testVim('dd_multiply_repeat', function(cm, vim, helpers) {
-  cm.setCursor(0, 3);
-  var expectedBuffer = cm.getRange({ line: 0, ch: 0 },
-    { line: 6, ch: 0 });
-  var expectedLineCount = cm.lineCount() - 6;
-  helpers.doKeys('2', 'd', '3', 'd');
-  eq(expectedLineCount, cm.lineCount());
-  var register = helpers.getRegisterController().getRegister();
-  eq(expectedBuffer, register.toString());
-  is(register.linewise);
-  helpers.assertCursorAt(0, lines[6].textStart);
-});
-testVim('dd_lastline', function(cm, vim, helpers) {
-  cm.setCursor(cm.lineCount(), 0);
-  var expectedLineCount = cm.lineCount() - 1;
-  helpers.doKeys('d', 'd');
-  eq(expectedLineCount, cm.lineCount());
-  helpers.assertCursorAt(cm.lineCount() - 1, 0);
-});
-testVim('dd_only_line', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  var expectedRegister = cm.getValue() + "\n";
-  helpers.doKeys('d','d');
-  eq(1, cm.lineCount());
-  eq('', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq(expectedRegister, register.toString());
-}, { value: "thisistheonlyline" });
-// Yank commands should behave the exact same as d commands, expect that nothing
-// gets deleted.
-testVim('yw_repeat', function(cm, vim, helpers) {
-  // Assert that yw does yank newline if it should go to the next line, and
-  // that repeat works properly.
-  var curStart = makeCursor(0, 1);
-  cm.setCursor(curStart);
-  helpers.doKeys('y', '2', 'w');
-  eq(' word1\nword2', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq('word1\nword2', register.toString());
-  is(!register.linewise);
-  eqPos(curStart, cm.getCursor());
-}, { value: ' word1\nword2' });
-testVim('yy_multiply_repeat', function(cm, vim, helpers) {
-  var curStart = makeCursor(0, 3);
-  cm.setCursor(curStart);
-  var expectedBuffer = cm.getRange({ line: 0, ch: 0 },
-    { line: 6, ch: 0 });
-  var expectedLineCount = cm.lineCount();
-  helpers.doKeys('2', 'y', '3', 'y');
-  eq(expectedLineCount, cm.lineCount());
-  var register = helpers.getRegisterController().getRegister();
-  eq(expectedBuffer, register.toString());
-  is(register.linewise);
-  eqPos(curStart, cm.getCursor());
-});
-// Change commands behave like d commands except that it also enters insert
-// mode. In addition, when the change is linewise, an additional newline is
-// inserted so that insert mode starts on that line.
-testVim('cw', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('c', '2', 'w');
-  eq(' word3', cm.getValue());
-  helpers.assertCursorAt(0, 0);
-}, { value: 'word1 word2 word3'});
-testVim('cw_repeat', function(cm, vim, helpers) {
-  // Assert that cw does delete newline if it should go to the next line, and
-  // that repeat works properly.
-  var curStart = makeCursor(0, 1);
-  cm.setCursor(curStart);
-  helpers.doKeys('c', '2', 'w');
-  eq(' ', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq('word1\nword2', register.toString());
-  is(!register.linewise);
-  eqPos(curStart, cm.getCursor());
-  eq('vim-insert', cm.getOption('keyMap'));
-}, { value: ' word1\nword2' });
-testVim('cc_multiply_repeat', function(cm, vim, helpers) {
-  cm.setCursor(0, 3);
-  var expectedBuffer = cm.getRange({ line: 0, ch: 0 },
-    { line: 6, ch: 0 });
-  var expectedLineCount = cm.lineCount() - 5;
-  helpers.doKeys('2', 'c', '3', 'c');
-  eq(expectedLineCount, cm.lineCount());
-  var register = helpers.getRegisterController().getRegister();
-  eq(expectedBuffer, register.toString());
-  is(register.linewise);
-  eq('vim-insert', cm.getOption('keyMap'));
-});
-testVim('cc_should_not_append_to_document', function(cm, vim, helpers) {
-  var expectedLineCount = cm.lineCount();
-  cm.setCursor(cm.lastLine(), 0);
-  helpers.doKeys('c', 'c');
-  eq(expectedLineCount, cm.lineCount());
-});
-function fillArray(val, times) {
-  var arr = [];
-  for (var i = 0; i < times; i++) {
-    arr.push(val);
-  }
-  return arr;
-}
-testVim('c_visual_block', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.doKeys('<C-v>', '2', 'j', 'l', 'l', 'l', 'c');
-  var replacement = fillArray('hello', 3);
-  cm.replaceSelections(replacement);
-  eq('1hello\n5hello\nahellofg', cm.getValue());
-  helpers.doKeys('<Esc>');
-  cm.setCursor(2, 3);
-  helpers.doKeys('<C-v>', '2', 'k', 'h', 'C');
-  replacement = fillArray('world', 3);
-  cm.replaceSelections(replacement);
-  eq('1hworld\n5hworld\nahworld', cm.getValue());
-}, {value: '1234\n5678\nabcdefg'});
-testVim('c_visual_block_replay', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.doKeys('<C-v>', '2', 'j', 'l', 'c');
-  var replacement = fillArray('fo', 3);
-  cm.replaceSelections(replacement);
-  eq('1fo4\n5fo8\nafodefg', cm.getValue());
-  helpers.doKeys('<Esc>');
-  cm.setCursor(0, 0);
-  helpers.doKeys('.');
-  eq('foo4\nfoo8\nfoodefg', cm.getValue());
-}, {value: '1234\n5678\nabcdefg'});
-
-testVim('d_visual_block', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.doKeys('<C-v>', '2', 'j', 'l', 'l', 'l', 'd');
-  eq('1\n5\nafg', cm.getValue());
-}, {value: '1234\n5678\nabcdefg'});
-testVim('D_visual_block', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.doKeys('<C-v>', '2', 'j', 'l', 'D');
-  eq('1\n5\na', cm.getValue());
-}, {value: '1234\n5678\nabcdefg'});
-
-// Swapcase commands edit in place and do not modify registers.
-testVim('g~w_repeat', function(cm, vim, helpers) {
-  // Assert that dw does delete newline if it should go to the next line, and
-  // that repeat works properly.
-  var curStart = makeCursor(0, 1);
-  cm.setCursor(curStart);
-  helpers.doKeys('g', '~', '2', 'w');
-  eq(' WORD1\nWORD2', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq('', register.toString());
-  is(!register.linewise);
-  eqPos(curStart, cm.getCursor());
-}, { value: ' word1\nword2' });
-testVim('g~g~', function(cm, vim, helpers) {
-  var curStart = makeCursor(0, 3);
-  cm.setCursor(curStart);
-  var expectedLineCount = cm.lineCount();
-  var expectedValue = cm.getValue().toUpperCase();
-  helpers.doKeys('2', 'g', '~', '3', 'g', '~');
-  eq(expectedValue, cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq('', register.toString());
-  is(!register.linewise);
-  eqPos(curStart, cm.getCursor());
-}, { value: ' word1\nword2\nword3\nword4\nword5\nword6' });
-testVim('gu_and_gU', function(cm, vim, helpers) {
-  var curStart = makeCursor(0, 7);
-  var value = cm.getValue();
-  cm.setCursor(curStart);
-  helpers.doKeys('2', 'g', 'U', 'w');
-  eq(cm.getValue(), 'wa wb xX WC wd');
-  eqPos(curStart, cm.getCursor());
-  helpers.doKeys('2', 'g', 'u', 'w');
-  eq(cm.getValue(), value);
-
-  helpers.doKeys('2', 'g', 'U', 'B');
-  eq(cm.getValue(), 'wa WB Xx wc wd');
-  eqPos(makeCursor(0, 3), cm.getCursor());
-
-  cm.setCursor(makeCursor(0, 4));
-  helpers.doKeys('g', 'u', 'i', 'w');
-  eq(cm.getValue(), 'wa wb Xx wc wd');
-  eqPos(makeCursor(0, 3), cm.getCursor());
-
-  // TODO: support gUgU guu
-  // eqPos(makeCursor(0, 0), cm.getCursor());
-
-  var register = helpers.getRegisterController().getRegister();
-  eq('', register.toString());
-  is(!register.linewise);
-}, { value: 'wa wb xx wc wd' });
-testVim('visual_block_~', function(cm, vim, helpers) {
-  cm.setCursor(1, 1);
-  helpers.doKeys('<C-v>', 'l', 'l', 'j', '~');
-  helpers.assertCursorAt(1, 1);
-  eq('hello\nwoRLd\naBCDe', cm.getValue());
-  cm.setCursor(2, 0);
-  helpers.doKeys('v', 'l', 'l', '~');
-  helpers.assertCursorAt(2, 0);
-  eq('hello\nwoRLd\nAbcDe', cm.getValue());
-},{value: 'hello\nwOrld\nabcde' });
-testVim('._swapCase_visualBlock', function(cm, vim, helpers) {
-  helpers.doKeys('<C-v>', 'j', 'j', 'l', '~');
-  cm.setCursor(0, 3);
-  helpers.doKeys('.');
-  eq('HelLO\nWorLd\nAbcdE', cm.getValue());
-},{value: 'hEllo\nwOrlD\naBcDe' });
-testVim('._delete_visualBlock', function(cm, vim, helpers) {
-  helpers.doKeys('<C-v>', 'j', 'x');
-  eq('ive\ne\nsome\nsugar', cm.getValue());
-  helpers.doKeys('.');
-  eq('ve\n\nsome\nsugar', cm.getValue());
-  helpers.doKeys('j', 'j', '.');
-  eq('ve\n\nome\nugar', cm.getValue());
-  helpers.doKeys('u', '<C-r>', '.');
-  eq('ve\n\nme\ngar', cm.getValue());
-},{value: 'give\nme\nsome\nsugar' });
-testVim('>{motion}', function(cm, vim, helpers) {
-  cm.setCursor(1, 3);
-  var expectedLineCount = cm.lineCount();
-  var expectedValue = '   word1\n  word2\nword3 ';
-  helpers.doKeys('>', 'k');
-  eq(expectedValue, cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq('', register.toString());
-  is(!register.linewise);
-  helpers.assertCursorAt(0, 3);
-}, { value: ' word1\nword2\nword3 ', indentUnit: 2 });
-testVim('>>', function(cm, vim, helpers) {
-  cm.setCursor(0, 3);
-  var expectedLineCount = cm.lineCount();
-  var expectedValue = '   word1\n  word2\nword3 ';
-  helpers.doKeys('2', '>', '>');
-  eq(expectedValue, cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq('', register.toString());
-  is(!register.linewise);
-  helpers.assertCursorAt(0, 3);
-}, { value: ' word1\nword2\nword3 ', indentUnit: 2 });
-testVim('<{motion}', function(cm, vim, helpers) {
-  cm.setCursor(1, 3);
-  var expectedLineCount = cm.lineCount();
-  var expectedValue = ' word1\nword2\nword3 ';
-  helpers.doKeys('<', 'k');
-  eq(expectedValue, cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq('', register.toString());
-  is(!register.linewise);
-  helpers.assertCursorAt(0, 1);
-}, { value: '   word1\n  word2\nword3 ', indentUnit: 2 });
-testVim('<<', function(cm, vim, helpers) {
-  cm.setCursor(0, 3);
-  var expectedLineCount = cm.lineCount();
-  var expectedValue = ' word1\nword2\nword3 ';
-  helpers.doKeys('2', '<', '<');
-  eq(expectedValue, cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq('', register.toString());
-  is(!register.linewise);
-  helpers.assertCursorAt(0, 1);
-}, { value: '   word1\n  word2\nword3 ', indentUnit: 2 });
-
-// Edit tests
-function testEdit(name, before, pos, edit, after) {
-  return testVim(name, function(cm, vim, helpers) {
-             var ch = before.search(pos)
-             var line = before.substring(0, ch).split('\n').length - 1;
-             if (line) {
-               ch = before.substring(0, ch).split('\n').pop().length;
-             }
-             cm.setCursor(line, ch);
-             helpers.doKeys.apply(this, edit.split(''));
-             eq(after, cm.getValue());
-           }, {value: before});
-}
-
-// These Delete tests effectively cover word-wise Change, Visual & Yank.
-// Tabs are used as differentiated whitespace to catch edge cases.
-// Normal word:
-testEdit('diw_mid_spc', 'foo \tbAr\t baz', /A/, 'diw', 'foo \t\t baz');
-testEdit('daw_mid_spc', 'foo \tbAr\t baz', /A/, 'daw', 'foo \tbaz');
-testEdit('diw_mid_punct', 'foo \tbAr.\t baz', /A/, 'diw', 'foo \t.\t baz');
-testEdit('daw_mid_punct', 'foo \tbAr.\t baz', /A/, 'daw', 'foo.\t baz');
-testEdit('diw_mid_punct2', 'foo \t,bAr.\t baz', /A/, 'diw', 'foo \t,.\t baz');
-testEdit('daw_mid_punct2', 'foo \t,bAr.\t baz', /A/, 'daw', 'foo \t,.\t baz');
-testEdit('diw_start_spc', 'bAr \tbaz', /A/, 'diw', ' \tbaz');
-testEdit('daw_start_spc', 'bAr \tbaz', /A/, 'daw', 'baz');
-testEdit('diw_start_punct', 'bAr. \tbaz', /A/, 'diw', '. \tbaz');
-testEdit('daw_start_punct', 'bAr. \tbaz', /A/, 'daw', '. \tbaz');
-testEdit('diw_end_spc', 'foo \tbAr', /A/, 'diw', 'foo \t');
-testEdit('daw_end_spc', 'foo \tbAr', /A/, 'daw', 'foo');
-testEdit('diw_end_punct', 'foo \tbAr.', /A/, 'diw', 'foo \t.');
-testEdit('daw_end_punct', 'foo \tbAr.', /A/, 'daw', 'foo.');
-// Big word:
-testEdit('diW_mid_spc', 'foo \tbAr\t baz', /A/, 'diW', 'foo \t\t baz');
-testEdit('daW_mid_spc', 'foo \tbAr\t baz', /A/, 'daW', 'foo \tbaz');
-testEdit('diW_mid_punct', 'foo \tbAr.\t baz', /A/, 'diW', 'foo \t\t baz');
-testEdit('daW_mid_punct', 'foo \tbAr.\t baz', /A/, 'daW', 'foo \tbaz');
-testEdit('diW_mid_punct2', 'foo \t,bAr.\t baz', /A/, 'diW', 'foo \t\t baz');
-testEdit('daW_mid_punct2', 'foo \t,bAr.\t baz', /A/, 'daW', 'foo \tbaz');
-testEdit('diW_start_spc', 'bAr\t baz', /A/, 'diW', '\t baz');
-testEdit('daW_start_spc', 'bAr\t baz', /A/, 'daW', 'baz');
-testEdit('diW_start_punct', 'bAr.\t baz', /A/, 'diW', '\t baz');
-testEdit('daW_start_punct', 'bAr.\t baz', /A/, 'daW', 'baz');
-testEdit('diW_end_spc', 'foo \tbAr', /A/, 'diW', 'foo \t');
-testEdit('daW_end_spc', 'foo \tbAr', /A/, 'daW', 'foo');
-testEdit('diW_end_punct', 'foo \tbAr.', /A/, 'diW', 'foo \t');
-testEdit('daW_end_punct', 'foo \tbAr.', /A/, 'daW', 'foo');
-// Deleting text objects
-//    Open and close on same line
-testEdit('di(_open_spc', 'foo (bAr) baz', /\(/, 'di(', 'foo () baz');
-testEdit('di)_open_spc', 'foo (bAr) baz', /\(/, 'di)', 'foo () baz');
-testEdit('dib_open_spc', 'foo (bAr) baz', /\(/, 'dib', 'foo () baz');
-testEdit('da(_open_spc', 'foo (bAr) baz', /\(/, 'da(', 'foo  baz');
-testEdit('da)_open_spc', 'foo (bAr) baz', /\(/, 'da)', 'foo  baz');
-
-testEdit('di(_middle_spc', 'foo (bAr) baz', /A/, 'di(', 'foo () baz');
-testEdit('di)_middle_spc', 'foo (bAr) baz', /A/, 'di)', 'foo () baz');
-testEdit('da(_middle_spc', 'foo (bAr) baz', /A/, 'da(', 'foo  baz');
-testEdit('da)_middle_spc', 'foo (bAr) baz', /A/, 'da)', 'foo  baz');
-
-testEdit('di(_close_spc', 'foo (bAr) baz', /\)/, 'di(', 'foo () baz');
-testEdit('di)_close_spc', 'foo (bAr) baz', /\)/, 'di)', 'foo () baz');
-testEdit('da(_close_spc', 'foo (bAr) baz', /\)/, 'da(', 'foo  baz');
-testEdit('da)_close_spc', 'foo (bAr) baz', /\)/, 'da)', 'foo  baz');
-
-//  delete around and inner b.
-testEdit('dab_on_(_should_delete_around_()block', 'o( in(abc) )', /\(a/, 'dab', 'o( in )');
-
-//  delete around and inner B.
-testEdit('daB_on_{_should_delete_around_{}block', 'o{ in{abc} }', /{a/, 'daB', 'o{ in }');
-testEdit('diB_on_{_should_delete_inner_{}block', 'o{ in{abc} }', /{a/, 'diB', 'o{ in{} }');
-
-testEdit('da{_on_{_should_delete_inner_block', 'o{ in{abc} }', /{a/, 'da{', 'o{ in }');
-testEdit('di[_on_(_should_not_delete', 'foo (bAr) baz', /\(/, 'di[', 'foo (bAr) baz');
-testEdit('di[_on_)_should_not_delete', 'foo (bAr) baz', /\)/, 'di[', 'foo (bAr) baz');
-testEdit('da[_on_(_should_not_delete', 'foo (bAr) baz', /\(/, 'da[', 'foo (bAr) baz');
-testEdit('da[_on_)_should_not_delete', 'foo (bAr) baz', /\)/, 'da[', 'foo (bAr) baz');
-testMotion('di(_outside_should_stay', ['d', 'i', '('], { line: 0, ch: 0}, { line: 0, ch: 0});
-
-//  Open and close on different lines, equally indented
-testEdit('di{_middle_spc', 'a{\n\tbar\n}b', /r/, 'di{', 'a{}b');
-testEdit('di}_middle_spc', 'a{\n\tbar\n}b', /r/, 'di}', 'a{}b');
-testEdit('da{_middle_spc', 'a{\n\tbar\n}b', /r/, 'da{', 'ab');
-testEdit('da}_middle_spc', 'a{\n\tbar\n}b', /r/, 'da}', 'ab');
-testEdit('daB_middle_spc', 'a{\n\tbar\n}b', /r/, 'daB', 'ab');
-
-// open and close on diff lines, open indented less than close
-testEdit('di{_middle_spc', 'a{\n\tbar\n\t}b', /r/, 'di{', 'a{}b');
-testEdit('di}_middle_spc', 'a{\n\tbar\n\t}b', /r/, 'di}', 'a{}b');
-testEdit('da{_middle_spc', 'a{\n\tbar\n\t}b', /r/, 'da{', 'ab');
-testEdit('da}_middle_spc', 'a{\n\tbar\n\t}b', /r/, 'da}', 'ab');
-
-// open and close on diff lines, open indented more than close
-testEdit('di[_middle_spc', 'a\t[\n\tbar\n]b', /r/, 'di[', 'a\t[]b');
-testEdit('di]_middle_spc', 'a\t[\n\tbar\n]b', /r/, 'di]', 'a\t[]b');
-testEdit('da[_middle_spc', 'a\t[\n\tbar\n]b', /r/, 'da[', 'a\tb');
-testEdit('da]_middle_spc', 'a\t[\n\tbar\n]b', /r/, 'da]', 'a\tb');
-
-function testSelection(name, before, pos, keys, sel) {
-  return testVim(name, function(cm, vim, helpers) {
-             var ch = before.search(pos)
-             var line = before.substring(0, ch).split('\n').length - 1;
-             if (line) {
-               ch = before.substring(0, ch).split('\n').pop().length;
-             }
-             cm.setCursor(line, ch);
-             helpers.doKeys.apply(this, keys.split(''));
-             eq(sel, cm.getSelection());
-           }, {value: before});
-}
-testSelection('viw_middle_spc', 'foo \tbAr\t baz', /A/, 'viw', 'bAr');
-testSelection('vaw_middle_spc', 'foo \tbAr\t baz', /A/, 'vaw', 'bAr\t ');
-testSelection('viw_middle_punct', 'foo \tbAr,\t baz', /A/, 'viw', 'bAr');
-testSelection('vaW_middle_punct', 'foo \tbAr,\t baz', /A/, 'vaW', 'bAr,\t ');
-testSelection('viw_start_spc', 'foo \tbAr\t baz', /b/, 'viw', 'bAr');
-testSelection('viw_end_spc', 'foo \tbAr\t baz', /r/, 'viw', 'bAr');
-testSelection('viw_eol', 'foo \tbAr', /r/, 'viw', 'bAr');
-testSelection('vi{_middle_spc', 'a{\n\tbar\n\t}b', /r/, 'vi{', '\n\tbar\n\t');
-testSelection('va{_middle_spc', 'a{\n\tbar\n\t}b', /r/, 'va{', '{\n\tbar\n\t}');
-
-testVim('mouse_select', function(cm, vim, helpers) {
-  cm.setSelection(Pos(0, 2), Pos(0, 4), {origin: '*mouse'});
-  is(cm.state.vim.visualMode);
-  is(!cm.state.vim.visualLine);
-  is(!cm.state.vim.visualBlock);
-  helpers.doKeys('<Esc>');
-  is(!cm.somethingSelected());
-  helpers.doKeys('g', 'v');
-  eq('cd', cm.getSelection());
-}, {value: 'abcdef'});
-
-// Operator-motion tests
-testVim('D', function(cm, vim, helpers) {
-  cm.setCursor(0, 3);
-  helpers.doKeys('D');
-  eq(' wo\nword2\n word3', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq('rd1', register.toString());
-  is(!register.linewise);
-  helpers.assertCursorAt(0, 3);
-}, { value: ' word1\nword2\n word3' });
-testVim('C', function(cm, vim, helpers) {
-  var curStart = makeCursor(0, 3);
-  cm.setCursor(curStart);
-  helpers.doKeys('C');
-  eq(' wo\nword2\n word3', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq('rd1', register.toString());
-  is(!register.linewise);
-  eqPos(curStart, cm.getCursor());
-  eq('vim-insert', cm.getOption('keyMap'));
-}, { value: ' word1\nword2\n word3' });
-testVim('Y', function(cm, vim, helpers) {
-  var curStart = makeCursor(0, 3);
-  cm.setCursor(curStart);
-  helpers.doKeys('Y');
-  eq(' word1\nword2\n word3', cm.getValue());
-  var register = helpers.getRegisterController().getRegister();
-  eq('rd1', register.toString());
-  is(!register.linewise);
-  helpers.assertCursorAt(0, 3);
-}, { value: ' word1\nword2\n word3' });
-testVim('~', function(cm, vim, helpers) {
-  helpers.doKeys('3', '~');
-  eq('ABCdefg', cm.getValue());
-  helpers.assertCursorAt(0, 3);
-}, { value: 'abcdefg' });
-
-// Action tests
-testVim('ctrl-a', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('<C-a>');
-  eq('-9', cm.getValue());
-  helpers.assertCursorAt(0, 1);
-  helpers.doKeys('2','<C-a>');
-  eq('-7', cm.getValue());
-}, {value: '-10'});
-testVim('ctrl-x', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('<C-x>');
-  eq('-1', cm.getValue());
-  helpers.assertCursorAt(0, 1);
-  helpers.doKeys('2','<C-x>');
-  eq('-3', cm.getValue());
-}, {value: '0'});
-testVim('<C-x>/<C-a> search forward', function(cm, vim, helpers) {
-  forEach(['<C-x>', '<C-a>'], function(key) {
-    cm.setCursor(0, 0);
-    helpers.doKeys(key);
-    helpers.assertCursorAt(0, 5);
-    helpers.doKeys('l');
-    helpers.doKeys(key);
-    helpers.assertCursorAt(0, 10);
-    cm.setCursor(0, 11);
-    helpers.doKeys(key);
-    helpers.assertCursorAt(0, 11);
-  });
-}, {value: '__jmp1 jmp2 jmp'});
-testVim('a', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.doKeys('a');
-  helpers.assertCursorAt(0, 2);
-  eq('vim-insert', cm.getOption('keyMap'));
-});
-testVim('a_eol', function(cm, vim, helpers) {
-  cm.setCursor(0, lines[0].length - 1);
-  helpers.doKeys('a');
-  helpers.assertCursorAt(0, lines[0].length);
-  eq('vim-insert', cm.getOption('keyMap'));
-});
-testVim('A_endOfSelectedArea', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('v', 'j', 'l');
-  helpers.doKeys('A');
-  helpers.assertCursorAt(1, 2);
-  eq('vim-insert', cm.getOption('keyMap'));
-}, {value: 'foo\nbar'});
-testVim('i', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.doKeys('i');
-  helpers.assertCursorAt(0, 1);
-  eq('vim-insert', cm.getOption('keyMap'));
-});
-testVim('i_repeat', function(cm, vim, helpers) {
-  helpers.doKeys('3', 'i');
-  cm.replaceRange('test', cm.getCursor());
-  helpers.doKeys('<Esc>');
-  eq('testtesttest', cm.getValue());
-  helpers.assertCursorAt(0, 11);
-}, { value: '' });
-testVim('i_repeat_delete', function(cm, vim, helpers) {
-  cm.setCursor(0, 4);
-  helpers.doKeys('2', 'i');
-  cm.replaceRange('z', cm.getCursor());
-  helpers.doInsertModeKeys('Backspace', 'Backspace');
-  helpers.doKeys('<Esc>');
-  eq('abe', cm.getValue());
-  helpers.assertCursorAt(0, 1);
-}, { value: 'abcde' });
-testVim('A', function(cm, vim, helpers) {
-  helpers.doKeys('A');
-  helpers.assertCursorAt(0, lines[0].length);
-  eq('vim-insert', cm.getOption('keyMap'));
-});
-testVim('A_visual_block', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.doKeys('<C-v>', '2', 'j', 'l', 'l', 'A');
-  var replacement = new Array(cm.listSelections().length+1).join('hello ').split(' ');
-  replacement.pop();
-  cm.replaceSelections(replacement);
-  eq('testhello\nmehello\npleahellose', cm.getValue());
-  helpers.doKeys('<Esc>');
-  cm.setCursor(0, 0);
-  helpers.doKeys('.');
-  // TODO this doesn't work yet
-  // eq('teshellothello\nme hello hello\nplehelloahellose', cm.getValue());
-}, {value: 'test\nme\nplease'});
-testVim('I', function(cm, vim, helpers) {
-  cm.setCursor(0, 4);
-  helpers.doKeys('I');
-  helpers.assertCursorAt(0, lines[0].textStart);
-  eq('vim-insert', cm.getOption('keyMap'));
-});
-testVim('I_repeat', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.doKeys('3', 'I');
-  cm.replaceRange('test', cm.getCursor());
-  helpers.doKeys('<Esc>');
-  eq('testtesttestblah', cm.getValue());
-  helpers.assertCursorAt(0, 11);
-}, { value: 'blah' });
-testVim('I_visual_block', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('<C-v>', '2', 'j', 'l', 'l', 'I');
-  var replacement = new Array(cm.listSelections().length+1).join('hello ').split(' ');
-  replacement.pop();
-  cm.replaceSelections(replacement);
-  eq('hellotest\nhellome\nhelloplease', cm.getValue());
-}, {value: 'test\nme\nplease'});
-testVim('o', function(cm, vim, helpers) {
-  cm.setCursor(0, 4);
-  helpers.doKeys('o');
-  eq('word1\n\nword2', cm.getValue());
-  helpers.assertCursorAt(1, 0);
-  eq('vim-insert', cm.getOption('keyMap'));
-}, { value: 'word1\nword2' });
-testVim('o_repeat', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('3', 'o');
-  cm.replaceRange('test', cm.getCursor());
-  helpers.doKeys('<Esc>');
-  eq('\ntest\ntest\ntest', cm.getValue());
-  helpers.assertCursorAt(3, 3);
-}, { value: '' });
-testVim('O', function(cm, vim, helpers) {
-  cm.setCursor(0, 4);
-  helpers.doKeys('O');
-  eq('\nword1\nword2', cm.getValue());
-  helpers.assertCursorAt(0, 0);
-  eq('vim-insert', cm.getOption('keyMap'));
-}, { value: 'word1\nword2' });
-testVim('J', function(cm, vim, helpers) {
-  cm.setCursor(0, 4);
-  helpers.doKeys('J');
-  var expectedValue = 'word1  word2\nword3\n word4';
-  eq(expectedValue, cm.getValue());
-  helpers.assertCursorAt(0, expectedValue.indexOf('word2') - 1);
-}, { value: 'word1 \n    word2\nword3\n word4' });
-testVim('J_repeat', function(cm, vim, helpers) {
-  cm.setCursor(0, 4);
-  helpers.doKeys('3', 'J');
-  var expectedValue = 'word1  word2 word3\n word4';
-  eq(expectedValue, cm.getValue());
-  helpers.assertCursorAt(0, expectedValue.indexOf('word3') - 1);
-}, { value: 'word1 \n    word2\nword3\n word4' });
-testVim('p', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.getRegisterController().pushText('"', 'yank', 'abc\ndef', false);
-  helpers.doKeys('p');
-  eq('__abc\ndef_', cm.getValue());
-  helpers.assertCursorAt(1, 2);
-}, { value: '___' });
-testVim('p_register', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.getRegisterController().getRegister('a').setText('abc\ndef', false);
-  helpers.doKeys('"', 'a', 'p');
-  eq('__abc\ndef_', cm.getValue());
-  helpers.assertCursorAt(1, 2);
-}, { value: '___' });
-testVim('p_wrong_register', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.getRegisterController().getRegister('a').setText('abc\ndef', false);
-  helpers.doKeys('p');
-  eq('___', cm.getValue());
-  helpers.assertCursorAt(0, 1);
-}, { value: '___' });
-testVim('p_line', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.getRegisterController().pushText('"', 'yank', '  a\nd\n', true);
-  helpers.doKeys('2', 'p');
-  eq('___\n  a\nd\n  a\nd', cm.getValue());
-  helpers.assertCursorAt(1, 2);
-}, { value: '___' });
-testVim('p_lastline', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.getRegisterController().pushText('"', 'yank', '  a\nd', true);
-  helpers.doKeys('2', 'p');
-  eq('___\n  a\nd\n  a\nd', cm.getValue());
-  helpers.assertCursorAt(1, 2);
-}, { value: '___' });
-testVim(']p_first_indent_is_smaller', function(cm, vim, helpers) {
-  helpers.getRegisterController().pushText('"', 'yank', '  abc\n    def\n', true);
-  helpers.doKeys(']', 'p');
-  eq('  ___\n  abc\n    def', cm.getValue());
-}, { value: '  ___' });
-testVim(']p_first_indent_is_larger', function(cm, vim, helpers) {
-  helpers.getRegisterController().pushText('"', 'yank', '    abc\n  def\n', true);
-  helpers.doKeys(']', 'p');
-  eq('  ___\n  abc\ndef', cm.getValue());
-}, { value: '  ___' });
-testVim(']p_with_tab_indents', function(cm, vim, helpers) {
-  helpers.getRegisterController().pushText('"', 'yank', '\t\tabc\n\t\t\tdef\n', true);
-  helpers.doKeys(']', 'p');
-  eq('\t___\n\tabc\n\t\tdef', cm.getValue());
-}, { value: '\t___', indentWithTabs: true});
-testVim(']p_with_spaces_translated_to_tabs', function(cm, vim, helpers) {
-  helpers.getRegisterController().pushText('"', 'yank', '  abc\n    def\n', true);
-  helpers.doKeys(']', 'p');
-  eq('\t___\n\tabc\n\t\tdef', cm.getValue());
-}, { value: '\t___', indentWithTabs: true, tabSize: 2 });
-testVim('[p', function(cm, vim, helpers) {
-  helpers.getRegisterController().pushText('"', 'yank', '  abc\n    def\n', true);
-  helpers.doKeys('[', 'p');
-  eq('  abc\n    def\n  ___', cm.getValue());
-}, { value: '  ___' });
-testVim('P', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.getRegisterController().pushText('"', 'yank', 'abc\ndef', false);
-  helpers.doKeys('P');
-  eq('_abc\ndef__', cm.getValue());
-  helpers.assertCursorAt(1, 3);
-}, { value: '___' });
-testVim('P_line', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.getRegisterController().pushText('"', 'yank', '  a\nd\n', true);
-  helpers.doKeys('2', 'P');
-  eq('  a\nd\n  a\nd\n___', cm.getValue());
-  helpers.assertCursorAt(0, 2);
-}, { value: '___' });
-testVim('r', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.doKeys('3', 'r', 'u');
-  eq('wuuuet\nanother', cm.getValue(),'3r failed');
-  helpers.assertCursorAt(0, 3);
-  cm.setCursor(0, 4);
-  helpers.doKeys('v', 'j', 'h', 'r', '<Space>');
-  eq('wuuu  \n    her', cm.getValue(),'Replacing selection by space-characters failed');
-}, { value: 'wordet\nanother' });
-testVim('r_visual_block', function(cm, vim, helpers) {
-  cm.setCursor(2, 3);
-  helpers.doKeys('<C-v>', 'k', 'k', 'h', 'h', 'r', 'l');
-  eq('1lll\n5lll\nalllefg', cm.getValue());
-  helpers.doKeys('<C-v>', 'l', 'j', 'r', '<Space>');
-  eq('1  l\n5  l\nalllefg', cm.getValue());
-  cm.setCursor(2, 0);
-  helpers.doKeys('o');
-  helpers.doKeys('<Esc>');
-  cm.replaceRange('\t\t', cm.getCursor());
-  helpers.doKeys('<C-v>', 'h', 'h', 'r', 'r');
-  eq('1  l\n5  l\nalllefg\nrrrrrrrr', cm.getValue());
-}, {value: '1234\n5678\nabcdefg'});
-testVim('R', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.doKeys('R');
-  helpers.assertCursorAt(0, 1);
-  eq('vim-replace', cm.getOption('keyMap'));
-  is(cm.state.overwrite, 'Setting overwrite state failed');
-});
-testVim('mark', function(cm, vim, helpers) {
-  cm.setCursor(2, 2);
-  helpers.doKeys('m', 't');
-  cm.setCursor(0, 0);
-  helpers.doKeys('`', 't');
-  helpers.assertCursorAt(2, 2);
-  cm.setCursor(2, 0);
-  cm.replaceRange('   h', cm.getCursor());
-  cm.setCursor(0, 0);
-  helpers.doKeys('\'', 't');
-  helpers.assertCursorAt(2, 3);
-});
-testVim('jumpToMark_next', function(cm, vim, helpers) {
-  cm.setCursor(2, 2);
-  helpers.doKeys('m', 't');
-  cm.setCursor(0, 0);
-  helpers.doKeys(']', '`');
-  helpers.assertCursorAt(2, 2);
-  cm.setCursor(0, 0);
-  helpers.doKeys(']', '\'');
-  helpers.assertCursorAt(2, 0);
-});
-testVim('jumpToMark_next_repeat', function(cm, vim, helpers) {
-  cm.setCursor(2, 2);
-  helpers.doKeys('m', 'a');
-  cm.setCursor(3, 2);
-  helpers.doKeys('m', 'b');
-  cm.setCursor(4, 2);
-  helpers.doKeys('m', 'c');
-  cm.setCursor(0, 0);
-  helpers.doKeys('2', ']', '`');
-  helpers.assertCursorAt(3, 2);
-  cm.setCursor(0, 0);
-  helpers.doKeys('2', ']', '\'');
-  helpers.assertCursorAt(3, 1);
-});
-testVim('jumpToMark_next_sameline', function(cm, vim, helpers) {
-  cm.setCursor(2, 0);
-  helpers.doKeys('m', 'a');
-  cm.setCursor(2, 4);
-  helpers.doKeys('m', 'b');
-  cm.setCursor(2, 2);
-  helpers.doKeys(']', '`');
-  helpers.assertCursorAt(2, 4);
-});
-testVim('jumpToMark_next_onlyprev', function(cm, vim, helpers) {
-  cm.setCursor(2, 0);
-  helpers.doKeys('m', 'a');
-  cm.setCursor(4, 0);
-  helpers.doKeys(']', '`');
-  helpers.assertCursorAt(4, 0);
-});
-testVim('jumpToMark_next_nomark', function(cm, vim, helpers) {
-  cm.setCursor(2, 2);
-  helpers.doKeys(']', '`');
-  helpers.assertCursorAt(2, 2);
-  helpers.doKeys(']', '\'');
-  helpers.assertCursorAt(2, 0);
-});
-testVim('jumpToMark_next_linewise_over', function(cm, vim, helpers) {
-  cm.setCursor(2, 2);
-  helpers.doKeys('m', 'a');
-  cm.setCursor(3, 4);
-  helpers.doKeys('m', 'b');
-  cm.setCursor(2, 1);
-  helpers.doKeys(']', '\'');
-  helpers.assertCursorAt(3, 1);
-});
-testVim('jumpToMark_next_action', function(cm, vim, helpers) {
-  cm.setCursor(2, 2);
-  helpers.doKeys('m', 't');
-  cm.setCursor(0, 0);
-  helpers.doKeys('d', ']', '`');
-  helpers.assertCursorAt(0, 0);
-  var actual = cm.getLine(0);
-  var expected = 'pop pop 0 1 2 3 4';
-  eq(actual, expected, "Deleting while jumping to the next mark failed.");
-});
-testVim('jumpToMark_next_line_action', function(cm, vim, helpers) {
-  cm.setCursor(2, 2);
-  helpers.doKeys('m', 't');
-  cm.setCursor(0, 0);
-  helpers.doKeys('d', ']', '\'');
-  helpers.assertCursorAt(0, 1);
-  var actual = cm.getLine(0);
-  var expected = ' (a) [b] {c} '
-  eq(actual, expected, "Deleting while jumping to the next mark line failed.");
-});
-testVim('jumpToMark_prev', function(cm, vim, helpers) {
-  cm.setCursor(2, 2);
-  helpers.doKeys('m', 't');
-  cm.setCursor(4, 0);
-  helpers.doKeys('[', '`');
-  helpers.assertCursorAt(2, 2);
-  cm.setCursor(4, 0);
-  helpers.doKeys('[', '\'');
-  helpers.assertCursorAt(2, 0);
-});
-testVim('jumpToMark_prev_repeat', function(cm, vim, helpers) {
-  cm.setCursor(2, 2);
-  helpers.doKeys('m', 'a');
-  cm.setCursor(3, 2);
-  helpers.doKeys('m', 'b');
-  cm.setCursor(4, 2);
-  helpers.doKeys('m', 'c');
-  cm.setCursor(5, 0);
-  helpers.doKeys('2', '[', '`');
-  helpers.assertCursorAt(3, 2);
-  cm.setCursor(5, 0);
-  helpers.doKeys('2', '[', '\'');
-  helpers.assertCursorAt(3, 1);
-});
-testVim('jumpToMark_prev_sameline', function(cm, vim, helpers) {
-  cm.setCursor(2, 0);
-  helpers.doKeys('m', 'a');
-  cm.setCursor(2, 4);
-  helpers.doKeys('m', 'b');
-  cm.setCursor(2, 2);
-  helpers.doKeys('[', '`');
-  helpers.assertCursorAt(2, 0);
-});
-testVim('jumpToMark_prev_onlynext', function(cm, vim, helpers) {
-  cm.setCursor(4, 4);
-  helpers.doKeys('m', 'a');
-  cm.setCursor(2, 0);
-  helpers.doKeys('[', '`');
-  helpers.assertCursorAt(2, 0);
-});
-testVim('jumpToMark_prev_nomark', function(cm, vim, helpers) {
-  cm.setCursor(2, 2);
-  helpers.doKeys('[', '`');
-  helpers.assertCursorAt(2, 2);
-  helpers.doKeys('[', '\'');
-  helpers.assertCursorAt(2, 0);
-});
-testVim('jumpToMark_prev_linewise_over', function(cm, vim, helpers) {
-  cm.setCursor(2, 2);
-  helpers.doKeys('m', 'a');
-  cm.setCursor(3, 4);
-  helpers.doKeys('m', 'b');
-  cm.setCursor(3, 6);
-  helpers.doKeys('[', '\'');
-  helpers.assertCursorAt(2, 0);
-});
-testVim('delmark_single', function(cm, vim, helpers) {
-  cm.setCursor(1, 2);
-  helpers.doKeys('m', 't');
-  helpers.doEx('delmarks t');
-  cm.setCursor(0, 0);
-  helpers.doKeys('`', 't');
-  helpers.assertCursorAt(0, 0);
-});
-testVim('delmark_range', function(cm, vim, helpers) {
-  cm.setCursor(1, 2);
-  helpers.doKeys('m', 'a');
-  cm.setCursor(2, 2);
-  helpers.doKeys('m', 'b');
-  cm.setCursor(3, 2);
-  helpers.doKeys('m', 'c');
-  cm.setCursor(4, 2);
-  helpers.doKeys('m', 'd');
-  cm.setCursor(5, 2);
-  helpers.doKeys('m', 'e');
-  helpers.doEx('delmarks b-d');
-  cm.setCursor(0, 0);
-  helpers.doKeys('`', 'a');
-  helpers.assertCursorAt(1, 2);
-  helpers.doKeys('`', 'b');
-  helpers.assertCursorAt(1, 2);
-  helpers.doKeys('`', 'c');
-  helpers.assertCursorAt(1, 2);
-  helpers.doKeys('`', 'd');
-  helpers.assertCursorAt(1, 2);
-  helpers.doKeys('`', 'e');
-  helpers.assertCursorAt(5, 2);
-});
-testVim('delmark_multi', function(cm, vim, helpers) {
-  cm.setCursor(1, 2);
-  helpers.doKeys('m', 'a');
-  cm.setCursor(2, 2);
-  helpers.doKeys('m', 'b');
-  cm.setCursor(3, 2);
-  helpers.doKeys('m', 'c');
-  cm.setCursor(4, 2);
-  helpers.doKeys('m', 'd');
-  cm.setCursor(5, 2);
-  helpers.doKeys('m', 'e');
-  helpers.doEx('delmarks bcd');
-  cm.setCursor(0, 0);
-  helpers.doKeys('`', 'a');
-  helpers.assertCursorAt(1, 2);
-  helpers.doKeys('`', 'b');
-  helpers.assertCursorAt(1, 2);
-  helpers.doKeys('`', 'c');
-  helpers.assertCursorAt(1, 2);
-  helpers.doKeys('`', 'd');
-  helpers.assertCursorAt(1, 2);
-  helpers.doKeys('`', 'e');
-  helpers.assertCursorAt(5, 2);
-});
-testVim('delmark_multi_space', function(cm, vim, helpers) {
-  cm.setCursor(1, 2);
-  helpers.doKeys('m', 'a');
-  cm.setCursor(2, 2);
-  helpers.doKeys('m', 'b');
-  cm.setCursor(3, 2);
-  helpers.doKeys('m', 'c');
-  cm.setCursor(4, 2);
-  helpers.doKeys('m', 'd');
-  cm.setCursor(5, 2);
-  helpers.doKeys('m', 'e');
-  helpers.doEx('delmarks b c d');
-  cm.setCursor(0, 0);
-  helpers.doKeys('`', 'a');
-  helpers.assertCursorAt(1, 2);
-  helpers.doKeys('`', 'b');
-  helpers.assertCursorAt(1, 2);
-  helpers.doKeys('`', 'c');
-  helpers.assertCursorAt(1, 2);
-  helpers.doKeys('`', 'd');
-  helpers.assertCursorAt(1, 2);
-  helpers.doKeys('`', 'e');
-  helpers.assertCursorAt(5, 2);
-});
-testVim('delmark_all', function(cm, vim, helpers) {
-  cm.setCursor(1, 2);
-  helpers.doKeys('m', 'a');
-  cm.setCursor(2, 2);
-  helpers.doKeys('m', 'b');
-  cm.setCursor(3, 2);
-  helpers.doKeys('m', 'c');
-  cm.setCursor(4, 2);
-  helpers.doKeys('m', 'd');
-  cm.setCursor(5, 2);
-  helpers.doKeys('m', 'e');
-  helpers.doEx('delmarks a b-de');
-  cm.setCursor(0, 0);
-  helpers.doKeys('`', 'a');
-  helpers.assertCursorAt(0, 0);
-  helpers.doKeys('`', 'b');
-  helpers.assertCursorAt(0, 0);
-  helpers.doKeys('`', 'c');
-  helpers.assertCursorAt(0, 0);
-  helpers.doKeys('`', 'd');
-  helpers.assertCursorAt(0, 0);
-  helpers.doKeys('`', 'e');
-  helpers.assertCursorAt(0, 0);
-});
-testVim('visual', function(cm, vim, helpers) {
-  helpers.doKeys('l', 'v', 'l', 'l');
-  helpers.assertCursorAt(0, 4);
-  eqPos(makeCursor(0, 1), cm.getCursor('anchor'));
-  helpers.doKeys('d');
-  eq('15', cm.getValue());
-}, { value: '12345' });
-testVim('visual_yank', function(cm, vim, helpers) {
-  helpers.doKeys('v', '3', 'l', 'y');
-  helpers.assertCursorAt(0, 0);
-  helpers.doKeys('p');
-  eq('aa te test for yank', cm.getValue());
-}, { value: 'a test for yank' })
-testVim('visual_w', function(cm, vim, helpers) {
-  helpers.doKeys('v', 'w');
-  eq(cm.getSelection(), 'motion t');
-}, { value: 'motion test'});
-testVim('visual_initial_selection', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.doKeys('v');
-  cm.getSelection('n');
-}, { value: 'init'});
-testVim('visual_crossover_left', function(cm, vim, helpers) {
-  cm.setCursor(0, 2);
-  helpers.doKeys('v', 'l', 'h', 'h');
-  cm.getSelection('ro');
-}, { value: 'cross'});
-testVim('visual_crossover_left', function(cm, vim, helpers) {
-  cm.setCursor(0, 2);
-  helpers.doKeys('v', 'h', 'l', 'l');
-  cm.getSelection('os');
-}, { value: 'cross'});
-testVim('visual_crossover_up', function(cm, vim, helpers) {
-  cm.setCursor(3, 2);
-  helpers.doKeys('v', 'j', 'k', 'k');
-  eqPos(Pos(2, 2), cm.getCursor('head'));
-  eqPos(Pos(3, 3), cm.getCursor('anchor'));
-  helpers.doKeys('k');
-  eqPos(Pos(1, 2), cm.getCursor('head'));
-  eqPos(Pos(3, 3), cm.getCursor('anchor'));
-}, { value: 'cross\ncross\ncross\ncross\ncross\n'});
-testVim('visual_crossover_down', function(cm, vim, helpers) {
-  cm.setCursor(1, 2);
-  helpers.doKeys('v', 'k', 'j', 'j');
-  eqPos(Pos(2, 3), cm.getCursor('head'));
-  eqPos(Pos(1, 2), cm.getCursor('anchor'));
-  helpers.doKeys('j');
-  eqPos(Pos(3, 3), cm.getCursor('head'));
-  eqPos(Pos(1, 2), cm.getCursor('anchor'));
-}, { value: 'cross\ncross\ncross\ncross\ncross\n'});
-testVim('visual_exit', function(cm, vim, helpers) {
-  helpers.doKeys('<C-v>', 'l', 'j', 'j', '<Esc>');
-  eqPos(cm.getCursor('anchor'), cm.getCursor('head'));
-  eq(vim.visualMode, false);
-}, { value: 'hello\nworld\nfoo' });
-testVim('visual_line', function(cm, vim, helpers) {
-  helpers.doKeys('l', 'V', 'l', 'j', 'j', 'd');
-  eq(' 4\n 5', cm.getValue());
-}, { value: ' 1\n 2\n 3\n 4\n 5' });
-testVim('visual_block_move_to_eol', function(cm, vim, helpers) {
-  // moveToEol should move all block cursors to end of line
-  cm.setCursor(0, 0);
-  helpers.doKeys('<C-v>', 'G', '$');
-  var selections = cm.getSelections().join();
-  eq("123,45,6", selections);
-}, {value: '123\n45\n6'});
-testVim('visual_block_different_line_lengths', function(cm, vim, helpers) {
-  // test the block selection with lines of different length
-  // i.e. extending the selection
-  // till the end of the longest line.
-  helpers.doKeys('<C-v>', 'l', 'j', 'j', '6', 'l', 'd');
-  helpers.doKeys('d', 'd', 'd', 'd');
-  eq('', cm.getValue());
-}, {value: '1234\n5678\nabcdefg'});
-testVim('visual_block_truncate_on_short_line', function(cm, vim, helpers) {
-  // check for left side selection in case
-  // of moving up to a shorter line.
-  cm.replaceRange('', cm.getCursor());
-  cm.setCursor(3, 4);
-  helpers.doKeys('<C-v>', 'l', 'k', 'k', 'd');
-  eq('hello world\n{\ntis\nsa!', cm.getValue());
-}, {value: 'hello world\n{\nthis is\nsparta!'});
-testVim('visual_block_corners', function(cm, vim, helpers) {
-  cm.setCursor(1, 2);
-  helpers.doKeys('<C-v>', '2', 'l', 'k');
-  // circle around the anchor
-  // and check the selections
-  var selections = cm.getSelections();
-  eq('345891', selections.join(''));
-  helpers.doKeys('4', 'h');
-  selections = cm.getSelections();
-  eq('123678', selections.join(''));
-  helpers.doKeys('j', 'j');
-  selections = cm.getSelections();
-  eq('678abc', selections.join(''));
-  helpers.doKeys('4', 'l');
-  selections = cm.getSelections();
-  eq('891cde', selections.join(''));
-}, {value: '12345\n67891\nabcde'});
-testVim('visual_block_mode_switch', function(cm, vim, helpers) {
-  // switch between visual modes
-  cm.setCursor(1, 1);
-  // blockwise to characterwise visual
-  helpers.doKeys('<C-v>', 'j', 'l', 'v');
-  selections = cm.getSelections();
-  eq('7891\nabc', selections.join(''));
-  // characterwise to blockwise
-  helpers.doKeys('<C-v>');
-  selections = cm.getSelections();
-  eq('78bc', selections.join(''));
-  // blockwise to linewise visual
-  helpers.doKeys('V');
-  selections = cm.getSelections();
-  eq('67891\nabcde', selections.join(''));
-}, {value: '12345\n67891\nabcde'});
-testVim('visual_block_crossing_short_line', function(cm, vim, helpers) {
-  // visual block with long and short lines
-  cm.setCursor(0, 3);
-  helpers.doKeys('<C-v>', 'j', 'j', 'j');
-  var selections = cm.getSelections().join();
-  eq('4,,d,b', selections);
-  helpers.doKeys('3', 'k');
-  selections = cm.getSelections().join();
-  eq('4', selections);
-  helpers.doKeys('5', 'j', 'k');
-  selections = cm.getSelections().join("");
-  eq(10, selections.length);
-}, {value: '123456\n78\nabcdefg\nfoobar\n}\n'});
-testVim('visual_block_curPos_on_exit', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('<C-v>', '3' , 'l', '<Esc>');
-  eqPos(makeCursor(0, 3), cm.getCursor());
-  helpers.doKeys('h', '<C-v>', '2' , 'j' ,'3' , 'l');
-  eq(cm.getSelections().join(), "3456,,cdef");
-  helpers.doKeys('4' , 'h');
-  eq(cm.getSelections().join(), "23,8,bc");
-  helpers.doKeys('2' , 'l');
-  eq(cm.getSelections().join(), "34,,cd");
-}, {value: '123456\n78\nabcdefg\nfoobar'});
-
-testVim('visual_marks', function(cm, vim, helpers) {
-  helpers.doKeys('l', 'v', 'l', 'l', 'j', 'j', 'v');
-  // Test visual mode marks
-  cm.setCursor(2, 1);
-  helpers.doKeys('\'', '<');
-  helpers.assertCursorAt(0, 1);
-  helpers.doKeys('\'', '>');
-  helpers.assertCursorAt(2, 0);
-});
-testVim('visual_join', function(cm, vim, helpers) {
-  helpers.doKeys('l', 'V', 'l', 'j', 'j', 'J');
-  eq(' 1 2 3\n 4\n 5', cm.getValue());
-  is(!vim.visualMode);
-}, { value: ' 1\n 2\n 3\n 4\n 5' });
-testVim('visual_blank', function(cm, vim, helpers) {
-  helpers.doKeys('v', 'k');
-  eq(vim.visualMode, true);
-}, { value: '\n' });
-testVim('reselect_visual', function(cm, vim, helpers) {
-  helpers.doKeys('l', 'v', 'l', 'l', 'l', 'y', 'g', 'v');
-  helpers.assertCursorAt(0, 5);
-  eqPos(makeCursor(0, 1), cm.getCursor('anchor'));
-  helpers.doKeys('v');
-  cm.setCursor(1, 0);
-  helpers.doKeys('v', 'l', 'l', 'p');
-  eq('123456\n2345\nbar', cm.getValue());
-  cm.setCursor(0, 0);
-  helpers.doKeys('g', 'v');
-  // here the fake cursor is at (1, 3)
-  helpers.assertCursorAt(1, 4);
-  eqPos(makeCursor(1, 0), cm.getCursor('anchor'));
-  helpers.doKeys('v');
-  cm.setCursor(2, 0);
-  helpers.doKeys('v', 'l', 'l', 'g', 'v');
-  helpers.assertCursorAt(1, 4);
-  eqPos(makeCursor(1, 0), cm.getCursor('anchor'));
-  helpers.doKeys('g', 'v');
-  helpers.assertCursorAt(2, 3);
-  eqPos(makeCursor(2, 0), cm.getCursor('anchor'));
-  eq('123456\n2345\nbar', cm.getValue());
-}, { value: '123456\nfoo\nbar' });
-testVim('reselect_visual_line', function(cm, vim, helpers) {
-  helpers.doKeys('l', 'V', 'j', 'j', 'V', 'g', 'v', 'd');
-  eq('foo\nand\nbar', cm.getValue());
-  cm.setCursor(1, 0);
-  helpers.doKeys('V', 'y', 'j');
-  helpers.doKeys('V', 'p' , 'g', 'v', 'd');
-  eq('foo\nand', cm.getValue());
-}, { value: 'hello\nthis\nis\nfoo\nand\nbar' });
-testVim('reselect_visual_block', function(cm, vim, helpers) {
-  cm.setCursor(1, 2);
-  helpers.doKeys('<C-v>', 'k', 'h', '<C-v>');
-  cm.setCursor(2, 1);
-  helpers.doKeys('v', 'l', 'g', 'v');
-  eqPos(Pos(1, 2), vim.sel.anchor);
-  eqPos(Pos(0, 1), vim.sel.head);
-  // Ensure selection is done with visual block mode rather than one
-  // continuous range.
-  eq(cm.getSelections().join(''), '23oo')
-  helpers.doKeys('g', 'v');
-  eqPos(Pos(2, 1), vim.sel.anchor);
-  eqPos(Pos(2, 2), vim.sel.head);
-  helpers.doKeys('<Esc>');
-  // Ensure selection of deleted range
-  cm.setCursor(1, 1);
-  helpers.doKeys('v', '<C-v>', 'j', 'd', 'g', 'v');
-  eq(cm.getSelections().join(''), 'or');
-}, { value: '123456\nfoo\nbar' });
-testVim('s_normal', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.doKeys('s');
-  helpers.doKeys('<Esc>');
-  eq('ac', cm.getValue());
-}, { value: 'abc'});
-testVim('s_visual', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.doKeys('v', 's');
-  helpers.doKeys('<Esc>');
-  helpers.assertCursorAt(0, 0);
-  eq('ac', cm.getValue());
-}, { value: 'abc'});
-testVim('o_visual', function(cm, vim, helpers) {
-  cm.setCursor(0,0);
-  helpers.doKeys('v','l','l','l','o');
-  helpers.assertCursorAt(0,0);
-  helpers.doKeys('v','v','j','j','j','o');
-  helpers.assertCursorAt(0,0);
-  helpers.doKeys('O');
-  helpers.doKeys('l','l')
-  helpers.assertCursorAt(3, 3);
-  helpers.doKeys('d');
-  eq('p',cm.getValue());
-}, { value: 'abcd\nefgh\nijkl\nmnop'});
-testVim('o_visual_block', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.doKeys('<C-v>','3','j','l','l', 'o');
-  eqPos(Pos(3, 3), vim.sel.anchor);
-  eqPos(Pos(0, 1), vim.sel.head);
-  helpers.doKeys('O');
-  eqPos(Pos(3, 1), vim.sel.anchor);
-  eqPos(Pos(0, 3), vim.sel.head);
-  helpers.doKeys('o');
-  eqPos(Pos(0, 3), vim.sel.anchor);
-  eqPos(Pos(3, 1), vim.sel.head);
-}, { value: 'abcd\nefgh\nijkl\nmnop'});
-testVim('changeCase_visual', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('v', 'l', 'l');
-  helpers.doKeys('U');
-  helpers.assertCursorAt(0, 0);
-  helpers.doKeys('v', 'l', 'l');
-  helpers.doKeys('u');
-  helpers.assertCursorAt(0, 0);
-  helpers.doKeys('l', 'l', 'l', '.');
-  helpers.assertCursorAt(0, 3);
-  cm.setCursor(0, 0);
-  helpers.doKeys('q', 'a', 'v', 'j', 'U', 'q');
-  helpers.assertCursorAt(0, 0);
-  helpers.doKeys('j', '@', 'a');
-  helpers.assertCursorAt(1, 0);
-  cm.setCursor(3, 0);
-  helpers.doKeys('V', 'U', 'j', '.');
-  eq('ABCDEF\nGHIJKL\nMnopq\nSHORT LINE\nLONG LINE OF TEXT', cm.getValue());
-}, { value: 'abcdef\nghijkl\nmnopq\nshort line\nlong line of text'});
-testVim('changeCase_visual_block', function(cm, vim, helpers) {
-  cm.setCursor(2, 1);
-  helpers.doKeys('<C-v>', 'k', 'k', 'h', 'U');
-  eq('ABcdef\nGHijkl\nMNopq\nfoo', cm.getValue());
-  cm.setCursor(0, 2);
-  helpers.doKeys('.');
-  eq('ABCDef\nGHIJkl\nMNOPq\nfoo', cm.getValue());
-  // check when last line is shorter.
-  cm.setCursor(2, 2);
-  helpers.doKeys('.');
-  eq('ABCDef\nGHIJkl\nMNOPq\nfoO', cm.getValue());
-}, { value: 'abcdef\nghijkl\nmnopq\nfoo'});
-testVim('visual_paste', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('v', 'l', 'l', 'y');
-  helpers.assertCursorAt(0, 0);
-  helpers.doKeys('3', 'l', 'j', 'v', 'l', 'p');
-  helpers.assertCursorAt(1, 5);
-  eq('this is a\nunithitest for visual paste', cm.getValue());
-  cm.setCursor(0, 0);
-  // in case of pasting whole line
-  helpers.doKeys('y', 'y');
-  cm.setCursor(1, 6);
-  helpers.doKeys('v', 'l', 'l', 'l', 'p');
-  helpers.assertCursorAt(2, 0);
-  eq('this is a\nunithi\nthis is a\n for visual paste', cm.getValue());
-}, { value: 'this is a\nunit test for visual paste'});
-
-// This checks the contents of the register used to paste the text
-testVim('v_paste_from_register', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('"', 'a', 'y', 'w');
-  cm.setCursor(1, 0);
-  helpers.doKeys('v', 'p');
-  cm.openDialog = helpers.fakeOpenDialog('registers');
-  cm.openNotification = helpers.fakeOpenNotification(function(text) {
-    is(/a\s+register/.test(text));
-  });
-}, { value: 'register contents\nare not erased'});
-testVim('S_normal', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.doKeys('j', 'S');
-  helpers.doKeys('<Esc>');
-  helpers.assertCursorAt(1, 0);
-  eq('aa\n\ncc', cm.getValue());
-}, { value: 'aa\nbb\ncc'});
-testVim('blockwise_paste', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('<C-v>', '3', 'j', 'l', 'y');
-  cm.setCursor(0, 2);
-  // paste one char after the current cursor position
-  helpers.doKeys('p');
-  eq('helhelo\nworwold\nfoofo\nbarba', cm.getValue());
-  cm.setCursor(0, 0);
-  helpers.doKeys('v', '4', 'l', 'y');
-  cm.setCursor(0, 0);
-  helpers.doKeys('<C-v>', '3', 'j', 'p');
-  eq('helheelhelo\norwold\noofo\narba', cm.getValue());
-}, { value: 'hello\nworld\nfoo\nbar'});
-testVim('blockwise_paste_long/short_line', function(cm, vim, helpers) {
-  // extend short lines in case of different line lengths.
-  cm.setCursor(0, 0);
-  helpers.doKeys('<C-v>', 'j', 'j', 'y');
-  cm.setCursor(0, 3);
-  helpers.doKeys('p');
-  eq('hellho\nfoo f\nbar b', cm.getValue());
-}, { value: 'hello\nfoo\nbar'});
-testVim('blockwise_paste_cut_paste', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('<C-v>', '2', 'j', 'x');
-  cm.setCursor(0, 0);
-  helpers.doKeys('P');
-  eq('cut\nand\npaste\nme', cm.getValue());
-}, { value: 'cut\nand\npaste\nme'});
-testVim('blockwise_paste_from_register', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('<C-v>', '2', 'j', '"', 'a', 'y');
-  cm.setCursor(0, 3);
-  helpers.doKeys('"', 'a', 'p');
-  eq('foobfar\nhellho\nworlwd', cm.getValue());
-}, { value: 'foobar\nhello\nworld'});
-testVim('blockwise_paste_last_line', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('<C-v>', '2', 'j', 'l', 'y');
-  cm.setCursor(3, 0);
-  helpers.doKeys('p');
-  eq('cut\nand\npaste\nmcue\n an\n pa', cm.getValue());
-}, { value: 'cut\nand\npaste\nme'});
-
-testVim('S_visual', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.doKeys('v', 'j', 'S');
-  helpers.doKeys('<Esc>');
-  helpers.assertCursorAt(0, 0);
-  eq('\ncc', cm.getValue());
-}, { value: 'aa\nbb\ncc'});
-
-testVim('/ and n/N', function(cm, vim, helpers) {
-  cm.openDialog = helpers.fakeOpenDialog('match');
-  helpers.doKeys('/');
-  helpers.assertCursorAt(0, 11);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(1, 6);
-  helpers.doKeys('N');
-  helpers.assertCursorAt(0, 11);
-
-  cm.setCursor(0, 0);
-  helpers.doKeys('2', '/');
-  helpers.assertCursorAt(1, 6);
-}, { value: 'match nope match \n nope Match' });
-testVim('/_case', function(cm, vim, helpers) {
-  cm.openDialog = helpers.fakeOpenDialog('Match');
-  helpers.doKeys('/');
-  helpers.assertCursorAt(1, 6);
-}, { value: 'match nope match \n nope Match' });
-testVim('/_2_pcre', function(cm, vim, helpers) {
-  CodeMirror.Vim.setOption('pcre', true);
-  cm.openDialog = helpers.fakeOpenDialog('(word){2}');
-  helpers.doKeys('/');
-  helpers.assertCursorAt(1, 9);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(2, 1);
-}, { value: 'word\n another wordword\n wordwordword\n' });
-testVim('/_2_nopcre', function(cm, vim, helpers) {
-  CodeMirror.Vim.setOption('pcre', false);
-  cm.openDialog = helpers.fakeOpenDialog('\\(word\\)\\{2}');
-  helpers.doKeys('/');
-  helpers.assertCursorAt(1, 9);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(2, 1);
-}, { value: 'word\n another wordword\n wordwordword\n' });
-testVim('/_nongreedy', function(cm, vim, helpers) {
-  cm.openDialog = helpers.fakeOpenDialog('aa');
-  helpers.doKeys('/');
-  helpers.assertCursorAt(0, 4);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(1, 3);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(0, 0);
-}, { value: 'aaa aa \n a aa'});
-testVim('?_nongreedy', function(cm, vim, helpers) {
-  cm.openDialog = helpers.fakeOpenDialog('aa');
-  helpers.doKeys('?');
-  helpers.assertCursorAt(1, 3);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(0, 4);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(0, 0);
-}, { value: 'aaa aa \n a aa'});
-testVim('/_greedy', function(cm, vim, helpers) {
-  cm.openDialog = helpers.fakeOpenDialog('a+');
-  helpers.doKeys('/');
-  helpers.assertCursorAt(0, 4);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(1, 1);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(1, 3);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(0, 0);
-}, { value: 'aaa aa \n a aa'});
-testVim('?_greedy', function(cm, vim, helpers) {
-  cm.openDialog = helpers.fakeOpenDialog('a+');
-  helpers.doKeys('?');
-  helpers.assertCursorAt(1, 3);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(1, 1);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(0, 4);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(0, 0);
-}, { value: 'aaa aa \n a aa'});
-testVim('/_greedy_0_or_more', function(cm, vim, helpers) {
-  cm.openDialog = helpers.fakeOpenDialog('a*');
-  helpers.doKeys('/');
-  helpers.assertCursorAt(0, 3);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(0, 4);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(0, 5);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(1, 0);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(1, 1);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(0, 0);
-}, { value: 'aaa  aa\n aa'});
-testVim('?_greedy_0_or_more', function(cm, vim, helpers) {
-  cm.openDialog = helpers.fakeOpenDialog('a*');
-  helpers.doKeys('?');
-  helpers.assertCursorAt(1, 1);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(1, 0);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(0, 5);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(0, 4);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(0, 3);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(0, 0);
-}, { value: 'aaa  aa\n aa'});
-testVim('? and n/N', function(cm, vim, helpers) {
-  cm.openDialog = helpers.fakeOpenDialog('match');
-  helpers.doKeys('?');
-  helpers.assertCursorAt(1, 6);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(0, 11);
-  helpers.doKeys('N');
-  helpers.assertCursorAt(1, 6);
-
-  cm.setCursor(0, 0);
-  helpers.doKeys('2', '?');
-  helpers.assertCursorAt(0, 11);
-}, { value: 'match nope match \n nope Match' });
-testVim('*', function(cm, vim, helpers) {
-  cm.setCursor(0, 9);
-  helpers.doKeys('*');
-  helpers.assertCursorAt(0, 22);
-
-  cm.setCursor(0, 9);
-  helpers.doKeys('2', '*');
-  helpers.assertCursorAt(1, 8);
-}, { value: 'nomatch match nomatch match \nnomatch Match' });
-testVim('*_no_word', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('*');
-  helpers.assertCursorAt(0, 0);
-}, { value: ' \n match \n' });
-testVim('*_symbol', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('*');
-  helpers.assertCursorAt(1, 0);
-}, { value: ' /}\n/} match \n' });
-testVim('#', function(cm, vim, helpers) {
-  cm.setCursor(0, 9);
-  helpers.doKeys('#');
-  helpers.assertCursorAt(1, 8);
-
-  cm.setCursor(0, 9);
-  helpers.doKeys('2', '#');
-  helpers.assertCursorAt(0, 22);
-}, { value: 'nomatch match nomatch match \nnomatch Match' });
-testVim('*_seek', function(cm, vim, helpers) {
-  // Should skip over space and symbols.
-  cm.setCursor(0, 3);
-  helpers.doKeys('*');
-  helpers.assertCursorAt(0, 22);
-}, { value: '    :=  match nomatch match \nnomatch Match' });
-testVim('#', function(cm, vim, helpers) {
-  // Should skip over space and symbols.
-  cm.setCursor(0, 3);
-  helpers.doKeys('#');
-  helpers.assertCursorAt(1, 8);
-}, { value: '    :=  match nomatch match \nnomatch Match' });
-testVim('g*', function(cm, vim, helpers) {
-  cm.setCursor(0, 8);
-  helpers.doKeys('g', '*');
-  helpers.assertCursorAt(0, 18);
-  cm.setCursor(0, 8);
-  helpers.doKeys('3', 'g', '*');
-  helpers.assertCursorAt(1, 8);
-}, { value: 'matches match alsoMatch\nmatchme matching' });
-testVim('g#', function(cm, vim, helpers) {
-  cm.setCursor(0, 8);
-  helpers.doKeys('g', '#');
-  helpers.assertCursorAt(0, 0);
-  cm.setCursor(0, 8);
-  helpers.doKeys('3', 'g', '#');
-  helpers.assertCursorAt(1, 0);
-}, { value: 'matches match alsoMatch\nmatchme matching' });
-testVim('macro_insert', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('q', 'a', '0', 'i');
-  cm.replaceRange('foo', cm.getCursor());
-  helpers.doKeys('<Esc>');
-  helpers.doKeys('q', '@', 'a');
-  eq('foofoo', cm.getValue());
-}, { value: ''});
-testVim('macro_insert_repeat', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('q', 'a', '$', 'a');
-  cm.replaceRange('larry.', cm.getCursor());
-  helpers.doKeys('<Esc>');
-  helpers.doKeys('a');
-  cm.replaceRange('curly.', cm.getCursor());
-  helpers.doKeys('<Esc>');
-  helpers.doKeys('q');
-  helpers.doKeys('a');
-  cm.replaceRange('moe.', cm.getCursor());
-  helpers.doKeys('<Esc>');
-  helpers.doKeys('@', 'a');
-  // At this point, the most recent edit should be the 2nd insert change
-  // inside the macro, i.e. "curly.".
-  helpers.doKeys('.');
-  eq('larry.curly.moe.larry.curly.curly.', cm.getValue());
-}, { value: ''});
-testVim('macro_space', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('<Space>', '<Space>');
-  helpers.assertCursorAt(0, 2);
-  helpers.doKeys('q', 'a', '<Space>', '<Space>', 'q');
-  helpers.assertCursorAt(0, 4);
-  helpers.doKeys('@', 'a');
-  helpers.assertCursorAt(0, 6);
-  helpers.doKeys('@', 'a');
-  helpers.assertCursorAt(0, 8);
-}, { value: 'one line of text.'});
-testVim('macro_t_search', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('q', 'a', 't', 'e', 'q');
-  helpers.assertCursorAt(0, 1);
-  helpers.doKeys('l', '@', 'a');
-  helpers.assertCursorAt(0, 6);
-  helpers.doKeys('l', ';');
-  helpers.assertCursorAt(0, 12);
-}, { value: 'one line of text.'});
-testVim('macro_f_search', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('q', 'b', 'f', 'e', 'q');
-  helpers.assertCursorAt(0, 2);
-  helpers.doKeys('@', 'b');
-  helpers.assertCursorAt(0, 7);
-  helpers.doKeys(';');
-  helpers.assertCursorAt(0, 13);
-}, { value: 'one line of text.'});
-testVim('macro_slash_search', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('q', 'c');
-  cm.openDialog = helpers.fakeOpenDialog('e');
-  helpers.doKeys('/', 'q');
-  helpers.assertCursorAt(0, 2);
-  helpers.doKeys('@', 'c');
-  helpers.assertCursorAt(0, 7);
-  helpers.doKeys('n');
-  helpers.assertCursorAt(0, 13);
-}, { value: 'one line of text.'});
-testVim('macro_multislash_search', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('q', 'd');
-  cm.openDialog = helpers.fakeOpenDialog('e');
-  helpers.doKeys('/');
-  cm.openDialog = helpers.fakeOpenDialog('t');
-  helpers.doKeys('/', 'q');
-  helpers.assertCursorAt(0, 12);
-  helpers.doKeys('@', 'd');
-  helpers.assertCursorAt(0, 15);
-}, { value: 'one line of text to rule them all.'});
-testVim('macro_parens', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('q', 'z', 'i');
-  cm.replaceRange('(', cm.getCursor());
-  helpers.doKeys('<Esc>');
-  helpers.doKeys('e', 'a');
-  cm.replaceRange(')', cm.getCursor());
-  helpers.doKeys('<Esc>');
-  helpers.doKeys('q');
-  helpers.doKeys('w', '@', 'z');
-  helpers.doKeys('w', '@', 'z');
-  eq('(see) (spot) (run)', cm.getValue());
-}, { value: 'see spot run'});
-testVim('macro_overwrite', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('q', 'z', '0', 'i');
-  cm.replaceRange('I ', cm.getCursor());
-  helpers.doKeys('<Esc>');
-  helpers.doKeys('q');
-  helpers.doKeys('e');
-  // Now replace the macro with something else.
-  helpers.doKeys('q', 'z', 'a');
-  cm.replaceRange('.', cm.getCursor());
-  helpers.doKeys('<Esc>');
-  helpers.doKeys('q');
-  helpers.doKeys('e', '@', 'z');
-  helpers.doKeys('e', '@', 'z');
-  eq('I see. spot. run.', cm.getValue());
-}, { value: 'see spot run'});
-testVim('macro_search_f', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('q', 'a', 'f', ' ');
-  helpers.assertCursorAt(0,3);
-  helpers.doKeys('q', '0');
-  helpers.assertCursorAt(0,0);
-  helpers.doKeys('@', 'a');
-  helpers.assertCursorAt(0,3);
-}, { value: 'The quick brown fox jumped over the lazy dog.'});
-testVim('macro_search_2f', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('q', 'a', '2', 'f', ' ');
-  helpers.assertCursorAt(0,9);
-  helpers.doKeys('q', '0');
-  helpers.assertCursorAt(0,0);
-  helpers.doKeys('@', 'a');
-  helpers.assertCursorAt(0,9);
-}, { value: 'The quick brown fox jumped over the lazy dog.'});
-testVim('yank_register', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('"', 'a', 'y', 'y');
-  helpers.doKeys('j', '"', 'b', 'y', 'y');
-  cm.openDialog = helpers.fakeOpenDialog('registers');
-  cm.openNotification = helpers.fakeOpenNotification(function(text) {
-    is(/a\s+foo/.test(text));
-    is(/b\s+bar/.test(text));
-  });
-  helpers.doKeys(':');
-}, { value: 'foo\nbar'});
-testVim('yank_visual_block', function(cm, vim, helpers) {
-  cm.setCursor(0, 1);
-  helpers.doKeys('<C-v>', 'l', 'j', '"', 'a', 'y');
-  cm.openNotification = helpers.fakeOpenNotification(function(text) {
-    is(/a\s+oo\nar/.test(text));
-  });
-  helpers.doKeys(':');
-}, { value: 'foo\nbar'});
-testVim('yank_append_line_to_line_register', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('"', 'a', 'y', 'y');
-  helpers.doKeys('j', '"', 'A', 'y', 'y');
-  cm.openDialog = helpers.fakeOpenDialog('registers');
-  cm.openNotification = helpers.fakeOpenNotification(function(text) {
-    is(/a\s+foo\nbar/.test(text));
-    is(/"\s+foo\nbar/.test(text));
-  });
-  helpers.doKeys(':');
-}, { value: 'foo\nbar'});
-testVim('yank_append_word_to_word_register', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('"', 'a', 'y', 'w');
-  helpers.doKeys('j', '"', 'A', 'y', 'w');
-  cm.openDialog = helpers.fakeOpenDialog('registers');
-  cm.openNotification = helpers.fakeOpenNotification(function(text) {
-    is(/a\s+foobar/.test(text));
-    is(/"\s+foobar/.test(text));
-  });
-  helpers.doKeys(':');
-}, { value: 'foo\nbar'});
-testVim('yank_append_line_to_word_register', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('"', 'a', 'y', 'w');
-  helpers.doKeys('j', '"', 'A', 'y', 'y');
-  cm.openDialog = helpers.fakeOpenDialog('registers');
-  cm.openNotification = helpers.fakeOpenNotification(function(text) {
-    is(/a\s+foo\nbar/.test(text));
-    is(/"\s+foo\nbar/.test(text));
-  });
-  helpers.doKeys(':');
-}, { value: 'foo\nbar'});
-testVim('yank_append_word_to_line_register', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('"', 'a', 'y', 'y');
-  helpers.doKeys('j', '"', 'A', 'y', 'w');
-  cm.openDialog = helpers.fakeOpenDialog('registers');
-  cm.openNotification = helpers.fakeOpenNotification(function(text) {
-    is(/a\s+foo\nbar/.test(text));
-    is(/"\s+foo\nbar/.test(text));
-  });
-  helpers.doKeys(':');
-}, { value: 'foo\nbar'});
-testVim('macro_register', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('q', 'a', 'i');
-  cm.replaceRange('gangnam', cm.getCursor());
-  helpers.doKeys('<Esc>');
-  helpers.doKeys('q');
-  helpers.doKeys('q', 'b', 'o');
-  cm.replaceRange('style', cm.getCursor());
-  helpers.doKeys('<Esc>');
-  helpers.doKeys('q');
-  cm.openDialog = helpers.fakeOpenDialog('registers');
-  cm.openNotification = helpers.fakeOpenNotification(function(text) {
-    is(/a\s+i/.test(text));
-    is(/b\s+o/.test(text));
-  });
-  helpers.doKeys(':');
-}, { value: ''});
-testVim('._register', function(cm,vim,helpers) {
-  cm.setCursor(0,0);
-  helpers.doKeys('i');
-  cm.replaceRange('foo',cm.getCursor());
-  helpers.doKeys('<Esc>');
-  cm.openDialog = helpers.fakeOpenDialog('registers');
-  cm.openNotification = helpers.fakeOpenNotification(function(text) {
-    is(/\.\s+foo/.test(text));
-  });
-  helpers.doKeys(':');
-}, {value: ''});
-testVim(':_register', function(cm,vim,helpers) {
-  helpers.doEx('bar');
-  cm.openDialog = helpers.fakeOpenDialog('registers');
-  cm.openNotification = helpers.fakeOpenNotification(function(text) {
-    is(/:\s+bar/.test(text));
-  });
-  helpers.doKeys(':');
-}, {value: ''});
-testVim('search_register_escape', function(cm, vim, helpers) {
-  // Check that the register is restored if the user escapes rather than confirms.
-  cm.openDialog = helpers.fakeOpenDialog('waldo');
-  helpers.doKeys('/');
-  var onKeyDown;
-  var onKeyUp;
-  var KEYCODES = {
-    f: 70,
-    o: 79,
-    Esc: 27
-  };
-  cm.openDialog = function(template, callback, options) {
-    onKeyDown = options.onKeyDown;
-    onKeyUp = options.onKeyUp;
-  };
-  var close = function() {};
-  helpers.doKeys('/');
-  // Fake some keyboard events coming in.
-  onKeyDown({keyCode: KEYCODES.f}, '', close);
-  onKeyUp({keyCode: KEYCODES.f}, '', close);
-  onKeyDown({keyCode: KEYCODES.o}, 'f', close);
-  onKeyUp({keyCode: KEYCODES.o}, 'f', close);
-  onKeyDown({keyCode: KEYCODES.o}, 'fo', close);
-  onKeyUp({keyCode: KEYCODES.o}, 'fo', close);
-  onKeyDown({keyCode: KEYCODES.Esc}, 'foo', close);
-  cm.openDialog = helpers.fakeOpenDialog('registers');
-  cm.openNotification = helpers.fakeOpenNotification(function(text) {
-    is(/waldo/.test(text));
-    is(!/foo/.test(text));
-  });
-  helpers.doKeys(':');
-}, {value: ''});
-testVim('search_register', function(cm, vim, helpers) {
-  cm.openDialog = helpers.fakeOpenDialog('foo');
-  helpers.doKeys('/');
-  cm.openDialog = helpers.fakeOpenDialog('registers');
-  cm.openNotification = helpers.fakeOpenNotification(function(text) {
-    is(/\/\s+foo/.test(text));
-  });
-  helpers.doKeys(':');
-}, {value: ''});
-testVim('search_history', function(cm, vim, helpers) {
-  cm.openDialog = helpers.fakeOpenDialog('this');
-  helpers.doKeys('/');
-  cm.openDialog = helpers.fakeOpenDialog('checks');
-  helpers.doKeys('/');
-  cm.openDialog = helpers.fakeOpenDialog('search');
-  helpers.doKeys('/');
-  cm.openDialog = helpers.fakeOpenDialog('history');
-  helpers.doKeys('/');
-  cm.openDialog = helpers.fakeOpenDialog('checks');
-  helpers.doKeys('/');
-  var onKeyDown;
-  var onKeyUp;
-  var query = '';
-  var keyCodes = {
-    Up: 38,
-    Down: 40
-  };
-  cm.openDialog = function(template, callback, options) {
-    onKeyUp = options.onKeyUp;
-    onKeyDown = options.onKeyDown;
-  };
-  var close = function(newVal) {
-    if (typeof newVal == 'string') query = newVal;
-  }
-  helpers.doKeys('/');
-  onKeyDown({keyCode: keyCodes.Up}, query, close);
-  onKeyUp({keyCode: keyCodes.Up}, query, close);
-  eq(query, 'checks');
-  onKeyDown({keyCode: keyCodes.Up}, query, close);
-  onKeyUp({keyCode: keyCodes.Up}, query, close);
-  eq(query, 'history');
-  onKeyDown({keyCode: keyCodes.Up}, query, close);
-  onKeyUp({keyCode: keyCodes.Up}, query, close);
-  eq(query, 'search');
-  onKeyDown({keyCode: keyCodes.Up}, query, close);
-  onKeyUp({keyCode: keyCodes.Up}, query, close);
-  eq(query, 'this');
-  onKeyDown({keyCode: keyCodes.Down}, query, close);
-  onKeyUp({keyCode: keyCodes.Down}, query, close);
-  eq(query, 'search');
-}, {value: ''});
-testVim('exCommand_history', function(cm, vim, helpers) {
-  cm.openDialog = helpers.fakeOpenDialog('registers');
-  helpers.doKeys(':');
-  cm.openDialog = helpers.fakeOpenDialog('sort');
-  helpers.doKeys(':');
-  cm.openDialog = helpers.fakeOpenDialog('map');
-  helpers.doKeys(':');
-  cm.openDialog = helpers.fakeOpenDialog('invalid');
-  helpers.doKeys(':');
-  var onKeyDown;
-  var onKeyUp;
-  var input = '';
-  var keyCodes = {
-    Up: 38,
-    Down: 40,
-    s: 115
-  };
-  cm.openDialog = function(template, callback, options) {
-    onKeyUp = options.onKeyUp;
-    onKeyDown = options.onKeyDown;
-  };
-  var close = function(newVal) {
-    if (typeof newVal == 'string') input = newVal;
-  }
-  helpers.doKeys(':');
-  onKeyDown({keyCode: keyCodes.Up}, input, close);
-  eq(input, 'invalid');
-  onKeyDown({keyCode: keyCodes.Up}, input, close);
-  eq(input, 'map');
-  onKeyDown({keyCode: keyCodes.Up}, input, close);
-  eq(input, 'sort');
-  onKeyDown({keyCode: keyCodes.Up}, input, close);
-  eq(input, 'registers');
-  onKeyDown({keyCode: keyCodes.s}, '', close);
-  input = 's';
-  onKeyDown({keyCode: keyCodes.Up}, input, close);
-  eq(input, 'sort');
-}, {value: ''});
-testVim('.', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('2', 'd', 'w');
-  helpers.doKeys('.');
-  eq('5 6', cm.getValue());
-}, { value: '1 2 3 4 5 6'});
-testVim('._repeat', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('2', 'd', 'w');
-  helpers.doKeys('3', '.');
-  eq('6', cm.getValue());
-}, { value: '1 2 3 4 5 6'});
-testVim('._insert', function(cm, vim, helpers) {
-  helpers.doKeys('i');
-  cm.replaceRange('test', cm.getCursor());
-  helpers.doKeys('<Esc>');
-  helpers.doKeys('.');
-  eq('testestt', cm.getValue());
-  helpers.assertCursorAt(0, 6);
-}, { value: ''});
-testVim('._insert_repeat', function(cm, vim, helpers) {
-  helpers.doKeys('i');
-  cm.replaceRange('test', cm.getCursor());
-  cm.setCursor(0, 4);
-  helpers.doKeys('<Esc>');
-  helpers.doKeys('2', '.');
-  eq('testesttestt', cm.getValue());
-  helpers.assertCursorAt(0, 10);
-}, { value: ''});
-testVim('._repeat_insert', function(cm, vim, helpers) {
-  helpers.doKeys('3', 'i');
-  cm.replaceRange('te', cm.getCursor());
-  cm.setCursor(0, 2);
-  helpers.doKeys('<Esc>');
-  helpers.doKeys('.');
-  eq('tetettetetee', cm.getValue());
-  helpers.assertCursorAt(0, 10);
-}, { value: ''});
-testVim('._insert_o', function(cm, vim, helpers) {
-  helpers.doKeys('o');
-  cm.replaceRange('z', cm.getCursor());
-  cm.setCursor(1, 1);
-  helpers.doKeys('<Esc>');
-  helpers.doKeys('.');
-  eq('\nz\nz', cm.getValue());
-  helpers.assertCursorAt(2, 0);
-}, { value: ''});
-testVim('._insert_o_repeat', function(cm, vim, helpers) {
-  helpers.doKeys('o');
-  cm.replaceRange('z', cm.getCursor());
-  helpers.doKeys('<Esc>');
-  cm.setCursor(1, 0);
-  helpers.doKeys('2', '.');
-  eq('\nz\nz\nz', cm.getValue());
-  helpers.assertCursorAt(3, 0);
-}, { value: ''});
-testVim('._insert_o_indent', function(cm, vim, helpers) {
-  helpers.doKeys('o');
-  cm.replaceRange('z', cm.getCursor());
-  helpers.doKeys('<Esc>');
-  cm.setCursor(1, 2);
-  helpers.doKeys('.');
-  eq('{\n  z\n  z', cm.getValue());
-  helpers.assertCursorAt(2, 2);
-}, { value: '{'});
-testVim('._insert_cw', function(cm, vim, helpers) {
-  helpers.doKeys('c', 'w');
-  cm.replaceRange('test', cm.getCursor());
-  helpers.doKeys('<Esc>');
-  cm.setCursor(0, 3);
-  helpers.doKeys('2', 'l');
-  helpers.doKeys('.');
-  eq('test test word3', cm.getValue());
-  helpers.assertCursorAt(0, 8);
-}, { value: 'word1 word2 word3' });
-testVim('._insert_cw_repeat', function(cm, vim, helpers) {
-  // For some reason, repeat cw in desktop VIM will does not repeat insert mode
-  // changes. Will conform to that behavior.
-  helpers.doKeys('c', 'w');
-  cm.replaceRange('test', cm.getCursor());
-  helpers.doKeys('<Esc>');
-  cm.setCursor(0, 4);
-  helpers.doKeys('l');
-  helpers.doKeys('2', '.');
-  eq('test test', cm.getValue());
-  helpers.assertCursorAt(0, 8);
-}, { value: 'word1 word2 word3' });
-testVim('._delete', function(cm, vim, helpers) {
-  cm.setCursor(0, 5);
-  helpers.doKeys('i');
-  helpers.doInsertModeKeys('Backspace');
-  helpers.doKeys('<Esc>');
-  helpers.doKeys('.');
-  eq('zace', cm.getValue());
-  helpers.assertCursorAt(0, 1);
-}, { value: 'zabcde'});
-testVim('._delete_repeat', function(cm, vim, helpers) {
-  cm.setCursor(0, 6);
-  helpers.doKeys('i');
-  helpers.doInsertModeKeys('Backspace');
-  helpers.doKeys('<Esc>');
-  helpers.doKeys('2', '.');
-  eq('zzce', cm.getValue());
-  helpers.assertCursorAt(0, 1);
-}, { value: 'zzabcde'});
-testVim('._visual_>', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('V', 'j', '>');
-  cm.setCursor(2, 0)
-  helpers.doKeys('.');
-  eq('  1\n  2\n  3\n  4', cm.getValue());
-  helpers.assertCursorAt(2, 2);
-}, { value: '1\n2\n3\n4'});
-testVim('f;', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('f', 'x');
-  helpers.doKeys(';');
-  helpers.doKeys('2', ';');
-  eq(9, cm.getCursor().ch);
-}, { value: '01x3xx678x'});
-testVim('F;', function(cm, vim, helpers) {
-  cm.setCursor(0, 8);
-  helpers.doKeys('F', 'x');
-  helpers.doKeys(';');
-  helpers.doKeys('2', ';');
-  eq(2, cm.getCursor().ch);
-}, { value: '01x3xx6x8x'});
-testVim('t;', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('t', 'x');
-  helpers.doKeys(';');
-  helpers.doKeys('2', ';');
-  eq(8, cm.getCursor().ch);
-}, { value: '01x3xx678x'});
-testVim('T;', function(cm, vim, helpers) {
-  cm.setCursor(0, 9);
-  helpers.doKeys('T', 'x');
-  helpers.doKeys(';');
-  helpers.doKeys('2', ';');
-  eq(2, cm.getCursor().ch);
-}, { value: '0xx3xx678x'});
-testVim('f,', function(cm, vim, helpers) {
-  cm.setCursor(0, 6);
-  helpers.doKeys('f', 'x');
-  helpers.doKeys(',');
-  helpers.doKeys('2', ',');
-  eq(2, cm.getCursor().ch);
-}, { value: '01x3xx678x'});
-testVim('F,', function(cm, vim, helpers) {
-  cm.setCursor(0, 3);
-  helpers.doKeys('F', 'x');
-  helpers.doKeys(',');
-  helpers.doKeys('2', ',');
-  eq(9, cm.getCursor().ch);
-}, { value: '01x3xx678x'});
-testVim('t,', function(cm, vim, helpers) {
-  cm.setCursor(0, 6);
-  helpers.doKeys('t', 'x');
-  helpers.doKeys(',');
-  helpers.doKeys('2', ',');
-  eq(3, cm.getCursor().ch);
-}, { value: '01x3xx678x'});
-testVim('T,', function(cm, vim, helpers) {
-  cm.setCursor(0, 4);
-  helpers.doKeys('T', 'x');
-  helpers.doKeys(',');
-  helpers.doKeys('2', ',');
-  eq(8, cm.getCursor().ch);
-}, { value: '01x3xx67xx'});
-testVim('fd,;', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('f', '4');
-  cm.setCursor(0, 0);
-  helpers.doKeys('d', ';');
-  eq('56789', cm.getValue());
-  helpers.doKeys('u');
-  cm.setCursor(0, 9);
-  helpers.doKeys('d', ',');
-  eq('01239', cm.getValue());
-}, { value: '0123456789'});
-testVim('Fd,;', function(cm, vim, helpers) {
-  cm.setCursor(0, 9);
-  helpers.doKeys('F', '4');
-  cm.setCursor(0, 9);
-  helpers.doKeys('d', ';');
-  eq('01239', cm.getValue());
-  helpers.doKeys('u');
-  cm.setCursor(0, 0);
-  helpers.doKeys('d', ',');
-  eq('56789', cm.getValue());
-}, { value: '0123456789'});
-testVim('td,;', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('t', '4');
-  cm.setCursor(0, 0);
-  helpers.doKeys('d', ';');
-  eq('456789', cm.getValue());
-  helpers.doKeys('u');
-  cm.setCursor(0, 9);
-  helpers.doKeys('d', ',');
-  eq('012349', cm.getValue());
-}, { value: '0123456789'});
-testVim('Td,;', function(cm, vim, helpers) {
-  cm.setCursor(0, 9);
-  helpers.doKeys('T', '4');
-  cm.setCursor(0, 9);
-  helpers.doKeys('d', ';');
-  eq('012349', cm.getValue());
-  helpers.doKeys('u');
-  cm.setCursor(0, 0);
-  helpers.doKeys('d', ',');
-  eq('456789', cm.getValue());
-}, { value: '0123456789'});
-testVim('fc,;', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('f', '4');
-  cm.setCursor(0, 0);
-  helpers.doKeys('c', ';', '<Esc>');
-  eq('56789', cm.getValue());
-  helpers.doKeys('u');
-  cm.setCursor(0, 9);
-  helpers.doKeys('c', ',');
-  eq('01239', cm.getValue());
-}, { value: '0123456789'});
-testVim('Fc,;', function(cm, vim, helpers) {
-  cm.setCursor(0, 9);
-  helpers.doKeys('F', '4');
-  cm.setCursor(0, 9);
-  helpers.doKeys('c', ';', '<Esc>');
-  eq('01239', cm.getValue());
-  helpers.doKeys('u');
-  cm.setCursor(0, 0);
-  helpers.doKeys('c', ',');
-  eq('56789', cm.getValue());
-}, { value: '0123456789'});
-testVim('tc,;', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('t', '4');
-  cm.setCursor(0, 0);
-  helpers.doKeys('c', ';', '<Esc>');
-  eq('456789', cm.getValue());
-  helpers.doKeys('u');
-  cm.setCursor(0, 9);
-  helpers.doKeys('c', ',');
-  eq('012349', cm.getValue());
-}, { value: '0123456789'});
-testVim('Tc,;', function(cm, vim, helpers) {
-  cm.setCursor(0, 9);
-  helpers.doKeys('T', '4');
-  cm.setCursor(0, 9);
-  helpers.doKeys('c', ';', '<Esc>');
-  eq('012349', cm.getValue());
-  helpers.doKeys('u');
-  cm.setCursor(0, 0);
-  helpers.doKeys('c', ',');
-  eq('456789', cm.getValue());
-}, { value: '0123456789'});
-testVim('fy,;', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('f', '4');
-  cm.setCursor(0, 0);
-  helpers.doKeys('y', ';', 'P');
-  eq('012340123456789', cm.getValue());
-  helpers.doKeys('u');
-  cm.setCursor(0, 9);
-  helpers.doKeys('y', ',', 'P');
-  eq('012345678456789', cm.getValue());
-}, { value: '0123456789'});
-testVim('Fy,;', function(cm, vim, helpers) {
-  cm.setCursor(0, 9);
-  helpers.doKeys('F', '4');
-  cm.setCursor(0, 9);
-  helpers.doKeys('y', ';', 'p');
-  eq('012345678945678', cm.getValue());
-  helpers.doKeys('u');
-  cm.setCursor(0, 0);
-  helpers.doKeys('y', ',', 'P');
-  eq('012340123456789', cm.getValue());
-}, { value: '0123456789'});
-testVim('ty,;', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys('t', '4');
-  cm.setCursor(0, 0);
-  helpers.doKeys('y', ';', 'P');
-  eq('01230123456789', cm.getValue());
-  helpers.doKeys('u');
-  cm.setCursor(0, 9);
-  helpers.doKeys('y', ',', 'p');
-  eq('01234567895678', cm.getValue());
-}, { value: '0123456789'});
-testVim('Ty,;', function(cm, vim, helpers) {
-  cm.setCursor(0, 9);
-  helpers.doKeys('T', '4');
-  cm.setCursor(0, 9);
-  helpers.doKeys('y', ';', 'p');
-  eq('01234567895678', cm.getValue());
-  helpers.doKeys('u');
-  cm.setCursor(0, 0);
-  helpers.doKeys('y', ',', 'P');
-  eq('01230123456789', cm.getValue());
-}, { value: '0123456789'});
-testVim('HML', function(cm, vim, helpers) {
-  var lines = 35;
-  var textHeight = cm.defaultTextHeight();
-  cm.setSize(600, lines*textHeight);
-  cm.setCursor(120, 0);
-  helpers.doKeys('H');
-  helpers.assertCursorAt(86, 2);
-  helpers.doKeys('L');
-  helpers.assertCursorAt(120, 4);
-  helpers.doKeys('M');
-  helpers.assertCursorAt(103,4);
-}, { value: (function(){
-  var lines = new Array(100);
-  var upper = '  xx\n';
-  var lower = '    xx\n';
-  upper = lines.join(upper);
-  lower = lines.join(lower);
-  return upper + lower;
-})()});
-
-var zVals = [];
-forEach(['zb','zz','zt','z-','z.','z<CR>'], function(e, idx){
-  var lineNum = 250;
-  var lines = 35;
-  testVim(e, function(cm, vim, helpers) {
-    var k1 = e[0];
-    var k2 = e.substring(1);
-    var textHeight = cm.defaultTextHeight();
-    cm.setSize(600, lines*textHeight);
-    cm.setCursor(lineNum, 0);
-    helpers.doKeys(k1, k2);
-    zVals[idx] = cm.getScrollInfo().top;
-  }, { value: (function(){
-    return new Array(500).join('\n');
-  })()});
-});
-testVim('zb<zz', function(cm, vim, helpers){
-  eq(zVals[0]<zVals[1], true);
-});
-testVim('zz<zt', function(cm, vim, helpers){
-  eq(zVals[1]<zVals[2], true);
-});
-testVim('zb==z-', function(cm, vim, helpers){
-  eq(zVals[0], zVals[3]);
-});
-testVim('zz==z.', function(cm, vim, helpers){
-  eq(zVals[1], zVals[4]);
-});
-testVim('zt==z<CR>', function(cm, vim, helpers){
-  eq(zVals[2], zVals[5]);
-});
-
-var moveTillCharacterSandbox =
-  'The quick brown fox \n'
-  'jumped over the lazy dog.'
-testVim('moveTillCharacter', function(cm, vim, helpers){
-  cm.setCursor(0, 0);
-  // Search for the 'q'.
-  cm.openDialog = helpers.fakeOpenDialog('q');
-  helpers.doKeys('/');
-  eq(4, cm.getCursor().ch);
-  // Jump to just before the first o in the list.
-  helpers.doKeys('t');
-  helpers.doKeys('o');
-  eq('The quick brown fox \n', cm.getValue());
-  // Delete that one character.
-  helpers.doKeys('d');
-  helpers.doKeys('t');
-  helpers.doKeys('o');
-  eq('The quick bown fox \n', cm.getValue());
-  // Delete everything until the next 'o'.
-  helpers.doKeys('.');
-  eq('The quick box \n', cm.getValue());
-  // An unmatched character should have no effect.
-  helpers.doKeys('d');
-  helpers.doKeys('t');
-  helpers.doKeys('q');
-  eq('The quick box \n', cm.getValue());
-  // Matches should only be possible on single lines.
-  helpers.doKeys('d');
-  helpers.doKeys('t');
-  helpers.doKeys('z');
-  eq('The quick box \n', cm.getValue());
-  // After all that, the search for 'q' should still be active, so the 'N' command
-  // can run it again in reverse. Use that to delete everything back to the 'q'.
-  helpers.doKeys('d');
-  helpers.doKeys('N');
-  eq('The ox \n', cm.getValue());
-  eq(4, cm.getCursor().ch);
-}, { value: moveTillCharacterSandbox});
-testVim('searchForPipe', function(cm, vim, helpers){
-  CodeMirror.Vim.setOption('pcre', false);
-  cm.setCursor(0, 0);
-  // Search for the '|'.
-  cm.openDialog = helpers.fakeOpenDialog('|');
-  helpers.doKeys('/');
-  eq(4, cm.getCursor().ch);
-}, { value: 'this|that'});
-
-
-var scrollMotionSandbox =
-  '\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n'
-  '\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n'
-  '\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n'
-  '\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n';
-testVim('scrollMotion', function(cm, vim, helpers){
-  var prevCursor, prevScrollInfo;
-  cm.setCursor(0, 0);
-  // ctrl-y at the top of the file should have no effect.
-  helpers.doKeys('<C-y>');
-  eq(0, cm.getCursor().line);
-  prevScrollInfo = cm.getScrollInfo();
-  helpers.doKeys('<C-e>');
-  eq(1, cm.getCursor().line);
-  is(prevScrollInfo.top < cm.getScrollInfo().top);
-  // Jump to the end of the sandbox.
-  cm.setCursor(1000, 0);
-  prevCursor = cm.getCursor();
-  // ctrl-e at the bottom of the file should have no effect.
-  helpers.doKeys('<C-e>');
-  eq(prevCursor.line, cm.getCursor().line);
-  prevScrollInfo = cm.getScrollInfo();
-  helpers.doKeys('<C-y>');
-  eq(prevCursor.line - 1, cm.getCursor().line);
-  is(prevScrollInfo.top > cm.getScrollInfo().top);
-}, { value: scrollMotionSandbox});
-
-var squareBracketMotionSandbox = ''+
-  '({\n'+//0
-  '  ({\n'+//11
-  '  /*comment {\n'+//2
-  '            */(\n'+//3
-  '#else                \n'+//4
-  '  /*       )\n'+//5
-  '#if        }\n'+//6
-  '  )}*/\n'+//7
-  ')}\n'+//8
-  '{}\n'+//9
-  '#else {{\n'+//10
-  '{}\n'+//11
-  '}\n'+//12
-  '{\n'+//13
-  '#endif\n'+//14
-  '}\n'+//15
-  '}\n'+//16
-  '#else';//17
-testVim('[[, ]]', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys(']', ']');
-  helpers.assertCursorAt(9,0);
-  helpers.doKeys('2', ']', ']');
-  helpers.assertCursorAt(13,0);
-  helpers.doKeys(']', ']');
-  helpers.assertCursorAt(17,0);
-  helpers.doKeys('[', '[');
-  helpers.assertCursorAt(13,0);
-  helpers.doKeys('2', '[', '[');
-  helpers.assertCursorAt(9,0);
-  helpers.doKeys('[', '[');
-  helpers.assertCursorAt(0,0);
-}, { value: squareBracketMotionSandbox});
-testVim('[], ][', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doKeys(']', '[');
-  helpers.assertCursorAt(12,0);
-  helpers.doKeys('2', ']', '[');
-  helpers.assertCursorAt(16,0);
-  helpers.doKeys(']', '[');
-  helpers.assertCursorAt(17,0);
-  helpers.doKeys('[', ']');
-  helpers.assertCursorAt(16,0);
-  helpers.doKeys('2', '[', ']');
-  helpers.assertCursorAt(12,0);
-  helpers.doKeys('[', ']');
-  helpers.assertCursorAt(0,0);
-}, { value: squareBracketMotionSandbox});
-testVim('[{, ]}', function(cm, vim, helpers) {
-  cm.setCursor(4, 10);
-  helpers.doKeys('[', '{');
-  helpers.assertCursorAt(2,12);
-  helpers.doKeys('2', '[', '{');
-  helpers.assertCursorAt(0,1);
-  cm.setCursor(4, 10);
-  helpers.doKeys(']', '}');
-  helpers.assertCursorAt(6,11);
-  helpers.doKeys('2', ']', '}');
-  helpers.assertCursorAt(8,1);
-  cm.setCursor(0,1);
-  helpers.doKeys(']', '}');
-  helpers.assertCursorAt(8,1);
-  helpers.doKeys('[', '{');
-  helpers.assertCursorAt(0,1);
-}, { value: squareBracketMotionSandbox});
-testVim('[(, ])', function(cm, vim, helpers) {
-  cm.setCursor(4, 10);
-  helpers.doKeys('[', '(');
-  helpers.assertCursorAt(3,14);
-  helpers.doKeys('2', '[', '(');
-  helpers.assertCursorAt(0,0);
-  cm.setCursor(4, 10);
-  helpers.doKeys(']', ')');
-  helpers.assertCursorAt(5,11);
-  helpers.doKeys('2', ']', ')');
-  helpers.assertCursorAt(8,0);
-  helpers.doKeys('[', '(');
-  helpers.assertCursorAt(0,0);
-  helpers.doKeys(']', ')');
-  helpers.assertCursorAt(8,0);
-}, { value: squareBracketMotionSandbox});
-testVim('[*, ]*, [/, ]/', function(cm, vim, helpers) {
-  forEach(['*', '/'], function(key){
-    cm.setCursor(7, 0);
-    helpers.doKeys('2', '[', key);
-    helpers.assertCursorAt(2,2);
-    helpers.doKeys('2', ']', key);
-    helpers.assertCursorAt(7,5);
-  });
-}, { value: squareBracketMotionSandbox});
-testVim('[#, ]#', function(cm, vim, helpers) {
-  cm.setCursor(10, 3);
-  helpers.doKeys('2', '[', '#');
-  helpers.assertCursorAt(4,0);
-  helpers.doKeys('5', ']', '#');
-  helpers.assertCursorAt(17,0);
-  cm.setCursor(10, 3);
-  helpers.doKeys(']', '#');
-  helpers.assertCursorAt(14,0);
-}, { value: squareBracketMotionSandbox});
-testVim('[m, ]m, [M, ]M', function(cm, vim, helpers) {
-  cm.setCursor(11, 0);
-  helpers.doKeys('[', 'm');
-  helpers.assertCursorAt(10,7);
-  helpers.doKeys('4', '[', 'm');
-  helpers.assertCursorAt(1,3);
-  helpers.doKeys('5', ']', 'm');
-  helpers.assertCursorAt(11,0);
-  helpers.doKeys('[', 'M');
-  helpers.assertCursorAt(9,1);
-  helpers.doKeys('3', ']', 'M');
-  helpers.assertCursorAt(15,0);
-  helpers.doKeys('5', '[', 'M');
-  helpers.assertCursorAt(7,3);
-}, { value: squareBracketMotionSandbox});
-
-// Ex mode tests
-testVim('ex_go_to_line', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doEx('4');
-  helpers.assertCursorAt(3, 0);
-}, { value: 'a\nb\nc\nd\ne\n'});
-testVim('ex_write', function(cm, vim, helpers) {
-  var tmp = CodeMirror.commands.save;
-  var written;
-  var actualCm;
-  CodeMirror.commands.save = function(cm) {
-    written = true;
-    actualCm = cm;
-  };
-  // Test that w, wr, wri ... write all trigger :write.
-  var command = 'write';
-  for (var i = 1; i < command.length; i++) {
-    written = false;
-    actualCm = null;
-    helpers.doEx(command.substring(0, i));
-    eq(written, true);
-    eq(actualCm, cm);
-  }
-  CodeMirror.commands.save = tmp;
-});
-testVim('ex_sort', function(cm, vim, helpers) {
-  helpers.doEx('sort');
-  eq('Z\na\nb\nc\nd', cm.getValue());
-}, { value: 'b\nZ\nd\nc\na'});
-testVim('ex_sort_reverse', function(cm, vim, helpers) {
-  helpers.doEx('sort!');
-  eq('d\nc\nb\na', cm.getValue());
-}, { value: 'b\nd\nc\na'});
-testVim('ex_sort_range', function(cm, vim, helpers) {
-  helpers.doEx('2,3sort');
-  eq('b\nc\nd\na', cm.getValue());
-}, { value: 'b\nd\nc\na'});
-testVim('ex_sort_oneline', function(cm, vim, helpers) {
-  helpers.doEx('2sort');
-  // Expect no change.
-  eq('b\nd\nc\na', cm.getValue());
-}, { value: 'b\nd\nc\na'});
-testVim('ex_sort_ignoreCase', function(cm, vim, helpers) {
-  helpers.doEx('sort i');
-  eq('a\nb\nc\nd\nZ', cm.getValue());
-}, { value: 'b\nZ\nd\nc\na'});
-testVim('ex_sort_unique', function(cm, vim, helpers) {
-  helpers.doEx('sort u');
-  eq('Z\na\nb\nc\nd', cm.getValue());
-}, { value: 'b\nZ\na\na\nd\na\nc\na'});
-testVim('ex_sort_decimal', function(cm, vim, helpers) {
-  helpers.doEx('sort d');
-  eq('d3\n s5\n6\n.9', cm.getValue());
-}, { value: '6\nd3\n s5\n.9'});
-testVim('ex_sort_decimal_negative', function(cm, vim, helpers) {
-  helpers.doEx('sort d');
-  eq('z-9\nd3\n s5\n6\n.9', cm.getValue());
-}, { value: '6\nd3\n s5\n.9\nz-9'});
-testVim('ex_sort_decimal_reverse', function(cm, vim, helpers) {
-  helpers.doEx('sort! d');
-  eq('.9\n6\n s5\nd3', cm.getValue());
-}, { value: '6\nd3\n s5\n.9'});
-testVim('ex_sort_hex', function(cm, vim, helpers) {
-  helpers.doEx('sort x');
-  eq(' s5\n6\n.9\n&0xB\nd3', cm.getValue());
-}, { value: '6\nd3\n s5\n&0xB\n.9'});
-testVim('ex_sort_octal', function(cm, vim, helpers) {
-  helpers.doEx('sort o');
-  eq('.8\n.9\nd3\n s5\n6', cm.getValue());
-}, { value: '6\nd3\n s5\n.9\n.8'});
-testVim('ex_sort_decimal_mixed', function(cm, vim, helpers) {
-  helpers.doEx('sort d');
-  eq('y\nz\nc1\nb2\na3', cm.getValue());
-}, { value: 'a3\nz\nc1\ny\nb2'});
-testVim('ex_sort_decimal_mixed_reverse', function(cm, vim, helpers) {
-  helpers.doEx('sort! d');
-  eq('a3\nb2\nc1\nz\ny', cm.getValue());
-}, { value: 'a3\nz\nc1\ny\nb2'});
-// test for :global command
-testVim('ex_global', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  helpers.doEx('g/one/s//two');
-  eq('two two\n two two\n two two', cm.getValue());
-  helpers.doEx('1,2g/two/s//one');
-  eq('one one\n one one\n two two', cm.getValue());
-}, {value: 'one one\n one one\n one one'});
-testVim('ex_global_confirm', function(cm, vim, helpers) {
-  cm.setCursor(0, 0);
-  var onKeyDown;
-  var openDialogSave = cm.openDialog;
-  var KEYCODES = {
-    a: 65,
-    n: 78,
-    q: 81,
-    y: 89
-  };
-  // Intercept the ex command, 'global'
-  cm.openDialog = function(template, callback, options) {
-    // Intercept the prompt for the embedded ex command, 'substitute'
-    cm.openDialog = function(template, callback, options) {
-      onKeyDown = options.onKeyDown;
-    };
-    callback('g/one/s//two/gc');
-  };
-  helpers.doKeys(':');
-  var close = function() {};
-  onKeyDown({keyCode: KEYCODES.n}, '', close);
-  onKeyDown({keyCode: KEYCODES.y}, '', close);
-  onKeyDown({keyCode: KEYCODES.a}, '', close);
-  onKeyDown({keyCode: KEYCODES.q}, '', close);
-  onKeyDown({keyCode: KEYCODES.y}, '', close);
-  eq('one two\n two two\n one one\n two one\n one one', cm.getValue());
-}, {value: 'one one\n one one\n one one\n one one\n one one'});
-// Basic substitute tests.
-testVim('ex_substitute_same_line', function(cm, vim, helpers) {
-  cm.setCursor(1, 0);
-  helpers.doEx('s/one/two/g');
-  eq('one one\n two two', cm.getValue());
-}, { value: 'one one\n one one'});
-testVim('ex_substitute_full_file', function(cm, vim, helpers) {
-  cm.setCursor(1, 0);
-  helpers.doEx('%s/one/two/g');
-  eq('two two\n two two', cm.getValue());
-}, { value: 'one one\n one one'});
-testVim('ex_substitute_input_range', function(cm, vim, helpers) {
-  cm.setCursor(1, 0);
-  helpers.doEx('1,3s/\\d/0/g');
-  eq('0\n0\n0\n4', cm.getValue());
-}, { value: '1\n2\n3\n4' });
-testVim('ex_substitute_visual_range', function(cm, vim, helpers) {
-  cm.setCursor(1, 0);
-  // Set last visual mode selection marks '< and '> at lines 2 and 4
-  helpers.doKeys('V', '2', 'j', 'v');
-  helpers.doEx('\'<,\'>s/\\d/0/g');
-  eq('1\n0\n0\n0\n5', cm.getValue());
-}, { value: '1\n2\n3\n4\n5' });
-testVim('ex_substitute_empty_query', function(cm, vim, helpers) {
-  // If the query is empty, use last query.
-  cm.setCursor(1, 0);
-  cm.openDialog = helpers.fakeOpenDialog('1');
-  helpers.doKeys('/');
-  helpers.doEx('s//b/g');
-  eq('abb ab2 ab3', cm.getValue());
-}, { value: 'a11 a12 a13' });
-testVim('ex_substitute_javascript', function(cm, vim, helpers) {
-  CodeMirror.Vim.setOption('pcre', false);
-  cm.setCursor(1, 0);
-  // Throw all the things that javascript likes to treat as special values
-  // into the replace part. All should be literal (this is VIM).
-  helpers.doEx('s/\\(\\d+\\)/$$ $\' $` $& \\1/g')
-  eq('a $$ $\' $` $& 0 b', cm.getValue());
-}, { value: 'a 0 b' });
-testVim('ex_substitute_empty_arguments', function(cm,vim,helpers) {
-  cm.setCursor(0, 0);
-  helpers.doEx('s/a/b/g');
-  cm.setCursor(1, 0);
-  helpers.doEx('s');
-  eq('b b\nb a', cm.getValue());
-}, {value: 'a a\na a'});
-
-// More complex substitute tests that test both pcre and nopcre options.
-function testSubstitute(name, options) {
-  testVim(name + '_pcre', function(cm, vim, helpers) {
-    cm.setCursor(1, 0);
-    CodeMirror.Vim.setOption('pcre', true);
-    helpers.doEx(options.expr);
-    eq(options.expectedValue, cm.getValue());
-  }, options);
-  // If no noPcreExpr is defined, assume that it's the same as the expr.
-  var noPcreExpr = options.noPcreExpr ? options.noPcreExpr : options.expr;
-  testVim(name + '_nopcre', function(cm, vim, helpers) {
-    cm.setCursor(1, 0);
-    CodeMirror.Vim.setOption('pcre', false);
-    helpers.doEx(noPcreExpr);
-    eq(options.expectedValue, cm.getValue());
-  }, options);
-}
-testSubstitute('ex_substitute_capture', {
-  value: 'a11 a12 a13',
-  expectedValue: 'a1111 a1212 a1313',
-  // $n is a backreference
-  expr: 's/(\\d+)/$1$1/g',
-  // \n is a backreference.
-  noPcreExpr: 's/\\(\\d+\\)/\\1\\1/g'});
-testSubstitute('ex_substitute_capture2', {
-  value: 'a 0 b',
-  expectedValue: 'a $00 b',
-  expr: 's/(\\d+)/$$$1$1/g',
-  noPcreExpr: 's/\\(\\d+\\)/$\\1\\1/g'});
-testSubstitute('ex_substitute_nocapture', {
-  value: 'a11 a12 a13',
-  expectedValue: 'a$1$1 a$1$1 a$1$1',
-  expr: 's/(\\d+)/$$1$$1/g',
-  noPcreExpr: 's/\\(\\d+\\)/$1$1/g'});
-testSubstitute('ex_substitute_nocapture2', {
-  value: 'a 0 b',
-  expectedValue: 'a $10 b',
-  expr: 's/(\\d+)/$$1$1/g',
-  noPcreExpr: 's/\\(\\d+\\)/\\$1\\1/g'});
-testSubstitute('ex_substitute_nocapture', {
-  value: 'a b c',
-  expectedValue: 'a $ c',
-  expr: 's/b/$$/',
-  noPcreExpr: 's/b/$/'});
-testSubstitute('ex_substitute_slash_regex', {
-  value: 'one/two \n three/four',
-  expectedValue: 'one|two \n three|four',
-  expr: '%s/\\//|'});
-testSubstitute('ex_substitute_pipe_regex', {
-  value: 'one|two \n three|four',
-  expectedValue: 'one,two \n three,four',
-  expr: '%s/\\|/,/',
-  noPcreExpr: '%s/|/,/'});
-testSubstitute('ex_substitute_or_regex', {
-  value: 'one|two \n three|four',
-  expectedValue: 'ana|twa \n thraa|faar',
-  expr: '%s/o|e|u/a/g',
-  noPcreExpr: '%s/o\\|e\\|u/a/g'});
-testSubstitute('ex_substitute_or_word_regex', {
-  value: 'one|two \n three|four',
-  expectedValue: 'five|five \n three|four',
-  expr: '%s/(one|two)/five/g',
-  noPcreExpr: '%s/\\(one\\|two\\)/five/g'});
-testSubstitute('ex_substitute_backslashslash_regex', {
-  value: 'one\\two \n three\\four',
-  expectedValue: 'one,two \n three,four',
-  expr: '%s/\\\\/,'});
-testSubstitute('ex_substitute_slash_replacement', {
-  value: 'one,two \n three,four',
-  expectedValue: 'one/two \n three/four',
-  expr: '%s/,/\\/'});
-testSubstitute('ex_substitute_backslash_replacement', {
-  value: 'one,two \n three,four',
-  expectedValue: 'one\\two \n three\\four',
-  expr: '%s/,/\\\\/g'});
-testSubstitute('ex_substitute_multibackslash_replacement', {
-  value: 'one,two \n three,four',
-  expectedValue: 'one\\\\\\\\two \n three\\\\\\\\four', // 2*8 backslashes.
-  expr: '%s/,/\\\\\\\\\\\\\\\\/g'}); // 16 backslashes.
-testSubstitute('ex_substitute_braces_word', {
-  value: 'ababab abb ab{2}',
-  expectedValue: 'ab abb ab{2}',
-  expr: '%s/(ab){2}//g',
-  noPcreExpr: '%s/\\(ab\\)\\{2\\}//g'});
-testSubstitute('ex_substitute_braces_range', {
-  value: 'a aa aaa aaaa',
-  expectedValue: 'a   a',
-  expr: '%s/a{2,3}//g',
-  noPcreExpr: '%s/a\\{2,3\\}//g'});
-testSubstitute('ex_substitute_braces_literal', {
-  value: 'ababab abb ab{2}',
-  expectedValue: 'ababab abb ',
-  expr: '%s/ab\\{2\\}//g',
-  noPcreExpr: '%s/ab{2}//g'});
-testSubstitute('ex_substitute_braces_char', {
-  value: 'ababab abb ab{2}',
-  expectedValue: 'ababab  ab{2}',
-  expr: '%s/ab{2}//g',
-  noPcreExpr: '%s/ab\\{2\\}//g'});
-testSubstitute('ex_substitute_braces_no_escape', {
-  value: 'ababab abb ab{2}',
-  expectedValue: 'ababab  ab{2}',
-  expr: '%s/ab{2}//g',
-  noPcreExpr: '%s/ab\\{2}//g'});
-testSubstitute('ex_substitute_count', {
-  value: '1\n2\n3\n4',
-  expectedValue: '1\n0\n0\n4',
-  expr: 's/\\d/0/i 2'});
-testSubstitute('ex_substitute_count_with_range', {
-  value: '1\n2\n3\n4',
-  expectedValue: '1\n2\n0\n0',
-  expr: '1,3s/\\d/0/ 3'});
-testSubstitute('ex_substitute_not_global', {
-  value: 'aaa\nbaa\ncaa',
-  expectedValue: 'xaa\nbxa\ncxa',
-  expr: '%s/a/x/'});
-function testSubstituteConfirm(name, command, initialValue, expectedValue, keys, finalPos) {
-  testVim(name, function(cm, vim, helpers) {
-    var savedOpenDialog = cm.openDialog;
-    var savedKeyName = CodeMirror.keyName;
-    var onKeyDown;
-    var recordedCallback;
-    var closed = true; // Start out closed, set false on second openDialog.
-    function close() {
-      closed = true;
-    }
-    // First openDialog should save callback.
-    cm.openDialog = function(template, callback, options) {
-      recordedCallback = callback;
-    }
-    // Do first openDialog.
-    helpers.doKeys(':');
-    // Second openDialog should save keyDown handler.
-    cm.openDialog = function(template, callback, options) {
-      onKeyDown = options.onKeyDown;
-      closed = false;
-    };
-    // Return the command to Vim and trigger second openDialog.
-    recordedCallback(command);
-    // The event should really use keyCode, but here just mock it out and use
-    // key and replace keyName to just return key.
-    CodeMirror.keyName = function (e) { return e.key; }
-    keys = keys.toUpperCase();
-    for (var i = 0; i < keys.length; i++) {
-      is(!closed);
-      onKeyDown({ key: keys.charAt(i) }, '', close);
-    }
-    try {
-      eq(expectedValue, cm.getValue());
-      helpers.assertCursorAt(finalPos);
-      is(closed);
-    } catch(e) {
-      throw e
-    } finally {
-      // Restore overriden functions.
-      CodeMirror.keyName = savedKeyName;
-      cm.openDialog = savedOpenDialog;
-    }
-  }, { value: initialValue });
-};
-testSubstituteConfirm('ex_substitute_confirm_emptydoc',
-    '%s/x/b/c', '', '', '', makeCursor(0, 0));
-testSubstituteConfirm('ex_substitute_confirm_nomatch',
-    '%s/x/b/c', 'ba a\nbab', 'ba a\nbab', '', makeCursor(0, 0));
-testSubstituteConfirm('ex_substitute_confirm_accept',
-    '%s/a/b/cg', 'ba a\nbab', 'bb b\nbbb', 'yyy', makeCursor(1, 1));
-testSubstituteConfirm('ex_substitute_confirm_random_keys',
-    '%s/a/b/cg', 'ba a\nbab', 'bb b\nbbb', 'ysdkywerty', makeCursor(1, 1));
-testSubstituteConfirm('ex_substitute_confirm_some',
-    '%s/a/b/cg', 'ba a\nbab', 'bb a\nbbb', 'yny', makeCursor(1, 1));
-testSubstituteConfirm('ex_substitute_confirm_all',
-    '%s/a/b/cg', 'ba a\nbab', 'bb b\nbbb', 'a', makeCursor(1, 1));
-testSubstituteConfirm('ex_substitute_confirm_accept_then_all',
-    '%s/a/b/cg', 'ba a\nbab', 'bb b\nbbb', 'ya', makeCursor(1, 1));
-testSubstituteConfirm('ex_substitute_confirm_quit',
-    '%s/a/b/cg', 'ba a\nbab', 'bb a\nbab', 'yq', makeCursor(0, 3));
-testSubstituteConfirm('ex_substitute_confirm_last',
-    '%s/a/b/cg', 'ba a\nbab', 'bb b\nbab', 'yl', makeCursor(0, 3));
-testSubstituteConfirm('ex_substitute_confirm_oneline',
-    '1s/a/b/cg', 'ba a\nbab', 'bb b\nbab', 'yl', makeCursor(0, 3));
-testSubstituteConfirm('ex_substitute_confirm_range_accept',
-    '1,2s/a/b/cg', 'aa\na \na\na', 'bb\nb \na\na', 'yyy', makeCursor(1, 0));
-testSubstituteConfirm('ex_substitute_confirm_range_some',
-    '1,3s/a/b/cg', 'aa\na \na\na', 'ba\nb \nb\na', 'ynyy', makeCursor(2, 0));
-testSubstituteConfirm('ex_substitute_confirm_range_all',
-    '1,3s/a/b/cg', 'aa\na \na\na', 'bb\nb \nb\na', 'a', makeCursor(2, 0));
-testSubstituteConfirm('ex_substitute_confirm_range_last',
-    '1,3s/a/b/cg', 'aa\na \na\na', 'bb\nb \na\na', 'yyl', makeCursor(1, 0));
-//:noh should clear highlighting of search-results but allow to resume search through n
-testVim('ex_noh_clearSearchHighlight', function(cm, vim, helpers) {
-  cm.openDialog = helpers.fakeOpenDialog('match');
-  helpers.doKeys('?');
-  helpers.doEx('noh');
-  eq(vim.searchState_.getOverlay(),null,'match-highlighting wasn\'t cleared');
-  helpers.doKeys('n');
-  helpers.assertCursorAt(0, 11,'can\'t resume search after clearing highlighting');
-}, { value: 'match nope match \n nope Match' });
-testVim('set_boolean', function(cm, vim, helpers) {
-  CodeMirror.Vim.defineOption('testoption', true, 'boolean');
-  // Test default value is set.
-  is(CodeMirror.Vim.getOption('testoption'));
-  try {
-    // Test fail to set to non-boolean
-    CodeMirror.Vim.setOption('testoption', '5');
-    fail();
-  } catch (expected) {};
-  // Test setOption
-  CodeMirror.Vim.setOption('testoption', false);
-  is(!CodeMirror.Vim.getOption('testoption'));
-});
-testVim('ex_set_boolean', function(cm, vim, helpers) {
-  CodeMirror.Vim.defineOption('testoption', true, 'boolean');
-  // Test default value is set.
-  is(CodeMirror.Vim.getOption('testoption'));
-  try {
-    // Test fail to set to non-boolean
-    helpers.doEx('set testoption=22');
-    fail();
-  } catch (expected) {};
-  // Test setOption
-  helpers.doEx('set notestoption');
-  is(!CodeMirror.Vim.getOption('testoption'));
-});
-testVim('set_string', function(cm, vim, helpers) {
-  CodeMirror.Vim.defineOption('testoption', 'a', 'string');
-  // Test default value is set.
-  eq('a', CodeMirror.Vim.getOption('testoption'));
-  try {
-    // Test fail to set non-string.
-    CodeMirror.Vim.setOption('testoption', true);
-    fail();
-  } catch (expected) {};
-  try {
-    // Test fail to set 'notestoption'
-    CodeMirror.Vim.setOption('notestoption', 'b');
-    fail();
-  } catch (expected) {};
-  // Test setOption
-  CodeMirror.Vim.setOption('testoption', 'c');
-  eq('c', CodeMirror.Vim.getOption('testoption'));
-});
-testVim('ex_set_string', function(cm, vim, helpers) {
-  CodeMirror.Vim.defineOption('testoption', 'a', 'string');
-  // Test default value is set.
-  eq('a', CodeMirror.Vim.getOption('testoption'));
-  try {
-    // Test fail to set 'notestoption'
-    helpers.doEx('set notestoption=b');
-    fail();
-  } catch (expected) {};
-  // Test setOption
-  helpers.doEx('set testoption=c')
-  eq('c', CodeMirror.Vim.getOption('testoption'));
-});
-// TODO: Reset key maps after each test.
-testVim('ex_map_key2key', function(cm, vim, helpers) {
-  helpers.doEx('map a x');
-  helpers.doKeys('a');
-  helpers.assertCursorAt(0, 0);
-  eq('bc', cm.getValue());
-}, { value: 'abc' });
-testVim('ex_unmap_key2key', function(cm, vim, helpers) {
-  helpers.doEx('unmap a');
-  helpers.doKeys('a');
-  eq('vim-insert', cm.getOption('keyMap'));
-}, { value: 'abc' });
-testVim('ex_unmap_key2key_does_not_remove_default', function(cm, vim, helpers) {
-  try {
-    helpers.doEx('unmap a');
-    fail();
-  } catch (expected) {}
-  helpers.doKeys('a');
-  eq('vim-insert', cm.getOption('keyMap'));
-}, { value: 'abc' });
-testVim('ex_map_key2key_to_colon', function(cm, vim, helpers) {
-  helpers.doEx('map ; :');
-  var dialogOpened = false;
-  cm.openDialog = function() {
-    dialogOpened = true;
-  }
-  helpers.doKeys(';');
-  eq(dialogOpened, true);
-});
-testVim('ex_map_ex2key:', function(cm, vim, helpers) {
-  helpers.doEx('map :del x');
-  helpers.doEx('del');
-  helpers.assertCursorAt(0, 0);
-  eq('bc', cm.getValue());
-}, { value: 'abc' });
-testVim('ex_map_ex2ex', function(cm, vim, helpers) {
-  helpers.doEx('map :del :w');
-  var tmp = CodeMirror.commands.save;
-  var written = false;
-  var actualCm;
-  CodeMirror.commands.save = function(cm) {
-    written = true;
-    actualCm = cm;
-  };
-  helpers.doEx('del');
-  CodeMirror.commands.save = tmp;
-  eq(written, true);
-  eq(actualCm, cm);
-});
-testVim('ex_map_key2ex', function(cm, vim, helpers) {
-  helpers.doEx('map a :w');
-  var tmp = CodeMirror.commands.save;
-  var written = false;
-  var actualCm;
-  CodeMirror.commands.save = function(cm) {
-    written = true;
-    actualCm = cm;
-  };
-  helpers.doKeys('a');
-  CodeMirror.commands.save = tmp;
-  eq(written, true);
-  eq(actualCm, cm);
-});
-testVim('ex_map_key2key_visual_api', function(cm, vim, helpers) {
-  CodeMirror.Vim.map('b', ':w', 'visual');
-  var tmp = CodeMirror.commands.save;
-  var written = false;
-  var actualCm;
-  CodeMirror.commands.save = function(cm) {
-    written = true;
-    actualCm = cm;
-  };
-  // Mapping should not work in normal mode.
-  helpers.doKeys('b');
-  eq(written, false);
-  // Mapping should work in visual mode.
-  helpers.doKeys('v', 'b');
-  eq(written, true);
-  eq(actualCm, cm);
-
-  CodeMirror.commands.save = tmp;
-});
-testVim('ex_imap', function(cm, vim, helpers) {
-  CodeMirror.Vim.map('jk', '<Esc>', 'insert');
-  helpers.doKeys('i');
-  is(vim.insertMode);
-  helpers.doKeys('j', 'k');
-  is(!vim.insertMode);
-})
-
-// Testing registration of functions as ex-commands and mapping to <Key>-keys
-testVim('ex_api_test', function(cm, vim, helpers) {
-  var res=false;
-  var val='from';
-  CodeMirror.Vim.defineEx('extest','ext',function(cm,params){
-    if(params.args)val=params.args[0];
-    else res=true;
-  });
-  helpers.doEx(':ext to');
-  eq(val,'to','Defining ex-command failed');
-  CodeMirror.Vim.map('<C-CR><Space>',':ext');
-  helpers.doKeys('<C-CR>','<Space>');
-  is(res,'Mapping to key failed');
-});
-// For now, this test needs to be last because it messes up : for future tests.
-testVim('ex_map_key2key_from_colon', function(cm, vim, helpers) {
-  helpers.doEx('map : x');
-  helpers.doKeys(':');
-  helpers.assertCursorAt(0, 0);
-  eq('bc', cm.getValue());
-}, { value: 'abc' });
-
-// Test event handlers
-testVim('beforeSelectionChange', function(cm, vim, helpers) {
-  cm.setCursor(0, 100);
-  eqPos(cm.getCursor('head'), cm.getCursor('anchor'));
-}, { value: 'abc' });
-
-
diff --git a/public/js/lib/codemirror/theme/3024-day.css b/public/js/lib/codemirror/theme/3024-day.css
deleted file mode 100644
index 3c01c2b..0000000
--- a/public/js/lib/codemirror/theme/3024-day.css
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-
-    Name:       3024 day
-    Author:     Jan T. Sott (http://github.com/idleberg)
-
-    CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
-    Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
-
-*/
-
-.cm-s-3024-day.CodeMirror {background: #f7f7f7; color: #3a3432;}
-.cm-s-3024-day div.CodeMirror-selected {background: #d6d5d4 !important;}
-
-.cm-s-3024-day .CodeMirror-gutters {background: #f7f7f7; border-right: 0px;}
-.cm-s-3024-day .CodeMirror-guttermarker { color: #db2d20; }
-.cm-s-3024-day .CodeMirror-guttermarker-subtle { color: #807d7c; }
-.cm-s-3024-day .CodeMirror-linenumber {color: #807d7c;}
-
-.cm-s-3024-day .CodeMirror-cursor {border-left: 1px solid #5c5855 !important;}
-
-.cm-s-3024-day span.cm-comment {color: #cdab53;}
-.cm-s-3024-day span.cm-atom {color: #a16a94;}
-.cm-s-3024-day span.cm-number {color: #a16a94;}
-
-.cm-s-3024-day span.cm-property, .cm-s-3024-day span.cm-attribute {color: #01a252;}
-.cm-s-3024-day span.cm-keyword {color: #db2d20;}
-.cm-s-3024-day span.cm-string {color: #fded02;}
-
-.cm-s-3024-day span.cm-variable {color: #01a252;}
-.cm-s-3024-day span.cm-variable-2 {color: #01a0e4;}
-.cm-s-3024-day span.cm-def {color: #e8bbd0;}
-.cm-s-3024-day span.cm-bracket {color: #3a3432;}
-.cm-s-3024-day span.cm-tag {color: #db2d20;}
-.cm-s-3024-day span.cm-link {color: #a16a94;}
-.cm-s-3024-day span.cm-error {background: #db2d20; color: #5c5855;}
-
-.cm-s-3024-day .CodeMirror-activeline-background {background: #e8f2ff !important;}
-.cm-s-3024-day .CodeMirror-matchingbracket { text-decoration: underline; color: #a16a94 !important;}
diff --git a/public/js/lib/codemirror/theme/3024-night.css b/public/js/lib/codemirror/theme/3024-night.css
deleted file mode 100644
index 631757f..0000000
--- a/public/js/lib/codemirror/theme/3024-night.css
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-
-    Name:       3024 night
-    Author:     Jan T. Sott (http://github.com/idleberg)
-
-    CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
-    Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
-
-*/
-
-.cm-s-3024-night.CodeMirror {background: #090300; color: #d6d5d4;}
-.cm-s-3024-night div.CodeMirror-selected {background: #3a3432 !important;}
-.cm-s-3024-night .CodeMirror-gutters {background: #090300; border-right: 0px;}
-.cm-s-3024-night .CodeMirror-guttermarker { color: #db2d20; }
-.cm-s-3024-night .CodeMirror-guttermarker-subtle { color: #5c5855; }
-.cm-s-3024-night .CodeMirror-linenumber {color: #5c5855;}
-
-.cm-s-3024-night .CodeMirror-cursor {border-left: 1px solid #807d7c !important;}
-
-.cm-s-3024-night span.cm-comment {color: #cdab53;}
-.cm-s-3024-night span.cm-atom {color: #a16a94;}
-.cm-s-3024-night span.cm-number {color: #a16a94;}
-
-.cm-s-3024-night span.cm-property, .cm-s-3024-night span.cm-attribute {color: #01a252;}
-.cm-s-3024-night span.cm-keyword {color: #db2d20;}
-.cm-s-3024-night span.cm-string {color: #fded02;}
-
-.cm-s-3024-night span.cm-variable {color: #01a252;}
-.cm-s-3024-night span.cm-variable-2 {color: #01a0e4;}
-.cm-s-3024-night span.cm-def {color: #e8bbd0;}
-.cm-s-3024-night span.cm-bracket {color: #d6d5d4;}
-.cm-s-3024-night span.cm-tag {color: #db2d20;}
-.cm-s-3024-night span.cm-link {color: #a16a94;}
-.cm-s-3024-night span.cm-error {background: #db2d20; color: #807d7c;}
-
-.cm-s-3024-night .CodeMirror-activeline-background {background: #2F2F2F !important;}
-.cm-s-3024-night .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
diff --git a/public/js/lib/codemirror/theme/ambiance-mobile.css b/public/js/lib/codemirror/theme/ambiance-mobile.css
deleted file mode 100644
index 88d332e..0000000
--- a/public/js/lib/codemirror/theme/ambiance-mobile.css
+++ /dev/null
@@ -1,5 +0,0 @@
-.cm-s-ambiance.CodeMirror {
-  -webkit-box-shadow: none;
-  -moz-box-shadow: none;
-  box-shadow: none;
-}
diff --git a/public/js/lib/codemirror/theme/ambiance.css b/public/js/lib/codemirror/theme/ambiance.css
deleted file mode 100644
index c844566..0000000
--- a/public/js/lib/codemirror/theme/ambiance.css
+++ /dev/null
@@ -1,77 +0,0 @@
-/* ambiance theme for codemirror */
-
-/* Color scheme */
-
-.cm-s-ambiance .cm-keyword { color: #cda869; }
-.cm-s-ambiance .cm-atom { color: #CF7EA9; }
-.cm-s-ambiance .cm-number { color: #78CF8A; }
-.cm-s-ambiance .cm-def { color: #aac6e3; }
-.cm-s-ambiance .cm-variable { color: #ffb795; }
-.cm-s-ambiance .cm-variable-2 { color: #eed1b3; }
-.cm-s-ambiance .cm-variable-3 { color: #faded3; }
-.cm-s-ambiance .cm-property { color: #eed1b3; }
-.cm-s-ambiance .cm-operator {color: #fa8d6a;}
-.cm-s-ambiance .cm-comment { color: #555; font-style:italic; }
-.cm-s-ambiance .cm-string { color: #8f9d6a; }
-.cm-s-ambiance .cm-string-2 { color: #9d937c; }
-.cm-s-ambiance .cm-meta { color: #D2A8A1; }
-.cm-s-ambiance .cm-qualifier { color: yellow; }
-.cm-s-ambiance .cm-builtin { color: #9999cc; }
-.cm-s-ambiance .cm-bracket { color: #24C2C7; }
-.cm-s-ambiance .cm-tag { color: #fee4ff }
-.cm-s-ambiance .cm-attribute {  color: #9B859D; }
-.cm-s-ambiance .cm-header {color: blue;}
-.cm-s-ambiance .cm-quote { color: #24C2C7; }
-.cm-s-ambiance .cm-hr { color: pink; }
-.cm-s-ambiance .cm-link { color: #F4C20B; }
-.cm-s-ambiance .cm-special { color: #FF9D00; }
-.cm-s-ambiance .cm-error { color: #AF2018; }
-
-.cm-s-ambiance .CodeMirror-matchingbracket { color: #0f0; }
-.cm-s-ambiance .CodeMirror-nonmatchingbracket { color: #f22; }
-
-.cm-s-ambiance .CodeMirror-selected {
-  background: rgba(255, 255, 255, 0.15);
-}
-.cm-s-ambiance.CodeMirror-focused .CodeMirror-selected {
-  background: rgba(255, 255, 255, 0.10);
-}
-
-/* Editor styling */
-
-.cm-s-ambiance.CodeMirror {
-  line-height: 1.40em;
-  color: #E6E1DC;
-  background-color: #202020;
-  -webkit-box-shadow: inset 0 0 10px black;
-  -moz-box-shadow: inset 0 0 10px black;
-  box-shadow: inset 0 0 10px black;
-}
-
-.cm-s-ambiance .CodeMirror-gutters {
-  background: #3D3D3D;
-  border-right: 1px solid #4D4D4D;
-  box-shadow: 0 10px 20px black;
-}
-
-.cm-s-ambiance .CodeMirror-linenumber {
-  text-shadow: 0px 1px 1px #4d4d4d;
-  color: #111;
-  padding: 0 5px;
-}
-
-.cm-s-ambiance .CodeMirror-guttermarker { color: #aaa; }
-.cm-s-ambiance .CodeMirror-guttermarker-subtle { color: #111; }
-
-.cm-s-ambiance .CodeMirror-lines .CodeMirror-cursor {
-  border-left: 1px solid #7991E8;
-}
-
-.cm-s-ambiance .CodeMirror-activeline-background {
-  background: none repeat scroll 0% 0% rgba(255, 255, 255, 0.031);
-}
-
-.cm-s-ambiance.CodeMirror,
-.cm-s-ambiance .CodeMirror-gutters {
-  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAQAAAAHUWYVAABFFUlEQVQYGbzBCeDVU/74/6fj9HIcx/FRHx9JCFmzMyGRURhLZIkUsoeRfUjS2FNDtr6WkMhO9sm+S8maJfu+Jcsg+/o/c+Z4z/t97/vezy3z+z8ekGlnYICG/o7gdk+wmSHZ1z4pJItqapjoKXWahm8NmV6eOTbWUOp6/6a/XIg6GQqmenJ2lDHyvCFZ2cBDbmtHA043VFhHwXxClWmeYAdLhV00Bd85go8VmaFCkbVkzlQENzfBDZ5gtN7HwF0KDrTwJ0dypSOzpaKCMwQHKTIreYIxlmhXTzTWkVm+LTynZhiSBT3RZQ7aGfjGEd3qyXQ1FDymqbKxpspERQN2MiRjNZlFFQXfCNFm9nM1zpAsoYjmtRTc5ajwuaXc5xrWskT97RaKzAGe5ARHhVUsDbjKklziiX5WROcJwSNCNI+9w1Jwv4Zb2r7lCMZ4oq5C0EdTx+2GzNuKpJ+iFf38JEWkHJn9DNF7mmBDITrWEg0VWL3pHU20tSZnuqWu+R3BtYa8XxV1HO7GyD32UkOpL/yDloINFTmvtId+nmAjxRw40VMwVKiwrKLE4bK5UOVntYwhOcSSXKrJHKPJedocpGjVz/ZMIbnYUPB10/eKCrs5apqpgVmWzBYWpmtKHecJPjaUuEgRDDaU0oZghCJ6zNMQ5ZhDYx05r5v2muQdM0EILtXUsaKiQX9WMEUotagQzFbUNN6NUPC2nm5pxEWGCjMc3GdJHjSU2kORLK/JGSrkfGEIjncU/CYUnOipoYemwj8tST9NsJmB7TUVXtbUtXATJVZXBMvYeTXJfobgJUPmGMP/yFaWonaa6BcFO3nqcIqCozSZoZoSr1g4zJOzuyGnxTEX3lUEJ7WcZgme8ddaWvWJo2AJR9DZU3CUIbhCSG6ybSwN6qtJVnCU2svDTP2ZInOw2cBTrqtQahtNZn9NcJ4l2NaSmSkkP1noZWnVwkLmdUPOwLZEwy2Z3S3R+4rIG9hcbpPXHFVWcQdZkn2FOta3cKWQnNRC5g1LsJah4GCzSVsKnCOY5OAFRTBekyyryeyilhFKva75r4Mc0aWanGEaThcy31s439KKxTzJYY5WTHPU1FtIHjQU3Oip4xlNzj/lBw23dYZVliQa7WAXf4shetcQfatI+jWRDBPmyNeW6A1P5kdDgyYJlba0BIM8BZu1JfrFwItyjcAMR3K0BWOIrtMEXyhyrlVEx3ui5dUBjmB/Q3CXW85R4mBD0s7B+4q5tKUjOlb9qqmhi5AZ6GFIC5HXtOobdYGlVdMVbNJ8toNTFcHxnoL+muBagcctjWnbNMuR00uI7nQESwg5q2qqrKWIfrNUmeQocY6HuyxJV02wj36w00yhpmUFenv4p6fUkZYqLyuinx2RGOjhCXYyJF84oiU00YMOOhhquNdfbOB7gU88pY4xJO8LVdp6/q2voeB4R04vIdhSE40xZObx1HGGJ/ja0LBthFInKaLPPFzuCaYaoj8JjPME8yoyxo6zlBqkiUZYgq00OYMswbWO5NGmq+xhipxHLRW29ARjNKXO0wRnear8XSg4XFPLKEPUS1GqvyLwiuBUoa7zpZ0l5xxFwWmWZC1H5h5FwU8eQ7K+g8UcVY6TMQreVQT/8uQ8Z+ALIXnSEa2pYZQneE9RZbSBNYXfWYJzW/h/4j4Dp1tYVcFIC5019Vyi4ThPqSFCzjGWaHQTBU8q6vrVwgxP9Lkm840imWKpcLCjYTtrKuwvsKSnrvHCXGkSMk9p6lhckfRpIeis+N2PiszT+mFLspyGleUhDwcLrZqmyeylxwjBcKHEapqkmyangyLZRVOijwOtCY5SsG5zL0OwlCJ4y5KznF3EUNDDrinwiyLZRzOXtlBbK5ITHFGLp8Q0R6ab6mS7enI2cFrxOyHvOCFaT1HThS1krjCwqWeurCkk+willhCC+RSZnRXBiZaC5RXRIZYKp2lyfrHwiKPKR0JDzrdU2EFgpidawlFDR6FgXUMNa+g1FY3bUQh2cLCwosRdnuQTS/S+JVrGLeWIvtQUvONJxlqSQYYKpwoN2kaocLjdVsis4Mk80ESF2YpSkzwldjHkjFCUutI/r+EHDU8oCs6yzL3PhWiEooZdFMkymlas4AcI3KmoMMNSQ3tHzjGWCrcJJdYyZC7QFGwjRL9p+MrRkAGWzIaWCn9W0F3TsK01c2ZvQw0byvxuQU0r1lM0qJO7wW0kRIMdDTtXEdzi4VIh+EoIHm0mWtAtpCixlabgn83fKTI7anJe9ST7WIK1DMGpQmYeA58ImV6ezOGOzK2Kgq01pd60cKWiUi9Lievb/0vIDPHQ05Kzt4ddPckQBQtoaurjyHnek/nKzpQLrVgKPjIkh2v4uyezpv+Xoo7fPFXaGFp1vaLKxQ4uUpQQS5VuQs7BCq4xRJv7fwpVvvFEB3j+620haOuocqMhWd6TTPAEx+mdFNGHdranFe95WrWmIvlY4F1Dle2ECgc6cto7SryuqGGGha0tFQ5V53migUKmg6XKAo4qS3mik+0OZpAhOLeZKicacgaYcyx5hypYQE02ZA4xi/pNhOQxR4klNKyqacj+mpxnLTnnGSo85++3ZCZq6lrZkXlGEX3o+C9FieccJbZWVFjC0Yo1FZnJhoYMFoI1hEZ9r6hwg75HwzBNhbZCdJEfJwTPGzJvaKImw1yYX1HDAmpXR+ZJQ/SmgqMNVQb5vgamGwLtt7VwvP7Qk1xpiM5x5Cyv93E06MZmgs0Nya2azIKOYKCGBQQW97RmhKNKF02JZqHEJ4o58qp7X5EcZmc56trXEqzjCBZ1MFGR87Ql2tSTs6CGxS05PTzRQorkbw7aKoKXFDXsYW42VJih/q+FP2BdTzDTwVqOYB13liM50vG7wy28qagyuIXMeQI/Oqq8bcn5wJI50xH00CRntyfpL1T4hydYpoXgNiFzoIUTDZnLNRzh4TBHwbYGDvZkxmlyJloyr6tRihpeUG94GnKtIznREF0tzJG/OOr73JBcrSh1k6WuTprgLU+mnSGnv6Zge0NNz+kTDdH8nuAuTdJDCNb21LCiIuqlYbqGzT3RAoZofQfjFazkqeNWdYaGvYTM001EW2oKPvVk1ldUGSgUtHFwjKM1h9jnFcmy5lChoLNaQMGGDsYbKixlaMBmmsx1QjCfflwTfO/gckW0ruZ3jugKR3R5W9hGUWqCgxuFgsuaCHorotGKzGaeZB9DMsaTnKCpMtwTvOzhYk0rdrArKCqcaWmVk1+F372ur1YkKxgatI8Qfe1gIX9wE9FgS8ESmuABIXnRUbCapcKe+nO7slClSZFzpV/LkLncEb1qiO42fS3R855Su2mCLh62t1SYZZYVmKwIHjREF2uihTzB20JOkz7dkxzYQnK0UOU494wh+VWRc6Un2kpTaVgLDFEkJ/uhzRcI0YKGgpGWOlocBU/a4fKoJ/pEaNV6jip3+Es9VXY078rGnmAdf7t9ylPXS34RBSuYPs1UecZTU78WanhBCHpZ5sAoTz0LGZKjPf9TRypqWEiTvOFglL1fCEY3wY/++rbk7C8bWebA6p6om6PgOL2kp44TFJlVNBXae2rqqdZztOJpT87GQsE9jqCPIe9VReZuQ/CIgacsyZdCpIScSYqcZk8r+nsyCzhyfhOqHGOIvrLknC8wTpFcaYiGC/RU1NRbUeUpocQOnkRpGOrIOcNRx+1uA0UrzhSSt+VyS3SJpnFWkzNDqOFGIWcfR86DnmARTQ1HKIL33ExPiemeOhYSSjzlSUZZuE4TveoJLnBUOFof6KiysCbnAEcZgcUNTDOwkqWu3RWtmGpZwlHhJENdZ3miGz0lJlsKnjbwqSHQjpxnFDlTLLwqJPMZMjd7KrzkSG7VsxXBZE+F8YZkb01Oe00yyRK9psh5SYh29ySPKBo2ylNht7ZkZnsKenjKNJu9PNEyZpaCHv4Kt6RQsLvAVp7M9kIimmCUwGeWqLMmGuIotYMmWNpSahkhZw9FqZsVnKJhsjAHvtHMsTM9fCI06Dx/u3vfUXCqfsKRc4oFY2jMsoo/7DJDwZ1CsIKnJu+J9ldkpmiCxQx1rWjI+T9FwcWWzOuaYH0Hj7klNRVWEQpmaqosakiGNTFHdjS/qnUdmf0NJW5xsL0HhimCCZZSRzmSPTXJQ4aaztAwtZnoabebJ+htCaZ7Cm535ByoqXKbX1WRc4Eh2MkRXWzImVc96Cj4VdOKVxR84VdQsIUM8Psoou2byVHyZFuq7O8otbSQ2UAoeEWTudATLGSpZzVLlXVkPU2Jc+27lsw2jmg5T5VhbeE3BT083K9WsTTkFU/Osi0rC5lRlpwRHUiesNS0sOvmqGML1aRbPAxTJD9ZKtxuob+hhl8cwYGWpJ8nub7t5p6coYbMovZ1BTdaKn1jYD6h4GFDNFyT/Kqe1XCXphXHOKLZmuRSRdBPEfVUXQzJm5YGPGGJdvAEr7hHNdGZnuBvrpciGmopOLf5N0uVMy0FfYToJk90uUCbJupaVpO53UJXR2bVpoU00V2KOo4zMFrBd0Jtz2pa0clT5Q5L8IpQ177mWQejPMEJhuQjS10ref6HHjdEhy1P1EYR7GtO0uSsKJQYLiTnG1rVScj5lyazpqWGl5uBbRWl7m6ixGOOnEsMJR7z8J0n6KMnCdxhiNYQCoZ6CmYLnO8omC3MkW3bktlPmEt/VQQHejL3+dOE5FlPdK/Mq8hZxxJtLyRrepLThYKbLZxkSb5W52vYxNOaOxUF0yxMUPwBTYqCzy01XayYK0sJyWBLqX0MwU5CzoymRzV0EjjeUeLgDpTo6ij42ZAzvD01dHUUTPLU96MdLbBME8nFBn7zJCMtJcZokn8YoqU0FS5WFKyniHobguMcmW8N0XkWZjkyN3hqOMtS08r+/xTBwpZSZ3qiVRX8SzMHHjfUNFjgHEPmY9PL3ykEzxkSre/1ZD6z/NuznuB0RcE1TWTm9zRgfUWVJiG6yrzgmWPXC8EAR4Wxhlad0ZbgQyEz3pG5RVEwwDJH2mgKpjcTiCOzn1lfUWANFbZ2BA8balnEweJC9J0iuaeZoI+ippFCztEKVvckR2iice1JvhVytrQwUAZpgsubCPaU7xUe9vWnaOpaSBEspalykhC9bUlOMpT42ZHca6hyrqKmw/wMR8H5ZmdFoBVJb03O4UL0tSNnvIeRmkrLWqrs78gcrEn2tpcboh0UPOW3UUR9PMk4T4nnNKWmCjlrefhCwxRNztfmIQVdDElvS4m1/WuOujoZCs5XVOjtKPGokJzsYCtFYoWonSPT21DheU/wWhM19FcElwqNGOsp9Q8N/cwXaiND1MmeL1Q5XROtYYgGeFq1aTMsoMmcrKjQrOFQTQ1fmBYhmW6o8Jkjc7iDJRTBIo5kgJD5yMEYA3srCg7VFKwiVJkmRCc5ohGOKhsYMn/XBLdo5taZjlb9YAlGWRimqbCsoY7HFAXLa5I1HPRxMMsQDHFkWtRNniqT9UEeNjcE7RUlrCJ4R2CSJuqlKHWvJXjAUNcITYkenuBRB84TbeepcqTj3zZyFJzgYQdHnqfgI0ddUwS6GqWpsKWhjq9cV0vBAEMN2znq+EBfIWT+pClYw5xsTlJU6GeIBsjGmmANTzJZiIYpgrM0Oa8ZMjd7NP87jxhqGOhJlnQtjuQpB+8aEE00wZFznSJPyHxgH3HkPOsJFvYk8zqCHzTs1BYOa4J3PFU+UVRZxlHDM4YavlNUuMoRveiZA2d7grMNc2g+RbSCEKzmgYsUmWmazFJyoiOZ4KnyhKOGRzWJa0+moyV4TVHDzn51Awtqaphfk/lRQ08FX1iiqxTB/kLwd0VynKfEvI6cd4XMV5bMhZ7gZUWVzYQ6Nm2BYzxJbw3bGthEUUMfgbGeorae6DxHtJoZ6alhZ0+ytiVoK1R4z5PTrOECT/SugseEOlb1MMNR4VRNcJy+V1Hg9ONClSZFZjdHlc6W6FBLdJja2MC5hhpu0DBYEY1TFGwiFAxRRCsYkiM9JRb0JNMVkW6CZYT/2EiTGWmo8k+h4FhDNE7BvppoTSFnmCV5xZKzvcCdDo7VVPnIU+I+Rc68juApC90MwcFCsJ5hDqxgScYKreruyQwTqrzoqDCmhWi4IbhB0Yrt3RGa6GfDv52rKXWhh28dyZaWUvcZeMTBaZoSGyiCtRU5J8iviioHaErs7Jkj61syVzTTgOcUOQ8buFBTYWdL5g3T4qlpe0+wvD63heAXRfCCIed9RbCsp2CiI7raUOYOTU13N8PNHvpaGvayo4a3LLT1lDrVEPT2zLUlheB1R+ZTRfKWJ+dcocLJfi11vyJ51lLqJ0WD7tRwryezjiV5W28uJO9qykzX8JDe2lHl/9oyBwa2UMfOngpXCixvKdXTk3wrsKmiVYdZIqsoWEERjbcUNDuiaQomGoIbFdEHmsyWnuR+IeriKDVLnlawlyNHKwKlSU631PKep8J4Q+ayjkSLKYLhalNHlYvttb6fHm0p6OApsZ4l2VfdqZkjuysy6ysKLlckf1KUutCTs39bmCgEyyoasIWlVaMF7mgmWtBT8Kol5xpH9IGllo8cJdopcvZ2sImlDmMIbtDk3KIpeNiS08lQw11NFPTwVFlPP6pJ2gvRfI7gQUfmNAtf6Gs0wQxDsKGlVBdF8rCa3jzdwMaGHOsItrZk7hAyOzpK9VS06j5F49b0VNGOOfKs3lDToMsMBe9ZWtHFEgxTJLs7qrygKZjUnmCYoeAqeU6jqWuLJup4WghOdvCYJnrSkSzoyRkm5M2StQwVltPkfCAk58tET/CSg+8MUecmotMEnhBKfWBIZsg2ihruMJQaoIm+tkTLKEqspMh00w95gvFCQRtDwTT1gVDDSEVdlwqZfxoQRbK0g+tbiBZxzKlpnpypejdDwTaeOvorMk/IJE10h9CqRe28hhLbe0pMsdSwv4ZbhKivo2BjDWfL8UKJgeavwlwb5KlwhyE4u4XkGE2ytZCznKLCDZZq42VzT8HLCrpruFbIfOIINmh/qCdZ1ZBc65kLHR1Bkyf5zn6pN3SvGKIlFNGplhrO9QSXanLOMQTLCa0YJCRrCZm/CZmrLTm7WzCK4GJDiWUdFeYx1LCFg3NMd0XmCuF3Y5rITLDUsYS9zoHVzwnJoYpSTQoObyEzr4cFBNqYTopoaU/wkyLZ2lPhX/5Y95ulxGTV7KjhWrOZgl8MyUUafjYraNjNU1N3IWcjT5WzWqjwtoarHSUObGYO3GCJZpsBlnJGPd6ZYLyl1GdCA2625IwwJDP8GUKymbzuyPlZlvTUsaUh5zFDhRWFzPKKZLAlWdcQbObgF9tOqOsmB1dqcqYJmWstFbZRRI9poolmqiLnU0POvxScpah2iSL5UJNzgScY5+AuIbpO0YD3NCW+dLMszFSdFCWGqG6eVq2uYVNDdICGD6W7EPRWZEY5gpsE9rUkS3mijzzJnm6UpUFXG1hCUeVoS5WfNcFpblELL2qqrCvMvRfd45oalvKU2tiQ6ePJOVMRXase9iTtLJztPxJKLWpo2CRDcJwn2sWSLKIO1WQWNTCvpVUvOZhgSC40JD0dOctaSqzkCRbXsKlb11Oip6PCJ0IwSJM31j3akRxlP7Rwn6aGaUL0qiLnJkvB3xWZ2+Q1TfCwpQH3G0o92UzmX4o/oJNQMMSQc547wVHhdk+VCw01DFYEnTxzZKAm74QmeNNR1w6WzEhNK15VJzuCdxQ53dRUDws5KvwgBMOEgpcVNe0hZI6RXT1Jd0cyj5nsaEAHgVmGaJIlWdsc5Ui2ElrRR6jrRAttNMEAIWrTDFubkZaok7/AkzfIwfuWVq0jHzuCK4QabtLUMVPB3kJ0oyHTSVFlqMALilJf2Rf8k5aaHtMfayocLBS8L89oKoxpJvnAkDPa0qp5DAUTHKWmCcnthlou8iCKaFFLHWcINd1nyIwXqrSxMNmSs6KmoL2QrKuWtlQ5V0120xQ5vRyZS1rgFkWwhiOwiuQbR0OOVhQM9iS3tiXp4RawRPMp5tDletOOBL95MpM01dZTBM9pkn5qF010rIeHFcFZhmSGpYpTsI6nwhqe5C9ynhlpp5ophuRb6WcJFldkVnVEwwxVfrVkvnWUuNLCg5bgboFHPDlDPDmnK7hUrWiIbjadDclujlZcaokOFup4Ri1kacV6jmrrK1hN9bGwpKEBQ4Q6DvIUXOmo6U5LqQM6EPyiKNjVkPnJkDPNEaxhiFay5ExW1NXVUGqcpYYdPcGiCq7z/TSlbhL4pplWXKd7NZO5QQFrefhRQW/NHOsqcIglc4UhWklR8K0QzbAw08CBDnpbgqXdeD/QUsM4RZXDFBW6WJKe/mFPdH0LtBgiq57wFLzlyQzz82qYx5D5WJP5yVJDW01BfyHnS6HKO/reZqId1WGa4Hkh2kWodJ8i6KoIPlAj2hPt76CzXsVR6koPRzWTfKqIentatYpQw2me4AA3y1Kind3SwoOKZDcFXTwl9tWU6mfgRk9d71sKtlNwrjnYw5tC5n5LdKiGry3JKNlHEd3oaMCFHrazBPMp/uNJ+V7IudcSbeOIdjUEdwl0VHCOZo5t6YluEuaC9mQeMgSfOyKnYGFHcIeQ84yQWbuJYJpZw5CzglDH7gKnWqqM9ZTaXcN0TeYhR84eQtJT76JJ1lREe7WnnvsMmRc9FQ7SBBM9mV3lCUdmHk/S2RAMt0QjFNFqQpWjDPQ01DXWUdDBkXziKPjGEP3VP+zIWU2t7im41FOloyWzn/L6dkUy3VLDaZ6appgDLHPjJEsyvJngWEPUyVBiAaHCTEXwrLvSEbV1e1gKJniicWorC1MUrVjB3uDhJE/wgSOzk1DXpk0k73qCM8xw2UvD5kJmDUfOomqMpWCkJRlvKXGmoeBm18USjVIk04SClxTB6YrgLAPLWYK9HLUt5cmc0vYES8GnTeRc6skZbQkWdxRsIcyBRzx1DbTk9FbU0caTPOgJHhJKnOGIVhQqvKmo0llRw9sabrZkDtdg3PqaKi9oatjY8B+G371paMg6+mZFNNtQ04mWBq3rYLOmtWWQp8KJnpy9DdFensyjdqZ+yY40VJlH8wcdLzC8PZnvHMFUTZUrDTkLyQaGus5X5LzpYAf3i+e/ZlhqGqWhh6Ou6xTR9Z6oi5AZZtp7Mj2EEm8oSpxiYZCHU/1fbGdNNNRRoZMhmilEb2gqHOEJDtXkHK/JnG6IrvbPCwV3NhONVdS1thBMs1T4QOBcTWa2IzhMk2nW5Kyn9tXUtpv9RsG2msxk+ZsQzRQacJncpgke0+T8y5Fzj8BiGo7XlJjaTIlpQs7KFjpqGnKuoyEPeIKnFMkZHvopgh81ySxNFWvJWcKRs70j2FOT012IllEEO1n4pD1513Yg2ssQPOThOkvyrqHUdEXOSEsihmBbTbKX1kLBPWqWkLOqJbjB3GBIZmoa8qWl4CG/iZ7oiA72ZL7TJNeZUY7kFQftDcHHluBzRbCegzMtrRjVQpX2lgoPKKLJAkcbMl01XK2p7yhL8pCBbQ3BN2avJgKvttcrWDK3CiUOVxQ8ZP+pqXKyIxnmBymCg5vJjNfkPK4+c8cIfK8ocVt7kmfd/I5SR1hKvCzUtb+lhgc00ZaO6CyhIQP1Uv4yIZjload72PXX0OIJvnFU+0Zf6MhsJwTfW0r0UwQfW4LNLZl5HK261JCZ4qnBaAreVAS3WrjV0LBnNDUNNDToCEeFfwgcb4gOEqLRhirWkexrCEYKVV711DLYEE1XBEsp5tpTGjorkomKYF9FDXv7fR3BGwbettSxnyL53MBPjsxDZjMh+VUW9NRxq1DhVk+FSxQcaGjV9Pawv6eGByw5qzoy7xk4RsOShqjJwWKe/1pEEfzkobeD/dQJmpqedcyBTy2sr4nGNRH0c0SPWTLrqAc0OQcb/gemKgqucQT7ySWKCn2EUotoCvpZct7RO2sy/QW0IWcXd7pQRQyZVwT2USRO87uhjioTLKV2brpMUcMQRbKH/N2T+UlTpaMls6cmc6CCNy3JdYYSUzzJQ4oSD3oKLncULOiJvjBEC2oqnCJkJluCYy2ZQ5so9YYlZ1VLlQU1mXEW1jZERwj/MUSRc24TdexlqLKfQBtDTScJUV8FszXBEY5ktpD5Ur9hYB4Nb1iikw3JoYpkKX+RodRKFt53MMuRnKSpY31PwYaGaILh3wxJGz9TkTPEETxoCWZrgvOlmyMzxFEwVJE5xZKzvyJ4WxEc16Gd4Xe3Weq4XH2jKRikqOkGQ87hQnC7wBmGYLAnesX3M+S87eFATauuN+Qcrh7xIxXJbUIdMw3JGE3ylCWzrieaqCn4zhGM19TQ3z1oH1AX+pWEqIc7wNGAkULBo/ZxRaV9NNyh4Br3rCHZzbzmSfawBL0dNRwpW1kK9mxPXR9povcdrGSZK9c2k0xwFGzjuniCtRSZCZ6ccZ7gaktmgAOtKbG/JnOkJrjcQTdFMsxRQ2cLY3WTIrlCw1eWKn8R6pvt4GFDso3QoL4a3nLk3G6JrtME3dSenpx7PNFTmga0EaJTLQ061sEeQoWXhSo9LTXsaSjoJQRXeZLtDclbCrYzfzHHeaKjHCVOUkQHO3JeEepr56mhiyaYYKjjNU+Fed1wS5VlhWSqI/hYUdDOkaxiKehoyOnrCV5yBHtbWFqTHCCwtpDcYolesVR5yUzTZBb3RNMd0d6WP+SvhuBmRcGxnuQzT95IC285cr41cLGQ6aJJhmi4TMGempxeimBRQw1tFKV+8jd6KuzoSTqqDxzRtpZkurvKEHxlqXKRIjjfUNNXQsNOsRScoWFLT+YeRZVD3GRN0MdQcKqQjHDMrdGGVu3iYJpQx3WGUvfbmxwFfR20WBq0oYY7LMFhhgYtr8jpaEnaOzjawWWaTP8mMr0t/EPDPoqcnxTBI5o58L7uoWnMrpoqPwgVrlAUWE+V+TQl9rawoyP6QGAlQw2TPRX+YSkxyBC8Z6jhHkXBgQL7WII3DVFnRfCrBfxewv9D6xsyjys4VkhWb9pUU627JllV0YDNHMku/ldNMMXDEo4aFnAkk4U6frNEU4XgZUPmEKHUl44KrzmYamjAbh0JFvGnaTLPu1s9jPCwjFpYiN7z1DTOk/nc07CfDFzmCf7i+bfNHXhDtLeBXzTBT5rkMvWOIxpl4EMh2LGJBu2syDnAEx2naEhHDWMMzPZEhygyS1mS5RTJr5ZkoKbEUoYqr2kqdDUE8ztK7OaIntJkFrIECwv8LJTaVx5XJE86go8dFeZ3FN3rjabCAYpoYEeC9zzJVULBbmZhDyd7ko09ydpNZ3nm2Kee4FPPXHnYEF1nqOFEC08LUVcDvYXkJHW8gTaKCk9YGOeIJhqiE4ToPEepdp7IWFjdwnWaufGMwJJCMtUTTBBK9BGCOy2tGGrJTHIwyEOzp6aPzNMOtlZkDvcEWpP5SVNhfkvDxhmSazTJXYrM9U1E0xwFVwqZQwzJxw6+kGGGUj2FglGGmnb1/G51udRSMNlTw6GGnCcUwVcOpmsqTHa06o72sw1RL02p9z0VbnMLOaIX3QKaYKSCFQzBKEUNHTSc48k53RH9wxGMtpQa5KjjW0W0n6XCCCG4yxNNdhQ4R4l1Ff+2sSd6UFHiIEOyqqFgT01mEUMD+joy75jPhOA+oVVLm309FR4yVOlp4RhLiScNmSmaYF5Pw0STrOIoWMSR2UkRXOMp+M4SHW8o8Zoi6OZgjKOaFar8zZDzkWzvKOjkKBjmCXby8JahhjXULY4KlzgKLvAwxVGhvyd4zxB1d9T0piazmKLCVZY5sKiD0y2ZSYrkUEPUbIk+dlQ4SJHTR50k1DPaUWIdTZW9NJwnJMOECgd7ou/MnppMJ02O1VT4Wsh85MnZzcFTngpXGKo84qmwgKbCL/orR/SzJ2crA+t6Mp94KvxJUeIbT3CQu1uIdlQEOzlKfS3UMcrTiFmOuroocrZrT2AcmamOKg8YomeEKm/rlT2sociMaybaUlFhuqHCM2qIJ+rg4EcDFymiDSxzaHdPcpE62pD5kyM5SBMoA1PaUtfIthS85ig1VPiPPYXgYEMNk4Qq7TXBgo7oT57gPUdwgCHzhIVFPFU6OYJzHAX9m5oNrVjeE61miDrqQ4VSa1oiURTsKHC0IfjNwU2WzK6eqK8jWln4g15TVBnqmDteCJ501PGAocJhhqjZdtBEB6lnhLreFJKxmlKbeGrqLiSThVIbCdGzloasa6lpMQXHCME2boLpJgT7yWaemu6wBONbqGNVRS0PKIL7LckbjmQtR7K8I5qtqel+T/ChJTNIKLjdUMNIRyvOEko9YYl2cwQveBikCNawJKcLBbc7+JM92mysNvd/Fqp8a0k6CNEe7cnZrxlW0wQXaXjaktnRwNOGZKYiONwS7a1JVheq3WgJHlQUGKHKmp4KAxXR/ULURcNgoa4zhKSLpZR3kxRRb0NmD0OFn+UCS7CzI1nbP6+o4x47QZE5xRCt3ZagnYcvmpYQktXdk5YKXTzBC57kKEe0VVuiSYqapssMS3C9p2CKkHOg8B8Pa8p5atrIw3qezIWanMGa5HRDNF6RM9wcacl0N+Q8Z8hsIkSnaIIdHRUOEebAPy1zbCkhM062FCJtif7PU+UtoVXzWKqM1PxXO8cfdruhFQ/a6x3JKYagvVDhQEtNiyiiSQ7OsuRsZUku0CRNDs4Sog6KKjsZgk2bYJqijgsEenoKeniinRXBn/U3lgpPdyDZynQx8IiioMnCep5Ky8mjGs6Wty0l1hUQTcNWswS3WRp2kCNZwJG8omG8JphPUaFbC8lEfabwP7VtM9yoaNCAjpR41VNhrD9LkbN722v0CoZMByFzhaW+MyzRYEWFDQwN2M4/JiT76PuljT3VU/A36eaIThb+R9oZGOAJ9tewkgGvqOMNRWYjT/Cwu99Q8LqDE4TgbLWxJ1jaDDAERsFOFrobgjUsBScaguXU8kKm2RL19tRypSHnHNlHiIZqgufs4opgQdVdwxBNNFBR6kVFqb8ogimOzB6a6HTzrlDHEpYaxjiiA4TMQobkDg2vejjfwJGWmnbVFAw3H3hq2NyQfG7hz4aC+w3BbwbesG0swYayvpAs6++Ri1Vfzx93mFChvyN5xVHTS+0p9aqCAxyZ6ZacZyw5+7uuQkFPR9DDk9NOiE7X1PCYJVjVUqq7JlrHwWALF5nfHNGjApdpqgzx5OwilDhCiDYTgnc9waGW4BdLNNUQvOtpzDOWHDH8D7TR/A/85KljEQu3NREc4Pl/6B1Hhc8Umb5CsKMmGC9EPcxoT2amwHNCmeOEnOPbklnMkbOgIvO5UMOpQrS9UGVdt6iH/fURjhI/WOpaW9OKLYRod6HCUEdOX000wpDZQ6hwg6LgZfOqo1RfT/CrJzjekXOGhpc1VW71ZLbXyyp+93ILbC1kPtIEYx0FIx1VDrLoVzXRKRYWk809yYlC9ImcrinxtabKnzRJk3lAU1OLEN1j2zrYzr2myHRXJFf4h4QKT1qSTzTB5+ZNTzTRkAxX8FcLV2uS8eoQQ2aAkFzvCM72sJIcJET3WPjRk5wi32uSS9rfZajpWEvj9hW42F4o5NytSXYy8IKHay10VYdrcl4SkqscrXpMwyGOgtkajheSxdQqmpxP1L3t4R5PqasFnrQEjytq6qgp9Y09Qx9o4S1FzhUCn1kyHSzBWLemoSGvOqLNhZyBjmCaAUYpMgt4Ck7wBBMMwWKWgjsUwTaGVsxWC1mYoKiyqqeGKYqonSIRQ3KIkHO0pmAxTdBHkbOvfllfr+AA+7gnc50huVKYK393FOyg7rbPO/izI7hE4CnHHHnJ0ogNPRUGeUpsrZZTBJcrovUcJe51BPsr6GkJdhCCsZ6aTtMEb2pqWkqeVtDXE/QVggsU/Nl86d9RMF3DxvZTA58agu810RWawCiSzzXBeU3MMW9oyJUedvNEvQyNu1f10BSMddR1vaLCYpYa/mGocLSiYDcLbQz8aMn5iyF4xBNMs1P0QEOV7o5gaWGuzSeLue4tt3ro7y4Tgm4G/mopdZgl6q0o6KzJWE3mMksNr3r+a6CbT8g5wZNzT9O7fi/zpaOmnz3BRoqos+tv9zMbdpxsqDBOEewtJLt7cg5wtKKbvldpSzRRCD43VFheCI7yZLppggMVBS/KMAdHODJvOwq2NQSbKKKPLdFWQs7Fqo+mpl01JXYRgq8dnGLhTiFzqmWsUMdpllZdbKlyvSdYxhI9YghOtxR8LgSLWHK62mGGVoxzBE8LNWzqH9CUesQzFy5RQzTc56mhi6fgXEWwpKfE5Z7M05ZgZUPmo6auiv8YKzDYwWBLMErIbKHJvOwIrvEdhOBcQ9JdU1NHQ7CXn2XIDFBKU2WAgcX9UAUzDXWd5alwuyJ41Z9rjKLCL4aCp4WarhPm2rH+SaHUYE001JDZ2ZAzXPjdMpZWvC9wmqIB2lLhQ01D5jO06hghWMndbM7yRJMsoCj1vYbnFQVrW9jak3OlEJ3s/96+p33dEPRV5GxiqaGjIthUU6FFEZyqCa5qJrpBdzSw95IUnOPIrCUUjRZQFrbw5PR0R1qiYx3cb6nrWUMrBmmiBQxVHtTew5ICP/ip6g4hed/Akob/32wvBHsIOX83cI8hGeNeNPCIkPmXe8fPKx84OMSRM1MTdXSwjCZ4S30jVGhvqTRak/OVhgGazHuOCud5onEO1lJr6ecVyaOK6H7zqlBlIaHE0oroCgfvGJIdPcmfLNGLjpz7hZwZQpUbFME0A1cIJa7VNORkgfsMBatbKgwwJM9bSvQXeNOvbIjelg6WWvo5kvbKaJJNHexkKNHL9xRyFlH8Ti2riB5wVPhUk7nGkJnoCe428LR/wRGdYIlmWebCyxou1rCk4g/ShugBDX0V0ZQWkh0dOVsagkM0yV6OoLd5ye+pRlsCr0n+KiQrGuq5yJDzrTAXHtLUMduTDBVKrSm3eHL+6ijxhFDX9Z5gVU/wliHYTMiMFpKLNMEywu80wd3meoFmt6VbRMPenhrOc6DVe4pgXU8DnnHakLOIIrlF4FZPIw6R+zxBP0dyq6OOZ4Q5sLKCcz084ok+VsMMyQhNZmmBgX5xIXOEJTmi7VsGTvMTNdHHhpzdbE8Du2oKxgvBqQKdDDnTFOylCFaxR1syz2iqrOI/FEpNc3C6f11/7+ASS6l2inq2ciTrCCzgyemrCL5SVPjQkdPZUmGy2c9Sw9FtR1sS30RmsKPCS4rkIC/2U0MduwucYolGaPjKEyhzmiPYXagyWbYz8LWBDdzRimAXzxx4z8K9hpzlhLq+NiQ97HuKorMUfK/OVvC2JfiHUPCQI/q7J2gjK+tTDNxkCc4TMssqCs4TGtLVwQihyoAWgj9bosU80XGW6Ac9TJGziaUh5+hnFcHOnlaM1iRn29NaqGENTTTSUHCH2tWTeV0osUhH6psuVLjRUmGWhm6OZEshGeNowABHcJ2Bpy2ZszRcKkRXd2QuKVEeXnbfaEq825FguqfgfE2whlChSRMdron+LATTPQ2Z369t4B9C5gs/ylzv+CMmepIDPclFQl13W0rspPd1JOcbghGOEutqCv5qacURQl3dDKyvyJlqKXGPgcM9FfawJAMVmdcspcYKOZc4GjDYkFlK05olNMHyHn4zFNykyOxt99RkHlfwmiHo60l2EKI+mhreEKp080Tbug08BVPcgoqC5zWt+NLDTZ7oNSF51N1qie7Va3uCCwyZbkINf/NED6jzOsBdZjFN8oqG3wxVunqCSYYKf3EdhJyf9YWGf7tRU2oH3VHgPr1fe5J9hOgHd7xQ0y7qBwXr23aGErP0cm64JVjZwsOGqL+mhNgZmhJLW2oY4UhedsyBgzrCKrq7BmcpNVhR6jBPq64Vgi+kn6XE68pp8J5/+0wRHGOpsKenQn9DZntPzjRLZpDAdD2fnSgkG9tmIXnUwQ6WVighs7Yi2MxQ0N3CqYaCXkJ0oyOztMDJjmSSpcpvlrk0RMMOjmArQ04PRV1DO1FwhCVaUVPpKUM03JK5SxPsIWRu8/CGHi8UHChiqGFDTbSRJWeYUDDcH6vJWUxR4k1FXbMUwV6e4AJFXS8oMqsZKqzvYQ9DDQdZckY4aGsIhtlubbd2r3j4QBMoTamdPZk7O/Bf62lacZwneNjQoGcdVU7zJOd7ghsUHOkosagic6cnWc8+4gg285R6zZP5s1/LUbCKIznTwK36PkdwlOrl4U1LwfdCCa+IrvFkmgw1PCAUXKWo0sURXWcI2muKJlgyFzhynCY4RBOsqCjoI1R5zREco0n2Vt09BQtYSizgKNHfUmUrQ5UOCh51BFcLmY7umhYqXKQomOop8bUnWNNQcIiBcYaC6xzMNOS8JQQfeqKBmmglB+97ok/lfk3ygaHSyZaCRTzRxQo6GzLfa2jWBPepw+UmT7SQEJyiyRkhBLMVOfcoMjcK0eZChfUNzFAUzCsEN5vP/X1uP/n/aoMX+K+nw/Hjr/9xOo7j7Pju61tLcgvJpTWXNbfN5jLpi6VfCOviTktKlFusQixdEKWmEBUKNaIpjZRSSOXSgzaaKLdabrm1/9nZ+/f+vd/vz/v9+Xy+zZ7PRorYoZqyLrCwQdEAixxVOEXNNnjX2nUSRlkqGmWowk8lxR50JPy9Bo6qJXaXwNvREBvnThPEPrewryLhcAnj5WE15Fqi8W7R1sAuEu86S4ENikItFN4xkv9Af4nXSnUVcLiA9xzesFpivRRVeFKtsMRaKBhuSbjOELnAUtlSQUpXgdfB4Z1oSbnFEetbQ0IrAe+Y+pqnDcEJFj6S8LDZzZHwY4e3XONNlARraomNEt2bkvGsosA3ioyHm+6jCMbI59wqt4eeara28IzEmyPgoRaUOEDhTVdEJhmCoTWfC0p8aNkCp0oYqih2iqGi4yXeMkOsn4LdLLnmKfh/YogjNsPebeFGR4m9BJHLzB61XQ3BtpISfS2FugsK9FAtLWX1dCRcrCnUp44CNzuCowUZmxSRgYaE6Za0W2u/E7CVXCiI/UOR8aAm1+OSyE3mOUcwyc1zBBeoX1kiKy0Zfxck1Gsyulti11i83QTBF5Kg3pDQThFMVHiPSlK+0cSedng/VaS8bOZbtsBcTcZAR8JP5KeqQ1OYKAi20njdNNRpgnsU//K+JnaXJaGTomr7aYIphoRn9aeShJWKEq9LcozSF7QleEfDI5LYm5bgVkFkRwVDBCVu0DDIkGupo8TZBq+/pMQURYErJQmPKGKjNDkWOLx7Jd5QizdUweIaKrlP7SwJDhZvONjLkOsBBX9UpGxnydhXkfBLQ8IxgojQbLFnJf81JytSljclYYyEFyx0kVBvKWOFJmONpshGAcsduQY5giVNCV51eOdJYo/pLhbvM0uDHSevNKRcrKZIqnCtJeEsO95RoqcgGK4ocZcho1tTYtcZvH41pNQ7vA0WrhIfOSraIIntIAi+NXWCErdbkvrWwjRLrt0NKUdL6KSOscTOdMSOUtBHwL6OLA0vNSdynaWQEnCpIvKaIrJJEbvHkmuNhn6OjM8VkSGSqn1uYJCGHnq9I3aLhNME3t6GjIkO7xrNFumpyTNX/NrwX7CrIRiqqWijI9JO4d1iieykyfiposQIQ8YjjsjlBh6oHWbwRjgYJQn2NgSnNycmJAk3NiXhx44Sxykihxm8ybUwT1OVKySc7vi3OXVkdBJ4AyXBeksDXG0IhgtYY0lY5ahCD0ehborIk5aUWRJviMA7Xt5kyRjonrXENkm8yYqgs8VzgrJmClK20uMM3jRJ0FiQICQF9hdETlLQWRIb5ki6WDfWRPobvO6a4GP5mcOrNzDFELtTkONLh9dXE8xypEg7z8A9jkhrQ6Fhjlg/QVktJXxt4WXzT/03Q8IaQWSqIuEvloQ2mqC9Jfi7wRul4RX3pSPlzpoVlmCtI2jvKHCFhjcM3sN6lqF6HxnKelLjXWbwrpR4xzuCrTUZx2qq9oAh8p6ixCUGr78g8oyjRAtB5CZFwi80VerVpI0h+IeBxa6Zg6kWvpDHaioYYuEsRbDC3eOmC2JvGYLeioxGknL2UATNJN6hmtj1DlpLvDVmocYbrGCVJKOrg4X6DgddLA203BKMFngdJJFtFd7vJLm6KEpc5yjQrkk7M80SGe34X24nSex1Ra5Omgb71JKyg8SrU3i/kARKwWpH0kOGhKkObyfd0ZGjvyXlAkVZ4xRbYJ2irFMkFY1SwyWxr2oo4zlNiV+7zmaweFpT4kR3kaDAFW6xpSqzJay05FtYR4HmZhc9UxKbbfF2V8RG1MBmSaE+kmC6JnaRXK9gsiXhJHl/U0qM0WTcbyhwkYIvFGwjSbjfwhiJt8ZSQU+Bd5+marPMOkVkD0muxYLIfEuhh60x/J92itguihJSEMySVPQnTewnEm+620rTQEMsOfo4/kP/0ARvWjitlpSX7GxBgcMEsd3EEeYWvdytd+Saawi6aCIj1CkGb6Aj9rwhx16Cf3vAwFy5pyLhVonXzy51FDpdEblbkdJbUcEPDEFzQ8qNmhzzLTmmKWKbFCXeEuRabp6rxbvAtLF442QjQ+wEA9eL1xSR7Q0JXzlSHjJ4exq89yR0laScJ/FW6z4a73pFMEfDiRZvuvijIt86RaSFOl01riV2mD1UEvxGk/Geg5aWwGki1zgKPG9J2U8PEg8qYvMsZeytiTRXBMslCU8JSlxi8EabjwUldlDNLfzTUmCgxWsjqWCOHavYAqsknKFIO0yQ61VL5AVFxk6WhEaCAkdJgt9aSkzXlKNX2jEa79waYuc7gq0N3GDJGCBhoiTXUEPsdknCUE1CK0fwsiaylSF2uiDyO4XX3pFhNd7R4itFGc0k/ElBZwWvq+GC6szVeEoS/MZ+qylwpKNKv9Z469UOjqCjwlusicyTxG6VpNxcQ8IncoR4RhLbR+NdpGGmJWOcIzJGUuKPGpQg8rrG21dOMqQssJQ4RxH5jaUqnZuQ0F4Q+cjxLwPtpZbIAk3QTJHQWBE5S1BokoVtDd6lhqr9UpHSUxMcIYl9pojsb8h4SBOsMQcqvOWC2E8EVehqiJ1hrrAEbQxeK0NGZ0Gkq+guSRgniM23bIHVkqwx4hiHd7smaOyglyIyQuM978j4VS08J/A2G1KeMBRo4fBaSNhKUEZfQewVQ/C1I+MgfbEleEzCUw7mKXI0M3hd1EESVji8x5uQ41nxs1q4RMJCCXs7Iq9acpxn22oSDnQ/sJTxsCbHIYZiLyhY05TY0ZLIOQrGaSJDDN4t8pVaIrsqqFdEegtizc1iTew5Q4ayBDMUsQMkXocaYkc0hZua412siZ1rSXlR460zRJ5SlHGe5j801RLMlJTxtaOM3Q1pvxJ45zUlWFD7rsAbpfEm1JHxG0eh8w2R7QQVzBUw28FhFp5QZzq8t2rx2joqulYTWSuJdTYfWwqMFMcovFmSyJPNyLhE4E10pHzYjOC3huArRa571ZsGajQpQx38SBP5pyZB6lMU3khDnp0MBV51BE9o2E+TY5Ml2E8S7C0o6w1xvCZjf0HkVEHCzFoyNmqC+9wdcqN+Tp7jSDheE9ws8Y5V0NJCn2bk2tqSY4okdrEhx1iDN8cSudwepWmAGXKcJXK65H9to8jYQRH7SBF01ESUJdd0TayVInaWhLkOjlXE5irKGOnI6GSWGCJa482zBI9rCr0jyTVcEuzriC1vcr6mwFGSiqy5zMwxBH/TJHwjSPhL8+01kaaSUuMFKTcLEvaUePcrSmwn8DZrgikWb7CGPxkSjhQwrRk57tctmxLsb9sZvL9LSlyuSLlWkqOjwduo8b6Uv1DkmudIeFF2dHCgxVtk8dpIvHpBxhEOdhKk7OLIUSdJ+cSRY57B+0DgGUUlNfpthTfGkauzxrvTsUUaCVhlKeteTXCoJDCa2NOKhOmC4G1H8JBd4OBZReSRGkqcb/CO1PyLJTLB4j1q8JYaIutEjSLX8YKM+a6phdMsdLFUoV5RTm9JSkuDN8WcIon0NZMNZWh1q8C7SJEwV5HxrmnnTrf3KoJBlmCYI2ilSLlfEvlE4011NNgjgthzEua0oKK7JLE7HZHlEl60BLMVFewg4EWNt0ThrVNEVkkiTwpKXSWJzdRENgvKGq4IhjsiezgSFtsfCUq8qki5S1LRQeYQQ4nemmCkImWMw3tFUoUBZk4NOeZYEp4XRKTGa6wJjrWNHBVJR4m3FCnbuD6aak2WsMTh3SZImGCIPKNgsDpVwnsa70K31lCFJZYcwwSMFcQulGTsZuEaSdBXkPGZhu0FsdUO73RHjq8MPGGIfaGIbVTk6iuI3GFgucHrIQkmWSJdBd7BBu+uOryWAhY7+Lki9rK5wtEQzWwvtbqGhIMFwWRJsElsY4m9IIg9L6lCX0VklaPAYkfkZEGDnOWowlBJjtMUkcGK4Lg6EtoZInMUBVYLgn0UsdmCyCz7gIGHFfk+k1QwTh5We7A9x+IdJ6CvIkEagms0hR50eH9UnTQJ+2oiKyVlLFUE+8gBGu8MQ3CppUHesnjTHN4QB/UGPhCTHLFPHMFrCqa73gqObUJGa03wgbhHkrCfpEpzNLE7JDS25FMKhlhKKWKfCgqstLCPu1zBXy0J2ztwjtixBu8UTRn9LVtkmCN2iyFhtME70JHRQ1KVZXqKI/KNIKYMCYs1GUMEKbM1bKOI9LDXC7zbHS+bt+1MTWS9odA9DtrYtpbImQJ2VHh/lisEwaHqUk1kjKTAKknkBEXkbkdMGwq0dnhzLJF3NJH3JVwrqOB4Sca2hti75nmJN0WzxS6UxDYoEpxpa4htVlRjkYE7DZGzJVU72uC9IyhQL4i8YfGWSYLLNcHXloyz7QhNifmKSE9JgfGmuyLhc403Xm9vqcp6gXe3xuuv8F6VJNxkyTHEkHG2g0aKXL0MsXc1bGfgas2//dCONXiNLCX+5mB7eZIl1kHh7ajwpikyzlUUWOVOsjSQlsS+M0R+pPje/dzBXRZGO0rMtgQrLLG9VSu9n6CMXS3BhwYmSoIBhsjNBmZbgusE9BCPCP5triU4VhNbJfE+swSP27aayE8tuTpYYjtrYjMVGZdp2NpS1s6aBnKSHDsbKuplKbHM4a0wMFd/5/DmGyKrJSUaW4IBrqUhx0vyfzTBBLPIUcnZdrAkNsKR0sWRspumSns6Ch0v/qqIbBYUWKvPU/CFoyrDJGwSNFhbA/MlzKqjrO80hRbpKx0Jewsi/STftwGSlKc1JZyAzx05dhLEdnfQvhZOqiHWWEAHC7+30FuRcZUgaO5gpaIK+xsiHRUsqaPElTV40xQZQ107Q9BZE1nryDVGU9ZSQ47bmhBpLcYpUt7S+xuK/FiT8qKjwXYw5ypS2iuCv7q1gtgjhuBuB8LCFY5cUuCNtsQOFcT+4Ih9JX+k8Ea6v0iCIRZOtCT0Et00JW5UeC85Cg0ScK0k411HcG1zKtre3SeITBRk7WfwDhEvaYLTHP9le0m8By0JDwn4TlLW/aJOvGHxdjYUes+ScZigCkYQdNdEOhkiezgShqkx8ueKjI8lDfK2oNiOFvrZH1hS+tk7NV7nOmLHicGWEgubkXKdwdtZknCLJXaCpkrjZBtLZFsDP9CdxWsSr05Sxl6CMmoFbCOgryX40uDtamB7SVmXW4Ihlgpmq+00tBKUUa83WbjLUNkzDmY7cow1JDygyPGlhgGKYKz4vcV7QBNbJIgM11TUqZaMdwTeSguH6rOaw1JRKzaaGyxVm2EJ/uCIrVWUcZUkcp2grMsEjK+DMwS59jQk3Kd6SEq1d0S6uVmO4Bc1lDXTUcHjluCXEq+1OlBDj1pi9zgiXxnKuE0SqTXwhqbETW6RggMEnGl/q49UT2iCzgJvRwVXS2K/d6+ZkyUl7jawSVLit46EwxVljDZwoSQ20sDBihztHfk2yA8NVZghiXwrYHQdfKAOtzsayjhY9bY0yE2CWEeJ9xfzO423xhL5syS2TFJofO2pboHob0nY4GiAgRrvGQEDa/FWSsoaaYl0syRsEt3kWoH3B01shCXhTUWe9w3Bt44SC9QCh3eShQctwbaK2ApLroGCMlZrYqvlY3qYhM0aXpFkPOuoqJ3Dm6fxXrGwVF9gCWZagjPqznfkuMKQ8DPTQRO8ZqG1hPGKEm9IgpGW4DZDgTNriTxvFiq+Lz+0cKfp4wj6OCK9JSnzNSn9LFU7UhKZZMnYwcJ8s8yRsECScK4j5UOB95HFO0CzhY4xJxuCix0lDlEUeMdS6EZBkTsUkZ4K74dugyTXS7aNgL8aqjDfkCE0ZbwkCXpaWCKhl8P7VD5jxykivSyxyZrYERbe168LYu9ZYh86IkscgVLE7tWPKmJv11CgoyJltMEbrohtVAQfO4ImltiHEroYEs7RxAarVpY8AwXMcMReFOTYWe5iiLRQxJ5Q8DtJ8LQhWOhIeFESPGsILhbNDRljNbHzNRlTFbk2S3L0NOS6V1KFJYKUbSTcIIhM0wQ/s2TM0SRMNcQmSap3jCH4yhJZKSkwyRHpYYgsFeQ4U7xoCB7VVOExhXepo9ABBsYbvGWKXPME3lyH95YioZ0gssQRWWbI+FaSMkXijZXwgiTlYdPdkNLaETxlyDVIwqeaEus0aTcYcg0RVOkpR3CSJqIddK+90JCxzsDVloyrFd5ZAr4TBKfaWa6boEA7C7s6EpYaeFPjveooY72mjIccLHJ9HUwVlDhKkmutJDJBwnp1rvulJZggKDRfbXAkvC/4l3ozQOG9a8lxjx0i7nV4jSXc7vhe3OwIxjgSHjdEhhsif9YkPGlus3iLFDnWOFhtCZbJg0UbQcIaR67JjthoCyMEZRwhiXWyxO5QxI6w5NhT4U1WsJvDO60J34fW9hwzwlKij6ZAW9ne4L0s8C6XeBMEkd/LQy1VucBRot6QMlbivaBhoBgjqGiCJNhsqVp/S2SsG6DIONCR0dXhvWbJ+MRRZJkkuEjgDXJjFQW6SSL7GXK8Z2CZg7cVsbWGoKmEpzQ5elpiy8Ryg7dMkLLUEauzeO86CuwlSOlgYLojZWeJ9xM3S1PWfEfKl5ISLQ0MEKR8YOB2QfCxJBjrKPCN4f9MkaSsqoVXJBmP7EpFZ9UQfOoOFwSzBN4MQ8LsGrymlipcJQhmy0GaQjPqCHaXRwuCZwRbqK2Fg9wlClZqYicrIgMdZfxTQ0c7TBIbrChxmuzoKG8XRaSrIhhiyNFJkrC7oIAWMEOQa5aBekPCRknCo4IKPrYkvCDI8aYmY7WFtprgekcJZ3oLIqssCSMtFbQTJKwXYy3BY5oCh2iKPCpJOE+zRdpYgi6O2KmOAgvVCYaU4ySRek1sgyFhJ403QFHiVEmJHwtybO1gs8Hr5+BETQX3War0qZngYGgtVZtoqd6vFSk/UwdZElYqyjrF4HXUeFspIi9IGKf4j92pKGAdCYMVsbcV3kRF0N+R8LUd5PCsIGWoxDtBkCI0nKofdJQxT+LtZflvuc8Q3CjwWkq8KwUpHzkK/NmSsclCL0nseQdj5FRH5CNHSgtLiW80Of5HU9Hhlsga9bnBq3fEVltKfO5IaSTmGjjc4J0otcP7QsJUSQM8pEj5/wCuUuC2DWz8AAAAAElFTkSuQmCC");
-}
diff --git a/public/js/lib/codemirror/theme/base16-dark.css b/public/js/lib/codemirror/theme/base16-dark.css
deleted file mode 100644
index a46abdb..0000000
--- a/public/js/lib/codemirror/theme/base16-dark.css
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-
-    Name:       Base16 Default Dark
-    Author:     Chris Kempson (http://chriskempson.com)
-
-    CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools)
-    Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
-
-*/
-
-.cm-s-base16-dark.CodeMirror {background: #151515; color: #e0e0e0;}
-.cm-s-base16-dark div.CodeMirror-selected {background: #303030 !important;}
-.cm-s-base16-dark .CodeMirror-gutters {background: #151515; border-right: 0px;}
-.cm-s-base16-dark .CodeMirror-guttermarker { color: #ac4142; }
-.cm-s-base16-dark .CodeMirror-guttermarker-subtle { color: #505050; }
-.cm-s-base16-dark .CodeMirror-linenumber {color: #505050;}
-.cm-s-base16-dark .CodeMirror-cursor {border-left: 1px solid #b0b0b0 !important;}
-
-.cm-s-base16-dark span.cm-comment {color: #8f5536;}
-.cm-s-base16-dark span.cm-atom {color: #aa759f;}
-.cm-s-base16-dark span.cm-number {color: #aa759f;}
-
-.cm-s-base16-dark span.cm-property, .cm-s-base16-dark span.cm-attribute {color: #90a959;}
-.cm-s-base16-dark span.cm-keyword {color: #ac4142;}
-.cm-s-base16-dark span.cm-string {color: #f4bf75;}
-
-.cm-s-base16-dark span.cm-variable {color: #90a959;}
-.cm-s-base16-dark span.cm-variable-2 {color: #6a9fb5;}
-.cm-s-base16-dark span.cm-def {color: #d28445;}
-.cm-s-base16-dark span.cm-bracket {color: #e0e0e0;}
-.cm-s-base16-dark span.cm-tag {color: #ac4142;}
-.cm-s-base16-dark span.cm-link {color: #aa759f;}
-.cm-s-base16-dark span.cm-error {background: #ac4142; color: #b0b0b0;}
-
-.cm-s-base16-dark .CodeMirror-activeline-background {background: #202020 !important;}
-.cm-s-base16-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
diff --git a/public/js/lib/codemirror/theme/base16-light.css b/public/js/lib/codemirror/theme/base16-light.css
deleted file mode 100644
index 12ff2eb..0000000
--- a/public/js/lib/codemirror/theme/base16-light.css
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-
-    Name:       Base16 Default Light
-    Author:     Chris Kempson (http://chriskempson.com)
-
-    CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools)
-    Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
-
-*/
-
-.cm-s-base16-light.CodeMirror {background: #f5f5f5; color: #202020;}
-.cm-s-base16-light div.CodeMirror-selected {background: #e0e0e0 !important;}
-.cm-s-base16-light .CodeMirror-gutters {background: #f5f5f5; border-right: 0px;}
-.cm-s-base16-light .CodeMirror-guttermarker { color: #ac4142; }
-.cm-s-base16-light .CodeMirror-guttermarker-subtle { color: #b0b0b0; }
-.cm-s-base16-light .CodeMirror-linenumber {color: #b0b0b0;}
-.cm-s-base16-light .CodeMirror-cursor {border-left: 1px solid #505050 !important;}
-
-.cm-s-base16-light span.cm-comment {color: #8f5536;}
-.cm-s-base16-light span.cm-atom {color: #aa759f;}
-.cm-s-base16-light span.cm-number {color: #aa759f;}
-
-.cm-s-base16-light span.cm-property, .cm-s-base16-light span.cm-attribute {color: #90a959;}
-.cm-s-base16-light span.cm-keyword {color: #ac4142;}
-.cm-s-base16-light span.cm-string {color: #f4bf75;}
-
-.cm-s-base16-light span.cm-variable {color: #90a959;}
-.cm-s-base16-light span.cm-variable-2 {color: #6a9fb5;}
-.cm-s-base16-light span.cm-def {color: #d28445;}
-.cm-s-base16-light span.cm-bracket {color: #202020;}
-.cm-s-base16-light span.cm-tag {color: #ac4142;}
-.cm-s-base16-light span.cm-link {color: #aa759f;}
-.cm-s-base16-light span.cm-error {background: #ac4142; color: #505050;}
-
-.cm-s-base16-light .CodeMirror-activeline-background {background: #DDDCDC !important;}
-.cm-s-base16-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
diff --git a/public/js/lib/codemirror/theme/blackboard.css b/public/js/lib/codemirror/theme/blackboard.css
deleted file mode 100644
index d7a2dc9..0000000
--- a/public/js/lib/codemirror/theme/blackboard.css
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Port of TextMate's Blackboard theme */
-
-.cm-s-blackboard.CodeMirror { background: #0C1021; color: #F8F8F8; }
-.cm-s-blackboard .CodeMirror-selected { background: #253B76 !important; }
-.cm-s-blackboard .CodeMirror-gutters { background: #0C1021; border-right: 0; }
-.cm-s-blackboard .CodeMirror-guttermarker { color: #FBDE2D; }
-.cm-s-blackboard .CodeMirror-guttermarker-subtle { color: #888; }
-.cm-s-blackboard .CodeMirror-linenumber { color: #888; }
-.cm-s-blackboard .CodeMirror-cursor { border-left: 1px solid #A7A7A7 !important; }
-
-.cm-s-blackboard .cm-keyword { color: #FBDE2D; }
-.cm-s-blackboard .cm-atom { color: #D8FA3C; }
-.cm-s-blackboard .cm-number { color: #D8FA3C; }
-.cm-s-blackboard .cm-def { color: #8DA6CE; }
-.cm-s-blackboard .cm-variable { color: #FF6400; }
-.cm-s-blackboard .cm-operator { color: #FBDE2D;}
-.cm-s-blackboard .cm-comment { color: #AEAEAE; }
-.cm-s-blackboard .cm-string { color: #61CE3C; }
-.cm-s-blackboard .cm-string-2 { color: #61CE3C; }
-.cm-s-blackboard .cm-meta { color: #D8FA3C; }
-.cm-s-blackboard .cm-builtin { color: #8DA6CE; }
-.cm-s-blackboard .cm-tag { color: #8DA6CE; }
-.cm-s-blackboard .cm-attribute { color: #8DA6CE; }
-.cm-s-blackboard .cm-header { color: #FF6400; }
-.cm-s-blackboard .cm-hr { color: #AEAEAE; }
-.cm-s-blackboard .cm-link { color: #8DA6CE; }
-.cm-s-blackboard .cm-error { background: #9D1E15; color: #F8F8F8; }
-
-.cm-s-blackboard .CodeMirror-activeline-background {background: #3C3636 !important;}
-.cm-s-blackboard .CodeMirror-matchingbracket {outline:1px solid grey;color:white !important}
\ No newline at end of file
diff --git a/public/js/lib/codemirror/theme/cobalt.css b/public/js/lib/codemirror/theme/cobalt.css
deleted file mode 100644
index 4744053..0000000
--- a/public/js/lib/codemirror/theme/cobalt.css
+++ /dev/null
@@ -1,23 +0,0 @@
-.cm-s-cobalt.CodeMirror { background: #002240; color: white; }
-.cm-s-cobalt div.CodeMirror-selected { background: #b36539 !important; }
-.cm-s-cobalt .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
-.cm-s-cobalt .CodeMirror-guttermarker { color: #ffee80; }
-.cm-s-cobalt .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
-.cm-s-cobalt .CodeMirror-linenumber { color: #d0d0d0; }
-.cm-s-cobalt .CodeMirror-cursor { border-left: 1px solid white !important; }
-
-.cm-s-cobalt span.cm-comment { color: #08f; }
-.cm-s-cobalt span.cm-atom { color: #845dc4; }
-.cm-s-cobalt span.cm-number, .cm-s-cobalt span.cm-attribute { color: #ff80e1; }
-.cm-s-cobalt span.cm-keyword { color: #ffee80; }
-.cm-s-cobalt span.cm-string { color: #3ad900; }
-.cm-s-cobalt span.cm-meta { color: #ff9d00; }
-.cm-s-cobalt span.cm-variable-2, .cm-s-cobalt span.cm-tag { color: #9effff; }
-.cm-s-cobalt span.cm-variable-3, .cm-s-cobalt span.cm-def { color: white; }
-.cm-s-cobalt span.cm-bracket { color: #d8d8d8; }
-.cm-s-cobalt span.cm-builtin, .cm-s-cobalt span.cm-special { color: #ff9e59; }
-.cm-s-cobalt span.cm-link { color: #845dc4; }
-.cm-s-cobalt span.cm-error { color: #9d1e15; }
-
-.cm-s-cobalt .CodeMirror-activeline-background {background: #002D57 !important;}
-.cm-s-cobalt .CodeMirror-matchingbracket {outline:1px solid grey;color:white !important}
diff --git a/public/js/lib/codemirror/theme/eclipse.css b/public/js/lib/codemirror/theme/eclipse.css
deleted file mode 100644
index 317218e..0000000
--- a/public/js/lib/codemirror/theme/eclipse.css
+++ /dev/null
@@ -1,23 +0,0 @@
-.cm-s-eclipse span.cm-meta {color: #FF1717;}
-.cm-s-eclipse span.cm-keyword { line-height: 1em; font-weight: bold; color: #7F0055; }
-.cm-s-eclipse span.cm-atom {color: #219;}
-.cm-s-eclipse span.cm-number {color: #164;}
-.cm-s-eclipse span.cm-def {color: #00f;}
-.cm-s-eclipse span.cm-variable {color: black;}
-.cm-s-eclipse span.cm-variable-2 {color: #0000C0;}
-.cm-s-eclipse span.cm-variable-3 {color: #0000C0;}
-.cm-s-eclipse span.cm-property {color: black;}
-.cm-s-eclipse span.cm-operator {color: black;}
-.cm-s-eclipse span.cm-comment {color: #3F7F5F;}
-.cm-s-eclipse span.cm-string {color: #2A00FF;}
-.cm-s-eclipse span.cm-string-2 {color: #f50;}
-.cm-s-eclipse span.cm-qualifier {color: #555;}
-.cm-s-eclipse span.cm-builtin {color: #30a;}
-.cm-s-eclipse span.cm-bracket {color: #cc7;}
-.cm-s-eclipse span.cm-tag {color: #170;}
-.cm-s-eclipse span.cm-attribute {color: #00c;}
-.cm-s-eclipse span.cm-link {color: #219;}
-.cm-s-eclipse span.cm-error {color: #f00;}
-
-.cm-s-eclipse .CodeMirror-activeline-background {background: #e8f2ff !important;}
-.cm-s-eclipse .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;}
diff --git a/public/js/lib/codemirror/theme/elegant.css b/public/js/lib/codemirror/theme/elegant.css
deleted file mode 100644
index dd7df7b..0000000
--- a/public/js/lib/codemirror/theme/elegant.css
+++ /dev/null
@@ -1,13 +0,0 @@
-.cm-s-elegant span.cm-number, .cm-s-elegant span.cm-string, .cm-s-elegant span.cm-atom {color: #762;}
-.cm-s-elegant span.cm-comment {color: #262; font-style: italic; line-height: 1em;}
-.cm-s-elegant span.cm-meta {color: #555; font-style: italic; line-height: 1em;}
-.cm-s-elegant span.cm-variable {color: black;}
-.cm-s-elegant span.cm-variable-2 {color: #b11;}
-.cm-s-elegant span.cm-qualifier {color: #555;}
-.cm-s-elegant span.cm-keyword {color: #730;}
-.cm-s-elegant span.cm-builtin {color: #30a;}
-.cm-s-elegant span.cm-link {color: #762;}
-.cm-s-elegant span.cm-error {background-color: #fdd;}
-
-.cm-s-elegant .CodeMirror-activeline-background {background: #e8f2ff !important;}
-.cm-s-elegant .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;}
diff --git a/public/js/lib/codemirror/theme/erlang-dark.css b/public/js/lib/codemirror/theme/erlang-dark.css
deleted file mode 100644
index ff47d7f..0000000
--- a/public/js/lib/codemirror/theme/erlang-dark.css
+++ /dev/null
@@ -1,32 +0,0 @@
-.cm-s-erlang-dark.CodeMirror { background: #002240; color: white; }
-.cm-s-erlang-dark div.CodeMirror-selected { background: #b36539 !important; }
-.cm-s-erlang-dark .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
-.cm-s-erlang-dark .CodeMirror-guttermarker { color: white; }
-.cm-s-erlang-dark .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
-.cm-s-erlang-dark .CodeMirror-linenumber { color: #d0d0d0; }
-.cm-s-erlang-dark .CodeMirror-cursor { border-left: 1px solid white !important; }
-
-.cm-s-erlang-dark span.cm-atom       { color: #f133f1; }
-.cm-s-erlang-dark span.cm-attribute  { color: #ff80e1; }
-.cm-s-erlang-dark span.cm-bracket    { color: #ff9d00; }
-.cm-s-erlang-dark span.cm-builtin    { color: #eaa; }
-.cm-s-erlang-dark span.cm-comment    { color: #77f; }
-.cm-s-erlang-dark span.cm-def        { color: #e7a; }
-.cm-s-erlang-dark span.cm-keyword    { color: #ffee80; }
-.cm-s-erlang-dark span.cm-meta       { color: #50fefe; }
-.cm-s-erlang-dark span.cm-number     { color: #ffd0d0; }
-.cm-s-erlang-dark span.cm-operator   { color: #d55; }
-.cm-s-erlang-dark span.cm-property   { color: #ccc; }
-.cm-s-erlang-dark span.cm-qualifier  { color: #ccc; }
-.cm-s-erlang-dark span.cm-quote      { color: #ccc; }
-.cm-s-erlang-dark span.cm-special    { color: #ffbbbb; }
-.cm-s-erlang-dark span.cm-string     { color: #3ad900; }
-.cm-s-erlang-dark span.cm-string-2   { color: #ccc; }
-.cm-s-erlang-dark span.cm-tag        { color: #9effff; }
-.cm-s-erlang-dark span.cm-variable   { color: #50fe50; }
-.cm-s-erlang-dark span.cm-variable-2 { color: #e0e; }
-.cm-s-erlang-dark span.cm-variable-3 { color: #ccc; }
-.cm-s-erlang-dark span.cm-error      { color: #9d1e15; }
-
-.cm-s-erlang-dark .CodeMirror-activeline-background {background: #013461 !important;}
-.cm-s-erlang-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}
diff --git a/public/js/lib/codemirror/theme/lesser-dark.css b/public/js/lib/codemirror/theme/lesser-dark.css
deleted file mode 100644
index a782474..0000000
--- a/public/js/lib/codemirror/theme/lesser-dark.css
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-http://lesscss.org/ dark theme
-Ported to CodeMirror by Peter Kroon
-*/
-.cm-s-lesser-dark {
-  line-height: 1.3em;
-}
-.cm-s-lesser-dark.CodeMirror { background: #262626; color: #EBEFE7; text-shadow: 0 -1px 1px #262626; }
-.cm-s-lesser-dark div.CodeMirror-selected {background: #45443B !important;} /* 33322B*/
-.cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white !important; }
-.cm-s-lesser-dark pre { padding: 0 8px; }/*editable code holder*/
-
-.cm-s-lesser-dark.CodeMirror span.CodeMirror-matchingbracket { color: #7EFC7E; }/*65FC65*/
-
-.cm-s-lesser-dark .CodeMirror-gutters { background: #262626; border-right:1px solid #aaa; }
-.cm-s-lesser-dark .CodeMirror-guttermarker { color: #599eff; }
-.cm-s-lesser-dark .CodeMirror-guttermarker-subtle { color: #777; }
-.cm-s-lesser-dark .CodeMirror-linenumber { color: #777; }
-
-.cm-s-lesser-dark span.cm-keyword { color: #599eff; }
-.cm-s-lesser-dark span.cm-atom { color: #C2B470; }
-.cm-s-lesser-dark span.cm-number { color: #B35E4D; }
-.cm-s-lesser-dark span.cm-def {color: white;}
-.cm-s-lesser-dark span.cm-variable { color:#D9BF8C; }
-.cm-s-lesser-dark span.cm-variable-2 { color: #669199; }
-.cm-s-lesser-dark span.cm-variable-3 { color: white; }
-.cm-s-lesser-dark span.cm-property {color: #92A75C;}
-.cm-s-lesser-dark span.cm-operator {color: #92A75C;}
-.cm-s-lesser-dark span.cm-comment { color: #666; }
-.cm-s-lesser-dark span.cm-string { color: #BCD279; }
-.cm-s-lesser-dark span.cm-string-2 {color: #f50;}
-.cm-s-lesser-dark span.cm-meta { color: #738C73; }
-.cm-s-lesser-dark span.cm-qualifier {color: #555;}
-.cm-s-lesser-dark span.cm-builtin { color: #ff9e59; }
-.cm-s-lesser-dark span.cm-bracket { color: #EBEFE7; }
-.cm-s-lesser-dark span.cm-tag { color: #669199; }
-.cm-s-lesser-dark span.cm-attribute {color: #00c;}
-.cm-s-lesser-dark span.cm-header {color: #a0a;}
-.cm-s-lesser-dark span.cm-quote {color: #090;}
-.cm-s-lesser-dark span.cm-hr {color: #999;}
-.cm-s-lesser-dark span.cm-link {color: #00c;}
-.cm-s-lesser-dark span.cm-error { color: #9d1e15; }
-
-.cm-s-lesser-dark .CodeMirror-activeline-background {background: #3C3A3A !important;}
-.cm-s-lesser-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}
diff --git a/public/js/lib/codemirror/theme/mbo.css b/public/js/lib/codemirror/theme/mbo.css
deleted file mode 100644
index 0ad6360..0000000
--- a/public/js/lib/codemirror/theme/mbo.css
+++ /dev/null
@@ -1,35 +0,0 @@
-/****************************************************************/
-/*   Based on mbonaci's Brackets mbo theme                      */
-/*   https://github.com/mbonaci/global/blob/master/Mbo.tmTheme  */
-/*   Create your own: http://tmtheme-editor.herokuapp.com       */
-/****************************************************************/
-
-.cm-s-mbo.CodeMirror {background: #2c2c2c; color: #ffffec;}
-.cm-s-mbo div.CodeMirror-selected {background: #716C62 !important;}
-.cm-s-mbo .CodeMirror-gutters {background: #4e4e4e; border-right: 0px;}
-.cm-s-mbo .CodeMirror-guttermarker { color: white; }
-.cm-s-mbo .CodeMirror-guttermarker-subtle { color: grey; }
-.cm-s-mbo .CodeMirror-linenumber {color: #dadada;}
-.cm-s-mbo .CodeMirror-cursor {border-left: 1px solid #ffffec !important;}
-
-.cm-s-mbo span.cm-comment {color: #95958a;}
-.cm-s-mbo span.cm-atom {color: #00a8c6;}
-.cm-s-mbo span.cm-number {color: #00a8c6;}
-
-.cm-s-mbo span.cm-property, .cm-s-mbo span.cm-attribute {color: #9ddfe9;}
-.cm-s-mbo span.cm-keyword {color: #ffb928;}
-.cm-s-mbo span.cm-string {color: #ffcf6c;}
-.cm-s-mbo span.cm-string.cm-property {color: #ffffec;}
-
-.cm-s-mbo span.cm-variable {color: #ffffec;}
-.cm-s-mbo span.cm-variable-2 {color: #00a8c6;}
-.cm-s-mbo span.cm-def {color: #ffffec;}
-.cm-s-mbo span.cm-bracket {color: #fffffc; font-weight: bold;}
-.cm-s-mbo span.cm-tag {color: #9ddfe9;}
-.cm-s-mbo span.cm-link {color: #f54b07;}
-.cm-s-mbo span.cm-error {border-bottom: #636363; color: #ffffec;}
-.cm-s-mbo span.cm-qualifier {color: #ffffec;}
-
-.cm-s-mbo .CodeMirror-activeline-background {background: #494b41 !important;}
-.cm-s-mbo .CodeMirror-matchingbracket {color: #222 !important;}
-.cm-s-mbo .CodeMirror-matchingtag {background: rgba(255, 255, 255, .37);}
diff --git a/public/js/lib/codemirror/theme/mdn-like.css b/public/js/lib/codemirror/theme/mdn-like.css
deleted file mode 100644
index 81b2177..0000000
--- a/public/js/lib/codemirror/theme/mdn-like.css
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-  MDN-LIKE Theme - Mozilla
-  Ported to CodeMirror by Peter Kroon <plakroon@gmail.com>
-  Report bugs/issues here: https://github.com/codemirror/CodeMirror/issues
-  GitHub: @peterkroon
-
-  The mdn-like theme is inspired on the displayed code examples at: https://developer.mozilla.org/en-US/docs/Web/CSS/animation
-
-*/
-.cm-s-mdn-like.CodeMirror { color: #999; background-color: #fff; }
-.cm-s-mdn-like .CodeMirror-selected { background: #cfc !important; }
-
-.cm-s-mdn-like .CodeMirror-gutters { background: #f8f8f8; border-left: 6px solid rgba(0,83,159,0.65); color: #333; }
-.cm-s-mdn-like .CodeMirror-linenumber { color: #aaa; margin-left: 3px; }
-div.cm-s-mdn-like .CodeMirror-cursor { border-left: 2px solid #222; }
-
-.cm-s-mdn-like .cm-keyword {  color: #6262FF; }
-.cm-s-mdn-like .cm-atom { color: #F90; }
-.cm-s-mdn-like .cm-number { color:  #ca7841; }
-.cm-s-mdn-like .cm-def { color: #8DA6CE; }
-.cm-s-mdn-like span.cm-variable-2, .cm-s-mdn-like span.cm-tag { color: #690; }
-.cm-s-mdn-like span.cm-variable-3, .cm-s-mdn-like span.cm-def { color: #07a; }
-
-.cm-s-mdn-like .cm-variable { color: #07a; }
-.cm-s-mdn-like .cm-property { color: #905; }
-.cm-s-mdn-like .cm-qualifier { color: #690; }
-
-.cm-s-mdn-like .cm-operator { color: #cda869; }
-.cm-s-mdn-like .cm-comment { color:#777; font-weight:normal; }
-.cm-s-mdn-like .cm-string { color:#07a; font-style:italic; }
-.cm-s-mdn-like .cm-string-2 { color:#bd6b18; } /*?*/
-.cm-s-mdn-like .cm-meta { color: #000; } /*?*/
-.cm-s-mdn-like .cm-builtin { color: #9B7536; } /*?*/
-.cm-s-mdn-like .cm-tag { color: #997643; }
-.cm-s-mdn-like .cm-attribute { color: #d6bb6d; } /*?*/
-.cm-s-mdn-like .cm-header { color: #FF6400; }
-.cm-s-mdn-like .cm-hr { color: #AEAEAE; }
-.cm-s-mdn-like .cm-link {   color:#ad9361; font-style:italic; text-decoration:none; }
-.cm-s-mdn-like .cm-error { border-bottom: 1px solid red; }
-
-div.cm-s-mdn-like .CodeMirror-activeline-background {background: #efefff;}
-div.cm-s-mdn-like span.CodeMirror-matchingbracket {outline:1px solid grey; color: inherit;}
-
-.cm-s-mdn-like.CodeMirror { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFcAAAAyCAYAAAAp8UeFAAAHvklEQVR42s2b63bcNgyEQZCSHCdt2vd/0tWF7I+Q6XgMXiTtuvU5Pl57ZQKkKHzEAOtF5KeIJBGJ8uvL599FRFREZhFx8DeXv8trn68RuGaC8TRfo3SNp9dlDDHedyLyTUTeRWStXKPZrjtpZxaRw5hPqozRs1N8/enzIiQRWcCgy4MUA0f+XWliDhyL8Lfyvx7ei/Ae3iQFHyw7U/59pQVIMEEPEz0G7XiwdRjzSfC3UTtz9vchIntxvry5iMgfIhJoEflOz2CQr3F5h/HfeFe+GTdLaKcu9L8LTeQb/R/7GgbsfKedyNdoHsN31uRPWrfZ5wsj/NzzRQHuToIdU3ahwnsKPxXCjJITuOsi7XLc7SG/v5GdALs7wf8JjTFiB5+QvTEfRyGOfX3Lrx8wxyQi3sNq46O7QahQiCsRFgqddjBouVEHOKDgXAQHD9gJCr5sMKkEdjwsarG/ww3BMHBU7OBjXnzdyY7SfCxf5/z6ATccrwlKuwC/jhznnPF4CgVzhhVf4xp2EixcBActO75iZ8/fM9zAs2OMzKdslgXWJ9XG8PQoOAMA5fGcsvORgv0doBXyHrCwfLJAOwo71QLNkb8n2Pl6EWiR7OCibtkPaz4Kc/0NNAze2gju3zOwekALDaCFPI5vjPFmgGY5AZqyGEvH1x7QfIb8YtxMnA/b+QQ0aQDAwc6JMFg8CbQZ4qoYEEHbRwNojuK3EHwd7VALSgq+MNDKzfT58T8qdpADrgW0GmgcAS1lhzztJmkAzcPNOQbsWEALBDSlMKUG0Eq4CLAQWvEVQ9WU57gZJwZtgPO3r9oBTQ9WO8TjqXINx8R0EYpiZEUWOF3FxkbJkgU9B2f41YBrIj5ZfsQa0M5kTgiAAqM3ShXLgu8XMqcrQBvJ0CL5pnTsfMB13oB8athpAq2XOQmcGmoACCLydx7nToa23ATaSIY2ichfOdPTGxlasXMLaL0MLZAOwAKIM+y8CmicobGdCcbbK9DzN+yYGVoNNI5iUKTMyYOjPse4A8SM1MmcXgU0toOq1yO/v8FOxlASyc7TgeYaAMBJHcY1CcCwGI/TK4AmDbDyKYBBtFUkRwto8gygiQEaByFgJ00BH2M8JWwQS1nafDXQCidWyOI8AcjDCSjCLk8ngObuAm3JAHAdubAmOaK06V8MNEsKPJOhobSprwQa6gD7DclRQdqcwL4zxqgBrQcabUiBLclRDKAlWp+etPkBaNMA0AKlrHwTdEByZAA4GM+SNluSY6wAzcMNewxmgig5Ks0nkrSpBvSaQHMdKTBAnLojOdYyGpQ254602ZILPdTD1hdlggdIm74jbTp8vDwF5ZYUeLWGJpWsh6XNyXgcYwVoJQTEhhTYkxzZjiU5npU2TaB979TQehlaAVq4kaGpiPwwwLkYUuBbQwocyQTv1tA0+1UFWoJF3iv1oq+qoSk8EQdJmwHkziIF7oOZk14EGitibAdjLYYK78H5vZOhtWpoI0ATGHs0Q8OMb4Ey+2bU2UYztCtA0wFAs7TplGLRVQCcqaFdGSPCeTI1QNIC52iWNzof6Uib7xjEp07mNNoUYmVosVItHrHzRlLgBn9LFyRHaQCtVUMbtTNhoXWiTOO9k/V8BdAc1Oq0ArSQs6/5SU0hckNy9NnXqQY0PGYo5dWJ7nINaN6o958FWin27aBaWRka1r5myvLOAm0j30eBJqCxHLReVclxhxOEN2JfDWjxBtAC7MIH1fVaGdoOp4qJYDgKtKPSFNID2gSnGldrCqkFZ+5UeQXQBIRrSwocbdZYQT/2LwRahBPBXoHrB8nxaGROST62DKUbQOMMzZIC9abkuELfQzQALWTnDNAm8KHWFOJgJ5+SHIvTPcmx1xQyZRhNL5Qci689aXMEaN/uNIWkEwDAvFpOZmgsBaaGnbs1NPa1Jm32gBZAIh1pCtG7TSH4aE0y1uVY4uqoFPisGlpP2rSA5qTecWn5agK6BzSpgAyD+wFaqhnYoSZ1Vwr8CmlTQbrcO3ZaX0NAEyMbYaAlyquFoLKK3SPby9CeVUPThrSJmkCAE0CrKUQadi4DrdSlWhmah0YL9z9vClH59YGbHx1J8VZTyAjQepJjmXwAKTDQI3omc3p1U4gDUf6RfcdYfrUp5ClAi2J3Ba6UOXGo+K+bQrjjssitG2SJzshaLwMtXgRagUNpYYoVkMSBLM+9GGiJZMvduG6DRZ4qc04DMPtQQxOjEtACmhO7K1AbNbQDEggZyJwscFpAGwENhoBeUwh3bWolhe8BTYVKxQEWrSUn/uhcM5KhvUu/+eQu0Lzhi+VrK0PrZZNDQKs9cpYUuFYgMVpD4/NxenJTiMCNqdUEUf1qZWjppLT5qSkkUZbCwkbZMSuVnu80hfSkzRbQeqCZSAh6huR4VtoM2gHAlLf72smuWgE+VV7XpE25Ab2WFDgyhnSuKbs4GuGzCjR+tIoUuMFg3kgcWKLTwRqanJQ2W00hAsenfaApRC42hbCvK1SlE0HtE9BGgneJO+ELamitD1YjjOYnNYVcraGhtKkW0EqVVeDx733I2NH581k1NNxNLG0i0IJ8/NjVaOZ0tYZ2Vtr0Xv7tPV3hkWp9EFkgS/J0vosngTaSoaG06WHi+xObQkaAdlbanP8B2+2l0f90LmUAAAAASUVORK5CYII=); }
diff --git a/public/js/lib/codemirror/theme/midnight.css b/public/js/lib/codemirror/theme/midnight.css
deleted file mode 100644
index 4567d29..0000000
--- a/public/js/lib/codemirror/theme/midnight.css
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Based on the theme at http://bonsaiden.github.com/JavaScript-Garden */
-
-/*<!--match-->*/
-.cm-s-midnight span.CodeMirror-matchhighlight { background: #494949; }
-.cm-s-midnight.CodeMirror-focused span.CodeMirror-matchhighlight { background: #314D67 !important; }
-
-/*<!--activeline-->*/
-.cm-s-midnight .CodeMirror-activeline-background {background: #253540 !important;}
-
-.cm-s-midnight.CodeMirror {
-    background: #0F192A;
-    color: #D1EDFF;
-}
-
-.cm-s-midnight.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
-
-.cm-s-midnight div.CodeMirror-selected {background: #314D67 !important;}
-.cm-s-midnight .CodeMirror-gutters {background: #0F192A; border-right: 1px solid;}
-.cm-s-midnight .CodeMirror-guttermarker { color: white; }
-.cm-s-midnight .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
-.cm-s-midnight .CodeMirror-linenumber {color: #D0D0D0;}
-.cm-s-midnight .CodeMirror-cursor {
-    border-left: 1px solid #F8F8F0 !important;
-}
-
-.cm-s-midnight span.cm-comment {color: #428BDD;}
-.cm-s-midnight span.cm-atom {color: #AE81FF;}
-.cm-s-midnight span.cm-number {color: #D1EDFF;}
-
-.cm-s-midnight span.cm-property, .cm-s-midnight span.cm-attribute {color: #A6E22E;}
-.cm-s-midnight span.cm-keyword {color: #E83737;}
-.cm-s-midnight span.cm-string {color: #1DC116;}
-
-.cm-s-midnight span.cm-variable {color: #FFAA3E;}
-.cm-s-midnight span.cm-variable-2 {color: #FFAA3E;}
-.cm-s-midnight span.cm-def {color: #4DD;}
-.cm-s-midnight span.cm-bracket {color: #D1EDFF;}
-.cm-s-midnight span.cm-tag {color: #449;}
-.cm-s-midnight span.cm-link {color: #AE81FF;}
-.cm-s-midnight span.cm-error {background: #F92672; color: #F8F8F0;}
-
-.cm-s-midnight .CodeMirror-matchingbracket {
-  text-decoration: underline;
-  color: white !important;
-}
diff --git a/public/js/lib/codemirror/theme/monokai.css b/public/js/lib/codemirror/theme/monokai.css
deleted file mode 100644
index 8ac80e7..0000000
--- a/public/js/lib/codemirror/theme/monokai.css
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Based on Sublime Text's Monokai theme */
-
-.cm-s-monokai.CodeMirror {background: #272822; color: #f8f8f2; height: auto;}
-.cm-s-monokai div.CodeMirror-selected {background: #49483E !important;}
-.cm-s-monokai .CodeMirror-gutters {background: #272822; border-right: 0px;}
-.cm-s-monokai .CodeMirror-guttermarker { color: white; }
-.cm-s-monokai .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
-.cm-s-monokai .CodeMirror-linenumber {color: #d0d0d0;}
-.cm-s-monokai .CodeMirror-cursor {border-left: 1px solid #f8f8f0 !important;}
-
-.cm-s-monokai span.cm-comment {color: #75715e;}
-.cm-s-monokai span.cm-atom {color: #ae81ff;}
-.cm-s-monokai span.cm-number {color: #ae81ff;}
-
-.cm-s-monokai span.cm-property, .cm-s-monokai span.cm-attribute {color: #a6e22e;}
-.cm-s-monokai span.cm-keyword {color: #f92672;}
-.cm-s-monokai span.cm-string {color: #e6db74;}
-
-.cm-s-monokai span.cm-variable {color: #a6e22e;}
-.cm-s-monokai span.cm-variable-2 {color: #9effff;}
-.cm-s-monokai span.cm-def {color: #fd971f;}
-.cm-s-monokai span.cm-bracket {color: #f8f8f2;}
-.cm-s-monokai span.cm-tag {color: #f92672;}
-.cm-s-monokai span.cm-link {color: #ae81ff;}
-.cm-s-monokai span.cm-error {background: #f92672; color: #f8f8f0;}
-
-.cm-s-monokai .CodeMirror-activeline-background {background: #373831 !important;}
-.cm-s-monokai .CodeMirror-matchingbracket {
-  text-decoration: underline;
-  color: white !important;
-}
diff --git a/public/js/lib/codemirror/theme/neat.css b/public/js/lib/codemirror/theme/neat.css
deleted file mode 100644
index 115083b..0000000
--- a/public/js/lib/codemirror/theme/neat.css
+++ /dev/null
@@ -1,12 +0,0 @@
-.cm-s-neat span.cm-comment { color: #a86; }
-.cm-s-neat span.cm-keyword { line-height: 1em; font-weight: bold; color: blue; }
-.cm-s-neat span.cm-string { color: #a22; }
-.cm-s-neat span.cm-builtin { line-height: 1em; font-weight: bold; color: #077; }
-.cm-s-neat span.cm-special { line-height: 1em; font-weight: bold; color: #0aa; }
-.cm-s-neat span.cm-variable { color: black; }
-.cm-s-neat span.cm-number, .cm-s-neat span.cm-atom { color: #3a3; }
-.cm-s-neat span.cm-meta {color: #555;}
-.cm-s-neat span.cm-link { color: #3a3; }
-
-.cm-s-neat .CodeMirror-activeline-background {background: #e8f2ff !important;}
-.cm-s-neat .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;}
diff --git a/public/js/lib/codemirror/theme/neo.css b/public/js/lib/codemirror/theme/neo.css
deleted file mode 100644
index cecaaf2..0000000
--- a/public/js/lib/codemirror/theme/neo.css
+++ /dev/null
@@ -1,43 +0,0 @@
-/* neo theme for codemirror */
-
-/* Color scheme */
-
-.cm-s-neo.CodeMirror {
-  background-color:#ffffff;
-  color:#2e383c;
-  line-height:1.4375;
-}
-.cm-s-neo .cm-comment {color:#75787b}
-.cm-s-neo .cm-keyword, .cm-s-neo .cm-property {color:#1d75b3}
-.cm-s-neo .cm-atom,.cm-s-neo .cm-number {color:#75438a}
-.cm-s-neo .cm-node,.cm-s-neo .cm-tag {color:#9c3328}
-.cm-s-neo .cm-string {color:#b35e14}
-.cm-s-neo .cm-variable,.cm-s-neo .cm-qualifier {color:#047d65}
-
-
-/* Editor styling */
-
-.cm-s-neo pre {
-  padding:0;
-}
-
-.cm-s-neo .CodeMirror-gutters {
-  border:none;
-  border-right:10px solid transparent;
-  background-color:transparent;
-}
-
-.cm-s-neo .CodeMirror-linenumber {
-  padding:0;
-  color:#e0e2e5;
-}
-
-.cm-s-neo .CodeMirror-guttermarker { color: #1d75b3; }
-.cm-s-neo .CodeMirror-guttermarker-subtle { color: #e0e2e5; }
-
-.cm-s-neo div.CodeMirror-cursor {
-  width: auto;
-  border: 0;
-  background: rgba(155,157,162,0.37);
-  z-index: 1;
-}
diff --git a/public/js/lib/codemirror/theme/night.css b/public/js/lib/codemirror/theme/night.css
deleted file mode 100644
index a0bf8cf..0000000
--- a/public/js/lib/codemirror/theme/night.css
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Loosely based on the Midnight Textmate theme */
-
-.cm-s-night.CodeMirror { background: #0a001f; color: #f8f8f8; }
-.cm-s-night div.CodeMirror-selected { background: #447 !important; }
-.cm-s-night .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
-.cm-s-night .CodeMirror-guttermarker { color: white; }
-.cm-s-night .CodeMirror-guttermarker-subtle { color: #bbb; }
-.cm-s-night .CodeMirror-linenumber { color: #f8f8f8; }
-.cm-s-night .CodeMirror-cursor { border-left: 1px solid white !important; }
-
-.cm-s-night span.cm-comment { color: #6900a1; }
-.cm-s-night span.cm-atom { color: #845dc4; }
-.cm-s-night span.cm-number, .cm-s-night span.cm-attribute { color: #ffd500; }
-.cm-s-night span.cm-keyword { color: #599eff; }
-.cm-s-night span.cm-string { color: #37f14a; }
-.cm-s-night span.cm-meta { color: #7678e2; }
-.cm-s-night span.cm-variable-2, .cm-s-night span.cm-tag { color: #99b2ff; }
-.cm-s-night span.cm-variable-3, .cm-s-night span.cm-def { color: white; }
-.cm-s-night span.cm-bracket { color: #8da6ce; }
-.cm-s-night span.cm-comment { color: #6900a1; }
-.cm-s-night span.cm-builtin, .cm-s-night span.cm-special { color: #ff9e59; }
-.cm-s-night span.cm-link { color: #845dc4; }
-.cm-s-night span.cm-error { color: #9d1e15; }
-
-.cm-s-night .CodeMirror-activeline-background {background: #1C005A !important;}
-.cm-s-night .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}
diff --git a/public/js/lib/codemirror/theme/paraiso-dark.css b/public/js/lib/codemirror/theme/paraiso-dark.css
deleted file mode 100644
index 53dcdf7..0000000
--- a/public/js/lib/codemirror/theme/paraiso-dark.css
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-
-    Name:       Paraíso (Dark)
-    Author:     Jan T. Sott
-
-    Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror)
-    Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
-
-*/
-
-.cm-s-paraiso-dark.CodeMirror {background: #2f1e2e; color: #b9b6b0;}
-.cm-s-paraiso-dark div.CodeMirror-selected {background: #41323f !important;}
-.cm-s-paraiso-dark .CodeMirror-gutters {background: #2f1e2e; border-right: 0px;}
-.cm-s-paraiso-dark .CodeMirror-guttermarker { color: #ef6155; }
-.cm-s-paraiso-dark .CodeMirror-guttermarker-subtle { color: #776e71; }
-.cm-s-paraiso-dark .CodeMirror-linenumber {color: #776e71;}
-.cm-s-paraiso-dark .CodeMirror-cursor {border-left: 1px solid #8d8687 !important;}
-
-.cm-s-paraiso-dark span.cm-comment {color: #e96ba8;}
-.cm-s-paraiso-dark span.cm-atom {color: #815ba4;}
-.cm-s-paraiso-dark span.cm-number {color: #815ba4;}
-
-.cm-s-paraiso-dark span.cm-property, .cm-s-paraiso-dark span.cm-attribute {color: #48b685;}
-.cm-s-paraiso-dark span.cm-keyword {color: #ef6155;}
-.cm-s-paraiso-dark span.cm-string {color: #fec418;}
-
-.cm-s-paraiso-dark span.cm-variable {color: #48b685;}
-.cm-s-paraiso-dark span.cm-variable-2 {color: #06b6ef;}
-.cm-s-paraiso-dark span.cm-def {color: #f99b15;}
-.cm-s-paraiso-dark span.cm-bracket {color: #b9b6b0;}
-.cm-s-paraiso-dark span.cm-tag {color: #ef6155;}
-.cm-s-paraiso-dark span.cm-link {color: #815ba4;}
-.cm-s-paraiso-dark span.cm-error {background: #ef6155; color: #8d8687;}
-
-.cm-s-paraiso-dark .CodeMirror-activeline-background {background: #4D344A !important;}
-.cm-s-paraiso-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
diff --git a/public/js/lib/codemirror/theme/paraiso-light.css b/public/js/lib/codemirror/theme/paraiso-light.css
deleted file mode 100644
index 07ca325..0000000
--- a/public/js/lib/codemirror/theme/paraiso-light.css
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-
-    Name:       Paraíso (Light)
-    Author:     Jan T. Sott
-
-    Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror)
-    Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
-
-*/
-
-.cm-s-paraiso-light.CodeMirror {background: #e7e9db; color: #41323f;}
-.cm-s-paraiso-light div.CodeMirror-selected {background: #b9b6b0 !important;}
-.cm-s-paraiso-light .CodeMirror-gutters {background: #e7e9db; border-right: 0px;}
-.cm-s-paraiso-light .CodeMirror-guttermarker { color: black; }
-.cm-s-paraiso-light .CodeMirror-guttermarker-subtle { color: #8d8687; }
-.cm-s-paraiso-light .CodeMirror-linenumber {color: #8d8687;}
-.cm-s-paraiso-light .CodeMirror-cursor {border-left: 1px solid #776e71 !important;}
-
-.cm-s-paraiso-light span.cm-comment {color: #e96ba8;}
-.cm-s-paraiso-light span.cm-atom {color: #815ba4;}
-.cm-s-paraiso-light span.cm-number {color: #815ba4;}
-
-.cm-s-paraiso-light span.cm-property, .cm-s-paraiso-light span.cm-attribute {color: #48b685;}
-.cm-s-paraiso-light span.cm-keyword {color: #ef6155;}
-.cm-s-paraiso-light span.cm-string {color: #fec418;}
-
-.cm-s-paraiso-light span.cm-variable {color: #48b685;}
-.cm-s-paraiso-light span.cm-variable-2 {color: #06b6ef;}
-.cm-s-paraiso-light span.cm-def {color: #f99b15;}
-.cm-s-paraiso-light span.cm-bracket {color: #41323f;}
-.cm-s-paraiso-light span.cm-tag {color: #ef6155;}
-.cm-s-paraiso-light span.cm-link {color: #815ba4;}
-.cm-s-paraiso-light span.cm-error {background: #ef6155; color: #776e71;}
-
-.cm-s-paraiso-light .CodeMirror-activeline-background {background: #CFD1C4 !important;}
-.cm-s-paraiso-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
diff --git a/public/js/lib/codemirror/theme/pastel-on-dark.css b/public/js/lib/codemirror/theme/pastel-on-dark.css
deleted file mode 100644
index 7992ac7..0000000
--- a/public/js/lib/codemirror/theme/pastel-on-dark.css
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Pastel On Dark theme ported from ACE editor
- * @license MIT
- * @copyright AtomicPages LLC 2014
- * @author Dennis Thompson, AtomicPages LLC
- * @version 1.1
- * @source https://github.com/atomicpages/codemirror-pastel-on-dark-theme
- */
-
-.cm-s-pastel-on-dark.CodeMirror {
-	background: #2c2827;
-	color: #8F938F;
-	line-height: 1.5;
-	font-size: 14px;
-}
-.cm-s-pastel-on-dark div.CodeMirror-selected { background: rgba(221,240,255,0.2) !important; }
-.cm-s-pastel-on-dark .CodeMirror-gutters {
-	background: #34302f;
-	border-right: 0px;
-	padding: 0 3px;
-}
-.cm-s-pastel-on-dark .CodeMirror-guttermarker { color: white; }
-.cm-s-pastel-on-dark .CodeMirror-guttermarker-subtle { color: #8F938F; }
-.cm-s-pastel-on-dark .CodeMirror-linenumber { color: #8F938F; }
-.cm-s-pastel-on-dark .CodeMirror-cursor { border-left: 1px solid #A7A7A7 !important; }
-.cm-s-pastel-on-dark span.cm-comment { color: #A6C6FF; }
-.cm-s-pastel-on-dark span.cm-atom { color: #DE8E30; }
-.cm-s-pastel-on-dark span.cm-number { color: #CCCCCC; }
-.cm-s-pastel-on-dark span.cm-property { color: #8F938F; }
-.cm-s-pastel-on-dark span.cm-attribute { color: #a6e22e; }
-.cm-s-pastel-on-dark span.cm-keyword { color: #AEB2F8; }
-.cm-s-pastel-on-dark span.cm-string { color: #66A968; }
-.cm-s-pastel-on-dark span.cm-variable { color: #AEB2F8; }
-.cm-s-pastel-on-dark span.cm-variable-2 { color: #BEBF55; }
-.cm-s-pastel-on-dark span.cm-variable-3 { color: #DE8E30; }
-.cm-s-pastel-on-dark span.cm-def { color: #757aD8; }
-.cm-s-pastel-on-dark span.cm-bracket { color: #f8f8f2; }
-.cm-s-pastel-on-dark span.cm-tag { color: #C1C144; }
-.cm-s-pastel-on-dark span.cm-link { color: #ae81ff; }
-.cm-s-pastel-on-dark span.cm-qualifier,.cm-s-pastel-on-dark span.cm-builtin { color: #C1C144; }
-.cm-s-pastel-on-dark span.cm-error {
-	background: #757aD8;
-	color: #f8f8f0;
-}
-.cm-s-pastel-on-dark .CodeMirror-activeline-background { background: rgba(255, 255, 255, 0.031) !important; }
-.cm-s-pastel-on-dark .CodeMirror-matchingbracket {
-	border: 1px solid rgba(255,255,255,0.25);
-	color: #8F938F !important;
-	margin: -1px -1px 0 -1px;
-}
diff --git a/public/js/lib/codemirror/theme/rubyblue.css b/public/js/lib/codemirror/theme/rubyblue.css
deleted file mode 100644
index 5349838..0000000
--- a/public/js/lib/codemirror/theme/rubyblue.css
+++ /dev/null
@@ -1,23 +0,0 @@
-.cm-s-rubyblue.CodeMirror { background: #112435; color: white; }
-.cm-s-rubyblue div.CodeMirror-selected { background: #38566F !important; }
-.cm-s-rubyblue .CodeMirror-gutters { background: #1F4661; border-right: 7px solid #3E7087; }
-.cm-s-rubyblue .CodeMirror-guttermarker { color: white; }
-.cm-s-rubyblue .CodeMirror-guttermarker-subtle { color: #3E7087; }
-.cm-s-rubyblue .CodeMirror-linenumber { color: white; }
-.cm-s-rubyblue .CodeMirror-cursor { border-left: 1px solid white !important; }
-
-.cm-s-rubyblue span.cm-comment { color: #999; font-style:italic; line-height: 1em; }
-.cm-s-rubyblue span.cm-atom { color: #F4C20B; }
-.cm-s-rubyblue span.cm-number, .cm-s-rubyblue span.cm-attribute { color: #82C6E0; }
-.cm-s-rubyblue span.cm-keyword { color: #F0F; }
-.cm-s-rubyblue span.cm-string { color: #F08047; }
-.cm-s-rubyblue span.cm-meta { color: #F0F; }
-.cm-s-rubyblue span.cm-variable-2, .cm-s-rubyblue span.cm-tag { color: #7BD827; }
-.cm-s-rubyblue span.cm-variable-3, .cm-s-rubyblue span.cm-def { color: white; }
-.cm-s-rubyblue span.cm-bracket { color: #F0F; }
-.cm-s-rubyblue span.cm-link { color: #F4C20B; }
-.cm-s-rubyblue span.CodeMirror-matchingbracket { color:#F0F !important; }
-.cm-s-rubyblue span.cm-builtin, .cm-s-rubyblue span.cm-special { color: #FF9D00; }
-.cm-s-rubyblue span.cm-error { color: #AF2018; }
-
-.cm-s-rubyblue .CodeMirror-activeline-background {background: #173047 !important;}
diff --git a/public/js/lib/codemirror/theme/solarized.css b/public/js/lib/codemirror/theme/solarized.css
deleted file mode 100644
index 07ef406..0000000
--- a/public/js/lib/codemirror/theme/solarized.css
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
-Solarized theme for code-mirror
-http://ethanschoonover.com/solarized
-*/
-
-/*
-Solarized color pallet
-http://ethanschoonover.com/solarized/img/solarized-palette.png
-*/
-
-.solarized.base03 { color: #002b36; }
-.solarized.base02 { color: #073642; }
-.solarized.base01 { color: #586e75; }
-.solarized.base00 { color: #657b83; }
-.solarized.base0 { color: #839496; }
-.solarized.base1 { color: #93a1a1; }
-.solarized.base2 { color: #eee8d5; }
-.solarized.base3  { color: #fdf6e3; }
-.solarized.solar-yellow  { color: #b58900; }
-.solarized.solar-orange  { color: #cb4b16; }
-.solarized.solar-red { color: #dc322f; }
-.solarized.solar-magenta { color: #d33682; }
-.solarized.solar-violet  { color: #6c71c4; }
-.solarized.solar-blue { color: #268bd2; }
-.solarized.solar-cyan { color: #2aa198; }
-.solarized.solar-green { color: #859900; }
-
-/* Color scheme for code-mirror */
-
-.cm-s-solarized {
-  line-height: 1.45em;
-  color-profile: sRGB;
-  rendering-intent: auto;
-}
-.cm-s-solarized.cm-s-dark {
-  color: #839496;
-  background-color:  #002b36;
-  text-shadow: #002b36 0 1px;
-}
-.cm-s-solarized.cm-s-light {
-  background-color: #fdf6e3;
-  color: #657b83;
-  text-shadow: #eee8d5 0 1px;
-}
-
-.cm-s-solarized .CodeMirror-widget {
-  text-shadow: none;
-}
-
-
-.cm-s-solarized .cm-keyword { color: #cb4b16 }
-.cm-s-solarized .cm-atom { color: #d33682; }
-.cm-s-solarized .cm-number { color: #d33682; }
-.cm-s-solarized .cm-def { color: #2aa198; }
-
-.cm-s-solarized .cm-variable { color: #268bd2; }
-.cm-s-solarized .cm-variable-2 { color: #b58900; }
-.cm-s-solarized .cm-variable-3 { color: #6c71c4; }
-
-.cm-s-solarized .cm-property { color: #2aa198; }
-.cm-s-solarized .cm-operator {color: #6c71c4;}
-
-.cm-s-solarized .cm-comment { color: #586e75; font-style:italic; }
-
-.cm-s-solarized .cm-string { color: #859900; }
-.cm-s-solarized .cm-string-2 { color: #b58900; }
-
-.cm-s-solarized .cm-meta { color: #859900; }
-.cm-s-solarized .cm-qualifier { color: #b58900; }
-.cm-s-solarized .cm-builtin { color: #d33682; }
-.cm-s-solarized .cm-bracket { color: #cb4b16; }
-.cm-s-solarized .CodeMirror-matchingbracket { color: #859900; }
-.cm-s-solarized .CodeMirror-nonmatchingbracket { color: #dc322f; }
-.cm-s-solarized .cm-tag { color: #93a1a1 }
-.cm-s-solarized .cm-attribute {  color: #2aa198; }
-.cm-s-solarized .cm-header { color: #586e75; }
-.cm-s-solarized .cm-quote { color: #93a1a1; }
-.cm-s-solarized .cm-hr {
-  color: transparent;
-  border-top: 1px solid #586e75;
-  display: block;
-}
-.cm-s-solarized .cm-link { color: #93a1a1; cursor: pointer; }
-.cm-s-solarized .cm-special { color: #6c71c4; }
-.cm-s-solarized .cm-em {
-  color: #999;
-  text-decoration: underline;
-  text-decoration-style: dotted;
-}
-.cm-s-solarized .cm-strong { color: #eee; }
-.cm-s-solarized .cm-error,
-.cm-s-solarized .cm-invalidchar {
-  color: #586e75;
-  border-bottom: 1px dotted #dc322f;
-}
-
-.cm-s-solarized.cm-s-dark .CodeMirror-selected {
-  background: #073642;
-}
-
-.cm-s-solarized.cm-s-light .CodeMirror-selected {
-  background: #eee8d5;
-}
-
-/* Editor styling */
-
-
-
-/* Little shadow on the view-port of the buffer view */
-.cm-s-solarized.CodeMirror {
-  -moz-box-shadow: inset 7px 0 12px -6px #000;
-  -webkit-box-shadow: inset 7px 0 12px -6px #000;
-  box-shadow: inset 7px 0 12px -6px #000;
-}
-
-/* Gutter border and some shadow from it  */
-.cm-s-solarized .CodeMirror-gutters {
-  border-right: 1px solid;
-}
-
-/* Gutter colors and line number styling based of color scheme (dark / light) */
-
-/* Dark */
-.cm-s-solarized.cm-s-dark .CodeMirror-gutters {
-  background-color:  #002b36;
-  border-color: #00232c;
-}
-
-.cm-s-solarized.cm-s-dark .CodeMirror-linenumber {
-  text-shadow: #021014 0 -1px;
-}
-
-/* Light */
-.cm-s-solarized.cm-s-light .CodeMirror-gutters {
-  background-color: #fdf6e3;
-  border-color: #eee8d5;
-}
-
-/* Common */
-.cm-s-solarized .CodeMirror-linenumber {
-  color: #586e75;
-  padding: 0 5px;
-}
-.cm-s-solarized .CodeMirror-guttermarker-subtle { color: #586e75; }
-.cm-s-solarized.cm-s-dark .CodeMirror-guttermarker { color: #ddd; }
-.cm-s-solarized.cm-s-light .CodeMirror-guttermarker { color: #cb4b16; }
-
-.cm-s-solarized .CodeMirror-gutter .CodeMirror-gutter-text {
-  color: #586e75;
-}
-
-.cm-s-solarized .CodeMirror-lines .CodeMirror-cursor {
-  border-left: 1px solid #819090;
-}
-
-/*
-Active line. Negative margin compensates left padding of the text in the
-view-port
-*/
-.cm-s-solarized.cm-s-dark .CodeMirror-activeline-background {
-  background: rgba(255, 255, 255, 0.10);
-}
-.cm-s-solarized.cm-s-light .CodeMirror-activeline-background {
-  background: rgba(0, 0, 0, 0.10);
-}
diff --git a/public/js/lib/codemirror/theme/the-matrix.css b/public/js/lib/codemirror/theme/the-matrix.css
deleted file mode 100644
index 01474ca..0000000
--- a/public/js/lib/codemirror/theme/the-matrix.css
+++ /dev/null
@@ -1,28 +0,0 @@
-.cm-s-the-matrix.CodeMirror { background: #000000; color: #00FF00; }
-.cm-s-the-matrix div.CodeMirror-selected { background: #2D2D2D !important; }
-.cm-s-the-matrix .CodeMirror-gutters { background: #060; border-right: 2px solid #00FF00; }
-.cm-s-the-matrix .CodeMirror-guttermarker { color: #0f0; }
-.cm-s-the-matrix .CodeMirror-guttermarker-subtle { color: white; }
-.cm-s-the-matrix .CodeMirror-linenumber { color: #FFFFFF; }
-.cm-s-the-matrix .CodeMirror-cursor { border-left: 1px solid #00FF00 !important; }
-
-.cm-s-the-matrix span.cm-keyword {color: #008803; font-weight: bold;}
-.cm-s-the-matrix span.cm-atom {color: #3FF;}
-.cm-s-the-matrix span.cm-number {color: #FFB94F;}
-.cm-s-the-matrix span.cm-def {color: #99C;}
-.cm-s-the-matrix span.cm-variable {color: #F6C;}
-.cm-s-the-matrix span.cm-variable-2 {color: #C6F;}
-.cm-s-the-matrix span.cm-variable-3 {color: #96F;}
-.cm-s-the-matrix span.cm-property {color: #62FFA0;}
-.cm-s-the-matrix span.cm-operator {color: #999}
-.cm-s-the-matrix span.cm-comment {color: #CCCCCC;}
-.cm-s-the-matrix span.cm-string {color: #39C;}
-.cm-s-the-matrix span.cm-meta {color: #C9F;}
-.cm-s-the-matrix span.cm-qualifier {color: #FFF700;}
-.cm-s-the-matrix span.cm-builtin {color: #30a;}
-.cm-s-the-matrix span.cm-bracket {color: #cc7;}
-.cm-s-the-matrix span.cm-tag {color: #FFBD40;}
-.cm-s-the-matrix span.cm-attribute {color: #FFF700;}
-.cm-s-the-matrix span.cm-error {color: #FF0000;}
-
-.cm-s-the-matrix .CodeMirror-activeline-background {background: #040;}
diff --git a/public/js/lib/codemirror/theme/tomorrow-night-bright.css b/public/js/lib/codemirror/theme/tomorrow-night-bright.css
deleted file mode 100644
index decb82d..0000000
--- a/public/js/lib/codemirror/theme/tomorrow-night-bright.css
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-
-    Name:       Tomorrow Night - Bright
-    Author:     Chris Kempson
-
-    Port done by Gerard Braad <me@gbraad.nl>
-
-*/
-
-.cm-s-tomorrow-night-bright.CodeMirror {background: #000000; color: #eaeaea;}
-.cm-s-tomorrow-night-bright div.CodeMirror-selected {background: #424242 !important;}
-.cm-s-tomorrow-night-bright .CodeMirror-gutters {background: #000000; border-right: 0px;}
-.cm-s-tomorrow-night-bright .CodeMirror-guttermarker { color: #e78c45; }
-.cm-s-tomorrow-night-bright .CodeMirror-guttermarker-subtle { color: #777; }
-.cm-s-tomorrow-night-bright .CodeMirror-linenumber {color: #424242;}
-.cm-s-tomorrow-night-bright .CodeMirror-cursor {border-left: 1px solid #6A6A6A !important;}
-
-.cm-s-tomorrow-night-bright span.cm-comment {color: #d27b53;}
-.cm-s-tomorrow-night-bright span.cm-atom {color: #a16a94;}
-.cm-s-tomorrow-night-bright span.cm-number {color: #a16a94;}
-
-.cm-s-tomorrow-night-bright span.cm-property, .cm-s-tomorrow-night-bright span.cm-attribute {color: #99cc99;}
-.cm-s-tomorrow-night-bright span.cm-keyword {color: #d54e53;}
-.cm-s-tomorrow-night-bright span.cm-string {color: #e7c547;}
-
-.cm-s-tomorrow-night-bright span.cm-variable {color: #b9ca4a;}
-.cm-s-tomorrow-night-bright span.cm-variable-2 {color: #7aa6da;}
-.cm-s-tomorrow-night-bright span.cm-def {color: #e78c45;}
-.cm-s-tomorrow-night-bright span.cm-bracket {color: #eaeaea;}
-.cm-s-tomorrow-night-bright span.cm-tag {color: #d54e53;}
-.cm-s-tomorrow-night-bright span.cm-link {color: #a16a94;}
-.cm-s-tomorrow-night-bright span.cm-error {background: #d54e53; color: #6A6A6A;}
-
-.cm-s-tomorrow-night-bright .CodeMirror-activeline-background {background: #2a2a2a !important;}
-.cm-s-tomorrow-night-bright .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
diff --git a/public/js/lib/codemirror/theme/tomorrow-night-eighties.css b/public/js/lib/codemirror/theme/tomorrow-night-eighties.css
deleted file mode 100644
index 8414135..0000000
--- a/public/js/lib/codemirror/theme/tomorrow-night-eighties.css
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-
-    Name:       Tomorrow Night - Eighties
-    Author:     Chris Kempson
-
-    CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
-    Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
-
-*/
-
-.cm-s-tomorrow-night-eighties.CodeMirror {background: #000000; color: #CCCCCC;}
-.cm-s-tomorrow-night-eighties div.CodeMirror-selected {background: #2D2D2D !important;}
-.cm-s-tomorrow-night-eighties .CodeMirror-gutters {background: #000000; border-right: 0px;}
-.cm-s-tomorrow-night-eighties .CodeMirror-guttermarker { color: #f2777a; }
-.cm-s-tomorrow-night-eighties .CodeMirror-guttermarker-subtle { color: #777; }
-.cm-s-tomorrow-night-eighties .CodeMirror-linenumber {color: #515151;}
-.cm-s-tomorrow-night-eighties .CodeMirror-cursor {border-left: 1px solid #6A6A6A !important;}
-
-.cm-s-tomorrow-night-eighties span.cm-comment {color: #d27b53;}
-.cm-s-tomorrow-night-eighties span.cm-atom {color: #a16a94;}
-.cm-s-tomorrow-night-eighties span.cm-number {color: #a16a94;}
-
-.cm-s-tomorrow-night-eighties span.cm-property, .cm-s-tomorrow-night-eighties span.cm-attribute {color: #99cc99;}
-.cm-s-tomorrow-night-eighties span.cm-keyword {color: #f2777a;}
-.cm-s-tomorrow-night-eighties span.cm-string {color: #ffcc66;}
-
-.cm-s-tomorrow-night-eighties span.cm-variable {color: #99cc99;}
-.cm-s-tomorrow-night-eighties span.cm-variable-2 {color: #6699cc;}
-.cm-s-tomorrow-night-eighties span.cm-def {color: #f99157;}
-.cm-s-tomorrow-night-eighties span.cm-bracket {color: #CCCCCC;}
-.cm-s-tomorrow-night-eighties span.cm-tag {color: #f2777a;}
-.cm-s-tomorrow-night-eighties span.cm-link {color: #a16a94;}
-.cm-s-tomorrow-night-eighties span.cm-error {background: #f2777a; color: #6A6A6A;}
-
-.cm-s-tomorrow-night-eighties .CodeMirror-activeline-background {background: #343600 !important;}
-.cm-s-tomorrow-night-eighties .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
diff --git a/public/js/lib/codemirror/theme/twilight.css b/public/js/lib/codemirror/theme/twilight.css
deleted file mode 100644
index 9ca5057..0000000
--- a/public/js/lib/codemirror/theme/twilight.css
+++ /dev/null
@@ -1,30 +0,0 @@
-.cm-s-twilight.CodeMirror { background: #141414; color: #f7f7f7; } /**/
-.cm-s-twilight .CodeMirror-selected { background: #323232 !important; } /**/
-
-.cm-s-twilight .CodeMirror-gutters { background: #222; border-right: 1px solid #aaa; }
-.cm-s-twilight .CodeMirror-guttermarker { color: white; }
-.cm-s-twilight .CodeMirror-guttermarker-subtle { color: #aaa; }
-.cm-s-twilight .CodeMirror-linenumber { color: #aaa; }
-.cm-s-twilight .CodeMirror-cursor { border-left: 1px solid white !important; }
-
-.cm-s-twilight .cm-keyword {  color: #f9ee98; } /**/
-.cm-s-twilight .cm-atom { color: #FC0; }
-.cm-s-twilight .cm-number { color:  #ca7841; } /**/
-.cm-s-twilight .cm-def { color: #8DA6CE; }
-.cm-s-twilight span.cm-variable-2, .cm-s-twilight span.cm-tag { color: #607392; } /**/
-.cm-s-twilight span.cm-variable-3, .cm-s-twilight span.cm-def { color: #607392; } /**/
-.cm-s-twilight .cm-operator { color: #cda869; } /**/
-.cm-s-twilight .cm-comment { color:#777; font-style:italic; font-weight:normal; } /**/
-.cm-s-twilight .cm-string { color:#8f9d6a; font-style:italic; } /**/
-.cm-s-twilight .cm-string-2 { color:#bd6b18 } /*?*/
-.cm-s-twilight .cm-meta { background-color:#141414; color:#f7f7f7; } /*?*/
-.cm-s-twilight .cm-builtin { color: #cda869; } /*?*/
-.cm-s-twilight .cm-tag { color: #997643; } /**/
-.cm-s-twilight .cm-attribute { color: #d6bb6d; } /*?*/
-.cm-s-twilight .cm-header { color: #FF6400; }
-.cm-s-twilight .cm-hr { color: #AEAEAE; }
-.cm-s-twilight .cm-link {   color:#ad9361; font-style:italic; text-decoration:none; } /**/
-.cm-s-twilight .cm-error { border-bottom: 1px solid red; }
-
-.cm-s-twilight .CodeMirror-activeline-background {background: #27282E !important;}
-.cm-s-twilight .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}
diff --git a/public/js/lib/codemirror/theme/vibrant-ink.css b/public/js/lib/codemirror/theme/vibrant-ink.css
deleted file mode 100644
index 5177282..0000000
--- a/public/js/lib/codemirror/theme/vibrant-ink.css
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Taken from the popular Visual Studio Vibrant Ink Schema */
-
-.cm-s-vibrant-ink.CodeMirror { background: black; color: white; }
-.cm-s-vibrant-ink .CodeMirror-selected { background: #35493c !important; }
-
-.cm-s-vibrant-ink .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
-.cm-s-vibrant-ink .CodeMirror-guttermarker { color: white; }
-.cm-s-vibrant-ink .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
-.cm-s-vibrant-ink .CodeMirror-linenumber { color: #d0d0d0; }
-.cm-s-vibrant-ink .CodeMirror-cursor { border-left: 1px solid white !important; }
-
-.cm-s-vibrant-ink .cm-keyword {  color: #CC7832; }
-.cm-s-vibrant-ink .cm-atom { color: #FC0; }
-.cm-s-vibrant-ink .cm-number { color:  #FFEE98; }
-.cm-s-vibrant-ink .cm-def { color: #8DA6CE; }
-.cm-s-vibrant-ink span.cm-variable-2, .cm-s-vibrant span.cm-tag { color: #FFC66D }
-.cm-s-vibrant-ink span.cm-variable-3, .cm-s-vibrant span.cm-def { color: #FFC66D }
-.cm-s-vibrant-ink .cm-operator { color: #888; }
-.cm-s-vibrant-ink .cm-comment { color: gray; font-weight: bold; }
-.cm-s-vibrant-ink .cm-string { color:  #A5C25C }
-.cm-s-vibrant-ink .cm-string-2 { color: red }
-.cm-s-vibrant-ink .cm-meta { color: #D8FA3C; }
-.cm-s-vibrant-ink .cm-builtin { color: #8DA6CE; }
-.cm-s-vibrant-ink .cm-tag { color: #8DA6CE; }
-.cm-s-vibrant-ink .cm-attribute { color: #8DA6CE; }
-.cm-s-vibrant-ink .cm-header { color: #FF6400; }
-.cm-s-vibrant-ink .cm-hr { color: #AEAEAE; }
-.cm-s-vibrant-ink .cm-link { color: blue; }
-.cm-s-vibrant-ink .cm-error { border-bottom: 1px solid red; }
-
-.cm-s-vibrant-ink .CodeMirror-activeline-background {background: #27282E !important;}
-.cm-s-vibrant-ink .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}
diff --git a/public/js/lib/codemirror/theme/xq-dark.css b/public/js/lib/codemirror/theme/xq-dark.css
deleted file mode 100644
index 116eccf..0000000
--- a/public/js/lib/codemirror/theme/xq-dark.css
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-Copyright (C) 2011 by MarkLogic Corporation
-Author: Mike Brevoort <mike@brevoort.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-*/
-.cm-s-xq-dark.CodeMirror { background: #0a001f; color: #f8f8f8; }
-.cm-s-xq-dark .CodeMirror-selected { background: #27007A !important; }
-.cm-s-xq-dark .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
-.cm-s-xq-dark .CodeMirror-guttermarker { color: #FFBD40; }
-.cm-s-xq-dark .CodeMirror-guttermarker-subtle { color: #f8f8f8; }
-.cm-s-xq-dark .CodeMirror-linenumber { color: #f8f8f8; }
-.cm-s-xq-dark .CodeMirror-cursor { border-left: 1px solid white !important; }
-
-.cm-s-xq-dark span.cm-keyword {color: #FFBD40;}
-.cm-s-xq-dark span.cm-atom {color: #6C8CD5;}
-.cm-s-xq-dark span.cm-number {color: #164;}
-.cm-s-xq-dark span.cm-def {color: #FFF; text-decoration:underline;}
-.cm-s-xq-dark span.cm-variable {color: #FFF;}
-.cm-s-xq-dark span.cm-variable-2 {color: #EEE;}
-.cm-s-xq-dark span.cm-variable-3 {color: #DDD;}
-.cm-s-xq-dark span.cm-property {}
-.cm-s-xq-dark span.cm-operator {}
-.cm-s-xq-dark span.cm-comment {color: gray;}
-.cm-s-xq-dark span.cm-string {color: #9FEE00;}
-.cm-s-xq-dark span.cm-meta {color: yellow;}
-.cm-s-xq-dark span.cm-qualifier {color: #FFF700;}
-.cm-s-xq-dark span.cm-builtin {color: #30a;}
-.cm-s-xq-dark span.cm-bracket {color: #cc7;}
-.cm-s-xq-dark span.cm-tag {color: #FFBD40;}
-.cm-s-xq-dark span.cm-attribute {color: #FFF700;}
-.cm-s-xq-dark span.cm-error {color: #f00;}
-
-.cm-s-xq-dark .CodeMirror-activeline-background {background: #27282E !important;}
-.cm-s-xq-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}
\ No newline at end of file
diff --git a/public/js/lib/codemirror/theme/xq-light.css b/public/js/lib/codemirror/theme/xq-light.css
deleted file mode 100644
index 20b5c79..0000000
--- a/public/js/lib/codemirror/theme/xq-light.css
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-Copyright (C) 2011 by MarkLogic Corporation
-Author: Mike Brevoort <mike@brevoort.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-*/
-.cm-s-xq-light span.cm-keyword {line-height: 1em; font-weight: bold; color: #5A5CAD; }
-.cm-s-xq-light span.cm-atom {color: #6C8CD5;}
-.cm-s-xq-light span.cm-number {color: #164;}
-.cm-s-xq-light span.cm-def {text-decoration:underline;}
-.cm-s-xq-light span.cm-variable {color: black; }
-.cm-s-xq-light span.cm-variable-2 {color:black;}
-.cm-s-xq-light span.cm-variable-3 {color: black; }
-.cm-s-xq-light span.cm-property {}
-.cm-s-xq-light span.cm-operator {}
-.cm-s-xq-light span.cm-comment {color: #0080FF; font-style: italic;}
-.cm-s-xq-light span.cm-string {color: red;}
-.cm-s-xq-light span.cm-meta {color: yellow;}
-.cm-s-xq-light span.cm-qualifier {color: grey}
-.cm-s-xq-light span.cm-builtin {color: #7EA656;}
-.cm-s-xq-light span.cm-bracket {color: #cc7;}
-.cm-s-xq-light span.cm-tag {color: #3F7F7F;}
-.cm-s-xq-light span.cm-attribute {color: #7F007F;}
-.cm-s-xq-light span.cm-error {color: #f00;}
-
-.cm-s-xq-light .CodeMirror-activeline-background {background: #e8f2ff !important;}
-.cm-s-xq-light .CodeMirror-matchingbracket {outline:1px solid grey;color:black !important;background:yellow;}
\ No newline at end of file
diff --git a/public/js/lib/codemirror/theme/zenburn.css b/public/js/lib/codemirror/theme/zenburn.css
deleted file mode 100644
index f817198..0000000
--- a/public/js/lib/codemirror/theme/zenburn.css
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * "
- *  Using Zenburn color palette from the Emacs Zenburn Theme
- *  https://github.com/bbatsov/zenburn-emacs/blob/master/zenburn-theme.el
- *
- *  Also using parts of https://github.com/xavi/coderay-lighttable-theme
- * "
- * From: https://github.com/wisenomad/zenburn-lighttable-theme/blob/master/zenburn.css
- */
-
-.cm-s-zenburn .CodeMirror-gutters { background: #3f3f3f !important; }
-.cm-s-zenburn .CodeMirror-foldgutter-open, .CodeMirror-foldgutter-folded { color: #999; }
-.cm-s-zenburn .CodeMirror-cursor { border-left: 1px solid white !important; }
-.cm-s-zenburn { background-color: #3f3f3f; color: #dcdccc; }
-.cm-s-zenburn span.cm-builtin { color: #dcdccc; font-weight: bold; }
-.cm-s-zenburn span.cm-comment { color: #7f9f7f; }
-.cm-s-zenburn span.cm-keyword { color: #f0dfaf; font-weight: bold; }
-.cm-s-zenburn span.cm-atom { color: #bfebbf; }
-.cm-s-zenburn span.cm-def { color: #dcdccc; }
-.cm-s-zenburn span.cm-variable { color: #dfaf8f; }
-.cm-s-zenburn span.cm-variable-2 { color: #dcdccc; }
-.cm-s-zenburn span.cm-string { color: #cc9393; }
-.cm-s-zenburn span.cm-string-2 { color: #cc9393; }
-.cm-s-zenburn span.cm-number { color: #dcdccc; }
-.cm-s-zenburn span.cm-tag { color: #93e0e3; }
-.cm-s-zenburn span.cm-property { color: #dfaf8f; }
-.cm-s-zenburn span.cm-attribute { color: #dfaf8f; }
-.cm-s-zenburn span.cm-qualifier { color: #7cb8bb; }
-.cm-s-zenburn span.cm-meta { color: #f0dfaf; }
-.cm-s-zenburn span.cm-header { color: #f0efd0; }
-.cm-s-zenburn span.cm-operator { color: #f0efd0; }
-.cm-s-zenburn span.CodeMirror-matchingbracket { box-sizing: border-box; background: transparent; border-bottom: 1px solid; }
-.cm-s-zenburn span.CodeMirror-nonmatchingbracket { border-bottom: 1px solid; background: none; }
-.cm-s-zenburn .CodeMirror-activeline { background: #000000; }
-.cm-s-zenburn .CodeMirror-activeline-background { background: #000000; }
-.cm-s-zenburn .CodeMirror-selected { background: #545454; }
-.cm-s-zenburn .CodeMirror-focused .CodeMirror-selected { background: #4f4f4f; }
diff --git a/public/js/lib/jquery-2.1.1.min.js b/public/js/lib/jquery-2.1.1.min.js
deleted file mode 100644
index e5ace11..0000000
--- a/public/js/lib/jquery-2.1.1.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
-!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)
-},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"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){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ib={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))
-},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.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){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \t]*([^\r\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\/\//,mc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\[\]$/,yc=/\r?\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\r\n")}}):{name:b.name,value:c.replace(yc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Ic=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Jc})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Lc=a.jQuery,Mc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Mc),b&&a.jQuery===n&&(a.jQuery=Lc),n},typeof b===U&&(a.jQuery=a.$=n),n});
diff --git a/public/js/lib/ramda/ramda.js b/public/js/lib/ramda/ramda.js
deleted file mode 100644
index 94149ef..0000000
--- a/public/js/lib/ramda/ramda.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/**
- * Created by nathanleniz on 2/21/15.
- */
-var R = require('ramda');
\ No newline at end of file
diff --git a/public/js/lib/ramda/ramda.min.js b/public/js/lib/ramda/ramda.min.js
deleted file mode 100644
index 09afdfe..0000000
--- a/public/js/lib/ramda/ramda.min.js
+++ /dev/null
@@ -1,6 +0,0 @@
-//  Ramda v0.10.0
-//  https://github.com/ramda/ramda
-//  (c) 2013-2015 Scott Sauyet and Michael Hurley
-//  Ramda may be freely distributed under the MIT license.
-
-(function(){"use strict";var n={ramda:"placeholder"},t=function(n,t){return n+t},r=function(n,t){for(var r=-1;++r<t.length;)if(!n(t[r]))return!1;return!0},e=function(n,t){for(var r=-1;++r<t.length;)if(n(t[r]))return!0;return!1},u=function(n,t){return function(){return n.call(this,t.apply(this,arguments))}},i=function(n,t){n=n||[],t=t||[];var r,e=n.length,u=t.length,i=new Array(e+u);for(r=-1;++r<e;)i[r]=n[r];for(r=-1;++r<u;)i[e+r]=t[r];return i},o=function(n,t,r){for(var e=-1,u=r.length;++e<u;)if(n(t,r[e]))return!0;return!1},c=function(n){return function(t,r){if(r&&r.length>0){for(var e,u=0,i=r[u],o=t(i);++u<r.length;)e=t(r[u]),n(e,o)&&(o=e,i=r[u]);return i}}},a=function(n,t){for(var r=-1,e=t.length,u=[];++r<e;)n(t[r])&&(u[u.length]=t[r]);return u},f=function(n,t){for(var r=-1,e=t.length,u=[];++r<e;)n(t[r],r,t)&&(u[u.length]=t[r]);return u},l=function(n,t){for(var r=-1,e=t.length;++r<e;)n(t[r]);return t},s=function(n){return function(t){return a(function(n){return"function"==typeof t[n]},n(t))}},h=function(n,t){return n>t},g=function(n,t,r){var e=0,u=n.length;for("number"==typeof r&&(e=0>r?Math.max(0,u+r):r);u>e;){if(n[e]===t)return e;++e}return-1},p=Array.isArray||function(n){return null!=n&&n.length>=0&&"[object Array]"===Object.prototype.toString.call(n)},m=Number.isInteger||function(n){return n<<0===n},y=function(n){return null!=n&&n===Object(n)&&"function"==typeof n.then},v=function(n,t,r){var e=n.length;for("number"==typeof r&&(e=0>r?e+r+1:Math.min(e,r+1));--e>=0;)if(n[e]===t)return e;return-1},d=function(n,t){return t>n},w=function(n,t){for(var r=-1,e=t.length,u=new Array(e);++r<e;)u[r]=n(t[r]);return u},b=function(n,t){return n*t},O=function(){return new TypeError("Function called with no arguments")},j=function(n,t){return 0>n?t[t.length+n]:t[n]},x=function(n){return function(t){return w(function(n){return[n,t[n]]},n(t))}},A=function(n,t){var r,e=-1,u=n.length;if(null!=t){for(r=t;null!=r&&++e<u;)r=r[n[e]];return r}},I=function(n,t){var r={};return l(function(n){r[n]=t[n]},n),r},E=function(n,t){return i([n],t)},k=function(n,t,r){for(var e=-1,u=r.length;++e<u;)t=n(t,r[e]);return t},M=function(n,t,r){if(n===r)return!0;if(null==r)return!1;t.fn=t.fn||[],t.obj=t.obj||[];for(var e,u,i=-1,o=t.fn.length,c=-1,a=t.obj.length;++i<o;){if(e=t.fn[i],u=n[e],!(e in r))return!1;if(!u(r[e],r))return!1}for(;++c<a;)if(e=t.obj[c],n[e]!==r[e])return!1;return!0},P=function qu(n,t,r){switch(arguments.length){case 0:throw O();case 1:return qu(n,0,n.length);case 2:return qu(n,t,n.length);default:for(var e=Math.max(0,r-t),u=new Array(e),i=-1;++i<e;)u[i]=n[t+i];return u}},T=function(n){return function(){return n}},S=function(n,t){switch(n){case 0:return function(){return t.apply(this,arguments)};case 1:return function(n){return t.apply(this,arguments)};case 2:return function(n,r){return t.apply(this,arguments)};case 3:return function(n,r,e){return t.apply(this,arguments)};case 4:return function(n,r,e,u){return t.apply(this,arguments)};case 5:return function(n,r,e,u,i){return t.apply(this,arguments)};case 6:return function(n,r,e,u,i,o){return t.apply(this,arguments)};case 7:return function(n,r,e,u,i,o,c){return t.apply(this,arguments)};case 8:return function(n,r,e,u,i,o,c,a){return t.apply(this,arguments)};case 9:return function(n,r,e,u,i,o,c,a,f){return t.apply(this,arguments)};case 10:return function(n,r,e,u,i,o,c,a,f,l){return t.apply(this,arguments)};default:throw new Error("First argument to arity must be a non-negative integer no greater than ten")}},W=function(n){return n.apply(this,P(arguments,1))},N=function(n){return function(t,r){return n(t,r)?-1:n(r,t)?1:0}},R=function(){var n=arguments;return function(){for(var t=-1;++t<n.length;)if(n[t][0].apply(this,arguments))return n[t][1].apply(this,arguments)}},q=function(n){var t=P(arguments,1);return function(){var r=arguments;return n.apply(this,w(function(n){return n.apply(this,r)},t))}},C=function(n){return function(t,r){switch(arguments.length){case 0:throw O();case 1:return function(r){return n.apply(this,[r,t].concat(P(arguments,1)))};default:return n.apply(this,i([r,t],P(arguments,2)))}}},L=function(n){for(var t=-1,r=n.length,e={};++t<r;)p(n[t])&&n[t].length&&(e[n[t][0]]=n[t][1]);return e},B=function(n,t){switch(arguments.length){case 0:throw O();case 1:return function(t){return t[n].apply(t,P(arguments,1))};default:return t[n].apply(t,P(arguments,2))}},F=function(n){return n},z=function(n){return p(n)?!0:n?"object"!=typeof n?!1:n instanceof String?!1:1===n.nodeType?!!n.length:0===n.length?!0:n.length>0?n.hasOwnProperty(0)&&n.hasOwnProperty(n.length-1):!1:!1},D=function(n){return 0===Object(n).length},U=function(n){return null==n},_=function(n){for(var t=n.length,r=-1;++r<t;)if(g(n,n[r],r+1)>=0)return!1;return!0},$=function(n){var t,r=[];for(t in n)r[r.length]=t;return r},G=function(n,t){switch(n){case 0:return function(){return t.call(this)};case 1:return function(n){return t.call(this,n)};case 2:return function(n,r){return t.call(this,n,r)};case 3:return function(n,r,e){return t.call(this,n,r,e)};case 4:return function(n,r,e,u){return t.call(this,n,r,e,u)};case 5:return function(n,r,e,u,i){return t.call(this,n,r,e,u,i)};case 6:return function(n,r,e,u,i,o){return t.call(this,n,r,e,u,i,o)};case 7:return function(n,r,e,u,i,o,c){return t.call(this,n,r,e,u,i,o,c)};case 8:return function(n,r,e,u,i,o,c,a){return t.call(this,n,r,e,u,i,o,c,a)};case 9:return function(n,r,e,u,i,o,c,a,f){return t.call(this,n,r,e,u,i,o,c,a,f)};case 10:return function(n,r,e,u,i,o,c,a,f,l){return t.call(this,n,r,e,u,i,o,c,a,f,l)};default:throw new Error("First argument to nAry must be a non-negative integer no greater than ten")}},H=function(n){return function(){return!n.apply(this,arguments)}},J=function(n){return function(){return j(n,arguments)}},K=function(n){return[n]},Q=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments))}},V=C(E),X=function(n,t){switch(arguments.length){case 0:throw O();case 1:return function(t){return t[n]}}return t[n]},Y=C(X),Z=function(n){return P(n).reverse()},nt=x($),tt=function(){var n="	\n\f\r   ᠎             　\u2028\u2029﻿",t="​",r="function"==typeof String.prototype.trim;return r&&!n.trim()&&t.trim()?function(n){return n.trim()}:function(t){var r=new RegExp("^["+n+"]["+n+"]*"),e=new RegExp("["+n+"]["+n+"]*$");return t.replace(r,"").replace(e,"")}}(),rt=function(n){return null===n?"Null":void 0===n?"Undefined":Object.prototype.toString.call(n).slice(8,-1)},et=function(n){if(0===arguments.length)throw O();return function(){return n(P(arguments))}},ut=function(n){return G(1,n)},it=function(n){var t,r=[];for(t in n)r[r.length]=n[t];return r},ot=T(!1),ct=F,at=T(!0),ft=function(n,t){return i(t,[n])},lt=function Cu(n,t,r){var e=function(e){for(var u=t.length,i=-1;++i<u;)if(n===t[i])return r[i];t[t.length]=n,r[r.length]=e;for(var o in n)e[o]=Cu(n[o],t,r);return e};switch(rt(n)){case"Object":return e({});case"Array":return e([]);case"Date":return new Date(n);default:return n}},st=function(n,t){return function(r,e,u){var i=arguments.length,o=arguments[i-1],c=o&&!p(o)&&"function"==typeof o[n];switch(arguments.length){case 0:return t();case 1:return c?o[n]():t(r);case 2:return c?o[n](r):t(r,e);case 3:return c?o[n](r,e):t(r,e,u)}}},ht=function(n,t){return function(){var r=this,e=t.apply(this,arguments);return y(e)?e.then(function(t){return n.call(r,t)}):n.call(this,e)}},gt=function(n,t){return g(t,n)>=0},pt=function(n){return function(){switch(arguments.length){case 0:throw O();case 1:return arguments[0];default:for(var t=arguments.length-1,r=arguments[t],e=r.length;t--;)r=n(arguments[t],r);return S(e,r)}}},mt=function(n,t){return function(r){if(0===arguments.length)throw O();for(var e,u=-1,i=t;++u<r.length;)e=+r[u],n(e,i)&&(i=e);return i}},yt=function(n){return function(t){var r=P(arguments,1);return S(Math.max(0,t.length-r.length),function(){return t.apply(this,n(r,arguments))})}},vt=function(n){return function(t,r){switch(arguments.length){case 0:throw O();case 1:return function(r){return n(t,r)};default:return n(t,r)}}},dt=function(n){return function(t,r,e){switch(arguments.length){case 0:throw O();case 1:return vt(function(r,e){return n(t,r,e)});case 2:return function(e){return n(t,r,e)};default:return n(t,r,e)}}},wt=function(n,t){return null!=t&&!p(t)&&"function"==typeof t[n]},bt=function(n){return function t(r){for(var e,u,i,o=[],c=-1,a=r.length;++c<a;)if(z(r[c]))for(e=n?t(r[c]):r[c],u=-1,i=e.length;++u<i;)o[o.length]=e[u];else o[o.length]=r[c];return o}},Ot=function(n,t){for(var r,e={},u=$(t),i=u.length,o=-1;++o<i;)r=u[o],n(t[r],r,t)&&(e[r]=t[r]);return e},jt=function(n,t){return w(X(n),t)},xt=vt(t),At=vt(r),It=vt(function(n,t){return function(){return n.apply(this,arguments)&&t.apply(this,arguments)}}),Et=vt(e),kt=vt(ft),Mt=C(ft),Pt=vt(function(n,t){return n.apply(this,t)}),Tt=function(n){return G(2,n)},St=vt(function(n,t){return function(){return n.apply(t,arguments)}}),Wt=function(n){return lt(n,[],[])},Nt=pt(u),Rt=pt(ht),qt=dt(o),Ct=vt(function(n,t){var r={};return r[n]=t,r}),Lt=vt(function(n,t){return function r(e){return S(Math.max(n-(e&&e.length||0),0),function(){if(0===arguments.length)throw O();var u=i(e,arguments);return u.length>=n?t.apply(this,u):r(u)})}([])}),Bt=xt(-1),Ft=vt(function(n,t){return null==t?n:t}),zt=vt(function(n,t){for(var r=[],e=-1,u=n.length;++e<u;)gt(n[e],t)||gt(n[e],r)||(r[r.length]=n[e]);return r}),Dt=dt(function(n,t,r){for(var e=[],u=-1,i=t.length,o=qt(n);++u<i;)o(t[u],r)||o(t[u],e)||(e[e.length]=t[u]);return e}),Ut=vt(function(n,t){return Ot(function(t,r){return r!==n},t)}),_t=vt(st("drop",function(n,t){return n<t.length?P(t,n):[]})),$t=vt(function(n,t){for(var r=-1,e=t.length;++r<e&&n(t[r]););return P(t,r)}),Gt=function(n){return wt("empty",n)?n.empty():[]},Ht=vt(function(n,t){return 0===n?1/n===1/t:n===t||n!==n&&t!==t}),Jt=dt(function(n,t,r){return t[n]===r[n]}),Kt=vt(st("filter",a)),Qt=vt(f),Vt=vt(function(n,t){for(var r=-1,e=t.length;++r<e;)if(n(t[r]))return t[r]}),Xt=vt(function(n,t){for(var r=-1,e=t.length;++r<e;)if(n(t[r]))return r;return-1}),Yt=vt(function(n,t){for(var r=t.length;r--;)if(n(t[r]))return t[r]}),Zt=vt(function(n,t){for(var r=t.length;r--;)if(n(t[r]))return r;return-1}),nr=bt(!0),tr=vt(l),rr=vt(function(n,t){for(var r=-1,e=t.length;++r<e;)n(t[r],r,t);return t}),er=s($),ur=X,ir=vt(function(n,t){return k(function(t,r){var e=n(r);return t[e]=ft(r,t[e]||(t[e]=[])),t},{},t)}),or=vt(function(n,t){return Object.prototype.hasOwnProperty.call(t,n)}),cr=vt(function(n,t){return n in t}),ar=dt(function(n,t,r){return function(){return n.apply(this,arguments)?t.apply(this,arguments):r.apply(this,arguments)}}),fr=xt(1),lr=vt(function(n,t){return g(t,n)}),sr=dt(function(n,t,r){return n=n<r.length&&n>=0?n:r.length,i(ft(t,P(r,0,n)),P(r,n))}),hr=dt(function(n,t,r){return n=n<r.length&&n>=0?n:r.length,i(i(P(r,0,n),t),P(r,n))}),gr=function(n,t){var r=P(arguments,2),e=n-r.length;return Lt(e+1,function(){var n=arguments[e],u=r.concat(P(arguments,0,e));return n[t].apply(n,u)})},pr=vt(function(n,t){return null!=t&&t.constructor===n||t instanceof n}),mr=gr(1,"join"),yr=function(){var n=!{toString:null}.propertyIsEnumerable("toString"),t=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];return function(r){if(Object(r)!==r)return[];if(Object.keys)return Object.keys(r);var e,u,i=[];for(e in r)or(e,r)&&(i[i.length]=e);if(n)for(u=t.length;u--;)e=t[u],or(e,r)&&!gt(e,i)&&(i[i.length]=e);return i}}(),vr=vt(function(n,t){return v(t,n)}),dr=function(n){return null!=n&&pr(Number,n.length)?n.length:0/0},wr=vt(function(n,t){var r=function(t){return n(t)};return r.set=vt(t),r.map=vt(function(r,e){return t(r(n(e)),e)}),r}),br=vt(st("map",w)),Or=dt(function(n,t,r){for(var e=-1,u=r.length,i=new Array(u),o=[t];++e<u;)o=n(o[0],r[e]),i[e]=o[1];return[o[0],i]}),jr=dt(function(n,t,r){for(var e=r.length,u=r.length,i=new Array(u),o=[t];e--;)o=n(o[0],r[e]),i[e]=o[1];return[o[0],i]}),xr=vt(function(n,t){for(var r=-1,e=t.length,u=new Array(e);++r<e;)u[r]=n(t[r],r,t);return u}),Ar=vt(function(n,t){return k(function(r,e){return r[e]=n(t[e]),r},{},yr(t))}),Ir=vt(function(n,t){return k(function(r,e){return r[e]=n(t[e],e,t),r},{},yr(t))}),Er=gr(1,"match"),kr=mt(h,-1/0),Mr=vt(c(h)),Pr=function(){var n=function(n){return n+"::"+Object.prototype.toString.call(n)},t=function(t){return t.length+":{"+w(n,t).join(",")+"}"};return function(n){var r={};return function(){var e=t(arguments);return or(e,r)||(r[e]=n.apply(this,arguments)),r[e]}}}(),Tr=mt(d,1/0),Sr=vt(c(d)),Wr=vt(b),Nr=Wr(-1),Rr=vt(j),qr=vt(function(n,t){return Ot(function(t,r){return!gt(r,n)},t)}),Cr=vt(function(n,t){return function(){return n.apply(this,arguments)||t.apply(this,arguments)}}),Lr=yt(i),Br=yt(C(i)),Fr=vt(function(n,t){return k(function(t,r){return t[n(r)?0:1].push(r),t},[[],[]],t)}),zr=dt(function(n,t,r){return A(n.split("."),r)===t}),Dr=dt(function(n,t,r){return A(t.split(n),r)}),Ur=vt(function(n,t){return Ot(function(t,r){return gt(r,n)},t)}),_r=vt(I),$r=vt(Ot),Gr=function(){return Nt.apply(this,Z(arguments))},Hr=function(){return Rt.apply(this,Z(arguments))},Jr=vt(jt),Kr=vt(E),Qr=dt(function(n,t,r){return r[n]===t}),Vr=dt(function(n,t,r){return or(t,r)?r[t]:n}),Xr=vt(function(n,t){for(var r=n.length,e=new Array(r),u=-1;++u<r;)e[u]=t[n[u]];return e}),Yr=vt(function(n,t){if(n>=t)return[];for(var r=0,e=new Array(Math.floor(t)-Math.ceil(n));t>n;)e[r++]=n++;return e}),Zr=dt(k),ne=dt(function(n,t,r){for(var e=-1,u=r.length;++e<u;)t=n(t,r[e],e,r);return t}),te=dt(function(n,t,r){for(var e=r.length;e--;)t=n(t,r[e]);return t}),re=dt(function(n,t,r){for(var e=r.length;e--;)t=n(t,r[e],e,r);return t}),ee=vt(function(n,t){return Kt(H(n),t)}),ue=vt(function(n,t){return f(H(n),t)}),ie=dt(function(n,t,r){return i(P(r,0,Math.min(n,r.length)),P(r,Math.min(r.length,n+t)))}),oe=dt(function(n,t,r){return r.replace(n,t)}),ce=dt(function(n,t,r){var e=0,u=r.length+1,i=new Array(u);for(i[e]=t;++e<u;)t=n(t,r[e-1]),i[e]=t;return i}),ae=gr(2,"slice"),fe=vt(function(n,t){return Wt(t).sort(n)}),le=vt(function(n,t){return P(t).sort(function(t,r){var e=n(t),u=n(r);return u>e?-1:e>u?1:0})}),se=gr(1,"split"),he=vt(function(n,t){return t.indexOf(n)}),ge=vt(function(n,t){return t.lastIndexOf(n)}),pe=gr(2,"substring"),me=C(pe)(void 0),ye=pe(0),ve=Zr(t,0),de=st("tail",function(n){return P(n,1)}),we=vt(st("take",function(n,t){return P(t,0,Math.min(n,t.length))})),be=vt(st("takeWhile",function(n,t){for(var r=-1,e=t.length;++r<e&&n(t[r]););return P(t,0,r)})),Oe=vt(function(n,t){return n(t),t}),je=vt(function(n,t){for(var r=new Array(Number(t)),e=r.length,u=-1;++u<e;)r[u]=n(u);return r}),xe=gr(0,"toLowerCase"),Ae=x(yr),Ie=gr(0,"toUpperCase"),Ee=vt(function(n,t){for(var r=n(t),e=[];r&&r.length;)e[e.length]=r[0],r=n(r[1]);return e}),ke=function(n){for(var t,r=-1,e=n.length,u=[];++r<e;)t=n[r],gt(t,u)||(u[u.length]=t);return u},Me=vt(function(n,t){for(var r,e=-1,u=t.length,i=[];++e<u;)r=t[e],o(n,r,i)||(i[i.length]=r);return i}),Pe=bt(!1),Te=function(n){for(var t=yr(n),r=t.length,e=new Array(r),u=-1;++u<r;)e[u]=n[t[u]];return e},Se=function(n,t){var r=ir(function(t){return"function"==typeof n[t]?"fn":"obj"},yr(n));switch(arguments.length){case 0:throw O();case 1:return function(t){return M(n,r,t)}}return M(n,r,t)},We=function(n,t){return Lt(n.length,function(){return t.apply(this,i([n],arguments))})},Ne=vt(function(n,t){for(var r,e=-1,u=n.length,i=t.length,o=[];++e<u;)for(r=-1;++r<i;)o[o.length]=[n[e],t[r]];return o}),Re=vt(function(n,t){for(var r=[],e=-1,u=Math.min(n.length,t.length);++e<u;)r[e]=[n[e],t[e]];return r}),qe=vt(function(n,t){for(var r=-1,e=n.length,u={};++r<e;)u[n[r]]=t[r];return u}),Ce=dt(function(n,t,r){for(var e=[],u=-1,i=Math.min(t.length,r.length);++u<i;)e[u]=n(t[u],r[u]);return e}),Le=function(n,t){return wt("ap",n)?n.ap(t):k(function(n,r){return i(n,w(r,t))},[],n)},Be=function Lu(n,t,r,e){var u=rt(n);if(u!==rt(t))return!1;if(Ht(n,t))return!0;if("RegExp"==u)return n.source===t.source&&n.global===t.global&&n.ignoreCase===t.ignoreCase&&n.multiline===t.multiline&&n.sticky===t.sticky&&n.unicode===t.unicode;if(Object(n)===n){if("Date"===u&&n.getTime()!=t.getTime())return!1;var i=yr(n);if(i.length!==yr(t).length)return!1;for(var o=r.length;o--;)if(r[o]===n)return e[o]===t;for(r.push(n),e.push(t),o=i.length;o--;){var c=i[o];if(!or(c,t)||!Lu(t[c],n[c],r,e))return!1}return r.pop(),e.pop(),!0}return!1},Fe=function(n,t){for(var r=yr(t),e=-1,u=r.length;++e<u;)n[r[e]]=t[r[e]];return n},ze=function(n){return function(t){var r=function(){var r=arguments;return n(function(n){return n.apply(null,r)},t)};return arguments.length>1?r.apply(null,P(arguments,1)):S(kr(jt("length",t)),r)}},De=ze(r),Ue=ze(e),_e=vt(Le),$e=dt(function(n,t,r){return Fe(L(w(function(n){return[n,r[n]]},$(r))),Ct(n,t))}),Ge=function(){var n=function(t,r,e){if(1===t.length)return $e(t[0],r,e);var u=e[t[0]];return $e(t[0],n(P(t,1),r,pr(Object,u)?u:{}),e)};return function(t,r,e){var u=arguments.length;if(0===u)throw O();var i=se(".",t),o=vt(function(t,r){return n(i,t,r)});switch(u){case 1:return o;case 2:return o(r);default:return o(r,e)}}}(),He=vt(st("chain",function(n,t){return Pe(w(n,t))})),Je=gr(1,"charAt"),Ke=gr(1,"charCodeAt"),Qe=dt(function(n,t,r){function e(t,r){return Le(w(kt,n(r)),t)}return k(e,t([]),r)}),Ve=vt(function(n,t){for(var r={},e=t.length,u=-1;++u<e;){var i=n(t[u]);r[i]=(or(i,r)?r[i]:0)+1}return r}),Xe=function(n){return Lt(n.length,n)},Ye=vt(function(n,t){return Be(n,t,[],[])}),Ze=vt(function(n,t){return Fe(Fe({},t),Ir(function(n,r){return n(t[r])},n))}),nu=s(yr),tu=Rr(0),ru=ae(0,-1),eu=function(n){return Fe(n,Ru)},uu=vt(function(n,t){return ke(a(C(gt)(n),t))}),iu=dt(function(n,t,r){for(var e=[],u=-1;++u<t.length;)o(n,t[u],r)&&(e[e.length]=t[u]);return Me(n,e)}),ou=function(n){for(var t=yr(n),r=t.length,e=-1,u={};++e<r;){var i=t[e],o=n[i];or(o,u)||(u[o]=[]),u[o].push(i)}return u},cu=function(n){for(var t=yr(n),r=t.length,e=-1,u={};++e<r;){var i=t[e];u[n[i]]=i}return u},au=Rr(-1),fu=vt(function(n,t){var r=Lt(n,t);if(0===arguments.length)throw O();return Lt(n,function(){return k(Le,br(r,arguments[0]),P(arguments,1))})}),lu=function(t){if(2!==t.length)throw new Error("Expected binary function.");return function r(e,u){switch(arguments.length){case 0:throw O();case 1:return e===n?C(r):Lr(t,e);default:return e===n?C(t)(u):t(e,u)}}},su=Dr("."),hu=Zr(b,1),gu=vt(function(n,t){return je(T(n),t)}),pu=lu(function(n,t){return n-t}),mu=vt(Nt(ke,i)),yu=dt(function(n,t,r){return Me(n,i(t,r))}),vu=function(n){var t=P(arguments,1),r=t.length;return Xe(S(r,function(){for(var e=[],u=-1;++u<r;)e[e.length]=t[u](arguments[u]);return n.apply(this,e.concat(P(arguments,r)))}))},du=Qe(br(F)),wu=lu(function(n,t){if(p(t))return i(n,t);if(wt("concat",n))return n.concat(t);throw new TypeError("can't concat "+typeof n)}),bu=vt(function(n,t){if(n>10)throw new Error("Constructor with greater than ten arguments");return 0===n?function(){return new t}:Xe(G(n,function(n,r,e,u,i,o,c,a,f,l){switch(arguments.length){case 1:return new t(n);case 2:return new t(n,r);case 3:return new t(n,r,e);case 4:return new t(n,r,e,u);case 5:return new t(n,r,e,u,i);case 6:return new t(n,r,e,u,i,o);case 7:return new t(n,r,e,u,i,o,c);case 8:return new t(n,r,e,u,i,o,c,a);case 9:return new t(n,r,e,u,i,o,c,a,f);case 10:return new t(n,r,e,u,i,o,c,a,f,l)}}))}),Ou=lu(gt),ju=lu(function(n,t){return n/t}),xu=lu(h),Au=lu(function(n,t){return n>=t}),Iu=function(n){if(0===arguments.length)throw O();return fu(n.length,n)},Eu=lu(d),ku=lu(function(n,t){return t>=n}),Mu=lu(function(n,t){return m(n)?!m(t)||1>t?0/0:(n%t+t)%t:0/0}),Pu=lu(function(n,t){return Fe(Fe({},n),t)}),Tu=Zr(Pu,{}),Su=lu(function(n,t){return n%t}),Wu=vu(w,_r,F),Nu=function(n){return bu(n.length,n)},Ru={F:ot,I:ct,T:at,__:n,add:xt,all:At,allPass:De,always:T,and:It,any:Et,anyPass:Ue,ap:_e,append:kt,appendTo:Mt,apply:Pt,arity:S,assoc:$e,assocPath:Ge,binary:Tt,bind:St,call:W,chain:He,charAt:Je,charCodeAt:Ke,clone:Wt,commute:du,commuteMap:Qe,comparator:N,compose:Nt,composeP:Rt,concat:wu,cond:R,construct:Nu,constructN:bu,contains:Ou,containsWith:qt,converge:q,countBy:Ve,createMapEntry:Ct,curry:Xe,curryN:Lt,dec:Bt,defaultTo:Ft,difference:zt,differenceWith:Dt,dissoc:Ut,divide:ju,drop:_t,dropWhile:$t,empty:Gt,eq:Ht,eqDeep:Ye,eqProps:Jt,evolve:Ze,filter:Kt,filterIndexed:Qt,find:Vt,findIndex:Xt,findLast:Yt,findLastIndex:Zt,flatten:nr,flip:C,forEach:tr,forEachIndexed:rr,fromPairs:L,func:B,functions:nu,functionsIn:er,get:ur,groupBy:ir,gt:xu,gte:Au,has:or,hasIn:cr,head:tu,identity:F,ifElse:ar,inc:fr,indexOf:lr,init:ru,insert:sr,insertAll:hr,installTo:eu,intersection:uu,intersectionWith:iu,invert:ou,invertObj:cu,invoker:gr,is:pr,isArrayLike:z,isEmpty:D,isNil:U,isSet:_,join:mr,keys:yr,keysIn:$,last:au,lastIndexOf:vr,length:dr,lens:wr,lift:Iu,liftN:fu,lt:Eu,lte:ku,map:br,mapAccum:Or,mapAccumRight:jr,mapIndexed:xr,mapObj:Ar,mapObjIndexed:Ir,match:Er,mathMod:Mu,max:kr,maxBy:Mr,memoize:Pr,merge:Pu,mergeAll:Tu,min:Tr,minBy:Sr,modulo:Su,multiply:Wr,nAry:G,negate:Nr,not:H,nth:Rr,nthArg:J,of:K,omit:qr,once:Q,op:lu,or:Cr,partial:Lr,partialRight:Br,partition:Fr,path:su,pathEq:zr,pathOn:Dr,pick:Ur,pickAll:_r,pickBy:$r,pipe:Gr,pipeP:Hr,pluck:Jr,prepend:Kr,prependTo:V,product:hu,project:Wu,prop:X,propEq:Qr,propOf:Y,propOr:Vr,props:Xr,range:Yr,reduce:Zr,reduceIndexed:ne,reduceRight:te,reduceRightIndexed:re,reject:ee,rejectIndexed:ue,remove:ie,repeat:gu,replace:oe,reverse:Z,scan:ce,slice:ae,sort:fe,sortBy:le,split:se,strIndexOf:he,strLastIndexOf:ge,substring:pe,substringFrom:me,substringTo:ye,subtract:pu,sum:ve,tail:de,take:we,takeWhile:be,tap:Oe,times:je,toLower:xe,toPairs:Ae,toPairsIn:nt,toUpper:Ie,trim:tt,type:rt,unapply:et,unary:ut,unfold:Ee,union:mu,unionWith:yu,uniq:ke,uniqWith:Me,unnest:Pe,useWith:vu,values:Te,valuesIn:it,where:Se,wrap:We,xprod:Ne,zip:Re,zipObj:qe,zipWith:Ce};"object"==typeof exports?module.exports=Ru:"function"==typeof define&&define.amd?define(function(){return Ru}):this.R=Ru}).call(this);
\ No newline at end of file
diff --git a/server/views/coursewares/showBonfire.jade b/server/views/coursewares/showBonfire.jade
index 5ea0b73..10322ea 100644
--- a/server/views/coursewares/showBonfire.jade
+++ b/server/views/coursewares/showBonfire.jade
@@ -1,19 +1,9 @@
 extends ../layout-wide
 block content
-
-    script(type='text/javascript', src='/bower_components/jshint/dist/jshint.js')
-    script(type='text/javascript', src='/js/lib/codemirror/lib/codemirror.js')
-    script(type='text/javascript', src='/js/lib/codemirror/addon/edit/closebrackets.js')
-    script(type='text/javascript', src='/js/lib/codemirror/addon/edit/matchbrackets.js')
-    script(type='text/javascript', src='/js/lib/codemirror/addon/lint/lint.js')
-    script(type='text/javascript', src='/js/lib/codemirror/addon/lint/javascript-lint.js')
-    script(type='text/javascript', src='/js/lib/chai/chai.js')
     link(rel='stylesheet', href='/js/lib/codemirror/lib/codemirror.css')
     link(rel='stylesheet', href='/js/lib/codemirror/addon/lint/lint.css')
     link(rel='stylesheet', href='/js/lib/codemirror/theme/monokai.css')
     link(rel='stylesheet', href='/css/ubuntu.css')
-    script(type='text/javascript', src='/js/lib/codemirror/mode/javascript/javascript.js')
-    script(type='text/javascript', src='/js/lib/jailed/jailed.js')
 
     .row(ng-controller="pairedWithController")
         .col-md-4.col-lg-3
diff --git a/server/views/coursewares/showHTML.jade b/server/views/coursewares/showHTML.jade
index 0048a23..174e209 100644
--- a/server/views/coursewares/showHTML.jade
+++ b/server/views/coursewares/showHTML.jade
@@ -1,23 +1,9 @@
 extends ../layout-wide
 block content
-    script(src='/js/lib/codemirror/lib/codemirror.js')
-    script(src='/js/lib/codemirror/addon/edit/closebrackets.js')
-    script(src='/js/lib/codemirror/addon/edit/matchbrackets.js')
-    script(src='/js/lib/codemirror/addon/lint/lint.js')
-    script(src='/js/lib/codemirror/addon/lint/javascript-lint.js')
-    script(src='/bower_components/jshint/dist/jshint.js')
-    script(src='/js/lib/chai/chai.js')
-    script(src='/js/lib/chai/chai-jquery.js')
     link(rel='stylesheet', href='/js/lib/codemirror/lib/codemirror.css')
     link(rel='stylesheet', href='/js/lib/codemirror/addon/lint/lint.css')
     link(rel='stylesheet', href='/js/lib/codemirror/theme/monokai.css')
     link(rel='stylesheet', href='/css/ubuntu.css')
-    script(src='/js/lib/codemirror/mode/javascript/javascript.js')
-    script(src='/js/lib/jailed/jailed.js')
-    script(src='/js/lib/codemirror/mode/xml/xml.js')
-    script(src='/js/lib/codemirror/mode/css/css.js')
-    script(src='/js/lib/codemirror/mode/htmlmixed/htmlmixed.js')
-    script(src='/js/lib/codemirror/addon/emmet/emmet.js')
     .row.courseware-height
         .col-md-3.col-lg-3
             .scroll-locker(id = "scroll-locker")
diff --git a/server/views/coursewares/showJS.jade b/server/views/coursewares/showJS.jade
index d42628f..6779066 100644
--- a/server/views/coursewares/showJS.jade
+++ b/server/views/coursewares/showJS.jade
@@ -1,18 +1,9 @@
 extends ../layout-wide
 block content
-    script(type='text/javascript', src='/js/lib/codemirror/lib/codemirror.js')
-    script(type='text/javascript', src='/js/lib/codemirror/addon/edit/closebrackets.js')
-    script(type='text/javascript', src='/js/lib/codemirror/addon/edit/matchbrackets.js')
-    script(type='text/javascript', src='/js/lib/codemirror/addon/lint/lint.js')
-    script(type='text/javascript', src='/js/lib/codemirror/addon/lint/javascript-lint.js')
-    script(type='text/javascript', src='/bower_components/jshint/dist/jshint.js')
-    script(type='text/javascript', src='/js/lib/chai/chai.js')
     link(rel='stylesheet', href='/js/lib/codemirror/lib/codemirror.css')
     link(rel='stylesheet', href='/js/lib/codemirror/addon/lint/lint.css')
     link(rel='stylesheet', href='/js/lib/codemirror/theme/monokai.css')
     link(rel='stylesheet', href='/css/ubuntu.css')
-    script(type='text/javascript', src='/js/lib/codemirror/mode/javascript/javascript.js')
-    script(type='text/javascript', src='/js/lib/jailed/jailed.js')
     .row(ng-controller="pairedWithController")
         .col-md-4.col-lg-3
             .scroll-locker(id = "scroll-locker")
diff --git a/server/views/coursewares/showStep.jade b/server/views/coursewares/showStep.jade
index 65ae23d..66560c1 100644
--- a/server/views/coursewares/showStep.jade
+++ b/server/views/coursewares/showStep.jade
@@ -52,4 +52,4 @@ block content
       common.isFrontEndCert = !{JSON.stringify(isFrontEndCert || false)};
       common.isFullStackCert = !{JSON.stringify(isFullStackCert || false)};
       common.challengeSeed = !{JSON.stringify(challengeSeed || [])};
-    script(src=rev('/js', 'commonFramework.js'))
+    include ..partials/challenge-footer
diff --git a/server/views/coursewares/showZiplineOrBasejump.jade b/server/views/coursewares/showZiplineOrBasejump.jade
index a4ab68d..9a2f3e0 100644
--- a/server/views/coursewares/showZiplineOrBasejump.jade
+++ b/server/views/coursewares/showZiplineOrBasejump.jade
@@ -68,10 +68,8 @@ block content
                     if (user)
                         a.btn.btn-lg.btn-primary.btn-block#next-courseware-button(name='_csrf', value=_csrf, ng-disabled='completedWithForm.$invalid') Go to my next challenge
                         .button-spacer
-                        script.
                     else
                         a.btn.btn-lg.btn-primary.btn-block(href='/challenges/next-challenge?id=' + challengeId) Go to my next challenge
-        script.
     include ../partials/challenge-modals
     script.
       var common = window.common || { init: [] };
diff --git a/server/views/partials/challenge-footer.jade b/server/views/partials/challenge-footer.jade
index 3f76382..ed6be20 100644
--- a/server/views/partials/challenge-footer.jade
+++ b/server/views/partials/challenge-footer.jade
@@ -1,3 +1,5 @@
+script(type='text/javascript', src='/js/lib/jailed/jailed.js')
+script(src=rev('/js', 'vendor-challenges.js'))
 script(src=rev('/js', 'commonFramework.js'))
 script.
   if (typeof localStorage !== 'undefined') {
diff --git a/server/views/partials/scripts.jade b/server/views/partials/scripts.jade
index 60ed1f1..a002f93 100644
--- a/server/views/partials/scripts.jade
+++ b/server/views/partials/scripts.jade
@@ -6,33 +6,6 @@ script.
     ga('create', 'UA-55446531-1', 'auto');
     ga('require', 'displayfeatures');
     ga('send', 'pageview');
-script(src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js")
-script.
-    window.jQuery || document.write('<script src="/bower_components/jquery/dist/jquery.min.js"><\/script>');
-script(src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.11/angular.js")
-script.
-    if (typeof window.angular === 'undefined') {
-        document.write('<script src="/bower_components/angular/angular.min.js"><\/script>');
-    }
-script(src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.13.0/ui-bootstrap.min.js")
-script.
-    try {
-        angular.module('ui.bootstrap');
-    } catch (e) {
-        document.write('<script src="/bower_components/angular-bootstrap/ui-bootstrap.min.js"><\/script>');
-    }
-script(src="//cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js")
-script.
-    window.d3 || document.write('<script src="/bower_components/d3/d3.js"><\/script>');
-script(src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.4/js/bootstrap.min.js")
-script.
-    if (typeof($.fn.modal) === 'undefined') {
-        document.write('<script src="/bower_components/bootstrap/dist/js/bootstrap.min.js"><\/script>');
-    }
-script(src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/moment.min.js")
-script.
-    window.moment || document.write('<script src="/bower_components/moment/min/moment.min.js"><\/script>');
 // Leave the below lines alone!
+script(src=rev('/js', 'vendor-main.js'))
 script(src=rev('/js', 'main.js'))
-script(src="/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js")
-script(src='/bower_components/lightbox2/dist/js/lightbox.min.js')
